jit/backend/aarch64/test/test_zrpy_releasegil.py::TestShadowStack::()::test_simple
cls = <class 'rpython.jit.backend.aarch64.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_arm64 cc=clang>, returncode = 2
stdout = 'clang -O3 -fomit-frame-pointer -Wno-duplicate-decl-specifier -mmacosx-version-min=10.13 -arch arm64 -mdynamic-no-pic ...ld/rpython"/rlib/rjitlog/src -I"/Users/matti/build-worker-arm64/rpython-macos-arm64/build/rpython"/rlib/rvmprof/src \n'
stderr = "implement.c:709: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-arm64/usession-main-4912/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:709: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 709 | 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 38 more blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 7 more blocks -=-
[rtyper] specializing: 1400 / 1401 blocks (99%)
[rtyper] -=- specialized 6 more blocks -=-
[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: 1800 / 34265 blocks (5%)
[rtyper] specializing: 3800 / 37669 blocks (10%)
[rtyper] specializing: 5800 / 38410 blocks (15%)
[rtyper] specializing: 8400 / 41708 blocks (20%)
[rtyper] specializing: 11000 / 43780 blocks (25%)
[rtyper] specializing: 13200 / 43780 blocks (30%)
[rtyper] specializing: 15400 / 43780 blocks (35%)
[rtyper] specializing: 17600 / 43780 blocks (40%)
[rtyper] specializing: 19800 / 43888 blocks (45%)
[rtyper] specializing: 24000 / 47897 blocks (50%)
[rtyper] specializing: 26700 / 48545 blocks (55%)
[rtyper] specializing: 29200 / 48621 blocks (60%)
[rtyper] specializing: 31700 / 48621 blocks (65%)
[rtyper] specializing: 34100 / 48621 blocks (70%)
[rtyper] specializing: 36600 / 48726 blocks (75%)
[rtyper] specializing: 39000 / 48726 blocks (80%)
[rtyper] specializing: 41500 / 48726 blocks (85%)
[rtyper] specializing: 43900 / 48726 blocks (90%)
[rtyper] specializing: 46300 / 48726 blocks (95%)
[rtyper] specializing: 48700 / 48728 blocks (99%)
[rtyper] -=- specialized 47301 more blocks -=-
[rtyper] -=- specialized 64 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[backendopt:removeassert] Could not remove 99 asserts, but removed 1808 asserts.
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 21625 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 3274 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] specializing: 48800 / 48817 blocks (99%)
[rtyper] -=- specialized 25 more blocks -=-
[rtyper] specializing: 48900 / 51454 blocks (95%)
[rtyper] specializing: 51500 / 51608 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 1685 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: 51700 / 51701 blocks (99%)
[rtyper] -=- specialized 21 more blocks -=-
[rtyper] -=- specialized 5 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[c] 1000 nodes [ array: 1039 framework rtti: 20 func: 164 group: 1 struct: 2450 ]
[c] 2000 nodes [ array: 3039 framework rtti: 20 func: 164 group: 1 struct: 2450 ]
[c] 3000 nodes [ array: 4284 framework rtti: 22 func: 206 group: 1 struct: 2509 ]
[c] 4000 nodes [ array: 4284 framework rtti: 22 func: 206 group: 1 struct: 2509 ]
[c] 5000 nodes [ array: 4284 framework rtti: 22 func: 206 group: 1 struct: 2509 ]
[c] 6000 nodes [ array: 4284 framework rtti: 22 func: 206 group: 1 struct: 2509 ]
[c] 7000 nodes [ array: 4311 framework rtti: 27 func: 242 group: 1 struct: 2607 ]
[c] 8000 nodes [ array: 4554 framework rtti: 40 func: 536 group: 1 struct: 3345 ]
[c] 9000 nodes [ array: 4831 framework rtti: 52 func: 710 group: 1 struct: 3808 ]
[c] 10000 nodes [ array: 4917 framework rtti: 68 func: 1142 group: 1 struct: 5681 ]
[c] 11000 nodes [ array: 4921 framework rtti: 194 func: 1399 group: 1 struct: 5818 ]
[c] 12000 nodes [ array: 4988 framework rtti: 293 func: 1593 group: 1 struct: 5985 ]
[c] 13000 nodes [ array: 5210 framework rtti: 295 func: 1644 group: 1 struct: 6071 ]
[c] 14000 nodes [ array: 5298 framework rtti: 303 func: 2142 group: 1 struct: 6319 ]
[c:database] GC transformer: finished helpers
[c] 15000 nodes [ array: 5665 framework rtti: 322 func: 2225 group: 1 struct: 6956 ]
[c] 16000 nodes [ array: 5776 framework rtti: 379 func: 2976 group: 1 struct: 7902 ]
[c] 17000 nodes [ array: 5794 framework rtti: 380 func: 3114 group: 1 struct: 7946 ]
[c] 18000 nodes [ array: 5951 framework rtti: 425 func: 3381 group: 1 struct: 8368 ]
[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 1023 typeids
[gctransform:info] added 22416 push/pop stack root instructions
[gctransform:info] inserted 1165 write barrier calls
[gctransform:info] inserted 1148 write_barrier_from_array calls
[gctransform:info] found 4 static roots
[c:database] Inlining GC helpers and postprocessing
[c] 18418 nodes [ array: 6033 framework rtti: 450 func: 3469 group: 1 struct: 8465 ]
[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_aarch64.c
[c:writing] data_rpython_jit_backend_llsupport.c
[c:writing] data_rpython_jit_backend_llsupport_test.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_aarch64_1.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_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_aarch64.c
[c:computedgoto] pypy_g_AssemblerARM64__walk_operations: 7 cases
[c:computedgoto] pypy_g_Regalloc_prepare_guard_op_guard_not_forced: 7 cases
[c:writing] rpython_jit_backend_aarch64_1.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_codewriter.c
[c:writing] rpython_jit_metainterp.c
[c:computedgoto] pypy_g_dispatch_loop: 47 cases
[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_1.c
[c:computedgoto] pypy_g_execute_nonspec_const: 253 cases
[c:writing] rpython_jit_metainterp_2.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:computedgoto] pypy_g_OptString_optimize_CALL_I: 8 cases
[c:writing] rpython_jit_metainterp_optimizeopt_1.c
[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_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-arm64/usession-main-4912/testing_1
[platform:Error] implement.c:709: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] 709 | 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-arm64 build #276+
test: jit/backend/aarch64/test/test_zrpy_releasegil.py::TestShadowStack::()::test_simple