Author: Armin Rigo <[email protected]>
Branch: stm-gc
Changeset: r52798:64b23c237c68
Date: 2012-02-23 13:18 +0100
http://bitbucket.org/pypy/pypy/changeset/64b23c237c68/
Log: Add a failing test
diff --git a/pypy/translator/stm/test/targetdemo.py
b/pypy/translator/stm/test/targetdemo.py
--- a/pypy/translator/stm/test/targetdemo.py
+++ b/pypy/translator/stm/test/targetdemo.py
@@ -63,6 +63,16 @@
print "thread done."
glob.done += 1
+def _check_pointer(arg1):
+ arg1.foobar = 40 # now 'arg1' is local
+ return arg1
+
+def check_pointer_equality(arg, retry_counter):
+ res = _check_pointer(arg)
+ if res is not arg:
+ debug_print("ERROR: bogus pointer equality")
+ raise AssertionError
+
def run_me():
rstm.descriptor_init()
try:
@@ -70,6 +80,7 @@
arg = glob._arg
ll_thread.release_NOAUTO(glob.lock)
arg.foobar = 41
+ rstm.perform_transaction(check_pointer_equality, Arg, arg)
i = 0
while i < glob.LENGTH:
arg.anchor = glob.anchor
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit