Limit number of parent links handled by backend.

This commit is contained in:
Mike Pall 2012-07-11 16:48:52 +02:00
parent 24fa85760c
commit 53e28d7678

View File

@ -1576,6 +1576,8 @@ static void asm_setup_regsp(ASMState *as)
if (as->parent) { if (as->parent) {
uint16_t *p; uint16_t *p;
lastir = lj_snap_regspmap(as->parent, as->J->exitno, ir); lastir = lj_snap_regspmap(as->parent, as->J->exitno, ir);
if (lastir - ir > LJ_MAX_JSLOTS)
lj_trace_err(as->J, LJ_TRERR_NYICOAL);
as->stopins = (IRRef)((lastir-1) - as->ir); as->stopins = (IRRef)((lastir-1) - as->ir);
for (p = as->parentmap; ir < lastir; ir++) { for (p = as->parentmap; ir < lastir; ir++) {
RegSP rs = ir->prev; RegSP rs = ir->prev;