Commit Graph

1844 Commits

Author SHA1 Message Date
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
Mike Pall
aa6b15c1a8 Follow-up fix for stack overflow handling cleanup. 2023-09-21 04:43:40 +02:00
Mike Pall
b138ccfa91 Handle all stack layouts in (delayed) TRACE vmevent.
Thanks to Sergey Bronnikov and Peter Cawley. #1087
2023-09-21 02:15:16 +02:00
Mike Pall
92b89d005a Add missing coercion when recording select(string, ...)
Thanks to Peter Cawley. #1083
2023-09-21 02:10:18 +02:00
Mike Pall
d2f6c55b05 Cleanup stack overflow handling.
Reported by Peter Cawley. #962
2023-09-21 01:58:43 +02:00
Mike Pall
9760984638 Allow path overrides in genversion.lua with minilua, too.
Thanks to arch1t3cht. #1067
2023-09-10 05:23:10 +02:00
Mike Pall
4fe2002292 Improve architecture detection error messages. 2023-09-09 23:01:26 +02:00
Mike Pall
44da356e97 ARM: Fix stack check code generation.
Thanks to Peter Cawley. #1068
2023-09-09 18:16:31 +02:00
Mike Pall
43eff4aad4 Fix mcode limit check for non-x86 archs.
Thanks to Peter Cawley.
2023-09-09 17:44:54 +02:00
Mike Pall
7f9907b4ed Add NaN check to IR_NEWREF.
Thanks to Peter Cawley. #1069
2023-09-09 13:37:31 +02:00
Mike Pall
4d05806ae0 Allow override of paths for genversion.lua.
Thanks to arch1t3cht. #1067
2023-09-09 12:47:27 +02:00