diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-26 04:01:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-26 04:01:38 +0000 |
commit | af4986f515bfccadc404709985422897217504c8 (patch) | |
tree | f87e22b5a0d490d943748e41808349ac65fa0047 /vm.c | |
parent | 201d99cc5f0c5f9da671245befe12e4036ff0c99 (diff) | |
download | ruby-af4986f515bfccadc404709985422897217504c8.tar.gz |
* vm.c (rb_thread_mark): should mark iseq itself other than normal
iseq. [ruby-dev:41880]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1646,8 +1646,11 @@ rb_thread_mark(void *ptr) rb_gc_mark_locations(p, p + th->mark_stack_len); while (cfp != limit_cfp) { + rb_iseq_t *iseq = cfp->iseq; rb_gc_mark(cfp->proc); - if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) rb_gc_mark(cfp->iseq->self); + if (iseq) { + rb_gc_mark(RUBY_VM_NORMAL_ISEQ_P(iseq) ? iseq->self : (VALUE)iseq); + } if (cfp->me) ((rb_method_entry_t *)cfp->me)->mark = 1; cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp); } |