Jump address should fit in 16 bits range; fix #3426

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-02-04 12:37:08 +09:00
parent a746ebe96f
commit 6e0ba0085d
+3
View File
@@ -388,6 +388,9 @@ dispatch(codegen_scope *s, int pc)
scope_error(s);
break;
}
if (diff > MAXARG_sBx) {
codegen_error(s, "too distant jump address");
}
s->iseq[pc] = MKOP_AsBx(c, GETARG_A(i), diff);
}