]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Remove temporary mcode limit error from application stack.
authorMike Pall <mike>
Mon, 8 Aug 2011 22:45:26 +0000 (00:45 +0200)
committerMike Pall <mike>
Mon, 8 Aug 2011 22:45:26 +0000 (00:45 +0200)
src/lj_dispatch.c
src/lj_trace.c

index b1d17add26a7b1454952297502c19e6a6235f0e7..38fd1709619ce82a0d26d1dcf5ec3acd3432f57d 100644 (file)
@@ -431,8 +431,12 @@ ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc)
     goto out;
   } else if (J->state != LJ_TRACE_IDLE &&
             !(g->hookmask & (HOOK_GC|HOOK_VMEVENT))) {
+#ifdef LUA_USE_ASSERT
+    ptrdiff_t delta = L->top - L->base;
+#endif
     /* Record the FUNC* bytecodes, too. */
     lj_trace_ins(J, pc-1);  /* The interpreter bytecode PC is offset by 1. */
+    lua_assert(L->top - L->base == delta);
   }
 #endif
   if ((g->hookmask & LUA_MASKCALL)) {
index 33cc98f7ed32bcdb04f3d78be49f700c0ea42611..afaeb3000f4af234c9944c4adf0e327e330ed1d2 100644 (file)
@@ -497,6 +497,7 @@ static int trace_abort(jit_State *J)
   if (tvisnumber(L->top-1))
     e = (TraceError)numberVint(L->top-1);
   if (e == LJ_TRERR_MCODELM) {
+    L->top--;  /* Remove error object */
     J->state = LJ_TRACE_ASM;
     return 1;  /* Retry ASM with new MCode area. */
   }