[pypy-commit] stmgc c7-more-segments: The error was a too-strict assertion.

arigo noreply at buildbot.pypy.org
Sun Mar 16 11:55:44 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: c7-more-segments
Changeset: r1038:b65a48fadcbd
Date: 2014-03-16 11:55 +0100
http://bitbucket.org/pypy/stmgc/changeset/b65a48fadcbd/

Log:	The error was a too-strict assertion.

diff --git a/c7/stm/sync.c b/c7/stm/sync.c
--- a/c7/stm/sync.c
+++ b/c7/stm/sync.c
@@ -293,7 +293,12 @@
 
     long i;
     for (i = 1; i <= NB_SEGMENTS; i++) {
-        assert(get_segment(i)->nursery_end != NURSERY_END);
+        /* note: the only possible way to concurrently change the value
+           of 'nursery_end' is with an abort done while we wait for
+           C_AT_SAFE_POINT.  It's fine because the next transaction
+           should not start. */
+        assert(get_segment(i)->nursery_end != NURSERY_END ||
+               get_priv_segment(i)->transaction_state == TS_NONE);
         if (get_segment(i)->nursery_end == NSE_SIGPAUSE)
             get_segment(i)->nursery_end = NURSERY_END;
     }


More information about the pypy-commit mailing list