summaryrefslogtreecommitdiff
path: root/rts/Interpreter.c
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2010-09-25 03:30:26 +0000
committerEdward Z. Yang <ezyang@mit.edu>2010-09-25 03:30:26 +0000
commit539d3adec64f51a3fb13bb65b7a494d7eded01a0 (patch)
treed70b17364ff81c6888e3ac9338aaa5239c426515 /rts/Interpreter.c
parent83d563cb9ede0ba792836e529b1e2929db926355 (diff)
downloadhaskell-539d3adec64f51a3fb13bb65b7a494d7eded01a0.tar.gz
Don't interrupt when task blocks exceptions, don't immediately start exception.
Diffstat (limited to 'rts/Interpreter.c')
-rw-r--r--rts/Interpreter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/Interpreter.c b/rts/Interpreter.c
index da7ee2196a..58ffd257af 100644
--- a/rts/Interpreter.c
+++ b/rts/Interpreter.c
@@ -1454,6 +1454,13 @@ run_BCO:
cap = (Capability *)((void *)((unsigned char*)resumeThread(tok) - STG_FIELD_OFFSET(Capability,r)));
LOAD_STACK_POINTERS;
+ if (Sp[0] == (W_)&stg_enter_info) {
+ // Sp got clobbered due to an exception; so we should
+ // go run it instead.
+ Sp++;
+ goto eval;
+ }
+
// Re-load the pointer to the BCO from the RET_DYN frame,
// it might have moved during the call. Also reload the
// pointers to the components of the BCO.