Skip to content

Commit

Permalink
JIT: tolerate missing InitClass map in SPMI (#111555)
Browse files Browse the repository at this point in the history
For some reason this map is missing in some recent OSX arm64 crossgen2
collections. SPMI shouldn't AV when this happens.
  • Loading branch information
AndyAyersMS authored Jan 18, 2025
1 parent 3998f4a commit 8a2e934
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,10 @@ CorInfoInitClassResult MethodContext::repInitClass(CORINFO_FIELD_HANDLE field,
key.method = CastHandle(method);
key.context = CastHandle(context);

DWORD value = InitClass->Get(key);
DWORD value =
LookupByKeyOrMiss(InitClass, key, ": fld-%016" PRIX64 " meth-%016" PRIX64 " con-%016" PRIX64,
key.field, key.method, key.context);

DEBUG_REP(dmpInitClass(key, value));
CorInfoInitClassResult result = (CorInfoInitClassResult)value;
return result;
Expand Down

0 comments on commit 8a2e934

Please sign in to comment.