diff options
| author | Kouhei Sutou <[email protected]> | 2016-03-25 00:25:48 +0900 |
|---|---|---|
| committer | Kouhei Sutou <[email protected]> | 2016-03-25 00:25:48 +0900 |
| commit | c69cba2ad97c311d1ae72c8a77cf1e57d70d694f (patch) | |
| tree | b21b1c7f8b8769c883a8b4fec4d493038ac3f861 /src | |
| parent | dd072b53641ea518049923af7717f906706be360 (diff) | |
| download | mruby-c69cba2ad97c311d1ae72c8a77cf1e57d70d694f.tar.gz mruby-c69cba2ad97c311d1ae72c8a77cf1e57d70d694f.zip | |
Add missing regs update
mrb_vm_define_class() may realloc() mrb->c->stack because it calls
mrb_funcall() for inherited hook. If mrb->c->stack is realloc()-ed, regs
refers orphan address.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2271,6 +2271,7 @@ RETRY_TRY_BLOCK: base = mrb_obj_value(mrb->c->ci->target_class); } c = mrb_vm_define_class(mrb, base, super, id); + regs = mrb->c->stack; regs[a] = mrb_obj_value(c); ARENA_RESTORE(mrb, ai); NEXT; |
