diff --git a/ChangeLog b/ChangeLog index 1247c73eef..4506b6db12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 30 06:13:10 2015 Koichi Sasada + + * vm_insnhelper.c (vm_check_frame_detail): should require me for + VM_FRAME_FLAG_BMETHOD type frame. + Thu Oct 29 18:42:30 2015 Koichi Sasada * gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can return diff --git a/vm_insnhelper.c b/vm_insnhelper.c index b4af1409c2..7fbdcd9c27 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -67,13 +67,17 @@ callable_method_entry_p(const rb_callable_method_entry_t *me) } static void -vm_check_frame_detail(int magic, int req_block, int req_me, int req_cref, VALUE specval, VALUE cref_or_me) +vm_check_frame_detail(VALUE type, int req_block, int req_me, int req_cref, VALUE specval, VALUE cref_or_me) { + int magic = (int)(type & VM_FRAME_MAGIC_MASK); enum imemo_type cref_or_me_type = imemo_none; if (RB_TYPE_P(cref_or_me, T_IMEMO)) { cref_or_me_type = imemo_type(cref_or_me); } + if (type & VM_FRAME_FLAG_BMETHOD) { + req_me = TRUE; + } if (req_block && !VM_ENVVAL_BLOCK_PTR_P(specval)) { rb_bug("vm_push_frame: specval (%p) should be a block_ptr on %x frame", (void *)specval, magic); @@ -119,7 +123,7 @@ vm_check_frame(VALUE type, { int magic = (int)(type & VM_FRAME_MAGIC_MASK); -#define CHECK(magic, req_block, req_me, req_cref) case magic: vm_check_frame_detail(magic, req_block, req_me, req_cref, specval, cref_or_me); break; +#define CHECK(magic, req_block, req_me, req_cref) case magic: vm_check_frame_detail(type, req_block, req_me, req_cref, specval, cref_or_me); break; switch (magic) { /* BLK ME CREF */ CHECK(VM_FRAME_MAGIC_METHOD, TRUE, TRUE, FALSE);