[pypy-commit] stmgc default: Fix
arigo
noreply at buildbot.pypy.org
Mon May 27 11:41:38 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r37:a93569a5c25a
Date: 2013-05-27 11:41 +0200
http://bitbucket.org/pypy/stmgc/changeset/a93569a5c25a/
Log: Fix
diff --git a/c3/gcpage.c b/c3/gcpage.c
--- a/c3/gcpage.c
+++ b/c3/gcpage.c
@@ -354,6 +354,11 @@
}
}
+static struct stm_object_s dead_object_stub = {
+ GCFLAG_PREBUILT | GCFLAG_STUB,
+ (revision_t)&dead_object_stub
+};
+
static void cleanup_for_thread(struct tx_descriptor *d)
{
long i;
@@ -376,8 +381,14 @@
fprintf(stderr,
"ABRT_COLLECT_MAJOR: %p was read but modified already\n",
obj);
- AbortTransactionAfterCollect(d, ABRT_COLLECT_MAJOR);
- return;
+ if (d->max_aborts != 0) { /* normal path */
+ AbortTransactionAfterCollect(d, ABRT_COLLECT_MAJOR);
+ return;
+ }
+ else { /* for tests */
+ items[i] = &dead_object_stub;
+ continue;
+ }
}
/* on the other hand, if we see a non-visited object in the read
diff --git a/c3/nursery.c b/c3/nursery.c
--- a/c3/nursery.c
+++ b/c3/nursery.c
@@ -665,17 +665,19 @@
which should be identical. */
gcptr P = (gcptr)obj->h_revision;
assert(dclassify(P) == K_PUBLIC);
+ items[i] = P;
- if (P->h_revision & 1) { /* "is not a pointer" */
- items[i] = P;
- /*mark*/
- }
- else {
+ if (!(P->h_revision & 1)) { /* "is a pointer" */
/* P has already been changed. Mark as abort. */
- AbortTransactionAfterCollect(d, ABRT_COLLECT_MINOR);
- /*mark*/
- gcptrlist_clear(&d->list_of_read_objects);
- break;
+ fprintf(stderr,
+ "ABRT_COLLECT_MINOR: %p was read but modified already\n",
+ P);
+ if (d->max_aborts != 0) { /* normal path */
+ AbortTransactionAfterCollect(d, ABRT_COLLECT_MINOR);
+ /*mark*/
+ gcptrlist_clear(&d->list_of_read_objects);
+ break;
+ }
}
}
else {
More information about the pypy-commit
mailing list