[pypy-commit] pypy default: Fix (probably; tests coming).

arigo noreply at buildbot.pypy.org
Tue Nov 29 19:16:20 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r49975:ca55b862ead9
Date: 2011-11-29 19:15 +0100
http://bitbucket.org/pypy/pypy/changeset/ca55b862ead9/

Log:	Fix (probably; tests coming).

diff --git a/pypy/rpython/memory/gctransform/shadowstack.py b/pypy/rpython/memory/gctransform/shadowstack.py
--- a/pypy/rpython/memory/gctransform/shadowstack.py
+++ b/pypy/rpython/memory/gctransform/shadowstack.py
@@ -307,7 +307,7 @@
                   "restore_state_from: broken shadowstack")
         self.gcdata.root_stack_base = shadowstackref.base
         self.gcdata.root_stack_top  = shadowstackref.top
-        self.destroy(shadowstackref)
+        self._cleanup(shadowstackref)
 
     def start_fresh_new_state(self):
         self.gcdata.root_stack_base = self.unused_full_stack
@@ -315,6 +315,10 @@
         self.unused_full_stack = llmemory.NULL
 
     def destroy(self, shadowstackref):
+        llmemory.raw_free(shadowstackref.base)
+        self._cleanup(shadowstackref)
+
+    def _cleanup(self, shadowstackref):
         shadowstackref.base = llmemory.NULL
         shadowstackref.top = llmemory.NULL
         shadowstackref.context = llmemory.NULL


More information about the pypy-commit mailing list