diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2010-09-25 03:30:26 +0000 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2010-09-25 03:30:26 +0000 |
commit | 539d3adec64f51a3fb13bb65b7a494d7eded01a0 (patch) | |
tree | d70b17364ff81c6888e3ac9338aaa5239c426515 /rts/Interpreter.c | |
parent | 83d563cb9ede0ba792836e529b1e2929db926355 (diff) | |
download | haskell-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.c | 7 |
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. |