Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/vm/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ COR_ILMETHOD* MethodDesc::GetILHeader()
// Always pickup overrides like reflection emit, EnC, etc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that this method has a PRECONDITION(IsIL()). It means that it is not expected to be called on IsNDirect method in the first place.

I think the correct fix is to add if (IsIL()) check around the whole CodeVersionManager related block in MethodDesc::EnumMemoryRegions.

TADDR pIL = pModule->GetDynamicIL(GetMemberDef());

if (pIL == (TADDR)NULL)
if (pIL == (TADDR)NULL && !IsNDirect())
{
pIL = pModule->GetIL(GetRVA());
}
Expand Down
Loading