From 714eb50bc0018c98e19ff6bd9f31017fd07eedbe Mon Sep 17 00:00:00 2001 From: Mikhail Kurinnoi Date: Mon, 20 Sep 2021 08:20:04 -0700 Subject: [PATCH] [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. --- src/debug/ee/frameinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.7.4