[pypy-commit] stmgc c8-new-page-handling: fix future bug
Raemi
noreply at buildbot.pypy.org
Fri Sep 19 13:09:33 CEST 2014
Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: c8-new-page-handling
Changeset: r1397:6f4f5fff1904
Date: 2014-09-19 13:09 +0200
http://bitbucket.org/pypy/stmgc/changeset/6f4f5fff1904/
Log: fix future bug
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -365,9 +365,13 @@
uintptr_t page;
for (page = first_page; page <= end_page; page++) {
/* check if our page is private or we are the only shared-page holder */
+ if (get_page_status_in(my_segnum, page) == PAGE_NO_ACCESS) {
+ /* happens if there is a concurrent WB between us making the backup
+ and acquiring the locks */
+ volatile char *dummy = REAL_ADDRESS(STM_SEGMENT->segment_base, page * 4096UL);
+ *dummy = *dummy; /* force segfault */
+ }
assert(get_page_status_in(my_segnum, page) != PAGE_NO_ACCESS);
- /* XXX: actually, it can be NO_ACCESS if somebody changed that after we
- copied from it */
if (get_page_status_in(my_segnum, page) == PAGE_PRIVATE)
continue;
More information about the pypy-commit
mailing list