diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-02-10 11:21:11 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-02-10 11:21:11 +0000 |
commit | a5bd056033e0f81e4d8ca30aa7c26cde3a3a132b (patch) | |
tree | 0f51890f4fd6660f1f53f23442dcdc54bec5bc24 /ghc/rts | |
parent | 6ff106616c1c98542df0a1763f0f9f655b2c8dd5 (diff) | |
download | haskell-a5bd056033e0f81e4d8ca30aa7c26cde3a3a132b.tar.gz |
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);
Diffstat (limited to 'ghc/rts')
-rw-r--r-- | ghc/rts/STM.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/rts/STM.c b/ghc/rts/STM.c index f94cf15d12..d3283a92f0 100644 --- a/ghc/rts/STM.c +++ b/ghc/rts/STM.c @@ -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. |