Commit Graph

1643 Commits

Author SHA1 Message Date
Mike Pall
6a3111a57f Use fallback name for install files without valid .git or .relver. 2023-08-28 21:25:51 +02:00
Mike Pall
a0b52aae33 Handle non-.git checkout with .relver in .bat-file builds.
Thanks to Simon Cooke.
2023-08-28 21:59:01 +02:00
Mike Pall
14e2917e7a Fix external C call stack check when using LUAJIT_MODE_WRAPCFUNC.
Thanks to Peter Cawley. #1047
2023-08-28 21:04:01 +02:00
Mike Pall
309fb42b87 Fix predict_next() in parser (again).
Reported by Sergey Bronnikov. #1054
2023-08-28 21:00:37 +02:00
Mike Pall
d0ce82ecdc Handle the case when .git is not a directory.
Thanks to Alexander Shpilkin.
2023-08-22 17:04:22 +02:00
Mike Pall
ed21acd863 Fix Windows build scripts for rolling releases.
Reported by Miku AuahDark.
2023-08-21 13:08:00 +02:00
Mike Pall
6351abc78f Switch MSVC and console build scripts to rolling releases. 2023-08-21 03:59:03 +02:00
Mike Pall
50e0fa03c4 Switch build system to rolling releases. 2023-08-21 03:06:26 +02:00
Mike Pall
158a284cc9 Bump copyright date. 2023-08-20 21:25:30 +02:00
Mike Pall
abb27c7771 Fix maxslots when recording BC_VARG, part 3.
Thanks to Peter Cawley. #1046
2023-08-12 20:16:56 +02:00
Mike Pall
caf7cbc57c Fix predict_next() in parser.
Reported by Sergey Kaplun. #1033
2023-08-12 16:21:41 +02:00
Mike Pall
aa2db7ebd1 Fix base register coalescing in side trace.
Thanks to Sergey Kaplun, NiLuJe and Peter Cawley. #1031 #1016
2023-07-12 21:56:17 +02:00
Mike Pall
a01cba9d2d Fix maxslots when recording BC_VARG, part 2.
Analyzed by Sergey Kaplun. #1024
2023-07-09 21:08:12 +02:00
Mike Pall
94ada59628 Fix maxslots when recording BC_VARG.
Analyzed by Sergey Kaplun. #1024
2023-07-08 19:40:12 +02:00
Mike Pall
b7a8c7c184 Fix register mask for stack check in head of side trace.
Analyzed by Sergey Kaplun. #1016
2023-07-08 19:36:24 +02:00
Mike Pall
4c35a42d9c FFI: Fix ffi.metatype() for non-raw types.
Reported by 999pingGG. #1005
2023-07-08 19:30:56 +02:00
Mike Pall
9f452bbef5 Fix handling of instable types in TNEW/TDUP load forwarding.
Analyzed by Sergey Kaplun. #994
2023-06-02 11:38:45 +02:00
Mike Pall
8c20c3b1a3 Fix compiler warning.
Reported by Myriachan.
2023-06-02 11:36:24 +02:00
Mike Pall
c7db8255e1 Fix TDUP load forwarding after table rehash.
Reported by Sergey Kaplun. #980
2023-04-16 13:26:18 +02:00
Mike Pall
96fc114a7a Fix canonicalization of +-0.0 keys for IR_NEWREF.
Reported by Sergey Kaplun. #981
2023-04-16 13:24:08 +02:00
Mike Pall
8135de2a02 Improve error reporting on stack overflow.
Thanks to Nicolas Lebedenco.
2023-02-21 17:05:12 +01:00
Mike Pall
126526ab93 Allow building sources with mixed LF/CRLF line-endings.
Reported by mgood7123.
2023-02-21 16:49:51 +01:00
Mike Pall
8a5e398c52 Avoid negation of signed integers in C that may hold INT*_MIN.
Reported by minoki.
Recent C compilers 'take advantage' of the undefined behavior.
This completely changes the meaning of expressions like (k == -k).
2022-12-22 00:03:06 +01:00
Mike Pall
b2791179ef Correct fix for stack check when recording BC_VARG.
Reported by Yichun Zhang.
2022-12-09 00:20:05 +01:00
Mike Pall
cc96ab9d51 FFI: Fix dangling reference to CType. Improve checks.
Reported by elmknot.
2022-12-07 17:19:29 +01:00
Mike Pall
ca8d3257bb Ensure correct stack top for OOM error message.
Reported by Sergey Kaplun.
2022-11-09 11:01:41 +01:00
Mike Pall
a93f4bb39f Prevent use of RTLD_DEFAULT when NO_RTLD_DEFAULT is defined.
Workaround for Android 4.4 bug.
Thanks to gudzpoz.
2022-08-07 20:02:40 +02:00
Mike Pall
899093a9e0 FFI: Fix sizeof expression in C parser for reference types. 2022-07-13 00:32:31 +02:00
Mike Pall
36b2962d40 FFI: Fix ffi.alignof() for reference types.
Reported by Eric Gouyer.
2022-07-13 00:32:04 +02:00
Mike Pall
27a6fee82e FFI: Allow ffi.metatype() for typedefs with attributes.
Reported by Eric Gouyer.
2022-07-13 00:30:23 +02:00
Mike Pall
674afcd4e2 x86/x64: Fix math.ceil(-0.9) result sign.
Reported by minoki.
2022-07-08 14:57:01 +02:00
Mike Pall
7dc3850e78 Fix warnings in minilua.c. 2022-06-08 15:35:12 +02:00
Mike Pall
bb7a30727e Prevent C compiler undefined-behavior optimization. 2022-05-21 12:00:10 +02:00
Mike Pall
1a401622fe Fix assertions.
Reported by ssdr.
2022-04-17 10:56:11 +02:00
Mike Pall
93a65d3cc2 Fix BC_UCLO insertion for returns.
Contributed by XmiliaH.
2022-03-13 18:32:32 +01:00
Mike Pall
9ebebc9b58 Fix command-line argv handling. 2022-01-27 22:18:39 +01:00
Mike Pall
c2237247cc Don't export internal symbol. 2022-01-25 22:17:56 +01:00
Mike Pall
c50232eb32 Always exit after machine code page protection change fails.
Reported by Sergey Kaplun.
2022-01-23 19:16:53 +01:00
Mike Pall
b5b20191f3 Save trace recorder state around VM event call.
Reported by Sergey Kaplun.
2022-01-16 20:58:42 +01:00
Mike Pall
c4dfb625ba Bump copyright date. 2022-01-15 19:30:54 +01:00
Mike Pall
e560487536 Limit exponent range in number parsing.
Reported by XmiliaH.
2022-01-13 17:48:43 +01:00
Mike Pall
103c29e634 Fix tonumber("-0") in dual-number mode.
Reported by Sergey Kaplun.
2022-01-13 15:38:56 +01:00
Mike Pall
a01602a826 Limit work done in SINK pass.
Reported by XmiliaH.
2022-01-13 15:13:59 +01:00
Mike Pall
c8bcf1e5fb Fix ABC FOLD rule with constants.
Reported by XmiliaH.
2022-01-13 14:40:11 +01:00
Mike Pall
e73916d811 Prevent CSE of a REF_BASE operand across IR_RETF.
Reported by XmiliaH.
2021-12-19 18:35:27 +01:00
Mike Pall
7b994e0ee0 Fix FOLD rule for x-0.
Reported by XmiliaH.
2021-12-17 14:15:40 +01:00
Mike Pall
d3294fa63b MIPS: Fix register allocation in assembly of HREF.
Reported by Jakub Piotr Cłapa.
2021-10-02 16:52:57 +02:00
Mike Pall
204cee2c91 Fix stack allocation after on-trace stack check. 2021-09-21 16:42:35 +02:00
Mike Pall
68ffbd318b FFI: Don't load PC from non-function object in FFI continuation.
Reported by Yichun Zhang. #743
2021-09-20 14:36:52 +02:00
Mike Pall
a622e2eb55 FFI: Fix missing cts->L initialization in argv2ctype(). 2021-09-20 14:34:47 +02:00
Mike Pall
3a654999c6 Consider slots used by upvalues in use-def analysis.
Reported by XmiliaH.
2021-07-27 14:47:41 +02:00
Mike Pall
0e66fc9637 Prevent loop in snap_usedef().
Reported by XmiliaH.
2021-07-23 21:33:59 +02:00
Mike Pall
d87da3d5fe Fix io.close() error message.
Reported by François Perrad.
2021-07-22 16:21:45 +02:00
Mike Pall
8430f774e6 Fix io.close().
Reported by farmboy0.
2021-07-22 02:33:04 +02:00
Mike Pall
81a797373f Fix minilua vararg stack handling.
Note: this is not exploitable! 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. LuaJIT itself has
completely different stack handling code and is not affected either.

This change is solely for the benefit of others, who might possibly use
minilua for purposes other than running DynASM.
2021-07-21 12:14:09 +02:00
Mike Pall
6ca580155b Avoid out-of-range number of results when compiling select(k, ...).
The interpreter will throw and abort the trace, anyway.
2021-07-19 17:03:16 +02:00
Mike Pall
44bd7437a2 Fix jit.dump() output for IR_CONV. 2021-07-19 16:05:05 +02:00
Mike Pall
ae533e3a6c FFI: Fix dangling reference to CType. 2021-06-01 00:26:45 +02:00
Mike Pall
c2cfa04231 PPC/PS3: Fix BC_ADD*/BC_SUB*.
Thanks to MaryWan1982.
2021-05-29 15:33:08 +02:00
Mike Pall
0e53a314d7 Fix use-def analysis for vararg functions.
Reported by Shmuel Zeigerman.
2021-05-29 15:31:13 +02:00
Mike Pall
2801500a26 Fix use-def analysis for BC_VARG.
Reported by Ryan Lucia.
2021-05-24 22:25:26 +02:00
Mike Pall
44684fa71d Fix compiler warnings. 2021-05-17 19:42:06 +02:00
Mike Pall
33e3f4badf Detect inconsistent renames even in the presence of sunk values.
Reported by Igor Munkin.
2021-03-23 00:43:07 +01:00
Mike Pall
f47c864b01 Bump copyright date. 2021-01-02 21:49:41 +01:00
Mike Pall
56c04accf9 FFI: Fix recording of union initialization.
Thanks to Alex Shpilkin.
2020-12-28 12:37:36 +01:00
Mike Pall
d67ff15a5c x64: Fix __call metamethod return dispatch.
Reported by Igor Munkin.
2020-12-04 11:16:55 +01:00
Mike Pall
7aa3e313a3 Fix warning. 2020-11-30 15:46:07 +01:00
Mike Pall
050466552b Minor changes and https-ify links. 2020-10-12 16:11:32 +02:00
Mike Pall
5c46f47736 Fix snapshot PC when linking to BC_JLOOP that was a BC_RET*.
Reported by Arseny Vakhrushev.
Fix contributed by Peter Cawley.
2020-10-12 15:45:05 +02:00
Mike Pall
de6b1a11dd Ensure full init of IR_NOP instructions. 2020-10-12 15:40:28 +02:00
Mike Pall
e8ec6fe996 Prevent patching of the GC exit check branch.
Reported by Arseny Vakhrushev.
2020-09-27 16:44:13 +02:00
Mike Pall
881d02d311 Mark CONV as non-weak, to prevent elimination of its side-effect.
An unused guarded CONV int.num cannot be omitted in general.
2020-09-22 11:56:06 +02:00
Mike Pall
90e65514dd Limit path length passed to C library loader. 2020-09-05 20:02:54 +02:00
Mike Pall
e296f56b82 Call error function on rethrow after trace exit. 2020-08-09 22:50:31 +02:00
Mike Pall
12ab596997 Fix handling of errors during snapshot restore. 2020-08-09 18:08:38 +02:00
Mike Pall
2211f6f960 ARM: Ensure relative GG_State element alignment differently.
Thanks to jojo59516 and dwing4g.
2020-08-05 15:21:00 +02:00
Mike Pall
c4b1e0feae Fix Makefile dependencies.
Thanks to Stefanos Chaliasos.
2020-08-05 14:14:58 +02:00
Mike Pall
53f82e6e2e Fix frame traversal for __gc handler frames.
Reported by Changochen.
2020-07-12 14:30:34 +02:00
Mike Pall
f5b0fff5a9 Fix debug.debug() for non-string errors. 2020-06-07 14:34:09 +02:00
Mike Pall
2f3f07882f Fix bytecode register allocation for comparisons. 2020-05-22 03:28:52 +02:00
Mike Pall
cc4bbec483 FFI: Always fall back to metamethods for cdata length/concat.
Thanks to Egor Skriptunoff.
2020-05-08 13:50:41 +02:00
Mike Pall
179cf2eb84 Fix overflow check in unpack().
Thanks to HybridDog.
2020-04-28 17:52:28 +02:00
Mike Pall
db0b7ec194 Fix Windows make clean. 2020-04-28 16:52:28 +02:00
Mike Pall
e613105ca9 Fix write barrier for lua_setupvalue() and debug.setupvalue(). 2020-03-20 13:35:49 +01:00
Mike Pall
522d2073da x86/x64: Fix loop realignment. 2020-02-02 18:19:44 +01:00
Mike Pall
62903bacf4 Fix C file generation in jit.bcsave.
Thanks to codicodi.
2020-01-22 02:37:21 +01:00
Mike Pall
38a5ed4b43 Bump copyright date. 2020-01-20 23:26:51 +01:00
Mike Pall
8203399601 Fix embedded bytecode loader. 2020-01-13 14:28:43 +01:00
Mike Pall
45a7e5073c Fix tonumber("-0").
Reported by bluecheetah001.
2019-12-08 19:51:33 +01:00
Mike Pall
de48d00094 Fix hash table chaining (again).
Thanks to Peter Cawley.
2019-12-08 19:47:00 +01:00
Mike Pall
324aef08d9 Typo. 2019-12-08 19:45:07 +01:00
Mike Pall
41a25efc80 Fix declarations of _BitScanForward/_BitScanReverse.
Reported by Mumin Guler.
2019-12-08 19:42:49 +01:00
Mike Pall
46a1b268eb Add stricter check for print() vs. tostring() shortcut. 2019-12-08 19:40:24 +01:00
Mike Pall
16e5605eec Prevent integer overflow while parsing long strings. 2019-12-08 19:35:25 +01:00
Mike Pall
e0388e6c00 Fix stack check when recording BC_VARG.
Contributed by Yichun Zhang.
2019-12-08 19:32:27 +01:00
Mike Pall
1d1bac5a65 FFI: Add missing write barrier on C library index update.
Contributed by Yichun Zhang.
2019-12-08 19:32:16 +01:00
Mike Pall
478bcfe52a FFI: Workaround for platform dlerror() returning NULL.
Contributed by mcclure.
2019-12-08 19:25:45 +01:00
Mike Pall
44382e833a OSX: Use __thread attribute. 2019-12-08 19:22:37 +01:00
Mike Pall
8961a92dd1 OSX: Don't set a default MACOSX_DEPLOYMENT_TARGET. 2019-12-08 19:22:00 +01:00
Mike Pall
eba586854b Build MinGW import library, too.
Thanks to Tarnyko.
2019-12-08 19:19:12 +01:00