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

Fix the ExposedLocalsNumbering test #105037

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Jul 17, 2024

Should fix #80184. See the first commit message for the description of the bug.

The test had a stack corrupting race condition:

1) Main thread returns from "Main".
2) Main thread calls some runtime code on the stack of former "Main".
3) Mutator thread writes to the "safeIndex" variable, which is now
   part of that runtime's code stack.
4) Things crash.

Fix by 'parking' the mutated index in some dynamic memory instead.
@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 Jul 17, 2024
@SingleAccretion SingleAccretion force-pushed the Fix-ExposedLocalsNumbering branch from 667e074 to e61522b Compare July 17, 2024 16:16
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 17, 2024
@SingleAccretion SingleAccretion marked this pull request as ready for review July 17, 2024 19:31
@SingleAccretion
Copy link
Contributor Author

@dotnet/jit-contrib

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the issue!

@AndyAyersMS AndyAyersMS merged commit 31bc167 into dotnet:main Jul 19, 2024
69 checks passed
@SingleAccretion SingleAccretion deleted the Fix-ExposedLocalsNumbering branch July 21, 2024 09:44
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2024
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 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExposedLocalsNumbering runtime test disabled
3 participants