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

jit/backend/x86/test/test_ztranslation_call_assembler.py::TestTranslationCallAssemblerX86::()::test_direct_assembler_call_translates

self = <rpython.jit.backend.x86.test.test_ztranslation_call_assembler.TestTranslationCallAssemblerX86 object at 0x00007fe430ec5590>

    def test_direct_assembler_call_translates(self):
        """Test CALL_ASSEMBLER and the recursion limit"""
        # - also tests threadlocalref_get
        from rpython.rlib.rstackovf import StackOverflow
    
        class Thing(object):
            def __init__(self, val):
                self.val = val
    
        class Frame(object):
            _virtualizable_ = ['thing']
    
        driver = JitDriver(greens = ['codeno'], reds = ['i', 'frame'],
                           virtualizables = ['frame'],
                           get_printable_location = lambda codeno: str(codeno))
        class SomewhereElse(object):
            pass
    
        somewhere_else = SomewhereElse()
    
        class Foo(object):
            pass
        t = ThreadLocalReference(Foo, loop_invariant=True)
        tf = ThreadLocalField(lltype.Char, "test_call_assembler_")
    
        def change(newthing):
            somewhere_else.frame.thing = newthing
    
        def main(codeno):
            frame = Frame()
            somewhere_else.frame = frame
            frame.thing = Thing(0)
            portal(codeno, frame)
            return frame.thing.val
    
        def portal(codeno, frame):
            i = 0
            while i < 10:
                driver.can_enter_jit(frame=frame, codeno=codeno, i=i)
                driver.jit_merge_point(frame=frame, codeno=codeno, i=i)
                nextval = frame.thing.val
                if codeno == 0:
                    subframe = Frame()
                    subframe.thing = Thing(nextval)
                    nextval = portal(1, subframe)
                elif frame.thing.val > 40:
                    change(Thing(13))
                    nextval = 13
                frame.thing = Thing(nextval + 1)
                i += 1
                if t.get().nine != 9: raise ValueError
                if ord(tf.getraw()) != 0x92: raise ValueError
            return frame.thing.val
    
        driver2 = JitDriver(greens = [], reds = ['n'])
    
        def main2(bound):
            try:
                while portal2(bound) == -bound+1:
                    bound *= 2
            except StackOverflow:
                pass
            return bound
    
        def portal2(n):
            while True:
                driver2.jit_merge_point(n=n)
                n -= 1
                if n <= 0:
                    return n
                n = portal2(n)
        assert portal2(10) == -9
    
        def setup(value):
            foo = Foo()
            foo.nine = value
            t.set(foo)
            tf.setraw("\x92")
            return foo
    
        def mainall(codeno, bound):
            foo = setup(bound + 8)
            result = main(codeno) + main2(bound)
            keepalive_until_here(foo)
            return result
    
        tmp_obj = setup(9)
        expected_1 = main(0)
        res = self.meta_interp(mainall, [0, 1], inline=True,
>                              policy=StopAtXPolicy(change))

jit/backend/llsupport/test/ztranslation_test.py:223: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
jit/backend/test/support.py:75: in meta_interp
    return self._compile_and_run(t, entry_point, entry_point_graph, args)
jit/backend/test/support.py:132: in _compile_and_run
    exe_name = 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 = "testing_1.c:56:2: warning: 'GC_all_interior_pointers' is deprecated [-Wdeprecated-declarations]\n   56 |         GC_a...memcpy;\n       |                  ^ ~~~~~~\n1 error generated.\nmake: *** [rpython_jit_backend_llsupport.o] Error 1\n"
outname = local('/tmp/buildbot-x86_64/usession-main-4467/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           	testing_1.c:56:2: warning: 'GC_all_interior_pointers' is deprecated [-Wdeprecated-declarations]
E           	   56 |         GC_all_interior_pointers = 0;
E           	      |         ^
E           	/opt/homebrew_x86_64/Cellar/bdw-gc/8.2.12/include/gc/gc.h:193:8: note: 'GC_all_interior_pointers' has been explicitly marked deprecated here
E           	  193 | GC_API GC_ATTR_DEPRECATED int GC_all_interior_pointers;
E           	      |        ^
E           	/opt/homebrew_x86_64/Cellar/bdw-gc/8.2.12/include/gc/gc_config_macros.h:309:46: note: expanded from macro 'GC_ATTR_DEPRECATED'
E           	  309 | #   define GC_ATTR_DEPRECATED __attribute__((__deprecated__))
E           	      |                                              ^
E           	1 warning generated.
E           	rpython_jit_backend_llsupport.c:18199:11: error: incompatible function pointer types assigning to 'void (*)(void *, void *, size_t)' (aka 'void (*)(void *, void *, unsigned long)') from 'void *(void *, const void *, unsigned long)' [-Wincompatible-function-pointer-types]
E           	 18199 |         l_v15974 = memcpy;
E           	       |                  ^ ~~~~~~
E           	1 error generated.
E           	make: *** [rpython_jit_backend_llsupport.o] Error 1
E           	""")

translator/platform/__init__.py:155: CompilationError
---------- Captured stdout call ----------
in get_rpath_flags, rel_libdirs is not fixed up [u'/opt/homebrew_x86_64/Cellar/bdw-gc/8.2.12/lib']
---------- Captured stderr call ----------
[rtyper] -=- specialized 78 blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] specializing: 100 / 369 blocks   (27%)
[rtyper] specializing: 200 / 435 blocks   (45%)
[rtyper] specializing: 300 / 488 blocks   (61%)
[rtyper] specializing: 400 / 488 blocks   (81%)
[rtyper] -=- specialized 406 more blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] specializing: 500 / 501 blocks   (99%)
[rtyper] -=- specialized 7 more blocks -=-
[rtyper] -=- specialized 6 more blocks -=-
[rtyper] -=- specialized 17 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 11 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 0 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] -=- specialized 6 more blocks -=-
[jitcodewriter:info] making JitCodes...
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[jitcodewriter:info] There are 4 JitCode instances.
[jitcodewriter:info] There are 19 -live- ops. Size of liveness is 29 bytes
[rtyper] replaced 8 'jit_force_virtualizable' with <* delayed!force_virtualizable_if_necessary>
[jitcodewriter] compute_bitstrings:
[jitcodewriter]   5 effectinfos:
[jitcodewriter]     0 descrs for arrays
[jitcodewriter]     2 descrs for fields
[jitcodewriter]     0 descrs for interiorfields
[jitcodewriter] -> 3 bitstrings, mean length 0.7, max length 1
[rtyper] specializing: 2600 / 51602 blocks   (5%)
[rtyper] specializing: 5500 / 54709 blocks   (10%)
[rtyper] specializing: 8900 / 59130 blocks   (15%)
[rtyper] specializing: 12300 / 61294 blocks   (20%)
[rtyper] specializing: 15400 / 61294 blocks   (25%)
[rtyper] specializing: 18400 / 61299 blocks   (30%)
[rtyper] specializing: 23000 / 65485 blocks   (35%)
[rtyper] specializing: 26300 / 65535 blocks   (40%)
[rtyper] specializing: 29500 / 65547 blocks   (45%)
[rtyper] specializing: 32800 / 65558 blocks   (50%)
[rtyper] specializing: 36200 / 65681 blocks   (55%)
[rtyper] specializing: 39500 / 65827 blocks   (60%)
[rtyper] specializing: 42800 / 65827 blocks   (65%)
[rtyper] specializing: 46100 / 65827 blocks   (70%)
[rtyper] specializing: 49400 / 65827 blocks   (75%)
[rtyper] specializing: 50000 / 65827 blocks   (75%)
[rtyper] specializing: 52700 / 65827 blocks   (80%)
[rtyper] specializing: 56000 / 65827 blocks   (85%)
[rtyper] specializing: 59300 / 65827 blocks   (90%)
[rtyper] specializing: 62700 / 65932 blocks   (95%)
[rtyper] specializing: 65900 / 65934 blocks   (99%)
[rtyper] -=- specialized 65398 more blocks -=-
[rtyper] -=- specialized 24 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[rtyper] -=- specialized 25 more blocks -=-
[rtyper] specializing: 66000 / 66047 blocks   (99%)
[rtyper] -=- specialized 64 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 8 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 0 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] -=- specialized 14 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[c]     1000 nodes  [ array: 530  boehm rtti: 37  func: 375  struct: 2511 ]
[c]     2000 nodes  [ array: 2530  boehm rtti: 37  func: 375  struct: 2511 ]
[c]     3000 nodes  [ array: 4295  boehm rtti: 38  func: 436  struct: 2573 ]
[c]     4000 nodes  [ array: 4300  boehm rtti: 39  func: 475  struct: 2587 ]
[c]     5000 nodes  [ array: 4300  boehm rtti: 39  func: 475  struct: 2587 ]
[c]     6000 nodes  [ array: 4300  boehm rtti: 39  func: 475  struct: 2587 ]
[c]     7000 nodes  [ array: 4300  boehm rtti: 39  func: 475  struct: 2587 ]
[c]     8000 nodes  [ array: 4400  boehm rtti: 66  func: 970  struct: 4876 ]
[c]     9000 nodes  [ array: 4487  boehm rtti: 161  func: 1387  struct: 5083 ]
[c]    10000 nodes  [ array: 4494  boehm rtti: 301  func: 1567  struct: 5232 ]
[c]    11000 nodes  [ array: 4613  boehm rtti: 310  func: 2092  struct: 5761 ]
[c]    12000 nodes  [ array: 5029  boehm rtti: 313  func: 2208  struct: 5821 ]
[c]    13000 nodes  [ array: 5100  boehm rtti: 326  func: 2563  struct: 6024 ]
[c]    14000 nodes  [ array: 5190  boehm rtti: 332  func: 2868  struct: 6259 ]
[c]    15000 nodes  [ array: 5302  boehm rtti: 340  func: 3434  struct: 6489 ]
[c]    16000 nodes  [ array: 5357  boehm rtti: 353  func: 4353  struct: 6723 ]
[c]    17000 nodes  [ array: 5417  boehm rtti: 367  func: 7373  struct: 7368 ]
[c]    18000 nodes  [ array: 5474  boehm rtti: 373  func: 8017  struct: 7520 ]
[c]    19000 nodes  [ array: 5501  boehm rtti: 373  func: 8174  struct: 7602 ]
[c]    20000 nodes  [ array: 5520  boehm rtti: 373  func: 8339  struct: 7685 ]
[c]    21000 nodes  [ array: 5615  boehm rtti: 373  func: 8767  struct: 7832 ]
[c]    22000 nodes  [ array: 5811  boehm rtti: 379  func: 9208  struct: 7968 ]
[c]    23000 nodes  [ array: 5861  boehm rtti: 394  func: 9651  struct: 8150 ]
[c]    24000 nodes  [ array: 5951  boehm rtti: 410  func: 10174  struct: 8996 ]
[c]    25000 nodes  [ array: 5969  boehm rtti: 413  func: 11995  struct: 9024 ]
[c]    26000 nodes  [ array: 6000  boehm rtti: 418  func: 12779  struct: 9104 ]
[c]    27000 nodes  [ array: 6000  boehm rtti: 418  func: 12828  struct: 9105 ]
[c]    28000 nodes  [ array: 6000  boehm rtti: 418  func: 12864  struct: 9105 ]
[c]    29000 nodes  [ array: 6076  boehm rtti: 448  func: 13321  struct: 9330 ]
[rtyper] -=- specialized 29 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 1 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 helpers
[c:database] GC transformer: finished tables
[c:database] Inlining GC helpers and postprocessing
[c]    29828 nodes  [ array: 6095  boehm rtti: 456  func: 13878  struct: 9399 ]
[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_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] data_rpython_translator_c.c
[c:writing] nonfuncnodes.c
[c:writing] data_rpython_jit_backend_llsupport_1.c
[c:writing] data_rpython_jit_backend_x86_1.c
[c:writing] data_rpython_jit_codewriter_1.c
[c:writing] data_rpython_jit_metainterp_1.c
[c:writing] data_rpython_rlib_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:writing] rpython_jit_backend_llsupport_test.c
[c:writing] rpython_jit_backend_x86.c
[c:writing] rpython_jit_codewriter.c
[c:writing] rpython_jit_metainterp.c
[c:writing] rpython_jit_metainterp_optimizeopt.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_module.c
[c:writing] rpython_tool_algo.c
[c:writing] rpython_translator.c
[c:writing] rpython_translator_c.c
[platform:execute] make  in /tmp/buildbot-x86_64/usession-main-4467/testing_1
[platform:Error] testing_1.c:56:2: warning: 'GC_all_interior_pointers' is deprecated [-Wdeprecated-declarations]
[platform:Error]    56 |         GC_all_interior_pointers = 0;
[platform:Error]       |         ^
[platform:Error] /opt/homebrew_x86_64/Cellar/bdw-gc/8.2.12/include/gc/gc.h:193:8: note: 'GC_all_interior_pointers' has been explicitly marked deprecated here
[platform:Error]   193 | GC_API GC_ATTR_DEPRECATED int GC_all_interior_pointers;
[platform:Error]       |        ^
[platform:Error] /opt/homebrew_x86_64/Cellar/bdw-gc/8.2.12/include/gc/gc_config_macros.h:309:46: note: expanded from macro 'GC_ATTR_DEPRECATED'
[platform:Error]   309 | #   define GC_ATTR_DEPRECATED __attribute__((__deprecated__))
[platform:Error]       |                                              ^
[platform:Error] 1 warning generated.
[platform:Error] rpython_jit_backend_llsupport.c:18199:11: error: incompatible function pointer types assigning to 'void (*)(void *, void *, size_t)' (aka 'void (*)(void *, void *, unsigned long)') from 'void *(void *, const void *, unsigned long)' [-Wincompatible-function-pointer-types]
[platform:Error]  18199 |         l_v15974 = memcpy;
[platform:Error]        |                  ^ ~~~~~~
[platform:Error] 1 error generated.
[platform:Error] make: *** [rpython_jit_backend_llsupport.o] Error 1
 (somefailed=True in jit/backend/x86/test/test_ztranslation_call_assembler.py)
builder: rpython-macos-x86-64 build #304+
test: jit/backend/x86/test/test_ztranslation_call_assembler.py::TestTranslationCallAssemblerX86::()::test_direct_assembler_call_translates