check iseq is executable

This commit is contained in:
Koichi Sasada 2019-07-23 08:42:20 +01:00
parent 33f54da15b
commit c25ff7bb5d

2
iseq.c
View File

@ -370,7 +370,7 @@ rb_iseq_memsize(const rb_iseq_t *iseq)
/* TODO: should we count original_iseq? */
if (body) {
if (ISEQ_EXECUTABLE_P(iseq) && body) {
struct rb_call_info_with_kwarg *ci_kw_entries = (struct rb_call_info_with_kwarg *)&body->ci_entries[body->ci_size];
size += sizeof(struct rb_iseq_constant_body);