1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_cc_fill() need to clear aux.

vm_cc_fill() fills CC information into stack allocated memory so
it is not cleared. So we need to clear CC->aux.
This commit is contained in:
Koichi Sasada 2020-03-02 14:25:35 +09:00
parent d348b4adef
commit 4fd51f848a

View file

@ -239,6 +239,7 @@ struct rb_callcache {
union {
const unsigned int attr_index;
const enum method_missing_reason method_missing_reason; /* used by method_missing */
VALUE v;
} aux_;
};
@ -265,6 +266,7 @@ vm_cc_fill(struct rb_callcache *cc,
.klass = klass,
.cme_ = cme,
.call_ = call,
.aux_.v = 0,
};
MEMCPY(cc, &cc_body, struct rb_callcache, 1);
return cc;