Skip to content

Commit

Permalink
Fix frame for on-trace out-of-memory error.
Browse files Browse the repository at this point in the history
Reported by ruidong007.
  • Loading branch information
Mike Pall committed Jun 2, 2023
1 parent 8e53ccc commit 2d8300c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lj_err.c
Expand Up @@ -777,6 +777,10 @@ LJ_NOINLINE void lj_err_mem(lua_State *L)
{
if (L->status == LUA_ERRERR+1) /* Don't touch the stack during lua_open. */
lj_vm_unwind_c(L->cframe, LUA_ERRMEM);
if (LJ_HASJIT) {
TValue *base = tvref(G(L)->jit_base);
if (base) L->base = base;
}
if (curr_funcisL(L)) L->top = curr_topL(L);
setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRMEM));
lj_err_throw(L, LUA_ERRMEM);
Expand Down

0 comments on commit 2d8300c

Please sign in to comment.