diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-12 15:17:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-12 15:17:19 +0000 |
commit | 1b39a6e539e617f21ce367ee00899f505ddf6c24 (patch) | |
tree | 08d4aa626b0c886080c79361c9bc8504ed8eb8b7 /iseq.c | |
parent | 9efd4dbe73babbc1be41d4bf72db2dbbcb1cfa5d (diff) |
iseq.c: mark parents of wrapped iseq
* 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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -711,7 +711,11 @@ rb_iseq_coverage(const rb_iseq_t *iseq) static void iseqw_mark(void *ptr) { + const rb_iseq_t *iseq = ptr; rb_gc_mark((VALUE)ptr); + while ((iseq = iseq->body->parent_iseq) != NULL) { + rb_gc_mark((VALUE)iseq); + } } static size_t |