diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_insnhelper.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Thu Sep 23 23:09:08 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * vm_insnhelper.c (vm_get_cref0): cref is stacked only in normal + iseqs, so check if it is the case first. + Thu Sep 23 23:08:41 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * tool/config.sub: mingw64 should use x86_64. [ruby-core:32514] diff --git a/vm_insnhelper.c b/vm_insnhelper.c index ba3b0cbb37..6b822d9e96 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1057,6 +1057,7 @@ vm_get_cref0(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp) { while (1) { if (lfp == dfp) { + if (!RUBY_VM_NORMAL_ISEQ_P(iseq)) return NULL; return iseq->cref_stack; } else if (dfp[-1] != Qnil) { |