Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

jit/backend/x86/test/test_zrpy_releasegil.py::TestShadowStack::()::test_simple

cls = <class 'rpython.jit.backend.x86.test.test_zrpy_releasegil.TestShadowStack'>

    def setup_class(cls):
        funcs = []
        name_to_func = {}
        for fullname in dir(cls):
            if not fullname.startswith('define'):
                continue
            definefunc = getattr(cls, fullname)
            _, name = fullname.split('_', 1)
            beforefunc, loopfunc, afterfunc = definefunc.im_func(cls)
            if beforefunc is None:
                def beforefunc(n, x):
                    return n, x, None, None, None, None, None, None, None, None, None, ''
            if afterfunc is None:
                def afterfunc(n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s):
                    pass
            beforefunc.__name__ = 'before_'+name
            loopfunc.__name__ = 'loop_'+name
            afterfunc.__name__ = 'after_'+name
            funcs.append((beforefunc, loopfunc, afterfunc))
            assert name not in name_to_func
            name_to_func[name] = len(name_to_func)
        print(name_to_func)
        def allfuncs(name, n):
            x = X()
            x.foo = 2
            main_allfuncs(name, n, x)
            x.foo = 5
            return weakref.ref(x)
        def main_allfuncs(name, n, x):
            num = name_to_func[name]
            n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s = funcs[num][0](n, x)
            while n > 0:
                myjitdriver.can_enter_jit(num=num, n=n, x=x, x0=x0, x1=x1,
                        x2=x2, x3=x3, x4=x4, x5=x5, x6=x6, x7=x7, l=l, s=s)
                myjitdriver.jit_merge_point(num=num, n=n, x=x, x0=x0, x1=x1,
                        x2=x2, x3=x3, x4=x4, x5=x5, x6=x6, x7=x7, l=l, s=s)
    
                n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s = funcs[num][1](
                        n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s)
            funcs[num][2](n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s)
        myjitdriver = JitDriver(greens = ['num'],
                                reds = ['n', 'x', 'x0', 'x1', 'x2', 'x3', 'x4',
                                        'x5', 'x6', 'x7', 'l', 's'], is_recursive=True)
        cls.main_allfuncs = staticmethod(main_allfuncs)
        cls.name_to_func = name_to_func
        OLD_DEBUG = GcLLDescr_framework.DEBUG
        try:
            GcLLDescr_framework.DEBUG = True
            cls.cbuilder = compile(get_entry(allfuncs), cls.gc,
                                   gcrootfinder=cls.gcrootfinder, jit=True,
>                                  thread=True)

jit/backend/llsupport/test/zrpy_gc_test.py:187: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
jit/backend/llsupport/test/zrpy_gc_test.py:105: in compile
    apply_jit(t)
jit/metainterp/warmspot.py:74: in apply_jit
    warmrunnerdesc.finish()
jit/metainterp/warmspot.py:298: in finish
    self.annhelper.finish()
rtyper/annlowlevel.py:219: in finish
    self.finish_rtype()
rtyper/annlowlevel.py:254: in finish_rtype
    perform_normalizations(rtyper.annotator)
rtyper/normalizecalls.py:408: in perform_normalizations
    normalize_call_familes(annotator)
rtyper/normalizecalls.py:19: in normalize_call_familes
    normalize_calltable(annotator, callfamily)
rtyper/normalizecalls.py:33: in normalize_calltable
    raise_call_table_too_complex_error(callfamily, annotator)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

callfamily = <rpython.annotator.description.CallFamily object at 0x00007fc3ffbbcde8>
annotator = <rpython.annotator.annrpython.RPythonAnnotator object at 0x00007fc3f9d54678>

    def raise_call_table_too_complex_error(callfamily, annotator):
        msg = []
        items = callfamily.calltables.items()
        for i, (shape1, table1) in enumerate(items):
            for shape2, table2 in items[i + 1:]:
                if shape1 == shape2:
                    continue
                row1 = table1[0]
                row2 = table2[0]
                problematic_function_graphs = set(row1.values()).union(set(row2.values()))
                pfg = [str(graph) for graph in problematic_function_graphs]
                pfg.sort()
                msg.append("the following functions:")
                msg.append("    %s" % ("\n    ".join(pfg), ))
                msg.append("are called with inconsistent numbers of arguments")
                msg.append("(and/or the argument names are different, which is"
                           " not supported in this case)")
                if shape1[0] != shape2[0]:
                    msg.append("sometimes with %s arguments, sometimes with %s" % (shape1[0], shape2[0]))
                else:
                    pass # XXX better message in this case
                callers = []
                msg.append("the callers of these functions are:")
                for tag, (caller, callee) in annotator.translator.callgraph.iteritems():
                    if callee not in problematic_function_graphs:
                        continue
                    if str(caller) in callers:
                        continue
                    callers.append(str(caller))
                callers.sort()
                for caller in callers:
                    msg.append("    %s" % (caller, ))
>       raise TyperError("\n".join(msg))
E       TyperError: the following functions:
E           (rpython.jit.metainterp.optimizeopt.info:120)NonNullPtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:336)InstancePtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:360)StructPtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:379)AbstractRawPtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:632)ArrayPtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:716)ConstPtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:83)PtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:862)FloatConstInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.intutils:1264)IntBound.make_guards
E           (rpython.jit.metainterp.optimizeopt.vstring:121)StrPtrInfo.make_guards
E       are called with inconsistent numbers of arguments
E       (and/or the argument names are different, which is not supported in this case)
E       the callers of these functions are:
E           (rpython.jit.metainterp.optimizeopt.info:336)InstancePtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.info:632)ArrayPtrInfo.make_guards
E           (rpython.jit.metainterp.optimizeopt.shortpreamble:382)AbstractShortPreambleBuilder.use_box
E           (rpython.jit.metainterp.optimizeopt.virtualstate:483)NotVirtualStateInfoInt._generate_guards_unkown
E           (rpython.jit.metainterp.optimizeopt.vstring:121)StrPtrInfo.make_guards

rtyper/normalizecalls.py:76: TyperError
---------- Captured stdout setup ----------
{'close_stack': 0, 'get_set_errno': 1, 'simple': 2}
---------- Captured stderr setup ----------
[rtyper] specializing: 100 / 1219 blocks   (8%)
[rtyper] specializing: 200 / 1336 blocks   (14%)
[rtyper] specializing: 300 / 1336 blocks   (22%)
[rtyper] specializing: 400 / 1340 blocks   (29%)
[rtyper] specializing: 500 / 1340 blocks   (37%)
[rtyper] specializing: 600 / 1340 blocks   (44%)
[rtyper] specializing: 700 / 1340 blocks   (52%)
[rtyper] specializing: 800 / 1340 blocks   (59%)
[rtyper] specializing: 900 / 1340 blocks   (67%)
[rtyper] specializing: 1000 / 1340 blocks   (74%)
[rtyper] specializing: 1100 / 1340 blocks   (82%)
[rtyper] specializing: 1200 / 1340 blocks   (89%)
[rtyper] specializing: 1300 / 1340 blocks   (97%)
[rtyper] -=- specialized 1340 blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 27 more blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 7 more blocks -=-
[rtyper] -=- specialized 6 more blocks -=-
[rtyper] specializing: 1400 / 1407 blocks   (99%)
[rtyper] -=- specialized 17 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[backendopt:removeassert] Removed 2 asserts
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 19 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 31 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] -=- specialized 3 more blocks -=-
[jitcodewriter:info] making JitCodes...
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[jitcodewriter:info] There are 12 JitCode instances.
[jitcodewriter:info] There are 38 -live- ops. Size of liveness is 49 bytes
[jitcodewriter] compute_bitstrings:
[jitcodewriter]   11 effectinfos:
[jitcodewriter]     1 descrs for arrays
[jitcodewriter]     2 descrs for fields
[jitcodewriter]     0 descrs for interiorfields
[jitcodewriter] -> 2 bitstrings, mean length 0.5, max length 1
builder: rpython-macos-x86-64 build #814*
test: jit/backend/x86/test/test_zrpy_releasegil.py::TestShadowStack::()::test_simple