Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r62849:a51c7cc17f48
Date: 2013-03-27 20:06 +0100
http://bitbucket.org/pypy/pypy/changeset/a51c7cc17f48/

Log:    Fix an obscure issue where destructed SHADOWSTACKREFs could still be
        occasionally traced, leading to crashes.

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
@@ -397,7 +397,11 @@
         from rpython.rlib import _rffi_stacklet as _c
         h = shadowstackref.context
         h = llmemory.cast_adr_to_ptr(h, _c.handle)
-        llmemory.raw_free(shadowstackref.base)
+        base = shadowstackref.base
+        shadowstackref.base    = llmemory.NULL
+        shadowstackref.top     = llmemory.NULL
+        shadowstackref.context = llmemory.NULL
+        llmemory.raw_free(base)
         if h:
             _c.destroy(h)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to