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

JIT: fix out of bounds read during SPMI collection #77147

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

AndyAyersMS
Copy link
Member

When recording the profile data into the method context, SPMI was assuming all data items were sizeof(uintptr_t) which is not guaranteed. Use the proper size.

Fixes #76991.

When recording the profile data into the method context, SPMI was
assuming all data items were `sizeof(uintptr_t)` which is not guaranteed.
Use the proper size.

Fixes dotnet#76991.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 18, 2022
@ghost ghost assigned AndyAyersMS Oct 18, 2022
@ghost
Copy link

ghost commented Oct 18, 2022

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

Issue Details

When recording the profile data into the method context, SPMI was assuming all data items were sizeof(uintptr_t) which is not guaranteed. Use the proper size.

Fixes #76991.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

@jakobbotsch PTAL
cc @dotnet/jit-contrib

See #76991 for analysis of the issue.

case ICorJitInfo::PgoInstrumentationKind::MethodHandle:
return sizeof(uintptr_t);
default:
LogError("Unexpedted pgo schema data size (kind = %d)", kind);
Copy link
Member

Choose a reason for hiding this comment

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

typo: Unexpedted

@AndyAyersMS
Copy link
Member Author

Windows x64 NAOT looks like #76801
OSX x64 NAOT failed during a restore step.

@AndyAyersMS AndyAyersMS merged commit 618e890 into dotnet:main Oct 18, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

superpmicollect access violation in pgo Bytemark
3 participants