summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_insnhelper.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e26d86295..b32007bcf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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) {