summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 14:15:17 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 14:15:17 +0000
commitd3c05ae77c933257f874fe043b4e370a935c1ec3 (patch)
tree8d5927d6a4d095c25972d37f328bad782fc389ab /iseq.c
parent6b2f77a844a8bf3c8be4f0888df6f53dec9198c5 (diff)
merge revision(s) 53514,53524: [Backport #11928]
* iseq.c (iseqw_mark): as wrapped iseq is isolated from the call stack, it needs to take care of its parent and ancestors, so that they do not become orphans. [ruby-core:72620] [Bug #11928] * iseq.c (rb_iseq_mark): mark parent iseq to prevent dynamically generated iseq by eval from GC. [ruby-core:72620] [Bug #11928] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 3c68264262..e679108558 100644
--- a/iseq.c
+++ b/iseq.c
@@ -113,6 +113,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
rb_gc_mark(body->location.base_label);
rb_gc_mark(body->location.path);
RUBY_MARK_UNLESS_NULL(body->location.absolute_path);
+ RUBY_MARK_UNLESS_NULL((VALUE)body->parent_iseq);
}
if (FL_TEST(iseq, ISEQ_NOT_LOADED_YET)) {