From b8b49bf3954b23e32e34187a6ada00021c26e172 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 18 Apr 2024 23:57:53 +0200 Subject: [PATCH] Use generic trace error for OOM during trace stitching. Thanks to Sergey Kaplun. #1166 --- src/lj_ffrecord.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index 03d0e6ec..923824d9 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c @@ -152,6 +152,8 @@ static void recff_stitch(jit_State *J) if (errcode) { if (errcode == LUA_ERRRUN) copyTV(L, L->top-1, L->top + (1 + LJ_FR2)); + else + setintV(L->top-1, (int32_t)LJ_TRERR_RECERR); lj_err_throw(L, errcode); /* Propagate errors. */ } }