[pypy-issue] Issue #1983: JIT crash on PyPy bridge. (pypy/pypy)

Edd Barrett issues-reply at bitbucket.org
Fri Feb 13 12:19:46 CET 2015

New issue 1983: JIT crash on PyPy bridge.

Edd Barrett:

Discussed with Armin on IRC, this looks like an RPython bug. We are using the 'hippy_bridge' branch of our PyPy fork (in sync with changes with PyPy-2.5.0) and the HippyVM 'pypy_bridge' branch as of today.

Our PyPy fork is here:

Sorry the test case is not very good.

$  /home/vext01/research/pyhyp_experiments/work/pyhyp/hippyvm/pyhyp /tmp/a.php
RPython traceback:
  File "rpython_jit_metainterp_pyjitpl_1.c", line 64176, in MIFrame_run_one_step
  File "rpython_jit_metainterp_pyjitpl_2.c", line 64796, in handler_getarrayitem_vable_r_1
  File "rpython_jit_metainterp_pyjitpl_3.c", line 55472, in MIFrame__opimpl_getarrayitem_vable
  File "rpython_jit_metainterp_pyjitpl_4.c", line 32219, in MIFrame__nonstandard_virtualizable
  File "rpython_jit_metainterp_pyjitpl_4.c", line 27757, in MetaInterp_replace_box
Fatal RPython error: AssertionError

function f_outer($n) {
        $inc = 2;

 $inner = embed_py_func("def inner(x): return x + inc");;

        $tot = 0;
        for ($i = 0; $i < $n; $i++) {
                $tot = $inner($tot);

        $expect = 2 * $n;
        assert($tot == $expect);


function run_iter($n) {



$ ~/pyve/testing/bin/python hippy/main.py /tmp/a.php
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-hippy_bridge-202/platcheck_0.c -
o /tmp/usession-hippy_bridge-202/platcheck_0.o
[platform:execute] gcc /tmp/usession-hippy_bridge-202/platcheck_0.o -pthread -lintl -lrt -o /tmp/usession-hippy_bridge-202/p
/home/vext01/research/pyhyp_experiments/work/pyhyp/hippyvm/hippy/sourceparser.py:2121: ParserGeneratorWarning: Token 'H_NEW_
LINE' is unused
  parser = pg.build()
/home/vext01/research/pyhyp_experiments/work/pyhyp/hippyvm/hippy/sourceparser.py:2121: ParserGeneratorWarning: Token 'H_TABU
LATURE' is unused
[platform:execute] gcc -shared /tmp/usession-hippy_bridge-202/rpython/translator/c/src/signals.o -pthread -lrt -o /tmp/usession-hippy_bridge-202/shared_cache/externmod.so
(process finishes ok)


    def replace_box(self, oldbox, newbox):                                      
        assert isinstance(oldbox, Box)                 <---?
        for frame in self.framestack:                                           
            frame.replace_active_box_in_frame(oldbox, newbox)                   
        boxes = self.virtualref_boxes                                           
        for i in range(len(boxes)):                                             
            if boxes[i] is oldbox:                                              
                boxes[i] = newbox                                               
        if (self.jitdriver_sd.virtualizable_info is not None or                 
            self.jitdriver_sd.greenfield_info is not None):                     
            boxes = self.virtualizable_boxes                                    
            for i in range(len(boxes)):                                         
                if boxes[i] is oldbox:                                          
                    boxes[i] = newbox                                           
        self.heapcache.replace_box(oldbox, newbox)

More information about the pypy-issue mailing list