Skip to content

Fix handling of interp code in some profiler APIs - #137430

Merged
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-clrinterp-rejit
Nov 13, 2026
Merged

BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-clrinterp-rejit

Conversation

@BrzVlad

@BrzVlad BrzVlad commented Nov 12, 2026

Copy link
Copy Markdown
Member

Interpreter code can be present in the set of native code versions for a method, which holds the address of the interpreter precode there, instead of the actual interpreter bytecode address. Some profiler APIs (GetILToNativeMapping2 and GetNativeCodeStartAddresses) were not handling this case, crashing later when trying to obtain information from the runtime for an invalid code address.

Should fix interpreter failures on rejit test. Additional profiler testing was added in #136678, which hit this bug on the interpreter runs.

Interpreter code can be present in the set of native code versions for a method, which holds the address of the interpreter precode there, instead of the actual interpreter bytecode address. Some profiler APIs (`GetILToNativeMapping2` and `GetNativeCodeStartAddresses`) were not handling this case, crashing later when trying to obtain information from the runtime for an invalid code address.

Should fix interpreter failures on rejit test.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@BrzVlad
BrzVlad requested a review from lateralusX November 12, 2026 15:20
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @BrzVlad, @janvorli
See info in area-owners.md if you want to be subscribed.

@lateralusX lateralusX left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good given that GetDiagnosticCodeStartFromEntryPoint won't return NULL in case we pass in a none NULL pCodeStart.

@BrzVlad

BrzVlad commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

/ba-g Failure unrelated

@BrzVlad
BrzVlad merged commit 785c941 into dotnet:main Nov 13, 2026
108 of 111 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants