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

[VM] Fix potential double free #86207

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Conversation

trungnt2910
Copy link
Contributor

Use a raw char NewArrayHolder instead of a NewHolder to store the StackingAllocator to prevent its destructor from being called twice since StackingAllocatorHolder has already taken care of the destruction.

This fixes a double free error when ACQUIRE_STACKING_ALLOCATOR is called in environments/OSes with smaller per-thread stack sizes, such as in this port.

Use a raw char `NewArrayHolder` instead of a `NewHolder` to store
the `StackingAllocator` to prevent its destructor from being
called twice since `StackingAllocatorHolder` has already taken
care of the destruction.
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label May 13, 2023
yowl pushed a commit to yowl/runtime that referenced this pull request May 13, 2023
* Add a regression test for dotnet#86207

* Ensure RotateRight and RotateLeft decomposition orders parameters correctly

* Add explicit tests covering the other two DecomposeRotate paths

* Ensure other code paths that create GT_RSH_LO nodes aren't broken
@mangod9 mangod9 merged commit 18c6495 into dotnet:main Jun 5, 2023
109 checks passed
@mangod9
Copy link
Member

mangod9 commented Jun 5, 2023

Thanks for your contribution!

@ghost ghost locked as resolved and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-coreclr 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.

None yet

2 participants