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

do not destroy a page with an active TT_ENV #3339

Merged
merged 1 commit into from Dec 10, 2016

Conversation

kazuho
Copy link
Contributor

@kazuho kazuho commented Dec 10, 2016

When a dead TT_FIBER object refers to a dead-and-shared TT_ENV object, both of the two gets collected, since neither of them are marked.

In such case, if the TT_ENV object is freed before the TT_FIBER object, a pointer within the TT_FIBER object referring to the TT_ENV object becomes invalid, which leads to freed memory access or segmentation fault if the page that contained the TT_ENV object was released prior to the destruction of the TT_FIBER object.

@matz matz merged commit 965690c into mruby:master Dec 10, 2016
2 checks passed
matz added a commit that referenced this issue Dec 10, 2016
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.

None yet

2 participants