Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle mutation of array being merged into set #13253

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

Merged
merged 2 commits into from
May 3, 2025

Conversation

jeremyevans
Copy link
Contributor

Check length of array during every iteration, as a #hash method could truncate the array, resulting in heap-use-after-free.

Fixes [Bug #21305]

Check length of array during every iteration, as a #hash method
could truncate the array, resulting in heap-use-after-free.

Fixes [Bug #21305]
This avoids a heap-use-after-free.

Fixes [Bug #21306]
Copy link
Member

@mame mame left a comment

Choose a reason for hiding this comment

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

Thank you! I confirmed that the ASAN error no longer occurs when running the two reported tests with this patch.

@jeremyevans jeremyevans merged commit 21035c8 into ruby:master May 3, 2025
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants