diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-18 16:49:43 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-18 16:49:43 +0900 |
| commit | 79e0314337f64bf48b280197f112070011a3619a (patch) | |
| tree | 7475a1705dce2206d1eeac5c46b21881ada7d4eb /src | |
| parent | ae4217e813a1067824965ad3ddc686e2dc30fddd (diff) | |
| download | mruby-79e0314337f64bf48b280197f112070011a3619a.tar.gz mruby-79e0314337f64bf48b280197f112070011a3619a.zip | |
Call envadjust() before updating VM stack.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -164,10 +164,10 @@ stack_extend_alloc(mrb_state *mrb, int room) mrb_exc_raise(mrb, mrb_obj_value(mrb->stack_err)); } stack_clear(&(newstack[oldsize]), size - oldsize); + envadjust(mrb, oldbase, newstack); mrb->c->stbase = newstack; mrb->c->stack = mrb->c->stbase + off; mrb->c->stend = mrb->c->stbase + size; - envadjust(mrb, oldbase, mrb->c->stbase); /* Raise an exception if the new stack size will be too large, to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */ |
