Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r17:ce7dcafc00aa
Date: 2013-05-26 15:11 +0200
http://bitbucket.org/pypy/stmgc/changeset/ce7dcafc00aa/

Log:    Test for one extra "abort();//XXX".

diff --git a/c3/nursery.c b/c3/nursery.c
--- a/c3/nursery.c
+++ b/c3/nursery.c
@@ -244,7 +244,6 @@
         assert(dclassify(L) == K_PRIVATE);
 
         R->h_revision = fetch_extra_word(L);
-        abort();//XXX
     }
     gcptrlist_clear(&d->protected_with_private_copy);
     spinlock_release(d->collection_lock);
@@ -613,7 +612,7 @@
             continue;
         }
         /* The listed object was not visited.  Either it's because it
-           because really unreachable (in which case it cannot possibly
+           is really unreachable (in which case it cannot possibly
            be modified any more, and the current transaction cannot
            abort because of it) or it's because it was already modified.
         */
diff --git a/c3/test/test_abort.py b/c3/test/test_abort.py
--- a/c3/test/test_abort.py
+++ b/c3/test/test_abort.py
@@ -89,3 +89,19 @@
             abort_and_retry()
         else:
             major_collect()
+
+def test_abort_protected_to_private():
+    pg = palloc(HDR + WORD)
+    p1 = lib.stm_write_barrier(pg)
+    lib.setlong(p1, 0, 32128247)
+    #
+    @perform_transaction
+    def run(retry_counter):
+        assert lib.getlong(pg, 0) == 32128247
+        if retry_counter == 0:
+            lib.setlong(pg, 0, 4737372)
+            abort_and_retry()
+        else:
+            lib.setlong(pg, 0, 838311)
+    #
+    assert lib.getlong(pg, 0) == 838311
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to