Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve debugger StackOverflow handling (#108172)
* Improve debugger StackOverflow handling In the function Debugger::IsThreadAtSafePlace we have some code that attempts to avoid calling a stack intensive helper method if the runtime is currently handling a StackOverflowException. The logic to do that check was incorrect because the runtime's EH has some special case handling for StackOverflow. Most exceptions cause the EH code to create an ExceptionTracker object which in turn causes thread->IsExceptionInProgress() to return TRUE. StackOverflow doesn't set that and goes straight to fatal error handling so thread->IsExceptionInProgress() is false. The fix avoids checking IsExceptionInProgress(). g_pEEInterface->GetThreadException() works because it checks both the tracker and also falls back to thread->m_lastThrownObject where the StackOverflow exception will be stored. Fixes #70755 Co-authored-by: mikelle-rogers <[email protected]>
- Loading branch information