[pypy-commit] pypy default: Fix an obscure issue where destructed SHADOWSTACKREFs could still be
arigo
noreply at buildbot.pypy.org
Wed Mar 27 20:07:18 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r62838:160bd3211313
Date: 2013-03-27 20:06 +0100
http://bitbucket.org/pypy/pypy/changeset/160bd3211313/
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)
More information about the pypy-commit
mailing list