Commit Graph

1854 Commits

Author SHA1 Message Date
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
Mike Pall
85b4fed0b0 Fix unsinking of IR_FSTORE for NULL metatable.
Reported by pwnhacker0x18. #1147
2024-01-23 18:58:52 +01:00
Mike Pall
658530562c Check for IR_HREF vs. IR_HREFK aliasing in non-nil store check.
Thanks to Peter Cawley. #1133
2023-12-23 19:43:03 +01:00
Mike Pall
7dbe545933 Respect jit.off() on pending trace exit.
Thanks to Sergey Kaplun. #1134
2023-12-23 19:22:34 +01:00
Mike Pall
c42c62e71a Simplify handling of instable types in TNEW/TDUP load forwarding.
Thanks to Peter Cawley. #994
2023-12-23 19:14:32 +01:00
Mike Pall
9bdfd34dcc Only emit proper parent references in snapshot replay.
Thanks to Peter Cawley. #1132
2023-12-11 13:01:36 +01:00
Mike Pall
10cc759f25 ARM: Fix stack restore for FP slots.
Thanks to Peter Cawley. #1131
2023-12-10 16:10:48 +01:00
Mike Pall
1b38c73655 Document workaround for multilib vs. cross-compiler conflict.
Reported by igorpupkinable. #1126
2023-12-10 15:45:10 +01:00
Mike Pall
856423f5da Fix runtime library flags for MSVC debug builds.
Reported by igor725. #1127
2023-12-10 15:00:52 +01:00
Mike Pall
dcf3627d79 Fix .debug_abbrev section in GDB JIT API.
Thanks to Dmitry Stogov. #1129
2023-12-10 14:48:34 +01:00
Mike Pall
1761fd2ef7 Emit sunk IR_NEWREF only once per key on snapshot replay.
Thanks to Sergey Kaplun and Peter Cawley. #1128
2023-12-10 14:29:45 +01:00
Mike Pall
644723649e x86/x64: Don't fuse loads across IR_NEWREF.
Reported by Peter Cawley. #1117
2023-11-14 22:50:21 +01:00
Mike Pall
d854d00ce9 x86/x64: Add more red zone checks to assembler backend.
Thanks to Peter Cawley. #1116
2023-11-12 15:18:44 +01:00
Mike Pall
a4c1640432 Add stack check to pcall/xpcall.
Analyzed by Peter Cawley. #1048
2023-11-12 14:42:24 +01:00
Mike Pall
65c8493907 Invalidate SCEV entry when returning to lower frame.
Thanks to Zhongwei Yao. #1115
2023-11-09 11:02:36 +01:00
Mike Pall
433d7e8d8d FFI: Fix pragma push stack limit check and throw on overflow.
Reported by Sergey Kaplun. #1114
2023-11-07 22:25:42 +01:00
Mike Pall
d133d67c88 x64: Properly fix __call metamethod return dispatch.
Reported by Sergey Kaplun. #1110
2023-11-05 11:31:08 +01:00
Mike Pall
db944b2b56 FFI: Fix dangling reference to CType in carith_checkarg().
Reported by Sergey Kaplun. #1108
2023-10-21 13:11:50 +02:00
Mike Pall
f72c19e482 Maintain chain invariant in DCE.
Thanks to Peter Cawley. #1094
2023-09-22 21:04:22 +02:00