From: Mikhail Kurinnoi Date: Mon, 20 Sep 2021 15:20:04 +0000 (-0700) Subject: [x86/Linux] Fix SIGSEGV on Debugger.Break() during debugging. X-Git-Tag: accepted/tizen/6.5/unified/20211028.225403^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_6.0_hotfix;p=platform%2Fupstream%2Fcoreclr.git [x86/Linux] Fix SIGSEGV on Debugger.Break() during debugging. SIGSEGV occur in src/vm/i386/cgenx86.cpp `HelperMethodFrame::UpdateRegDisplay()` at line `pRD->pCurrentContext->Eip = pRD->ControlPC = m_MachState.GetRetAddr();`, since `pRD->pCurrentContext` is NULL. The point of issue - wrong code block compilation in DebuggerWalkStack() in case of Linux x86. --- diff --git a/src/debug/ee/frameinfo.cpp b/src/debug/ee/frameinfo.cpp index 3efbddd..a4741df 100644 --- a/src/debug/ee/frameinfo.cpp +++ b/src/debug/ee/frameinfo.cpp @@ -2097,7 +2097,7 @@ StackWalkAction DebuggerWalkStack(Thread *thread, #endif memset((void *)&data, 0, sizeof(data)); -#if defined(_TARGET_X86_) +#if !defined(WIN64EXCEPTIONS) // @todo - this seems pointless. context->Eip will be 0; and when we copy it over to the DebuggerRD, // the context will be completely null. data.regDisplay.ControlPC = context->Eip;