Skip to content

Commit

Permalink
Fix an AV in crossgen caused by invalid profiling data (dotnet/corecl…
Browse files Browse the repository at this point in the history
…r#27842)

Commit migrated from dotnet/coreclr@e40384b
  • Loading branch information
Fadi Hanna authored Nov 12, 2019
1 parent d1fa566 commit 3b21198
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/coreclr/src/vm/ceeload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7814,10 +7814,14 @@ void Module::ExpandAll(DataImage *image)
if (TypeFromToken(token) == mdtMethodDef)
{
MethodDesc * pMD = LookupMethodDef(token);
//
// Record a reference to a hot non-generic method
//
image->GetPreloader()->MethodReferencedByCompiledCode((CORINFO_METHOD_HANDLE)pMD);

if (pMD != NULL)
{
//
// Record a reference to a hot non-generic method
//
image->GetPreloader()->MethodReferencedByCompiledCode((CORINFO_METHOD_HANDLE)pMD);
}
}
else if (TypeFromToken(token) == ibcMethodSpec)
{
Expand Down

0 comments on commit 3b21198

Please sign in to comment.