diff options
author | Ben.Lippmeier@anu.edu.au <unknown> | 2009-02-24 10:13:46 +0000 |
---|---|---|
committer | Ben.Lippmeier@anu.edu.au <unknown> | 2009-02-24 10:13:46 +0000 |
commit | 9ecd4a3e69829f4c4ca6207043256cd40146556d (patch) | |
tree | cf8c6be4a08939a0e1d699aec259f44f3bc9e92a /rts/STM.c | |
parent | 42222f95a101fb3647f8728302bbf1098b74e59e (diff) | |
download | haskell-9ecd4a3e69829f4c4ca6207043256cd40146556d.tar.gz |
Strip tag bits from closure pointers before trying to deference them.
Diffstat (limited to 'rts/STM.c')
-rw-r--r-- | rts/STM.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -306,7 +306,7 @@ static StgClosure *lock_tvar(StgTRecHeader *trec, do { do { result = s -> current_value; - } while (GET_INFO(result) == &stg_TREC_HEADER_info); + } while (GET_INFO(UNTAG_CLOSURE(result)) == &stg_TREC_HEADER_info); } while (cas((void *)&(s -> current_value), (StgWord)result, (StgWord)trec) != (StgWord)result); return result; @@ -1573,7 +1573,7 @@ static StgClosure *read_current_value(StgTRecHeader *trec STG_UNUSED, StgTVar *t result = tvar -> current_value; #if defined(STM_FG_LOCKS) - while (GET_INFO(result) == &stg_TREC_HEADER_info) { + while (GET_INFO(UNTAG_CLOSURE(result)) == &stg_TREC_HEADER_info) { TRACE("%p : read_current_value(%p) saw %p", trec, tvar, result); result = tvar -> current_value; } |