Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events for IL methods without IL headers #90826

Merged
merged 6 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
5 changes: 4 additions & 1 deletion src/coreclr/debug/daccess/stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,10 @@ ClrDataFrame::GetLocalSig(MetaSig** sig,
{
// It turns out we cannot really get rid of this check. Dynamic methods
// (including IL stubs) do not have their local sig's available after JIT time.
if (!m_methodDesc->IsIL())
// IL Methods with dynamically generated IL (for example, UnsafeAccessors) can
// may have not have an IL header.
AaronRobinsonMSFT marked this conversation as resolved.
Show resolved Hide resolved
if (!m_methodDesc->IsIL()
AaronRobinsonMSFT marked this conversation as resolved.
Show resolved Hide resolved
|| m_methodDesc->GetILHeader() == NULL)
{
*sig = NULL;
*count = 0;
Expand Down
6 changes: 5 additions & 1 deletion src/coreclr/vm/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4566,9 +4566,13 @@ VOID ETW::MethodLog::SendMethodJitStartEvent(MethodDesc *pMethodDesc, SString *n
ulMethodToken = (ULONG)0;
}
else
{
ulMethodToken = (ULONG)pMethodDesc->GetMemberDef();
}

if(pMethodDesc->IsIL())
// An IL method that has no IL header can occur for dynamically
// generated code during JIT (for example, UnsafeAccessor).
if(pMethodDesc->IsIL() && pMethodDesc->GetILHeader() != NULL)
AaronRobinsonMSFT marked this conversation as resolved.
Show resolved Hide resolved
{
COR_ILMETHOD_DECODER::DecoderStatus decoderstatus = COR_ILMETHOD_DECODER::FORMAT_ERROR;
COR_ILMETHOD_DECODER ILHeader(pMethodDesc->GetILHeader(), pMethodDesc->GetMDImport(), &decoderstatus);
Expand Down
3 changes: 0 additions & 3 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@
<ExcludeList Include="$(XunitTestBinBase)/Loader/binding/tracing/BinderTracingTest.Basic/*">
<Issue>https://github.com/dotnet/runtime/issues/57786</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Loader/binding/tracing/BinderTracingTest.ResolutionFlow/*">
<Issue>https://github.com/dotnet/runtime/issues/90580</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/MonoAPI/**">
<Issue>CoreCLR does not implement the mono embedding API</Issue>
</ExcludeList>
Expand Down