Skip to content

Commit a39ce71

Browse files
authored
Set *ppIndirection to NULL in MethodContext::repGetAddrOfCaptureThreadGlobal() if there is corresponding GetAddrOfCaptureThreadGlobal LWM (#48260)
1 parent 4823e7c commit a39ce71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4184,7 +4184,9 @@ LONG* MethodContext::repGetAddrOfCaptureThreadGlobal(void** ppIndirection)
41844184
if ((GetAddrOfCaptureThreadGlobal == nullptr) || (GetAddrOfCaptureThreadGlobal->GetIndex((DWORD)0) == -1))
41854185
{
41864186
#ifdef sparseMC
4187-
LogDebug("Sparse - repGetAddrOfCaptureThreadGlobal returning 0xCAFE0001");
4187+
LogDebug("Sparse - repGetAddrOfCaptureThreadGlobal returning nullptr and 0xCAFE0001");
4188+
if (ppIndirection != nullptr)
4189+
*ppIndirection = nullptr;
41884190
return (LONG*)(size_t)0xCAFE0001;
41894191
#else
41904192
LogException(EXCEPTIONCODE_MC, "Didn't find anything for GetAddrOfCaptureThreadGlobal", "");

0 commit comments

Comments
 (0)