Commit a5bd0560 authored by Simon Marlow's avatar Simon Marlow
Browse files

STM fix from Tim Harris

Fixes assertion failures with STM and -debug.  Tim says:
Sorry, it's a problem in how nested transactions are handled in
non-SMP builds.  It'll bite when trying to commit a nested transaction
which has read from a TVar but not updated it.

The call to validate_and_acquire_ownership in
stmCommitNestedTransaction should be the same as that in
stmCommitNestedTransaction, i.e.:

  result = validate_and_acquire_ownership(trec, (!use_read_phase), TRUE);
parent 6ff10661
......@@ -999,7 +999,7 @@ StgBool stmCommitNestedTransaction(Capability *cap, StgTRecHeader *trec) {
lock_stm(trec);
et = trec -> enclosing_trec;
result = validate_and_acquire_ownership(trec, FALSE, TRUE);
result = validate_and_acquire_ownership(trec, (!use_read_phase), TRUE);
if (result) {
// We now know that all the updated locations hold their expected values.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment