[pypy-commit] stmgc c8-private-pages: fix

Raemi noreply at buildbot.pypy.org
Fri Jan 16 16:36:22 CET 2015


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: c8-private-pages
Changeset: r1537:593ef95f4496
Date: 2015-01-16 14:24 +0100
http://bitbucket.org/pypy/stmgc/changeset/593ef95f4496/

Log:	fix

diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -848,6 +848,7 @@
 #endif
     tl->last_abort__bytes_in_nursery = bytes_in_nursery;
 
+    list_clear(pseg->objects_pointing_to_nursery);
 #pragma pop_macro("STM_SEGMENT")
 #pragma pop_macro("STM_PSEGMENT")
 }
diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -391,7 +391,6 @@
     for (i = 0; i < NB_SEGMENTS; i++) {
         set_gs_register(get_segment_base(i));
 
-        assert(!must_abort());
         if (!_stm_validate()) {
             assert(i != 0);     /* sharing seg0 should never need an abort */
 
diff --git a/c8/test/test_gcpage.py b/c8/test/test_gcpage.py
--- a/c8/test/test_gcpage.py
+++ b/c8/test/test_gcpage.py
@@ -309,3 +309,22 @@
         self.commit_transaction()
         self.start_transaction()
         stm_major_collect()
+
+    def test_bug2(self):
+        lp_ref_4 = stm_allocate_old(16)
+        #
+        self.start_transaction()
+        stm_set_char(lp_ref_4, 'x')
+        #
+        self.switch(1)
+        self.start_transaction()
+        stm_set_char(lp_ref_4, 'y')
+        #
+        self.switch(0)
+        self.commit_transaction()
+        self.start_transaction()
+        stm_major_collect()
+        stm_major_collect()
+        stm_major_collect()
+        #
+        py.test.raises(Conflict, self.switch, 1)


More information about the pypy-commit mailing list