From 7842ba3ab4b975c394be526da5452bd727dccef1 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Wed, 30 Mar 2016 14:57:18 -0700 Subject: [PATCH] Fixed issue #3987 "Debugger fails to stop on entry due to stack walk failure" By initializing m_rgHijackFunction to NULL. --- src/debug/daccess/dacdbiimpl.cpp | 3 +++ src/debug/ee/debugger.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp index 41ecde63ec74..8ff1ecd9daba 100644 --- a/src/debug/daccess/dacdbiimpl.cpp +++ b/src/debug/daccess/dacdbiimpl.cpp @@ -5081,6 +5081,9 @@ void DacDbiInterfaceImpl::Hijack( // (The hijack function already has the context) _ASSERTE((pOriginalContext == NULL) == (cbSizeContext == 0)); _ASSERTE(EHijackReason::IsValid(reason)); +#ifdef PLATFORM_UNIX + _ASSERTE(!"Not supported on this platform"); +#endif // // If we hijack a thread which might not be managed we can set vmThread = NULL diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp index c063eb829f25..7422f7baaeca 100644 --- a/src/debug/ee/debugger.cpp +++ b/src/debug/ee/debugger.cpp @@ -983,6 +983,7 @@ Debugger::Debugger() m_fShutdownMode = false; m_fDisabled = false; + m_rgHijackFunction = NULL; #ifdef _DEBUG InitDebugEventCounting(); @@ -17092,6 +17093,7 @@ Debugger::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) { DAC_ENUM_VTHIS(); SUPPORTS_DAC; + _ASSERTE(m_rgHijackFunction != NULL); if ( flags != CLRDATA_ENUM_MEM_TRIAGE) {