summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-07-07 19:13:31 +0100
committerIan Lynagh <ian@well-typed.com>2013-07-07 19:13:31 +0100
commit60cb478f16c0703e0e97a528869905333d9b3135 (patch)
treedb33447944a82d3ca6475fe8503a78117408e927 /rts/Schedule.c
parenta5913a23bcade044e4c693f05e8a60605c8d5618 (diff)
downloadhaskell-60cb478f16c0703e0e97a528869905333d9b3135.tar.gz
Fix segfault with STM; fixes #8035. Patch from errge.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r--rts/Schedule.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index a024926914..88bfd8c4d3 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -2722,7 +2722,19 @@ raiseExceptionHelper (StgRegTable *reg, StgTSO *tso, StgClosure *exception)
tso->stackobj->sp = p;
return STOP_FRAME;
- case CATCH_RETRY_FRAME:
+ case CATCH_RETRY_FRAME: {
+ StgTRecHeader *trec = tso -> trec;
+ StgTRecHeader *outer = trec -> enclosing_trec;
+ debugTrace(DEBUG_stm,
+ "found CATCH_RETRY_FRAME at %p during raise", p);
+ debugTrace(DEBUG_stm, "trec=%p outer=%p", trec, outer);
+ stmAbortTransaction(cap, trec);
+ stmFreeAbortedTRec(cap, trec);
+ tso -> trec = outer;
+ p = next;
+ continue;
+ }
+
default:
p = next;
continue;