Author: Remi Meier <[email protected]>
Branch: card-marking
Changeset: r1234:b6d49351889d
Date: 2014-05-22 16:35 +0200
http://bitbucket.org/pypy/stmgc/changeset/b6d49351889d/
Log: Merge default
diff --git a/c7/stm/nursery.c b/c7/stm/nursery.c
--- a/c7/stm/nursery.c
+++ b/c7/stm/nursery.c
@@ -476,6 +476,8 @@
_reset_object_cards(pseg, obj, CARD_CLEAR, false);
_cards_cleared_in_object(pseg, obj);
+ /* mark slot as unread */
+ ((stm_read_marker_t *)(item->addr >> 4))->rm = 0;
_stm_large_free(stm_object_pages + item->addr);
} TREE_LOOP_END;
diff --git a/c7/test/test_nursery.py b/c7/test/test_nursery.py
--- a/c7/test/test_nursery.py
+++ b/c7/test/test_nursery.py
@@ -236,3 +236,14 @@
# the 'p1' reference is invalid now, don't try to read it.
# we check that it's invalid because _stm_total_allocated()
# only records one of the two objects.
+
+ def test_clear_read_marker_for_external_young(self):
+ self.start_transaction()
+ big = stm_allocate(FAST_ALLOC + 1000) # young outside nursery
+ stm_read(big)
+ assert stm_was_read(big)
+ stm_minor_collect() # free young outside
+ assert not stm_was_read(big)
+ # if the read marker is not cleared, we get false conflicts
+ # with later transactions using the same large-malloced slot
+ # as our outside-nursery-obj
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit