exception jump should not cross mrb_funcall border; close #276

This commit is contained in:
Yukihiro Matsumoto
2012-06-15 22:57:11 +09:00
parent 4913311155
commit 5353b8555c
+4
View File
@@ -1013,6 +1013,10 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
while (ci[0].ridx == ci[-1].ridx) {
cipop(mrb);
ci = mrb->ci;
if (ci->acc < 0) {
mrb->jmp = prev_jmp;
longjmp(*(jmp_buf*)mrb->jmp, 1);
}
while (eidx > mrb->ci->eidx) {
ecall(mrb, --eidx);
}