[pypy-svn] r77805 - pypy/trunk/pypy/module/gc

arigo at codespeak.net arigo at codespeak.net
Mon Oct 11 18:45:26 CEST 2010


Author: arigo
Date: Mon Oct 11 18:45:24 2010
New Revision: 77805

Modified:
   pypy/trunk/pypy/module/gc/referents.py
Log:
Ignore instances of exactly the class W_Root.  Seems that
we get one on 64-bit translations, for some reason.
See crashes of module/gc/test e.g. on {applevel64}.


Modified: pypy/trunk/pypy/module/gc/referents.py
==============================================================================
--- pypy/trunk/pypy/module/gc/referents.py	(original)
+++ pypy/trunk/pypy/module/gc/referents.py	Mon Oct 11 18:45:24 2010
@@ -15,6 +15,10 @@
 
 def try_cast_gcref_to_w_root(gcref):
     w_obj = rgc.try_cast_gcref_to_instance(W_Root, gcref)
+    # Ignore instances of exactly the class W_Root.  Seems that
+    # we get one on 64-bit translations, for some reason.
+    if w_obj is not None and type(w_obj) is W_Root:
+        w_obj = None
     if not we_are_translated() and not hasattr(w_obj, 'typedef'):
         w_obj = None
     return w_obj



More information about the Pypy-commit mailing list