From 025b20005f8988b28fa3bd429adca6fe279edcbc Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 17 Mar 2025 17:40:26 +0100 Subject: Circumvent MSVC possible bug causing a crash in optimized builds --- src/universe.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/universe.cpp b/src/universe.cpp index db00b72..89ad02a 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -451,7 +451,9 @@ int Universe::UniverseGC(lua_State* const L_) } else { // take the value returned by the finalizer (or our default message) and throw it as an error // since we are inside Lua's GCTM, it will be propagated through the warning system (Lua 5.4) or swallowed silently - raise_lua_error(L_); + // IMPORTANT: lua_error() is used here instead of the wrapper raise_lua_error() to circumvent what looks like a MSVC compiler bug + // that manifests as a crash inside ntdll!longjmp() function, in optimized builds only + lua_error(L_); } } -- cgit v1.2.3-55-g6feb