Skip to content

Commit 8a2e934

Browse files
authored
JIT: tolerate missing InitClass map in SPMI (dotnet#111555)
For some reason this map is missing in some recent OSX arm64 crossgen2 collections. SPMI shouldn't AV when this happens.
1 parent 3998f4a commit 8a2e934

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,10 @@ CorInfoInitClassResult MethodContext::repInitClass(CORINFO_FIELD_HANDLE field,
988988
key.method = CastHandle(method);
989989
key.context = CastHandle(context);
990990

991-
DWORD value = InitClass->Get(key);
991+
DWORD value =
992+
LookupByKeyOrMiss(InitClass, key, ": fld-%016" PRIX64 " meth-%016" PRIX64 " con-%016" PRIX64,
993+
key.field, key.method, key.context);
994+
992995
DEBUG_REP(dmpInitClass(key, value));
993996
CorInfoInitClassResult result = (CorInfoInitClassResult)value;
994997
return result;

0 commit comments

Comments
 (0)