Skip to content

Commit 7823f50

Browse files
authored
Fix SPMI assert (#121051)
`repGetCookieForPInvokeCalliSig` was asserting for the wrong map, and so collection cleaning ended up throwing away a bunch of good method contexts. Fix and add the corresponding assert to `repGetCookieForInterpreterCalliSig`.
1 parent e221fc4 commit 7823f50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6081,7 +6081,7 @@ void MethodContext::dmpGetCookieForPInvokeCalliSig(const GetCookieForPInvokeCall
60816081
}
60826082
LPVOID MethodContext::repGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig, void** ppIndirection)
60836083
{
6084-
AssertMapExistsNoMessage(GetCookieForInterpreterCalliSig);
6084+
AssertMapExistsNoMessage(GetCookieForPInvokeCalliSig);
60856085

60866086
GetCookieForPInvokeCalliSigValue key;
60876087
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
@@ -6124,6 +6124,8 @@ void MethodContext::dmpGetCookieForInterpreterCalliSig(const GetCookieForInterpr
61246124
}
61256125
LPVOID MethodContext::repGetCookieForInterpreterCalliSig(CORINFO_SIG_INFO* szMetaSig)
61266126
{
6127+
AssertMapExistsNoMessage(GetCookieForInterpreterCalliSig);
6128+
61276129
GetCookieForInterpreterCalliSigValue key;
61286130
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
61296131
key.cbSig = (DWORD)szMetaSig->cbSig;

0 commit comments

Comments
 (0)