[commit: ghc] ghc-7.4: Fix silly bug in casMutVar#: I forgot the GC write barrier (78b3123)
Ian Lynagh
igloo at earth.li
Tue Dec 13 19:05:47 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : ghc-7.4
http://hackage.haskell.org/trac/ghc/changeset/78b312369b1e07edd5c3c098f2822ee096654465
>---------------------------------------------------------------
commit 78b312369b1e07edd5c3c098f2822ee096654465
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Dec 9 09:09:42 2011 +0000
Fix silly bug in casMutVar#: I forgot the GC write barrier
>---------------------------------------------------------------
rts/PrimOps.cmm | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 21ac05f..8475555 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -284,6 +284,9 @@ stg_casMutVarzh
if (h != old) {
RET_NP(1,h);
} else {
+ if (GET_INFO(mv) == stg_MUT_VAR_CLEAN_info) {
+ foreign "C" dirty_MUT_VAR(BaseReg "ptr", mv "ptr") [];
+ }
RET_NP(0,h);
}
}
More information about the Cvs-ghc
mailing list