[pypy-svn] r51627 - pypy/branch/no-forw-ptr/pypy/rpython/memory/gc
arigo at codespeak.net
arigo at codespeak.net
Tue Feb 19 13:19:30 CET 2008
Author: arigo
Date: Tue Feb 19 13:19:29 2008
New Revision: 51627
Modified:
pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py
Log:
Fix the assert. Apparently only GenerationGC tests trigger this bug.
Modified: pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py
==============================================================================
--- pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py (original)
+++ pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py Tue Feb 19 13:19:29 2008
@@ -363,9 +363,10 @@
def get_type_id(self, addr):
tid = self.header(addr).tid
- ll_assert(tid & GCFLAG_FORWARDED == 0, "get_type_id on forwarded obj")
- # Forwarded objects are overwritten with a FORWARDSTUB. Although
- # calling get_type_id() on a forwarded object works by itself,
+ ll_assert(tid & (GCFLAG_FORWARDED|GCFLAG_IMMORTAL) != GCFLAG_FORWARDED,
+ "get_type_id on forwarded obj")
+ # Non-prebuilt forwarded objects are overwritten with a FORWARDSTUB.
+ # Although calling get_type_id() on a forwarded object works by itself,
# we catch it as an error because it's likely that what is then
# done with the typeid is bogus.
return tid & TYPEID_MASK
More information about the Pypy-commit
mailing list