Skip to content

Fix crash in WeakMap #6152

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 1 commit into from
Jul 20, 2022
Merged

Fix crash in WeakMap #6152

merged 1 commit into from
Jul 20, 2022

Conversation

peterzhu2118
Copy link
Member

In wmap_live_p, if is_pointer_to_heap returns false, then the page is either in the tomb or has already been freed, so the object is dead. In this case, wmap_live_p should return false.

In wmap_live_p, if is_pointer_to_heap returns false, then the page is
either in the tomb or has already been freed, so the object is dead. In
this case, wmap_live_p should return false.
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.

Good catch!

@peterzhu2118 peterzhu2118 merged commit 86d0612 into ruby:master Jul 20, 2022
@peterzhu2118 peterzhu2118 deleted the pz-wmap-crash branch July 20, 2022 12:40
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.

3 participants