[pypy-commit] stmgc c8-private-pages: fix for tests not aborting in stm_validate if there is an inevitable transaction
Raemi
noreply at buildbot.pypy.org
Wed Jan 14 14:08:40 CET 2015
Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: c8-private-pages
Changeset: r1524:a5a56fe9b07e
Date: 2015-01-14 13:39 +0100
http://bitbucket.org/pypy/stmgc/changeset/a5a56fe9b07e/
Log: fix for tests not aborting in stm_validate if there is an inevitable
transaction
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -274,9 +274,12 @@
is itself more recent than last_cl. This is fixed
by re-validating. */
first_cl = STM_PSEGMENT->last_commit_log_entry;
- if (first_cl->next == NULL || first_cl->next == INEV_RUNNING)
+ if (first_cl->next == NULL)
break;
+ if (first_cl->next == INEV_RUNNING)
+ _stm_collectable_safe_point(); /* otherwise, we may deadlock */
+
/* Find the set of segments we need to copy from and lock them: */
uint64_t segments_to_lock = 1UL << my_segnum;
cl = first_cl;
@@ -298,6 +301,7 @@
}
}
last_cl = cl;
+
/* HERE */
acquire_privatization_lock(STM_SEGMENT->segment_num);
More information about the pypy-commit
mailing list