[pypy-commit] pypy default: Make sure this sanity check is not optimized in non-lldebug modes
arigo
noreply at buildbot.pypy.org
Mon Mar 23 14:21:43 CET 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r76513:ebff7c96679e
Date: 2015-03-23 14:21 +0100
http://bitbucket.org/pypy/pypy/changeset/ebff7c96679e/
Log: Make sure this sanity check is not optimized in non-lldebug modes
diff --git a/rpython/memory/gctransform/asmgcroot.py b/rpython/memory/gctransform/asmgcroot.py
--- a/rpython/memory/gctransform/asmgcroot.py
+++ b/rpython/memory/gctransform/asmgcroot.py
@@ -519,17 +519,15 @@
from rpython.jit.backend.llsupport.jitframe import STACK_DEPTH_OFS
tid = self.gc.get_possibly_forwarded_type_id(ebp_in_caller)
- ll_assert(rffi.cast(lltype.Signed, tid) ==
- rffi.cast(lltype.Signed, self.frame_tid),
- "found a stack frame that does not belong "
- "anywhere I know, bug in asmgcc")
- # fish the depth
- extra_stack_depth = (ebp_in_caller + STACK_DEPTH_OFS).signed[0]
- ll_assert((extra_stack_depth & (rffi.sizeof(lltype.Signed) - 1))
- == 0, "asmgcc: misaligned extra_stack_depth")
- extra_stack_depth //= rffi.sizeof(lltype.Signed)
- self._shape_decompressor.setjitframe(extra_stack_depth)
- return
+ if (rffi.cast(lltype.Signed, tid) ==
+ rffi.cast(lltype.Signed, self.frame_tid)):
+ # fish the depth
+ extra_stack_depth = (ebp_in_caller + STACK_DEPTH_OFS).signed[0]
+ ll_assert((extra_stack_depth & (rffi.sizeof(lltype.Signed) - 1))
+ == 0, "asmgcc: misaligned extra_stack_depth")
+ extra_stack_depth //= rffi.sizeof(lltype.Signed)
+ self._shape_decompressor.setjitframe(extra_stack_depth)
+ return
llop.debug_fatalerror(lltype.Void, "cannot find gc roots!")
def getlocation(self, callee, ebp_in_caller, location):
More information about the pypy-commit
mailing list