mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
8a73faf61e
mrb_const_set may invoke const_added via mrb_funcall_argv, which re-enters the VM and can reallocate cibase. This invalidates the local ci pointer (and thus the regs macro that expands to ci->stack), causing a use-after-free on the next opcode dispatch. OP_SETMCNST and the OP_GET* / OP_*IDX opcodes already follow this pattern; align OP_SETCONST with them. Reported by OSS-Fuzz (clusterfuzz testcase 5886006653157376). Co-authored-by: Claude <noreply@anthropic.com>