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

Assertion failure in mrb_write_barrier #3689

Closed
clayton-shopify opened this issue Jun 2, 2017 · 1 comment
Closed

Assertion failure in mrb_write_barrier #3689

clayton-shopify opened this issue Jun 2, 2017 · 1 comment

Comments

@clayton-shopify
Copy link
Contributor

The following input demonstrates an assertion failure:

GC.start
ObjectSpace.each_object{ GC.generational_mode = nil }
a

Assertion failed: (((gc)->generational) || gc->state != MRB_GC_STATE_ROOT), function mrb_write_barrier, file /Users/clayton/git/mruby/src/gc.c, line 1304.

This issue was reported by Dinko Galetic & Denis Kasak (https://hackerone.com/dgaletic).

@matz
Copy link
Member

matz commented Jun 3, 2017

It turns out it's (almost) impossible to keep consistency in GC after changing generational mode during iteration. I will make it impossible by raising an exception.

@matz matz closed this as completed in c9a4f8a Jun 3, 2017
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

No branches or pull requests

2 participants