diff options
| author | Masamitsu MURASE <[email protected]> | 2013-01-30 20:46:37 +0900 |
|---|---|---|
| committer | Masamitsu MURASE <[email protected]> | 2013-01-30 20:46:37 +0900 |
| commit | 8ce1ea843738170d53cf627b7b7ff09e55076b85 (patch) | |
| tree | 5d51f85d7b6c32410506947acf65c90101bf66a3 /src | |
| parent | a5fbaf17f78136d52260a90c3a3647b1893e44e2 (diff) | |
| download | mruby-8ce1ea843738170d53cf627b7b7ff09e55076b85.tar.gz mruby-8ce1ea843738170d53cf627b7b7ff09e55076b85.zip | |
Protect irep of ensure.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1236,6 +1236,12 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) acc = ci->acc; pc = ci->pc; regs = mrb->stack = mrb->stbase + ci->stackidx; + { + int idx = eidx; + while (idx > mrb->ci->eidx) { + mrb_gc_protect(mrb, mrb_obj_value(mrb->ensure[--idx])); + } + } while (eidx > mrb->ci->eidx) { ecall(mrb, --eidx); } |
