Home - Summaries: (main) : (py3.11) : 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:120: in compile
    cbuilder.compile()
translator/c/genc.py:341: in compile
    extra_opts)
translator/platform/posix.py:277: in execute_makefile
    self._handle_error(returncode, stdout, stderr, path.join('make'))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Darwin_x86_64 cc=clang>, returncode = 2
stdout = 'clang -O3 -fomit-frame-pointer -Wno-duplicate-decl-specifier -mmacosx-version-min=10.13 -arch x86_64 -mdynamic-no-pic.../rpython"/rlib/rjitlog/src -I"/Users/matti/build-worker-x86_64/rpython-macos-x86-64/build/rpython"/rlib/rvmprof/src \n'
stderr = "implement.c:1315:32: error: incompatible function pointer types passing 'int (*)(Signed, Signed)' (aka 'int (*)(long,... void *, const void *));\n      |                             ^\n1 error generated.\nmake: *** [implement.o] Error 1\n"
outname = local('/tmp/buildbot-x86_64/usession-main-4463/testing_1/make')

    def _handle_error(self, returncode, stdout, stderr, outname):
        if returncode != 0:
            errorfile = outname.new(ext='errors')
            errorfile.write(stderr, 'wb')
            if self.log_errors:
                stderrlines = stderr.splitlines()
                for line in stderrlines:
                    log.Error(line)
                # ^^^ don't use ERROR, because it might actually be fine.
                # Also, ERROR confuses lib-python/conftest.py.
>           raise CompilationError(stdout, stderr)
E           CompilationError: CompilationError(err="""
E           	implement.c:1315:32: error: incompatible function pointer types passing 'int (*)(Signed, Signed)' (aka 'int (*)(long, long)') to parameter of type 'int (* _Nonnull)(const void *, const void *)' [-Wincompatible-function-pointer-types]
E           	 1315 |         qsort(l_a0_2, l_a1_2, l_a2_1, l_a3_0);
E           	      |                                       ^~~~~~
E           	/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdlib.h:157:22: note: passing argument to parameter '__compar' here
E           	  157 |             int (* _Nonnull __compar)(const void *, const void *));
E           	      |                             ^
E           	1 error generated.
E           	make: *** [implement.o] Error 1
E           	""")

translator/platform/__init__.py:155: CompilationError
---------- 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
[rtyper] specializing: 2700 / 53304 blocks   (5%)
[rtyper] specializing: 5600 / 55917 blocks   (10%)
[rtyper] specializing: 8900 / 59325 blocks   (15%)
[rtyper] specializing: 12400 / 61984 blocks   (20%)
[rtyper] specializing: 15500 / 61984 blocks   (25%)
[rtyper] specializing: 18600 / 61984 blocks   (30%)
[rtyper] specializing: 21800 / 62203 blocks   (35%)
[rtyper] specializing: 26500 / 66191 blocks   (40%)
[rtyper] specializing: 29900 / 66241 blocks   (45%)
[rtyper] specializing: 33200 / 66253 blocks   (50%)
[rtyper] specializing: 36500 / 66259 blocks   (55%)
[rtyper] specializing: 39900 / 66417 blocks   (60%)
[rtyper] specializing: 43200 / 66434 blocks   (65%)
[rtyper] specializing: 46600 / 66434 blocks   (70%)
[rtyper] specializing: 49900 / 66434 blocks   (75%)
[rtyper] specializing: 52300 / 66434 blocks   (78%)
[rtyper] specializing: 55300 / 66539 blocks   (83%)
[rtyper] specializing: 58600 / 66539 blocks   (88%)
[rtyper] specializing: 61900 / 66539 blocks   (93%)
[rtyper] specializing: 65300 / 66539 blocks   (98%)
[rtyper] specializing: 66500 / 66541 blocks   (99%)
[rtyper] -=- specialized 65125 more blocks -=-
[rtyper] specializing: 66600 / 66605 blocks   (99%)
[rtyper] -=- specialized 64 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[backendopt:removeassert] Could not remove 210 asserts, but removed 1886 asserts.
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 29686 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 4614 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] -=- specialized 25 more blocks -=-
[rtyper] specializing: 66700 / 69267 blocks   (96%)
[rtyper] specializing: 69300 / 69421 blocks   (99%)
[rtyper] -=- specialized 2791 more blocks -=-
[rtyper] -=- specialized 43 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 1670 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 26 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] -=- specialized 17 more blocks -=-
[rtyper] -=- specialized 12 more blocks -=-
[rtyper] specializing: 69500 / 69514 blocks   (99%)
[rtyper] -=- specialized 21 more blocks -=-
[rtyper] -=- specialized 5 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[c]     1000 nodes  [ array: 1049  framework rtti: 19  func: 168  group: 1  struct: 2455 ]
[c]     2000 nodes  [ array: 3049  framework rtti: 19  func: 168  group: 1  struct: 2455 ]
[c]     3000 nodes  [ array: 4295  framework rtti: 21  func: 217  group: 1  struct: 2519 ]
[c]     4000 nodes  [ array: 4295  framework rtti: 21  func: 217  group: 1  struct: 2519 ]
[c]     5000 nodes  [ array: 4295  framework rtti: 21  func: 217  group: 1  struct: 2519 ]
[c]     6000 nodes  [ array: 4295  framework rtti: 21  func: 217  group: 1  struct: 2519 ]
[c]     7000 nodes  [ array: 4318  framework rtti: 26  func: 245  group: 1  struct: 2624 ]
[c]     8000 nodes  [ array: 4576  framework rtti: 39  func: 600  group: 1  struct: 3305 ]
[c]     9000 nodes  [ array: 4856  framework rtti: 51  func: 805  group: 1  struct: 3815 ]
[c]    10000 nodes  [ array: 4934  framework rtti: 64  func: 1150  group: 1  struct: 4074 ]
[c]    11000 nodes  [ array: 4982  framework rtti: 160  func: 1449  group: 1  struct: 5902 ]
[c]    12000 nodes  [ array: 4998  framework rtti: 293  func: 1641  group: 1  struct: 6073 ]
[c]    13000 nodes  [ array: 5279  framework rtti: 294  func: 1706  group: 1  struct: 6174 ]
[c]    14000 nodes  [ array: 5378  framework rtti: 301  func: 2187  group: 1  struct: 6426 ]
[c]    15000 nodes  [ array: 5448  framework rtti: 304  func: 2751  group: 1  struct: 6942 ]
[c:database] GC transformer: finished helpers
[c]    16000 nodes  [ array: 5748  framework rtti: 309  func: 2796  group: 1  struct: 7616 ]
[c]    17000 nodes  [ array: 5909  framework rtti: 370  func: 3139  group: 1  struct: 7837 ]
[c]    18000 nodes  [ array: 5966  framework rtti: 388  func: 3654  group: 1  struct: 8662 ]
[c]    19000 nodes  [ array: 6027  framework rtti: 398  func: 3878  group: 1  struct: 8772 ]
[rtyper] -=- specialized 70 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 7 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 16 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[c:database] GC transformer: finished tables
[gctransform:info] assigned 1036 typeids
[gctransform:info] added 27415 push/pop stack root instructions
[gctransform:info] inserted 1204 write barrier calls
[gctransform:info] inserted 1280 write_barrier_from_array calls
[gctransform:info] found 4 static roots
[c]    20000 nodes  [ array: 6220  framework rtti: 458  func: 4106  group: 1  struct: 9217 ]
[c:database] Inlining GC helpers and postprocessing
[c]    20002 nodes  [ array: 6220  framework rtti: 458  func: 4106  group: 1  struct: 9217 ]
[c:database] Completed
[c:writing] structdef.h
[c:writing] forwarddecl.h
[c:writing] preimpl.h
[c:writing] data_rpython_flowspace.c
[c:writing] data_rpython_jit_backend.c
[c:writing] data_rpython_jit_backend_llsupport.c
[c:writing] data_rpython_jit_backend_llsupport_test.c
[c:writing] data_rpython_jit_backend_x86.c
[c:writing] data_rpython_jit_codewriter.c
[c:writing] data_rpython_jit_metainterp.c
[c:writing] data_rpython_jit_metainterp_optimizeopt.c
[c:writing] data_rpython_memory_gc.c
[c:writing] data_rpython_memory_gctransform.c
[c:writing] data_rpython_rlib.c
[c:writing] data_rpython_rlib_rjitlog.c
[c:writing] data_rpython_rtyper.c
[c:writing] data_rpython_rtyper_lltypesystem.c
[c:writing] nonfuncnodes.c
[c:writing] data_rpython_jit_backend_llsupport_1.c
[c:writing] data_rpython_jit_backend_llsupport_test_1.c
[c:writing] data_rpython_jit_backend_x86_1.c
[c:writing] data_rpython_jit_metainterp_1.c
[c:writing] data_rpython_memory_gc_1.c
[c:writing] data_rpython_rlib_1.c
[c:writing] data_rpython_rlib_rjitlog_1.c
[c:writing] data_rpython_rlib_rvmprof.c
[c:writing] data_rpython_rtyper_lltypesystem_1.c
[c:writing] implement.c
[c:writing] rpython_flowspace.c
[c:writing] rpython_jit_backend.c
[c:writing] rpython_jit_backend_llsupport.c
[c:computedgoto] pypy_g_GcRewriterAssembler_handle_malloc_operation: 6 cases
[c:writing] rpython_jit_backend_llsupport_test.c
[c:writing] rpython_jit_backend_x86.c
[c:writing] rpython_jit_backend_x86_1.c
[c:writing] rpython_jit_backend_x86_2.c
[c:writing] rpython_jit_backend_x86_3.c
[c:writing] rpython_jit_codewriter.c
[c:writing] rpython_jit_metainterp.c
[c:computedgoto] pypy_g_dispatch_loop: 47 cases
[c:writing] rpython_jit_metainterp_1.c
[c:computedgoto] pypy_g_HeapCache_clear_caches_not_necessary: 15 cases
[c:computedgoto] pypy_g_HeapCache_clear_caches_varargs: 11 cases
[c:writing] rpython_jit_metainterp_2.c
[c:computedgoto] pypy_g_execute_nonspec_const: 253 cases
[c:writing] rpython_jit_metainterp_3.c
[c:writing] rpython_jit_metainterp_optimizeopt.c
[c:computedgoto] pypy_g_OptHeap_check_postprocess_: 6 cases
[c:computedgoto] pypy_g_dispatch_postprocess___star_0: 6 cases
[c:writing] rpython_jit_metainterp_optimizeopt_1.c
[c:computedgoto] pypy_g_OptString_optimize_CALL_I: 8 cases
[c:writing] rpython_jit_metainterp_optimizeopt_2.c
[c:computedgoto] pypy_g_Optimizer_protect_speculative_operation: 8 cases
[c:writing] rpython_jit_metainterp_optimizeopt_3.c
[c:writing] rpython_jit_metainterp_optimizeopt_4.c
[c:writing] rpython_memory.c
[c:writing] rpython_memory_gc.c
[c:writing] rpython_memory_gctransform.c
[c:writing] rpython_rlib.c
[c:writing] rpython_rlib_rjitlog.c
[c:writing] rpython_rlib_rvmprof.c
[c:writing] rpython_rtyper.c
[c:writing] rpython_rtyper_lltypesystem.c
[c:writing] rpython_rtyper_lltypesystem_1.c
[c:writing] rpython_translator.c
[c:writing] rpython_translator_c.c
[platform:execute] make  in /tmp/buildbot-x86_64/usession-main-4463/testing_1
[platform:Error] implement.c:1315:32: error: incompatible function pointer types passing 'int (*)(Signed, Signed)' (aka 'int (*)(long, long)') to parameter of type 'int (* _Nonnull)(const void *, const void *)' [-Wincompatible-function-pointer-types]
[platform:Error]  1315 |         qsort(l_a0_2, l_a1_2, l_a2_1, l_a3_0);
[platform:Error]       |                                       ^~~~~~
[platform:Error] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdlib.h:157:22: note: passing argument to parameter '__compar' here
[platform:Error]   157 |             int (* _Nonnull __compar)(const void *, const void *));
[platform:Error]       |                             ^
[platform:Error] 1 error generated.
[platform:Error] make: *** [implement.o] Error 1
builder: rpython-macos-x86-64 build #304+
test: jit/backend/x86/test/test_zrpy_releasegil.py::TestShadowStack::()::test_simple