Bail ThreadAbort redirection after catch handlers on Unix#72705
Conversation
|
Tagging subscribers to this area: @tommcdon Issue DetailsFixes #12739 to prevent crashes. The redirection stub was never implemented, leading to crashes in scenarios like Debugger Function Evaluations. Instead of rethrowing the exception after the catch clause, this allows the I've opened #72703 to amend the behavior.
|
|
cc: @AntonLapounov @jkotas I'm merging this today once I get it through debugger testing |
| CopyOSContext(pThread->m_OSContext, pContextRecord); | ||
| SetIP(pThread->m_OSContext, (PCODE)uResumePC); | ||
| #ifdef TARGET_UNIX | ||
| uAbortAddr = NULL; |
There was a problem hiding this comment.
Nit: uAbortAddr is already initialized to the zero value, so this assignment is not needed.
Fixes #12739 to prevent crashes.
The redirection stub was never implemented, leading to crashes in scenarios like Debugger Function Evaluations. Instead of rethrowing the exception after the catch clause, this allows the
ThreadAbortExceptionto flow as any usual exception and hopefully surface through other points that call mechanisms likeThread::HandleThreadAbort. This is a behavior difference between Unix and non-Unix plaforms with some observable side effects, butThread.Abortis not supported in core. Most commonly the debugger is the major scenario where ThreadAbort gets used, and this prevents the crash.I've opened #72703 to amend the behavior.