Fix frame for more types of on-trace error messages.

Thanks to Maxim Kokryashkin. #1034
This commit is contained in:
Mike Pall 2023-08-12 14:48:34 +02:00
parent 165ea18b0e
commit d5bbf9cdb4

View File

@ -875,6 +875,10 @@ LJ_NORET LJ_NOINLINE static void err_msgv(lua_State *L, ErrMsg em, ...)
const char *msg;
va_list argp;
va_start(argp, em);
if (LJ_HASJIT) {
TValue *base = tvref(G(L)->jit_base);
if (base) L->base = base;
}
if (curr_funcisL(L)) L->top = curr_topL(L);
msg = lj_strfmt_pushvf(L, err2msg(em), argp);
va_end(argp);