Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r72285:dfd595aa55f9
Date: 2014-06-30 13:18 +0200
http://bitbucket.org/pypy/pypy/changeset/dfd595aa55f9/
Log: Test and fix
diff --git a/rpython/memory/gctransform/stmframework.py
b/rpython/memory/gctransform/stmframework.py
--- a/rpython/memory/gctransform/stmframework.py
+++ b/rpython/memory/gctransform/stmframework.py
@@ -34,6 +34,8 @@
annmodel.s_None))
#
def pypy_stmcb_trace_cards(obj, visit_fn, start, stop):
+ if not gc.has_gcptr_in_varsize(gc.get_type_id(obj)):
+ return # there are cards, but they don't need tracing
gc.trace_partial(obj, start, stop, invokecallback, visit_fn)
pypy_stmcb_trace_cards.c_name = "pypy_stmcb_trace_cards"
self.autoregister_ptrs.append(
diff --git a/rpython/translator/stm/test/test_ztranslated.py
b/rpython/translator/stm/test/test_ztranslated.py
--- a/rpython/translator/stm/test/test_ztranslated.py
+++ b/rpython/translator/stm/test/test_ztranslated.py
@@ -456,6 +456,8 @@
lst = lltype.malloc(LST, 100, immortal=True)
def main(argv):
lst[42] = 43
+ llop.stm_commit_if_not_atomic(lltype.Void)
+ llop.stm_start_inevitable_if_not_atomic(lltype.Void)
print 'did not crash', lst[42]
return 0
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit