Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r80044:27d3379e61b6
Date: 2015-10-08 11:59 +0200
http://bitbucket.org/pypy/pypy/changeset/27d3379e61b6/

Log:    Bug and fix for stacklets on shdowstack: in some cases we have
        garbage in s_sscopy, and the custom tracer runs at that point

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
@@ -76,9 +76,12 @@
 def alloc_stacklet():
     new_stacklet = lltype.malloc(STACKLET)
     new_stacklet.s_handle = _c.null_handle
+    new_stacklet.s_sscopy = llmemory.NULL
     return new_stacklet
 
 def attach_handle_on_stacklet(stacklet, h):
+    ll_assert(stacklet.s_handle == _c.null_handle, "attach stacklet 1: 
garbage")
+    ll_assert(stacklet.s_sscopy == llmemory.NULL,  "attach stacklet 2: 
garbage")
     if not h:
         raise MemoryError
     elif _c.is_empty_handle(h):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to