]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Limit number of parent links handled by backend.
authorMike Pall <mike>
Wed, 11 Jul 2012 14:48:52 +0000 (16:48 +0200)
committerMike Pall <mike>
Wed, 11 Jul 2012 14:48:52 +0000 (16:48 +0200)
src/lj_asm.c

index 5ad140030ffffca7e64343a448b7ffd6169acc97..2e6b17451a20d81e6e9b4823aa01d9d3cc2c4b2c 100644 (file)
@@ -1576,6 +1576,8 @@ static void asm_setup_regsp(ASMState *as)
   if (as->parent) {
     uint16_t *p;
     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);
     for (p = as->parentmap; ir < lastir; ir++) {
       RegSP rs = ir->prev;