diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-08-16 16:04:26 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-08-27 11:43:18 -0700 |
commit | 932a471d3811d6d44764ce42b1b140a04961a763 (patch) | |
tree | d1cf0f163939dee99c623f1a14cfc433103038ec /node.c | |
parent | cbcad66741507daea5f5037510404848720e347f (diff) |
Directly mark compile options from the AST object
`rb_ast_t` holds a reference to this object, so it should mark the
object. Currently it is relying on the `mark_ary` on `node_buffer` to
ensure that the object stays alive. But since the array internals can
move, this could cause a segv if compaction impacts the array.
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1184,6 +1184,7 @@ void rb_ast_mark(rb_ast_t *ast) { if (ast->node_buffer) rb_gc_mark(ast->node_buffer->mark_ary); + if (ast->body.compile_option) rb_gc_mark(ast->body.compile_option); } void |