Commit Graph

1882 Commits

Author SHA1 Message Date
Mike Pall
295d45fb26 Make check in os.time() consistent.
Thanks to Temir Galeev. #1470
2026-06-25 11:59:34 +02:00
Mike Pall
d2c1327f57 Fix stack overflow relimit handling.
Thanks to Sergey Kaplun. #1471
2026-06-16 11:12:21 +02:00
Mike Pall
72d2061ae2 Fix corner case of os.time().
Thanks to Temir Galeev. #1470
2026-06-13 10:59:29 +02:00
Mike Pall
c3b379bf50 FFI: Prevent sanitizer warning in carith_ptr().
Reported by Sergey Bronnikov. #1459
2026-05-25 01:26:26 +02:00
Mike Pall
86d414f5ca Prevent sanitizer warning in os.time().
Reported by Sergey Bronnikov. #1454
2026-05-25 01:25:32 +02:00
Mike Pall
e4c7d8b380 FFI: Shrink container of packed bitfield.
Reported by Huang Haiyang. #1451
2026-03-30 20:41:59 +02:00
Mike Pall
f322ecb51e Prevent false positive sanitizer warning in unpack().
Reported by Sergey Bronnikov. #1450
2026-03-27 19:49:05 +01:00
Mike Pall
b58b071895 FFI: Fix pointer difference operation on 64 bit platforms.
Thanks to cuiweixie. #1449
2026-03-27 19:47:27 +01:00
Mike Pall
89f268b3f7 Fix edge cases when recording string.byte/sub.
Thanks to Sergey Kaplun. #1443
2026-03-04 11:18:28 +01:00
Mike Pall
02e2999558 FFI: Fix constructor index resolution in JIT compiler.
Reported by Vladimir Davydov and Sergey Kaplun. #1441
2026-02-24 22:13:15 +01:00
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