From af4986f515bfccadc404709985422897217504c8 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 Jul 2010 04:01:38 +0000 Subject: * 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 --- vm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 3010fe8ef3..e62c9a4b7b 100644 --- a/vm.c +++ b/vm.c @@ -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); } -- cgit v1.2.3