From: Mike Pall Date: Sun, 23 Jan 2022 18:16:53 +0000 (+0100) Subject: Always exit after machine code page protection change fails. X-Git-Tag: v2.1.ROLLING~94^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c50232eb320d56d526ba5e6cb5bda8cf5a848a55;p=thirdparty%2FLuaJIT.git Always exit after machine code page protection change fails. Reported by Sergey Kaplun. --- diff --git a/src/lj_mcode.c b/src/lj_mcode.c index ac37c1a6..0a3b3fa3 100644 --- a/src/lj_mcode.c +++ b/src/lj_mcode.c @@ -180,7 +180,7 @@ static void mcode_protect(jit_State *J, int prot) #define MCPROT_RUN MCPROT_RX /* Protection twiddling failed. Probably due to kernel security. */ -static LJ_NOINLINE void mcode_protfail(jit_State *J) +static LJ_NORET LJ_NOINLINE void mcode_protfail(jit_State *J) { lua_CFunction panic = J2G(J)->panic; if (panic) { @@ -188,6 +188,7 @@ static LJ_NOINLINE void mcode_protfail(jit_State *J) setstrV(L, L->top++, lj_err_str(L, LJ_ERR_JITPROT)); panic(L); } + exit(EXIT_FAILURE); } /* Change protection of MCode area. */