From: Mike Pall Date: Sat, 12 Aug 2023 12:48:34 +0000 (+0200) Subject: Fix frame for more types of on-trace error messages. X-Git-Tag: v2.1.ROLLING~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5bbf9cdb4c5eddc404a90bd44f077cfb3a57a90;p=thirdparty%2FLuaJIT.git Fix frame for more types of on-trace error messages. Thanks to Maxim Kokryashkin. #1034 --- diff --git a/src/lj_err.c b/src/lj_err.c index 3ee70b86..9652ef35 100644 --- a/src/lj_err.c +++ b/src/lj_err.c @@ -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);