X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FException.cmm;h=6c887c22dc3cbbba9579db78788541e368e2f28b;hb=6cf8982ac30be6836a0cdd8be5a6ac1a1a144213;hp=16b5d92b304e7eacaab452e90f0fe71d933114c5;hpb=3ce4cf858bbcae18ffc6989ca19522cb8887aab9;p=ghc-hetmet.git diff --git a/rts/Exception.cmm b/rts/Exception.cmm index 16b5d92..6c887c2 100644 --- a/rts/Exception.cmm +++ b/rts/Exception.cmm @@ -49,6 +49,8 @@ import ghczmprim_GHCziBool_True_closure; -------------------------------------------------------------------------- */ +STRING(stg_unblockAsync_err_str, "unblockAsyncExceptions#_ret") + INFO_TABLE_RET( stg_unblockAsyncExceptionszh_ret, RET_SMALL ) { CInt r; @@ -81,6 +83,14 @@ INFO_TABLE_RET( stg_unblockAsyncExceptionszh_ret, RET_SMALL ) jump %ENTRY_CODE(Sp(0)); } } + else { + /* + the thread might have been removed from the + blocked_exception list by someone else in the meantime. + Just restore the stack pointer and continue. + */ + Sp_adj(2); + } } Sp_adj(1); @@ -388,7 +398,7 @@ retry_pop_stack: W_ r; trec = StgTSO_trec(CurrentTSO); (r) = foreign "C" stmValidateNestOfTransactions(trec "ptr") []; - ("ptr" outer) = foreign "C" stmGetEnclosingTRec(trec "ptr") []; + outer = StgTRecHeader_enclosing_trec(trec); foreign "C" stmAbortTransaction(MyCapability() "ptr", trec "ptr") []; foreign "C" stmFreeAbortedTRec(MyCapability() "ptr", trec "ptr") []; @@ -488,7 +498,7 @@ retry_pop_stack: } else { W_ trec, outer; trec = StgTSO_trec(CurrentTSO); - ("ptr" outer) = foreign "C" stmGetEnclosingTRec(trec "ptr") []; + outer = StgTRecHeader_enclosing_trec(trec); foreign "C" stmAbortTransaction(MyCapability() "ptr", trec "ptr") []; foreign "C" stmFreeAbortedTRec(MyCapability() "ptr", trec "ptr") []; StgTSO_trec(CurrentTSO) = outer;