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 0x00007fd40149b6a8>

    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-5226/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:15086: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           	 15086 |         l_v15979 = 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 / 51474 blocks   (5%)
[rtyper] specializing: 5500 / 54577 blocks   (10%)
[rtyper] specializing: 8900 / 58998 blocks   (15%)
[rtyper] specializing: 12300 / 61162 blocks   (20%)
[rtyper] specializing: 15300 / 61162 blocks   (25%)
[rtyper] specializing: 18400 / 61167 blocks   (30%)
[rtyper] specializing: 22900 / 65353 blocks   (35%)
[rtyper] specializing: 26200 / 65403 blocks   (40%)
[rtyper] specializing: 29500 / 65415 blocks   (45%)
[rtyper] specializing: 32800 / 65426 blocks   (50%)
[rtyper] specializing: 36100 / 65543 blocks   (55%)
[rtyper] specializing: 39500 / 65689 blocks   (60%)
[rtyper] specializing: 42700 / 65689 blocks   (65%)
[rtyper] specializing: 46000 / 65689 blocks   (70%)
[rtyper] specializing: 49300 / 65689 blocks   (75%)
[rtyper] specializing: 49900 / 65689 blocks   (75%)
[rtyper] specializing: 52600 / 65689 blocks   (80%)
[rtyper] specializing: 55900 / 65689 blocks   (85%)
[rtyper] specializing: 59200 / 65689 blocks   (90%)
[rtyper] specializing: 62600 / 65794 blocks   (95%)
[rtyper] specializing: 65700 / 65796 blocks   (99%)
[rtyper] -=- specialized 65260 more blocks -=-
[rtyper] specializing: 65800 / 65820 blocks   (99%)
[rtyper] -=- specialized 24 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[rtyper] -=- specialized 25 more blocks -=-
[rtyper] specializing: 65900 / 65909 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: 550  boehm rtti: 37  func: 371  struct: 2499 ]
[c]     2000 nodes  [ array: 2550  boehm rtti: 37  func: 371  struct: 2499 ]
[c]     3000 nodes  [ array: 4283  boehm rtti: 38  func: 432  struct: 2561 ]
[c]     4000 nodes  [ array: 4288  boehm rtti: 39  func: 471  struct: 2575 ]
[c]     5000 nodes  [ array: 4288  boehm rtti: 39  func: 471  struct: 2575 ]
[c]     6000 nodes  [ array: 4288  boehm rtti: 39  func: 471  struct: 2575 ]
[c]     7000 nodes  [ array: 4288  boehm rtti: 39  func: 471  struct: 2575 ]
[c]     8000 nodes  [ array: 4390  boehm rtti: 66  func: 966  struct: 4873 ]
[c]     9000 nodes  [ array: 4475  boehm rtti: 165  func: 1382  struct: 5075 ]
[c]    10000 nodes  [ array: 4482  boehm rtti: 301  func: 1558  struct: 5251 ]
[c]    11000 nodes  [ array: 4610  boehm rtti: 310  func: 2080  struct: 5749 ]
[c]    12000 nodes  [ array: 5023  boehm rtti: 313  func: 2198  struct: 5812 ]
[c]    13000 nodes  [ array: 5089  boehm rtti: 326  func: 2565  struct: 6019 ]
[c]    14000 nodes  [ array: 5189  boehm rtti: 332  func: 2862  struct: 6257 ]
[c]    15000 nodes  [ array: 5290  boehm rtti: 340  func: 3438  struct: 6479 ]
[c]    16000 nodes  [ array: 5345  boehm rtti: 353  func: 4385  struct: 6711 ]
[c]    17000 nodes  [ array: 5406  boehm rtti: 367  func: 7380  struct: 7359 ]
[c]    18000 nodes  [ array: 5464  boehm rtti: 373  func: 8019  struct: 7513 ]
[c]    19000 nodes  [ array: 5490  boehm rtti: 373  func: 8175  struct: 7593 ]
[c]    20000 nodes  [ array: 5509  boehm rtti: 373  func: 8338  struct: 7675 ]
[c]    21000 nodes  [ array: 5603  boehm rtti: 374  func: 8804  struct: 7825 ]
[c]    22000 nodes  [ array: 5811  boehm rtti: 379  func: 9202  struct: 7956 ]
[c]    23000 nodes  [ array: 5849  boehm rtti: 394  func: 9668  struct: 8138 ]
[c]    24000 nodes  [ array: 5939  boehm rtti: 410  func: 10192  struct: 8984 ]
[c]    25000 nodes  [ array: 5957  boehm rtti: 413  func: 12041  struct: 9012 ]
[c]    26000 nodes  [ array: 5988  boehm rtti: 418  func: 12771  struct: 9092 ]
[c]    27000 nodes  [ array: 5988  boehm rtti: 418  func: 12823  struct: 9093 ]
[c]    28000 nodes  [ array: 5988  boehm rtti: 418  func: 12856  struct: 9093 ]
[c]    29000 nodes  [ array: 6064  boehm rtti: 448  func: 13351  struct: 9318 ]
[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]    29796 nodes  [ array: 6083  boehm rtti: 456  func: 13870  struct: 9387 ]
[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-5226/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:15086: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]  15086 |         l_v15979 = 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 #272
test: jit/backend/x86/test/test_ztranslation_call_assembler/py/TestTranslationCallAssemblerX86/()/test_direct_assembler_call_translates