[pypy-commit] pypy default: Aaaaaa finally found and fix an issue with stacklets on shadowstack
arigo
pypy.commits at gmail.com
Fri Feb 12 12:45:27 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r82188:1929d5b7982f
Date: 2016-02-12 18:44 +0100
http://bitbucket.org/pypy/pypy/changeset/1929d5b7982f/
Log: Aaaaaa finally found and fix an issue with stacklets on shadowstack
diff --git a/rpython/rlib/_stacklet_shadowstack.py b/rpython/rlib/_stacklet_shadowstack.py
--- a/rpython/rlib/_stacklet_shadowstack.py
+++ b/rpython/rlib/_stacklet_shadowstack.py
@@ -30,6 +30,11 @@
mixlevelannotator.finish()
lltype.attachRuntimeTypeInfo(STACKLET, destrptr=destrptr)
+# Note: it's important that this is a light finalizer, otherwise
+# the GC will call it but still expect the object to stay around for
+# a while---and it can't stay around, because s_sscopy points to
+# freed nonsense and customtrace() will crash
+ at rgc.must_be_light_finalizer
def stacklet_destructor(stacklet):
sscopy = stacklet.s_sscopy
if sscopy:
diff --git a/rpython/translator/backendopt/finalizer.py b/rpython/translator/backendopt/finalizer.py
--- a/rpython/translator/backendopt/finalizer.py
+++ b/rpython/translator/backendopt/finalizer.py
@@ -18,7 +18,7 @@
"""
ok_operations = ['ptr_nonzero', 'ptr_eq', 'ptr_ne', 'free', 'same_as',
'direct_ptradd', 'force_cast', 'track_alloc_stop',
- 'raw_free']
+ 'raw_free', 'adr_eq', 'adr_ne']
def analyze_light_finalizer(self, graph):
result = self.analyze_direct_call(graph)
More information about the pypy-commit
mailing list