]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Follow-up fix for stack overflow handling cleanup.
authorMike Pall <mike>
Thu, 21 Sep 2023 02:43:40 +0000 (04:43 +0200)
committerMike Pall <mike>
Thu, 21 Sep 2023 02:43:40 +0000 (04:43 +0200)
src/lj_state.c

index 1a3473b4544ee0cc4d236c087b7b7f1bba24ea95..c2f0b115a2a00eef8fc07865fb4cf4e7771884ee 100644 (file)
@@ -102,7 +102,7 @@ void LJ_FASTCALL lj_state_growstack(lua_State *L, MSize need)
     if (L->stacksize > LJ_STACK_MAXEX)
       lj_err_throw(L, LUA_ERRERR);  /* Does not invoke an error handler. */
     /* 1. We are _at_ the limit after the last growth. */
-    if (!L->status) {  /* 2. Throw 'stack overflow'. */
+    if (L->status < LUA_ERRRUN) {  /* 2. Throw 'stack overflow'. */
       L->status = LUA_ERRRUN;  /* Prevent ending here again for pushed msg. */
       lj_err_msg(L, LJ_ERR_STKOV);  /* May invoke an error handler. */
     }