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

fix and reduce the risk of GC-arena related leaks #701

Merged
merged 1 commit into from Jan 14, 2016
Merged

Conversation

kazuho
Copy link
Member

@kazuho kazuho commented Jan 14, 2016

Current design pushes down the arena value to callees so that they could restore the arena when operation is complete. The positive side of the design is that it would help us restore the arena earlier, and that there is more chance of callees getting tail-call optimized. The downside is that we need to assert that the arena is restored in more code paths.

As has been reported in #699, we have failed to assert that the arena is always being restored. I have found that such code is also missing here.

Now that we have found multiple occurrences of such failures we should switch to a more conservative design: maintain GC arena at the highest level; i.e. restore the GC state within the functions that collect the GC state. With the change, the code paths involved to handling the GC arena decreases, thereby it becomes easier for us to audit the code.

…ad of pushing down the arena value to let callees restore the state upon return
@kazuho kazuho added the mruby label Jan 14, 2016
@kazuho kazuho added this to the v1.7 milestone Jan 14, 2016
@kazuho kazuho mentioned this pull request Jan 14, 2016
15 tasks
kazuho added a commit that referenced this pull request Jan 14, 2016
fix and reduce the risk of GC-arena related leaks
@kazuho kazuho merged commit e49fdd7 into master Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant