[pypy-commit] pypy default: Meh, see comment.

arigo noreply at buildbot.pypy.org
Mon Apr 6 18:39:31 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r76728:36bfec91449e
Date: 2015-04-06 18:39 +0200
http://bitbucket.org/pypy/pypy/changeset/36bfec91449e/

Log:	Meh, see comment.

diff --git a/rpython/memory/gctransform/shadowstack.py b/rpython/memory/gctransform/shadowstack.py
--- a/rpython/memory/gctransform/shadowstack.py
+++ b/rpython/memory/gctransform/shadowstack.py
@@ -464,6 +464,13 @@
 
     def customtrace(gc, obj, callback, arg):
         obj = llmemory.cast_adr_to_ptr(obj, SHADOWSTACKREFPTR)
+        index = obj.fsindex
+        if index > 0:
+            # Haaaaaaack: fullstack_cache[] is just an integer, so it
+            # doesn't follow the SHADOWSTACKREF when it moves.  But we
+            # know this customtrace() will be called just after the
+            # move.  So we fix the fullstack_cache[] now... :-/
+            fullstack_cache[index] = lltype.cast_ptr_to_int(obj)
         addr = obj.top
         start = obj.base
         while addr != start:


More information about the pypy-commit mailing list