summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-23 14:09:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-23 14:09:22 +0000
commitd1a4b542186800607a60490d3aef8e244e00ca0c (patch)
tree495689140416de38300073a605d17c6d85eb501d
parent67d1d75fcbc04d1c2a2dd2aa1ae7139c7051950c (diff)
* vm_insnhelper.c (vm_get_cref0): cref is stacked only in normal
iseqs, so check if it is the case first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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) {