From d3c05ae77c933257f874fe043b4e370a935c1ec3 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 29 Mar 2016 14:15:17 +0000 Subject: 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 --- iseq.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iseq.c') 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)) { -- cgit v1.2.3