Commit Graph

1872 Commits

Author SHA1 Message Date
Mike Pall
5db4b03aea Fix compiler warning.
Thanks to Holger Hoffstätte. #1436
2026-02-13 14:21:42 +01:00
Mike Pall
221ea00775 Fix minilua undefined behavior in bit.tohex.
Note: this is not a vulnerability! minilua is only used during the LuaJIT
build process. It only runs controlled and static Lua code (DynASM),
which is entirely contained within this repo and does not trigger the
undefined behavior.

This change is solely for the benefit of others, who might possibly use
minilua for purposes other than running DynASM.

Reported by quart27219. #1424
2026-01-09 17:34:15 +01:00
Mike Pall
282e1a969d Ignore PDB files for git.
Thanks to Michael Fisher. #1423
2026-01-09 17:26:13 +01:00
Mike Pall
6e69e47314 Bump copyright date. 2026-01-09 17:18:03 +01:00
Mike Pall
406cf69b3a DUALNUM: Add missing type conversion for FORI slots.
Reported by Sergey Kaplun. #1413
2025-12-06 08:35:19 +01:00
Mike Pall
34b59f8aa9 x86/x64: Backport fix for math.min()/math.max() argument check.
Reported by puffy.
2025-11-16 19:34:11 +01:00
Mike Pall
af9763a50d Fix edge cases when generating IR for string.byte/sub/find.
Contributed by XmiliaH. #1407
2025-11-14 20:15:44 +01:00
Mike Pall
c94312d348 FFI: Avoid dangling cts->L.
Reported by ZumiKua. #1405
2025-11-10 18:15:11 +01:00
Mike Pall
c92d0cb192 x86/x64: Don't use undefined MUL/IMUL zero flag.
Reported by VrIgHtEr. #1376
2025-07-24 15:38:45 +02:00
Mike Pall
e3fa3c48d8 Avoid out-of-range PC for stack overflow error from snapshot restore.
Reported by Sergey Kaplun. #1369
2025-07-24 15:35:56 +02:00
Mike Pall
c64020f3c6 FFI: Fix dangling CType references (again).
Reported by Sergey Kaplun. Collateral of #1360
2025-07-24 15:29:54 +02:00
Mike Pall
048972dbfd Fix JIT slot overflow during up-recursion.
Reported by Sergey Kaplun. #1358
2025-05-28 21:13:17 +02:00
Mike Pall
cd4af8ad80 Avoid out-of-range PC for stack overflow error from snapshot restore.
Reported by Sergey Kaplun. #1359
2025-05-28 21:02:31 +02:00
Mike Pall
9c8eb7cfe1 FFI: Fix dangling CType references.
Reported by Sergey Kaplun. Collateral of #1360
2025-05-28 20:36:24 +02:00
Mike Pall
e76bb50d44 Fix error generation in load*.
Reported by Sergey Kaplun. #1353
2025-04-07 10:27:40 +02:00
Mike Pall
e9e4b6d302 Initialize unused value when specializing to cdata metatable.
Reported by jakitliang. #1354
2025-04-07 09:22:07 +02:00
Mike Pall
85c3f2fb6f Avoid unpatching bytecode twice after a trace flush.
Reported by Sergey Kaplun. #1345
2025-03-09 23:04:23 +01:00
Mike Pall
d508715ab6 Add compatibility string coercion for fp:seek() argument.
Reported by Magnus Wibeck. #1343
2025-03-09 16:21:29 +01:00
Mike Pall
62e362afbb Fix recording of BC_VARG.
Reported by Bachir Bendrissou.
2025-01-13 16:19:57 +01:00
Mike Pall
9d777346bc Reject negative getfenv()/setfenv() levels to prevent compiler warning.
Thanks to Sergey Kaplun. #1329
2025-01-13 16:16:27 +01:00
Mike Pall
e8236561d4 Bump copyright date. 2025-01-13 15:59:10 +01:00
Mike Pall
e2e0b1dd2d Force fallback source name for stripped bytecode.
Reported by Lyrth. #1319
2024-12-16 14:30:10 +01:00
Mike Pall
811e448daa Fix detection of inconsistent renames due to sunk values.
Thanks to Sergey Kaplun. #1295 #584
2024-11-28 16:26:10 +01:00
Mike Pall
5141cbc20c Fix compiliation of getmetatable() for UDTYPE_IO_FILE.
Reported by Sergey Bronnikov. #1279
2024-09-29 16:03:37 +02:00
Mike Pall
c63a160706 Remove ancient RtlUnwindEx workaround for MinGW64.
Thanks to Kacper Michajłow. #1272
2024-09-29 15:33:32 +02:00
Mike Pall
e45fd4cb71 Fix limit check in narrow_conv_backprop().
Thanks to Sergey Kaplun. #1262
2024-08-24 17:11:45 +02:00
Mike Pall
9bb6b35f7f Always use IRT_NIL for IR_TBAR.
Thanks to Peter Cawley. #1258
2024-08-24 17:03:17 +02:00
Mike Pall
32a683d226 ARM: Make hard-float tobit conversions match JIT backend behavior.
Reported by Peter Cawley. #1253
2024-08-20 19:00:47 +02:00
Mike Pall
ab39082fdd Fix another potential file descriptor leak in luaL_loadfile*().
Reported by Peter Cawley. #1249
2024-08-19 17:31:15 +02:00
Mike Pall
bcc6cbb188 MIPS32: Fix little-endian IR_RETF.
Thanks to Peter Cawley. #1250
2024-08-19 16:17:44 +02:00
Mike Pall
5ca25ee83e Correctly close VM state after early OOM during open.
Reported by Assumeru. #1248
2024-08-19 16:14:55 +02:00
Mike Pall
19db4e9b7c Fix potential file descriptor leak in luaL_loadfile*().
Reported by Assumeru. #1249
2024-08-19 16:11:36 +02:00
Mike Pall
86e7123bb1 Different fix for partial snapshot restore due to stack overflow.
Reported by Junlong Li. Fixed by Peter Cawley. #1196
2024-08-15 00:17:19 +02:00
Mike Pall
7369eff67d Fix IR_ABC hoisting.
Reported by pwnhacker0x18. Fixed by Peter Cawley. #1194
2024-08-15 00:10:01 +02:00
Mike Pall
3bdc6498c4 Limit CSE for IR_CARG to fix loop optimizations.
Thanks to Peter Cawley. #1244
2024-08-15 00:07:34 +02:00
Mike Pall
7a608e4425 FFI: Fix various issues in recff_cdata_arith.
Thanks to Sergey Kaplun. #1224
2024-07-03 23:46:47 +02:00
Mike Pall
f602f0154b Fix predict_next() in parser (for real now).
Reported by Sergey Kaplun. #1226 #1054
2024-07-03 23:45:16 +02:00
Mike Pall
f2a1cd4328 FFI: Fix __tostring metamethod access to enum cdata value.
Thanks to Sergey Kaplun. #1232
2024-07-03 23:43:57 +02:00
Mike Pall
0f8b878e2f Fix typo.
Reported by Sergey Bronnikov. #1223
2024-07-03 23:43:29 +02:00
Mike Pall
811c5322c8 Handle partial snapshot restore due to stack overflow.
Reported by pwnhacker0x18. Fixed by Peter Cawley. #1196
2024-07-03 21:42:21 +02:00
Mike Pall
4a22050df9 Prevent sanitizer warning in snap_restoredata().
Thanks to Sergey Kaplun. #1193
2024-05-25 16:38:05 +02:00
Mike Pall
9b5e837ac2 Fix segment release check in internal memory allocator.
Thanks to Jinji Zeng. #1179 #1157
2024-04-19 01:44:19 +02:00
Mike Pall
cae361187e Prevent down-recursion for side traces.
Thanks to Sergey Kaplun. #1169
2024-03-10 17:23:21 +01:00
Mike Pall
302366a338 Check frame size limit before returning to a lower frame.
Thanks to Sergey Kaplun. #1173
2024-03-10 17:19:29 +01:00
Mike Pall
dda1ac273a FFI: Treat cdata finalizer table as a GC root.
Thanks to Sergey Bronnikov. #1168
2024-03-10 17:16:41 +01:00
Mike Pall
88ed9fdbbb Handle stack reallocation in debug.setmetatable() and lua_setmetatable().
Thanks to Sergey Kaplun. #1172
2024-03-10 17:13:28 +01:00
Mike Pall
defe61a567 Rework stack overflow handling.
Reported by pwnhacker0x18. Fixed by Peter Cawley. #1152
2024-02-04 16:34:30 +01:00
Mike Pall
9cdd5a9479 Preserve keys with dynamic values in template tables when saving bytecode.
Reported by Lyrthras. Fixed by Peter Cawley. #1155
2024-01-31 14:32:04 +01:00
Mike Pall
14987af80a Prevent include of luajit_rolling.h.
Thanks to Peter Cawley. #1145
2024-01-31 14:29:23 +01:00
Mike Pall
e6c0ade97c Fix documentation bug about '\z' string escape. 2024-01-26 23:17:33 +01:00