[pypy-commit] pypy tealet: Fix: need to make the shadowstack empty here.
arigo
noreply at buildbot.pypy.org
Wed Jul 6 20:28:52 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: tealet
Changeset: r45388:039300a3c9b2
Date: 2011-06-13 12:34 +0200
http://bitbucket.org/pypy/pypy/changeset/039300a3c9b2/
Log: Fix: need to make the shadowstack empty here.
diff --git a/pypy/rpython/memory/gctransform/framework.py b/pypy/rpython/memory/gctransform/framework.py
--- a/pypy/rpython/memory/gctransform/framework.py
+++ b/pypy/rpython/memory/gctransform/framework.py
@@ -1419,16 +1419,17 @@
def ll_save_stack_roots(walker):
if jit_save_stack_roots is not None:
jit_save_stack_roots(walker, gcdata)
- return
- addr = gcdata.root_stack_base
- end = gcdata.root_stack_top
- count = (end - addr) // sizeofaddr
- walker.gcptr_array = array = lltype.malloc(GCPTR_ARRAY.TO, count)
- n = 0
- while n < len(array):
- array[n] = llmemory.cast_adr_to_ptr(addr.address[n],
- llmemory.GCREF)
- n += 1
+ else:
+ addr = gcdata.root_stack_base
+ end = gcdata.root_stack_top
+ count = (end - addr) // sizeofaddr
+ walker.gcptr_array = array = lltype.malloc(GCPTR_ARRAY.TO,count)
+ n = 0
+ while n < len(array):
+ array[n] = llmemory.cast_adr_to_ptr(addr.address[n],
+ llmemory.GCREF)
+ n += 1
+ gcdata.root_stack_top = gcdata.root_stack_base # make it empty
#
def ll_restore_stack_roots(walker):
if jit_restore_stack_roots is not None:
More information about the pypy-commit
mailing list