Author: Remi Meier
Branch: c7-weakref
Changeset: r990:096c66121a67
Date: 2014-03-12 18:06 +0100
http://bitbucket.org/pypy/stmgc/changeset/096c66121a67/
Log: fix some other test and its failure by adding some
synchronize_overflow_object_now(). Maybe there is a better solution
diff --git a/c7/stm/weakref.c b/c7/stm/weakref.c
--- a/c7/stm/weakref.c
+++ b/c7/stm/weakref.c
@@ -65,11 +65,13 @@
|| (pforwarded_array[0] != GCWORD_MOVED)) {
/* pointing_to dies */
*WEAKREF_PTR(item, size) = NULL;
+ synchronize_overflow_object_now(item);
continue; /* no need to remember in old_weakrefs */
}
else {
/* moved location */
*WEAKREF_PTR(item, size) = pforwarded_array[1];
+ synchronize_overflow_object_now(item);
}
}
else {
@@ -79,6 +81,7 @@
/* still in the tree -> wasn't seen by the minor
collection,
so it doesn't survive */
*WEAKREF_PTR(item, size) = NULL;
+ synchronize_overflow_object_now(item);
continue; /* no need to remember in old_weakrefs */
}
/* pointing_to was already old */
diff --git a/c7/test/test_weakref.py b/c7/test/test_weakref.py
--- a/c7/test/test_weakref.py
+++ b/c7/test/test_weakref.py
@@ -140,6 +140,7 @@
self.switch(1)
+ self.start_transaction()
assert stm_get_weakref(lp1) == ffi.NULL
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit