Commit Graph

2953 Commits

Author SHA1 Message Date
Mike Pall
578c41ceb7 ARM64: Enable unaligned accesses if indicated by the toolchain.
If you get a crash in jit_init() then you need to fix your toolchain.
2025-11-08 15:41:42 +01:00
Mike Pall
68354f4447 Allow mcode allocations outside of the jump range to the support code.
Thank you for your patience. #285
2025-11-06 00:42:02 +01:00
Mike Pall
3c7b158b79 ARM64: Fix disassembly of >2GB branch targets. 2025-11-06 00:30:22 +01:00
Mike Pall
8518c0b40b x64: Fix CET IBT.
Reported by Yuichiro Naito. #1400
2025-10-29 09:38:41 +01:00
Mike Pall
5b20d6e305 ARM64: Fix ARM BTI.
Reported by Yuichiro Naito. #1400
2025-10-29 09:38:31 +01:00
Mike Pall
864e78d66c Windows: Fix lua52compat option for msvcbuild.bat.
Thanks to Alex Orlenko. #1395 #1366
2025-10-28 04:59:18 +01:00
Mike Pall
8651ef6df4 ARM64: Add support for ARM BTI.
Note: this is not enabled by default, look for CET in lj_arch.h.
Thanks to Yuichiro Naito. #1398
2025-10-28 04:46:10 +01:00
Mike Pall
e34a78acf6 x64: Various fixes for CET IBT.
Also add ELF notes. #1391
2025-10-28 00:27:15 +01:00
Mike Pall
25a61a1821 x64: Add support for CET IBT.
Note: this is not enabled by default, look for CET in lj_arch.h
Contributed by Yuichiro Naito. #1391
2025-10-16 14:24:52 +02:00
Mike Pall
5c3254d68d Gracefully handle broken custom allocator.
Reported by Alex Orlenko. #1393
2025-10-16 13:23:51 +02:00
Mike Pall
a21ba1c9b5 Add GNU/Hurd build support.
Note: this is not an officially supported target.
Contributed by Pino Toscano and Samuel Thibault. #1383 #1384
2025-10-16 13:17:45 +02:00
Mike Pall
a69aef43fe Fix io.write() of newly created buffer.
Reported by vfprintf. #1386
2025-10-16 13:13:51 +02:00
Mike Pall
54a162688e Fix reporting of an error during error handling.
Reported by Sergey Kaplun. #1381
2025-10-16 13:11:02 +02:00
Mike Pall
871db2c84e Windows: Add lua52compat option to msvcbuild.bat.
Thanks to Gil Reis. #1366
2025-07-24 15:45:24 +02:00
Mike Pall
eed22e9ad9 Merge branch 'master' into v2.1 2025-07-24 15:41:35 +02: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
f9140a622a Merge branch 'master' into v2.1 2025-05-28 21:14:47 +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
0a8cd58ea1 Merge branch 'master' into v2.1 2025-05-28 21:06:44 +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
852c3a08ae Merge branch 'master' into v2.1 2025-05-28 20:39:05 +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
eec7a8016c Prevent Clang UB 'optimization' which breaks integerness checks.
Thanks to Kacper Michajłow. #1351 #1355
2025-04-10 22:53:50 +02:00
Mike Pall
51d4c26ec7 ARM: Fix soft-float math.min()/math.max().
Reported by Dong Jianqiang. #1356
2025-04-10 22:45:38 +02:00
Mike Pall
c262976486 ARM64: Fix pass-by-value struct calling conventions.
Reported by AnthonyK213. #1357
2025-04-10 22:06:47 +02:00
Mike Pall
e0a7ea8a92 Merge branch 'master' into v2.1 2025-04-07 10:33:15 +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
538a82133a Change handling of nil value markers in template tables.
Reported by Bernhard M. Wiedemann. #1348 #1155
Fixes from Peter Cawley, Christian Clason, Lewis Russell.
2025-03-11 23:04:30 +01:00
Mike Pall
84cb21ffaf REVERT: Change handling of nil value markers in template tables. 2025-03-10 02:56:07 +01:00
Mike Pall
4f2bb199fe macOS: Fix Apple hardened runtime support and put behind build option.
Reported by vanc. #1334
2025-03-10 02:53:20 +01:00
Mike Pall
e3c70a7d81 macOS: Fix support for Apple hardened runtime.
Reported by Christian Clason. #1334
2025-03-10 00:05:08 +01:00
Mike Pall
7db2d1b12a Fix handling of nil value markers in template tables.
Thanks to Peter Cawley. #1348 #1155
2025-03-09 23:11:05 +01:00
Mike Pall
e0551670c9 Merge branch 'master' into v2.1 2025-03-09 23:09:02 +01: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
eee16efa77 Fix state restore when recording __concat metamethod.
Reported by Sergey Kaplun. #1338 #1298
2025-03-09 21:28:17 +01:00
Mike Pall
4219efae43 Windows: Allow mixed builds with msvcbuild.bat.
Suggested by alex4814. #1341
2025-03-09 21:05:06 +01:00
Mike Pall
0254770582 macOS: Add suport for Apple hardened runtime.
Thanks to Peter Cawley. #1334
2025-03-09 20:45:22 +01:00
Mike Pall
f14556234c Merge branch 'master' into v2.1 2025-03-09 16:25:34 +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
e27ee68817 Windows: Clarify installation directory layout.
Suggested by eabase. #1346
2025-03-09 16:10:22 +01:00
Mike Pall
55a42da36e Remove Cygwin from docs, since it's not a supported target. 2025-03-09 16:09:36 +01:00
Mike Pall
423ac2144b Improve CLI signal handling on POSIX. 2025-03-09 15:50:01 +01:00
Mike Pall
54dc2fa5d7 FFI: Add pre-declared int128_t, uint128_t, __int128 types.
Note: Only declaration and copy (interpreted only) are implemented.
2025-03-09 15:37:35 +01:00
Mike Pall
b1179ea5f7 Use dylib extension for iOS installs, too.
Reported by Andrey Filipenkov. #1336
2025-03-09 15:00:15 +01:00
Mike Pall
5eb9509468 Change handling of nil value markers in template tables.
Reported by Bernhard M. Wiedemann. #1348 #1155
2025-03-09 14:44:57 +01:00
Mike Pall
a4f56a459a Merge branch 'master' into v2.1 2025-01-13 16:22:22 +01:00
Mike Pall
62e362afbb Fix recording of BC_VARG.
Reported by Bachir Bendrissou.
2025-01-13 16:19:57 +01:00