summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-26 04:01:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-26 04:01:38 +0000
commitaf4986f515bfccadc404709985422897217504c8 (patch)
treef87e22b5a0d490d943748e41808349ac65fa0047 /vm.c
parent201d99cc5f0c5f9da671245befe12e4036ff0c99 (diff)
* 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.c5
1 files changed, 4 insertions, 1 deletions
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);
}