Skip to content

[VM] Fix potential double free#86207

Merged
mangod9 merged 1 commit intodotnet:mainfrom
trungnt2910:dev/trungnt2910/fix
Jun 5, 2023
Merged

[VM] Fix potential double free#86207
mangod9 merged 1 commit intodotnet:mainfrom
trungnt2910:dev/trungnt2910/fix

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 community-contribution Indicates that the PR has been added by a community member area-VM-coreclr labels 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
@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.

2 participants