X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FInterpreter.c;h=fa4a46fd1277b72ba1be4ced6e872285b71e0156;hb=e9c6b0de1890a66a9ce2e7749eaf7d7317c9dd01;hp=58ffd257af06e3963e4d04a5910e9a450545f209;hpb=539d3adec64f51a3fb13bb65b7a494d7eded01a0;p=ghc-hetmet.git diff --git a/rts/Interpreter.c b/rts/Interpreter.c index 58ffd25..fa4a46f 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -1454,11 +1454,12 @@ 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; + if (Sp[0] != (W_)&stg_gc_gen_info) { + // the stack is not how we left it. This probably + // means that an exception got raised on exit from the + // foreign call, so we should just continue with + // whatever is on top of the stack now. + RETURN_TO_SCHEDULER_NO_PAUSE(ThreadRunGHC, ThreadYielding); } // Re-load the pointer to the BCO from the RET_DYN frame,