]> git.ipfire.org Git - thirdparty/LuaJIT.git/log
thirdparty/LuaJIT.git
11 days agox86/x64: Don't use undefined MUL/IMUL zero flag. master v2.0
Mike Pall [Thu, 24 Jul 2025 13:38:45 +0000 (15:38 +0200)] 
x86/x64: Don't use undefined MUL/IMUL zero flag.

Reported by VrIgHtEr. #1376

11 days agoAvoid out-of-range PC for stack overflow error from snapshot restore.
Mike Pall [Thu, 24 Jul 2025 13:35:56 +0000 (15:35 +0200)] 
Avoid out-of-range PC for stack overflow error from snapshot restore.

Reported by Sergey Kaplun. #1369

11 days agoFFI: Fix dangling CType references (again).
Mike Pall [Thu, 24 Jul 2025 13:29:54 +0000 (15:29 +0200)] 
FFI: Fix dangling CType references (again).

Reported by Sergey Kaplun. Collateral of #1360

2 months agoFix JIT slot overflow during up-recursion.
Mike Pall [Wed, 28 May 2025 19:13:17 +0000 (21:13 +0200)] 
Fix JIT slot overflow during up-recursion.

Reported by Sergey Kaplun. #1358

2 months agoAvoid out-of-range PC for stack overflow error from snapshot restore.
Mike Pall [Wed, 28 May 2025 19:02:31 +0000 (21:02 +0200)] 
Avoid out-of-range PC for stack overflow error from snapshot restore.

Reported by Sergey Kaplun. #1359

2 months agoFFI: Fix dangling CType references.
Mike Pall [Wed, 28 May 2025 18:36:24 +0000 (20:36 +0200)] 
FFI: Fix dangling CType references.

Reported by Sergey Kaplun. Collateral of #1360

3 months agoFix error generation in load*.
Mike Pall [Mon, 7 Apr 2025 08:27:40 +0000 (10:27 +0200)] 
Fix error generation in load*.

Reported by Sergey Kaplun. #1353

3 months agoInitialize unused value when specializing to cdata metatable.
Mike Pall [Mon, 7 Apr 2025 07:22:07 +0000 (09:22 +0200)] 
Initialize unused value when specializing to cdata metatable.

Reported by jakitliang. #1354

4 months agoAvoid unpatching bytecode twice after a trace flush.
Mike Pall [Sun, 9 Mar 2025 22:04:23 +0000 (23:04 +0100)] 
Avoid unpatching bytecode twice after a trace flush.

Reported by Sergey Kaplun. #1345

4 months agoAdd compatibility string coercion for fp:seek() argument.
Mike Pall [Sun, 9 Mar 2025 15:21:29 +0000 (16:21 +0100)] 
Add compatibility string coercion for fp:seek() argument.

Reported by Magnus Wibeck. #1343

6 months agoFix recording of BC_VARG.
Mike Pall [Mon, 13 Jan 2025 15:19:57 +0000 (16:19 +0100)] 
Fix recording of BC_VARG.

Reported by Bachir Bendrissou.

6 months agoReject negative getfenv()/setfenv() levels to prevent compiler warning.
Mike Pall [Mon, 13 Jan 2025 15:16:27 +0000 (16:16 +0100)] 
Reject negative getfenv()/setfenv() levels to prevent compiler warning.

Thanks to Sergey Kaplun. #1329

6 months agoBump copyright date.
Mike Pall [Mon, 13 Jan 2025 14:59:10 +0000 (15:59 +0100)] 
Bump copyright date.

7 months agoForce fallback source name for stripped bytecode.
Mike Pall [Mon, 16 Dec 2024 13:30:10 +0000 (14:30 +0100)] 
Force fallback source name for stripped bytecode.

Reported by Lyrth. #1319

8 months agoFix detection of inconsistent renames due to sunk values.
Mike Pall [Thu, 28 Nov 2024 15:26:10 +0000 (16:26 +0100)] 
Fix detection of inconsistent renames due to sunk values.

Thanks to Sergey Kaplun. #1295 #584

10 months agoFix compiliation of getmetatable() for UDTYPE_IO_FILE.
Mike Pall [Sun, 29 Sep 2024 14:03:37 +0000 (16:03 +0200)] 
Fix compiliation of getmetatable() for UDTYPE_IO_FILE.

Reported by Sergey Bronnikov. #1279

10 months agoRemove ancient RtlUnwindEx workaround for MinGW64.
Mike Pall [Sun, 29 Sep 2024 13:33:32 +0000 (15:33 +0200)] 
Remove ancient RtlUnwindEx workaround for MinGW64.

Thanks to Kacper Michajłow. #1272

11 months agoFix limit check in narrow_conv_backprop().
Mike Pall [Sat, 24 Aug 2024 15:11:45 +0000 (17:11 +0200)] 
Fix limit check in narrow_conv_backprop().

Thanks to Sergey Kaplun. #1262

11 months agoAlways use IRT_NIL for IR_TBAR.
Mike Pall [Sat, 24 Aug 2024 15:03:17 +0000 (17:03 +0200)] 
Always use IRT_NIL for IR_TBAR.

Thanks to Peter Cawley. #1258

11 months agoARM: Make hard-float tobit conversions match JIT backend behavior.
Mike Pall [Tue, 20 Aug 2024 17:00:47 +0000 (19:00 +0200)] 
ARM: Make hard-float tobit conversions match JIT backend behavior.

Reported by Peter Cawley. #1253

11 months agoFix another potential file descriptor leak in luaL_loadfile*().
Mike Pall [Mon, 19 Aug 2024 15:31:15 +0000 (17:31 +0200)] 
Fix another potential file descriptor leak in luaL_loadfile*().

Reported by Peter Cawley. #1249

11 months agoMIPS32: Fix little-endian IR_RETF.
Mike Pall [Mon, 19 Aug 2024 14:17:44 +0000 (16:17 +0200)] 
MIPS32: Fix little-endian IR_RETF.

Thanks to Peter Cawley. #1250

11 months agoCorrectly close VM state after early OOM during open.
Mike Pall [Mon, 19 Aug 2024 14:14:55 +0000 (16:14 +0200)] 
Correctly close VM state after early OOM during open.

Reported by Assumeru. #1248

11 months agoFix potential file descriptor leak in luaL_loadfile*().
Mike Pall [Mon, 19 Aug 2024 14:11:36 +0000 (16:11 +0200)] 
Fix potential file descriptor leak in luaL_loadfile*().

Reported by Assumeru. #1249

11 months agoDifferent fix for partial snapshot restore due to stack overflow.
Mike Pall [Wed, 14 Aug 2024 22:17:19 +0000 (00:17 +0200)] 
Different fix for partial snapshot restore due to stack overflow.

Reported by Junlong Li. Fixed by Peter Cawley. #1196

11 months agoFix IR_ABC hoisting.
Mike Pall [Wed, 14 Aug 2024 22:10:01 +0000 (00:10 +0200)] 
Fix IR_ABC hoisting.

Reported by pwnhacker0x18. Fixed by Peter Cawley. #1194

11 months agoLimit CSE for IR_CARG to fix loop optimizations.
Mike Pall [Wed, 14 Aug 2024 22:07:34 +0000 (00:07 +0200)] 
Limit CSE for IR_CARG to fix loop optimizations.

Thanks to Peter Cawley. #1244

13 months agoFFI: Fix various issues in recff_cdata_arith.
Mike Pall [Wed, 3 Jul 2024 21:46:47 +0000 (23:46 +0200)] 
FFI: Fix various issues in recff_cdata_arith.

Thanks to Sergey Kaplun. #1224

13 months agoFix predict_next() in parser (for real now).
Mike Pall [Wed, 3 Jul 2024 21:45:16 +0000 (23:45 +0200)] 
Fix predict_next() in parser (for real now).

Reported by Sergey Kaplun. #1226 #1054

13 months agoFFI: Fix __tostring metamethod access to enum cdata value.
Mike Pall [Wed, 3 Jul 2024 21:43:57 +0000 (23:43 +0200)] 
FFI: Fix __tostring metamethod access to enum cdata value.

Thanks to Sergey Kaplun. #1232

13 months agoFix typo.
Mike Pall [Wed, 3 Jul 2024 21:43:29 +0000 (23:43 +0200)] 
Fix typo.

Reported by Sergey Bronnikov. #1223

13 months agoHandle partial snapshot restore due to stack overflow.
Mike Pall [Wed, 3 Jul 2024 19:42:21 +0000 (21:42 +0200)] 
Handle partial snapshot restore due to stack overflow.

Reported by pwnhacker0x18. Fixed by Peter Cawley. #1196

14 months agoPrevent sanitizer warning in snap_restoredata().
Mike Pall [Sat, 25 May 2024 14:38:05 +0000 (16:38 +0200)] 
Prevent sanitizer warning in snap_restoredata().

Thanks to Sergey Kaplun. #1193

15 months agoFix segment release check in internal memory allocator.
Mike Pall [Thu, 18 Apr 2024 23:44:19 +0000 (01:44 +0200)] 
Fix segment release check in internal memory allocator.

Thanks to Jinji Zeng. #1179 #1157

16 months agoPrevent down-recursion for side traces.
Mike Pall [Sun, 10 Mar 2024 16:23:21 +0000 (17:23 +0100)] 
Prevent down-recursion for side traces.

Thanks to Sergey Kaplun. #1169

16 months agoCheck frame size limit before returning to a lower frame.
Mike Pall [Sun, 10 Mar 2024 16:19:29 +0000 (17:19 +0100)] 
Check frame size limit before returning to a lower frame.

Thanks to Sergey Kaplun. #1173

16 months agoFFI: Treat cdata finalizer table as a GC root.
Mike Pall [Sun, 10 Mar 2024 16:16:41 +0000 (17:16 +0100)] 
FFI: Treat cdata finalizer table as a GC root.

Thanks to Sergey Bronnikov. #1168

16 months agoHandle stack reallocation in debug.setmetatable() and lua_setmetatable().
Mike Pall [Sun, 10 Mar 2024 16:13:28 +0000 (17:13 +0100)] 
Handle stack reallocation in debug.setmetatable() and lua_setmetatable().

Thanks to Sergey Kaplun. #1172

17 months agoRework stack overflow handling.
Mike Pall [Sun, 4 Feb 2024 15:34:30 +0000 (16:34 +0100)] 
Rework stack overflow handling.

Reported by pwnhacker0x18. Fixed by Peter Cawley. #1152

18 months agoPreserve keys with dynamic values in template tables when saving bytecode.
Mike Pall [Wed, 31 Jan 2024 13:32:04 +0000 (14:32 +0100)] 
Preserve keys with dynamic values in template tables when saving bytecode.

Reported by Lyrthras. Fixed by Peter Cawley. #1155

18 months agoPrevent include of luajit_rolling.h.
Mike Pall [Wed, 31 Jan 2024 13:29:23 +0000 (14:29 +0100)] 
Prevent include of luajit_rolling.h.

Thanks to Peter Cawley. #1145

18 months agoFix documentation bug about '\z' string escape.
Mike Pall [Fri, 26 Jan 2024 22:17:33 +0000 (23:17 +0100)] 
Fix documentation bug about '\z' string escape.

18 months agoFix unsinking of IR_FSTORE for NULL metatable.
Mike Pall [Tue, 23 Jan 2024 17:58:52 +0000 (18:58 +0100)] 
Fix unsinking of IR_FSTORE for NULL metatable.

Reported by pwnhacker0x18. #1147

19 months agoCheck for IR_HREF vs. IR_HREFK aliasing in non-nil store check.
Mike Pall [Sat, 23 Dec 2023 18:43:03 +0000 (19:43 +0100)] 
Check for IR_HREF vs. IR_HREFK aliasing in non-nil store check.

Thanks to Peter Cawley. #1133

19 months agoRespect jit.off() on pending trace exit.
Mike Pall [Sat, 23 Dec 2023 18:22:34 +0000 (19:22 +0100)] 
Respect jit.off() on pending trace exit.

Thanks to Sergey Kaplun. #1134

19 months agoSimplify handling of instable types in TNEW/TDUP load forwarding.
Mike Pall [Sat, 23 Dec 2023 18:14:32 +0000 (19:14 +0100)] 
Simplify handling of instable types in TNEW/TDUP load forwarding.

Thanks to Peter Cawley. #994

19 months agoOnly emit proper parent references in snapshot replay.
Mike Pall [Mon, 11 Dec 2023 12:01:36 +0000 (13:01 +0100)] 
Only emit proper parent references in snapshot replay.

Thanks to Peter Cawley. #1132

19 months agoARM: Fix stack restore for FP slots.
Mike Pall [Sun, 10 Dec 2023 15:10:48 +0000 (16:10 +0100)] 
ARM: Fix stack restore for FP slots.

Thanks to Peter Cawley. #1131

19 months agoDocument workaround for multilib vs. cross-compiler conflict.
Mike Pall [Sun, 10 Dec 2023 14:45:10 +0000 (15:45 +0100)] 
Document workaround for multilib vs. cross-compiler conflict.

Reported by igorpupkinable. #1126

19 months agoFix runtime library flags for MSVC debug builds.
Mike Pall [Sun, 10 Dec 2023 14:00:52 +0000 (15:00 +0100)] 
Fix runtime library flags for MSVC debug builds.

Reported by igor725. #1127

19 months agoFix .debug_abbrev section in GDB JIT API.
Mike Pall [Sun, 10 Dec 2023 13:48:34 +0000 (14:48 +0100)] 
Fix .debug_abbrev section in GDB JIT API.

Thanks to Dmitry Stogov. #1129

19 months agoEmit sunk IR_NEWREF only once per key on snapshot replay.
Mike Pall [Sun, 10 Dec 2023 13:29:45 +0000 (14:29 +0100)] 
Emit sunk IR_NEWREF only once per key on snapshot replay.

Thanks to Sergey Kaplun and Peter Cawley. #1128

20 months agox86/x64: Don't fuse loads across IR_NEWREF.
Mike Pall [Tue, 14 Nov 2023 21:50:21 +0000 (22:50 +0100)] 
x86/x64: Don't fuse loads across IR_NEWREF.

Reported by Peter Cawley. #1117

20 months agox86/x64: Add more red zone checks to assembler backend.
Mike Pall [Sun, 12 Nov 2023 14:18:44 +0000 (15:18 +0100)] 
x86/x64: Add more red zone checks to assembler backend.

Thanks to Peter Cawley. #1116

20 months agoAdd stack check to pcall/xpcall.
Mike Pall [Sun, 12 Nov 2023 13:42:24 +0000 (14:42 +0100)] 
Add stack check to pcall/xpcall.

Analyzed by Peter Cawley. #1048

20 months agoInvalidate SCEV entry when returning to lower frame.
Mike Pall [Thu, 9 Nov 2023 10:02:36 +0000 (11:02 +0100)] 
Invalidate SCEV entry when returning to lower frame.

Thanks to Zhongwei Yao. #1115

20 months agoFFI: Fix pragma push stack limit check and throw on overflow.
Mike Pall [Tue, 7 Nov 2023 21:25:42 +0000 (22:25 +0100)] 
FFI: Fix pragma push stack limit check and throw on overflow.

Reported by Sergey Kaplun. #1114

20 months agox64: Properly fix __call metamethod return dispatch.
Mike Pall [Sun, 5 Nov 2023 10:31:08 +0000 (11:31 +0100)] 
x64: Properly fix __call metamethod return dispatch.

Reported by Sergey Kaplun. #1110

21 months agoFFI: Fix dangling reference to CType in carith_checkarg().
Mike Pall [Sat, 21 Oct 2023 11:11:50 +0000 (13:11 +0200)] 
FFI: Fix dangling reference to CType in carith_checkarg().

Reported by Sergey Kaplun. #1108

22 months agoMaintain chain invariant in DCE.
Mike Pall [Fri, 22 Sep 2023 19:04:22 +0000 (21:04 +0200)] 
Maintain chain invariant in DCE.

Thanks to Peter Cawley. #1094

22 months agoFollow-up fix for stack overflow handling cleanup.
Mike Pall [Thu, 21 Sep 2023 02:43:40 +0000 (04:43 +0200)] 
Follow-up fix for stack overflow handling cleanup.

22 months agoHandle all stack layouts in (delayed) TRACE vmevent.
Mike Pall [Thu, 21 Sep 2023 00:15:16 +0000 (02:15 +0200)] 
Handle all stack layouts in (delayed) TRACE vmevent.

Thanks to Sergey Bronnikov and Peter Cawley. #1087

22 months agoAdd missing coercion when recording select(string, ...)
Mike Pall [Thu, 21 Sep 2023 00:10:18 +0000 (02:10 +0200)] 
Add missing coercion when recording select(string, ...)

Thanks to Peter Cawley. #1083

22 months agoCleanup stack overflow handling.
Mike Pall [Wed, 20 Sep 2023 23:58:43 +0000 (01:58 +0200)] 
Cleanup stack overflow handling.

Reported by Peter Cawley. #962

22 months agoAllow path overrides in genversion.lua with minilua, too.
Mike Pall [Sun, 10 Sep 2023 03:23:10 +0000 (05:23 +0200)] 
Allow path overrides in genversion.lua with minilua, too.

Thanks to arch1t3cht. #1067

22 months agoImprove architecture detection error messages.
Mike Pall [Sat, 9 Sep 2023 21:01:26 +0000 (23:01 +0200)] 
Improve architecture detection error messages.

22 months agoARM: Fix stack check code generation.
Mike Pall [Sat, 9 Sep 2023 16:16:31 +0000 (18:16 +0200)] 
ARM: Fix stack check code generation.

Thanks to Peter Cawley. #1068

22 months agoFix mcode limit check for non-x86 archs.
Mike Pall [Sat, 9 Sep 2023 15:44:54 +0000 (17:44 +0200)] 
Fix mcode limit check for non-x86 archs.

Thanks to Peter Cawley.

22 months agoAdd NaN check to IR_NEWREF.
Mike Pall [Sat, 9 Sep 2023 11:37:31 +0000 (13:37 +0200)] 
Add NaN check to IR_NEWREF.

Thanks to Peter Cawley. #1069

22 months agoAllow override of paths for genversion.lua.
Mike Pall [Sat, 9 Sep 2023 10:47:27 +0000 (12:47 +0200)] 
Allow override of paths for genversion.lua.

Thanks to arch1t3cht. #1067

22 months agoFix native MinGW build.
Mike Pall [Sat, 9 Sep 2023 10:41:47 +0000 (12:41 +0200)] 
Fix native MinGW build.

Thanks to Victor Bombi. #1071

23 months agoUpdate external MSDN URL in code.
Mike Pall [Tue, 29 Aug 2023 20:27:38 +0000 (22:27 +0200)] 
Update external MSDN URL in code.

Thanks to Kyle Marshall. #1060

23 months agoHandle table unsinking in the presence of IRFL_TAB_NOMM.
Mike Pall [Mon, 28 Aug 2023 20:15:42 +0000 (22:15 +0200)] 
Handle table unsinking in the presence of IRFL_TAB_NOMM.

Reported by Sergey Kaplun. #1052

23 months agoUse fallback name for install files without valid .git or .relver.
Mike Pall [Mon, 28 Aug 2023 19:25:51 +0000 (21:25 +0200)] 
Use fallback name for install files without valid .git or .relver.

23 months agoHandle non-.git checkout with .relver in .bat-file builds.
Mike Pall [Mon, 28 Aug 2023 19:59:01 +0000 (21:59 +0200)] 
Handle non-.git checkout with .relver in .bat-file builds.

Thanks to Simon Cooke.

23 months agoFix external C call stack check when using LUAJIT_MODE_WRAPCFUNC.
Mike Pall [Mon, 28 Aug 2023 19:04:01 +0000 (21:04 +0200)] 
Fix external C call stack check when using LUAJIT_MODE_WRAPCFUNC.

Thanks to Peter Cawley. #1047

23 months agoFix predict_next() in parser (again).
Mike Pall [Mon, 28 Aug 2023 19:00:37 +0000 (21:00 +0200)] 
Fix predict_next() in parser (again).

Reported by Sergey Bronnikov. #1054

23 months agoHandle the case when .git is not a directory.
Mike Pall [Tue, 22 Aug 2023 15:04:22 +0000 (17:04 +0200)] 
Handle the case when .git is not a directory.

Thanks to Alexander Shpilkin.

23 months agoAdd .gitattributes to dynamically resolve .relver.
Mike Pall [Tue, 22 Aug 2023 13:36:55 +0000 (15:36 +0200)] 
Add .gitattributes to dynamically resolve .relver.

Thanks to Alexander Shpilkin.

23 months agoFix Windows build scripts for rolling releases.
Mike Pall [Mon, 21 Aug 2023 11:08:00 +0000 (13:08 +0200)] 
Fix Windows build scripts for rolling releases.

Reported by Miku AuahDark.

23 months agoSwitch MSVC and console build scripts to rolling releases.
Mike Pall [Mon, 21 Aug 2023 01:59:03 +0000 (03:59 +0200)] 
Switch MSVC and console build scripts to rolling releases.

23 months agoSwitch build system to rolling releases. v2.0.ROLLING
Mike Pall [Mon, 21 Aug 2023 01:06:26 +0000 (03:06 +0200)] 
Switch build system to rolling releases.

23 months agoUpdate documentation for switch to rolling releases.
Mike Pall [Mon, 21 Aug 2023 00:28:49 +0000 (02:28 +0200)] 
Update documentation for switch to rolling releases.

23 months agoBump copyright date.
Mike Pall [Sun, 20 Aug 2023 19:25:30 +0000 (21:25 +0200)] 
Bump copyright date.

23 months agoFix maxslots when recording BC_VARG, part 3.
Mike Pall [Sat, 12 Aug 2023 18:16:56 +0000 (20:16 +0200)] 
Fix maxslots when recording BC_VARG, part 3.

Thanks to Peter Cawley. #1046

23 months agoFix predict_next() in parser.
Mike Pall [Sat, 12 Aug 2023 14:21:41 +0000 (16:21 +0200)] 
Fix predict_next() in parser.

Reported by Sergey Kaplun. #1033

2 years agoFix base register coalescing in side trace.
Mike Pall [Wed, 12 Jul 2023 19:56:17 +0000 (21:56 +0200)] 
Fix base register coalescing in side trace.

Thanks to Sergey Kaplun, NiLuJe and Peter Cawley. #1031 #1016

2 years agoFix maxslots when recording BC_VARG, part 2.
Mike Pall [Sun, 9 Jul 2023 19:08:12 +0000 (21:08 +0200)] 
Fix maxslots when recording BC_VARG, part 2.

Analyzed by Sergey Kaplun. #1024

2 years agoFix maxslots when recording BC_VARG.
Mike Pall [Sat, 8 Jul 2023 17:40:12 +0000 (19:40 +0200)] 
Fix maxslots when recording BC_VARG.

Analyzed by Sergey Kaplun. #1024

2 years agoFix register mask for stack check in head of side trace.
Mike Pall [Sat, 8 Jul 2023 17:36:24 +0000 (19:36 +0200)] 
Fix register mask for stack check in head of side trace.

Analyzed by Sergey Kaplun. #1016

2 years agoFFI: Fix ffi.metatype() for non-raw types.
Mike Pall [Sat, 8 Jul 2023 17:30:56 +0000 (19:30 +0200)] 
FFI: Fix ffi.metatype() for non-raw types.

Reported by 999pingGG. #1005

2 years agoFix handling of instable types in TNEW/TDUP load forwarding.
Mike Pall [Fri, 2 Jun 2023 09:38:45 +0000 (11:38 +0200)] 
Fix handling of instable types in TNEW/TDUP load forwarding.

Analyzed by Sergey Kaplun. #994

2 years agoFix compiler warning.
Mike Pall [Fri, 2 Jun 2023 09:36:24 +0000 (11:36 +0200)] 
Fix compiler warning.

Reported by Myriachan.

2 years agoFix TDUP load forwarding after table rehash.
Mike Pall [Sun, 16 Apr 2023 11:26:18 +0000 (13:26 +0200)] 
Fix TDUP load forwarding after table rehash.

Reported by Sergey Kaplun. #980

2 years agoFix canonicalization of +-0.0 keys for IR_NEWREF.
Mike Pall [Sun, 16 Apr 2023 11:24:08 +0000 (13:24 +0200)] 
Fix canonicalization of +-0.0 keys for IR_NEWREF.

Reported by Sergey Kaplun. #981

2 years agoImprove error reporting on stack overflow.
Mike Pall [Tue, 21 Feb 2023 16:05:12 +0000 (17:05 +0100)] 
Improve error reporting on stack overflow.

Thanks to Nicolas Lebedenco.

2 years agoAllow building sources with mixed LF/CRLF line-endings.
Mike Pall [Tue, 21 Feb 2023 15:49:51 +0000 (16:49 +0100)] 
Allow building sources with mixed LF/CRLF line-endings.

Reported by mgood7123.

2 years agoAvoid negation of signed integers in C that may hold INT*_MIN.
Mike Pall [Wed, 21 Dec 2022 23:03:06 +0000 (00:03 +0100)] 
Avoid negation of signed integers in C that may hold INT*_MIN.

Reported by minoki.
Recent C compilers 'take advantage' of the undefined behavior.
This completely changes the meaning of expressions like (k == -k).

2 years agoCorrect fix for stack check when recording BC_VARG.
Mike Pall [Thu, 8 Dec 2022 23:20:05 +0000 (00:20 +0100)] 
Correct fix for stack check when recording BC_VARG.

Reported by Yichun Zhang.

2 years agoFFI: Fix dangling reference to CType. Improve checks.
Mike Pall [Wed, 7 Dec 2022 16:19:29 +0000 (17:19 +0100)] 
FFI: Fix dangling reference to CType. Improve checks.

Reported by elmknot.