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
Mike Pall
c43b6a9137
Fix MinGW make clean.
...
Reported by Shmuel Zeigerman.
2019-12-08 19:16:34 +01:00
Mike Pall
c6c6e3b416
Update MSVC build script and docs.
2019-12-08 18:52:41 +01:00
Mike Pall
3ece3a3e3a
More recent MSVC is partially C99 compliant.
2019-12-08 18:43:12 +01:00
Mike Pall
c4e15b457e
Fix narrowing of conversions to U32.
...
Reported by spacewander.
2019-11-10 22:37:42 +01:00
Mike Pall
20ac817a74
Fix bytecode dump unpatching.
...
Reported by Christopher Oliver.
2019-08-30 11:07:45 +02:00
Mike Pall
0cd643d7cf
Fix debug.getinfo() argument check.
...
Thanks to Sergey Ostanevich.
2019-08-10 00:54:41 +02:00
Mike Pall
51e013934b
MIPS: Fix delay slot hint.
...
This is documentation only. Thanks to snyh.
2019-07-05 13:19:41 +02:00
Mike Pall
d4c0c6e17e
Fix TNEW load forwarding with instable types.
2019-05-09 11:33:03 +02:00
Mike Pall
9bd5a722be
ARM: Fix GCC 7 -Wimplicit-fallthrough warnings.
2019-04-29 18:02:50 +02:00
Mike Pall
5802ab56b6
ARM: Fix condition code check fusion.
...
Reported by Qingjun Wei.
2019-04-29 17:38:05 +02:00
Mike Pall
61464b0a5b
Fix MinGW build.
...
Thanks to Victor Bombi.
2019-01-10 12:37:09 +01:00
Mike Pall
380e4409a7
Fix overflow of snapshot map offset.
...
Thanks to Yichun Zhang.
2019-01-10 12:19:30 +01:00
Mike Pall
3404183e23
Better detection of MinGW build.
2019-01-10 12:02:15 +01:00
Mike Pall
b025b01c5b
PPC/NetBSD: Fix endianess check.
...
Thanks to he32 and daurnimator.
2018-06-05 11:36:18 +02:00
Mike Pall
fb5e522fbc
x86/x64: Check for jcc when using xor r,r in emit_loadi().
...
Thanks to Peter Cawley.
2018-05-20 12:40:33 +02:00
Mike Pall
f5d424afe8
FFI: Make FP to U64 conversions match JIT backend behavior.
2018-05-20 12:25:36 +02:00
Mike Pall
02b521981a
FFI: Add tonumber() specialization for failed conversions.
...
Contributed by Javier Guerra Giraldez.
2018-04-22 13:27:25 +02:00
Mike Pall
046129dbdd
Fix rechaining of pseudo-resurrected string keys.
...
This is a serious bug. But extremely hard to reproduce, so it went
undetected for 8 years. One needs two resurrections with different
main nodes, which are both in a hash chain which gets relinked on
key insertion where the colliding node is in a non-main position. Phew.
Thanks to lbeiming.
2018-02-27 23:02:23 +01:00
Mike Pall
03cd5aa749
Clear stack after print_jit_status() in CLI.
...
Suggested by Hydroque.
2018-01-29 13:25:51 +01:00
Mike Pall
d4ee803427
Fix GCC 7 -Wimplicit-fallthrough warnings.
2018-01-29 13:06:13 +01:00
Mike Pall
b03a56f28e
FFI: Don't assert on #1LL (5.2 compatibility mode only).
...
Reported by Denis Golovan.
2018-01-29 12:47:08 +01:00
Mike Pall
430d9f8f7e
Fix string.format("%c", 0).
2018-01-14 14:11:59 +01:00
Mike Pall
7dbf0b05f1
Fix saved bytecode encapsulated in ELF objects.
...
Thanks to Dimitry Andric.
2017-11-16 12:58:12 +01:00
Mike Pall
9f0caad0e4
Fix FOLD rule for strength reduction of widening.
...
Reported by Matthew Burk.
2017-11-08 12:53:05 +01:00
Mike Pall
82151a4514
Modify fix for warning from 'ar'.
2017-06-12 09:24:00 +02:00
Mike Pall
c7c3c4da43
MIPS: Fix handling of spare long-range jump slots.
...
Contributed by Djordje Kovacevic and Stefan Pejic.
2017-06-07 19:36:46 +02:00
Mike Pall
7381b62035
MIPS: Use precise search for exit jump patching.
...
Contributed by Djordje Kovacevic and Stefan Pejic.
2017-06-07 19:16:22 +02:00
Mike Pall
630ff3196a
Add missing LJ_MAX_JSLOTS check.
...
Thanks to Yichun Zhang.
2017-05-17 17:37:35 +02:00
Mike Pall
1c89933f12
Fix LJ_MAX_JSLOTS assertion in rec_check_slots().
...
Thanks to Yichun Zhang.
2017-05-09 20:59:37 +02:00
Mike Pall
0bf80b07b0
RELEASE LuaJIT-2.0.5
2017-05-01 20:10:28 +02:00
Mike Pall
02b4b1e556
Add workaround for MSVC 2015 stdio changes.
...
Contributed by Peter Cawley.
2017-04-17 12:29:35 +02:00
Mike Pall
247b3624ff
OSX: Fix build with recent XCode.
...
Contributed by Joseph Zupko.
2017-04-07 11:59:08 +02:00
Mike Pall
e205ad0c55
FFI: Fix FOLD rules for int64_t comparisons.
...
Thanks to Peter Cawley.
2017-03-30 11:35:29 +02:00
Mike Pall
f50bf7585a
Remove unnecessary mcode alloc pointer check.
...
Also fixes Illumos address space issue reported by Theo Schlossnagle.
2017-03-08 23:02:24 +01:00
Mike Pall
d62459fc39
Limit mcode alloc probing, depending on the available pool size.
...
Contributed by Alexey Kopytov.
2017-03-08 23:01:47 +01:00
Mike Pall
4e308361bf
Fix overly restrictive range calculation in mcode allocation.
...
Contributed by Alexey Kopytov.
2017-03-08 22:59:44 +01:00
Mike Pall
ff648369aa
Fix out-of-scope goto handling in parser.
...
Many thanks to Demetrios Obenour for tracking down this long-standing bug.
2017-03-08 22:16:43 +01:00
Mike Pall
3ab9f5a18d
Remove internal __mode = "K" and replace with safe check.
2017-03-08 22:03:17 +01:00
Mike Pall
eef77a6d77
Fix annoying warning, due to deterministic binutils configuration.
2017-03-08 22:02:07 +01:00
Mike Pall
892d370edd
MIPS: Don't use RID_GP as a scratch register.
2017-02-20 02:35:24 +01:00
Mike Pall
ee33a1f9b3
MIPS: Fix emitted code for U32 to float conversion.
2017-02-20 02:35:00 +01:00
Mike Pall
1abd779907
MIPS: Backport workaround for compact unwind tables.
2017-02-20 02:29:42 +01:00
Mike Pall
b93a1dd0c8
Bump copyright date to 2017.
2017-01-17 12:35:03 +01:00
Mike Pall
a2013dd39a
Fix cross-endian jit.bcsave for MIPS target.
2017-01-17 10:46:45 +01:00
Mike Pall
fb61f7cbe3
Add "proto" field to jit.util.funcinfo().
...
Backport.
2016-12-15 22:45:28 +01:00
Mike Pall
a68c411857
Fix GC step size calculation.
...
Thanks to Igor Ehrlich.
2016-10-13 18:37:58 +02:00
Mike Pall
fcc8244899
ARM: Fix BLX encoding for Thumb interworking calls.
...
Thanks to Charles Baylis.
2016-10-02 14:24:04 +02:00
Mike Pall
8ada57eb49
Looks like COLORTERM has gone out of fashion.
2016-09-19 21:22:19 +02:00
Mike Pall
9910dedae4
Initialize uv->immutable for upvalues of loaded chunks.
...
Thanks to Peter Cawley.
2016-09-19 21:17:58 +02:00
Mike Pall
02b9b55976
Revert "OSX: Switch to Clang as the default compiler."
...
It breaks cross-compilation to Android.
And host "gcc" aliases to "clang", anyway.
2016-07-31 13:39:55 +02:00
Mike Pall
6be5ffdf2b
Adjust comment with defines.
2016-07-17 16:05:25 +02:00
Mike Pall
b74ddaf174
Fix for cdata vs. non-cdata arithmetics/comparisons.
...
Thanks to Vyacheslav Egorov.
2016-07-17 16:01:10 +02:00
Mike Pall
1914de71c7
Fix unused vars etc. in internal Lua files.
...
Thanks to François Perrad.
2016-07-17 14:29:03 +02:00
Mike Pall
aef4edddba
Drop leftover regs in 'for' iterator assignment, too.
2016-06-27 14:09:36 +02:00
Mike Pall
a7bec69a75
Fix PHI remarking in SINK pass.
...
Thanks to Vyacheslav Egorov.
2016-06-05 12:53:37 +02:00
Mike Pall
3206307563
Fix Valgrind suppressions.
2016-06-03 06:39:52 +02:00
Mike Pall
a5f8a4819f
Don't try to record outermost pcall() return to lower frame.
2016-06-03 04:26:08 +02:00
Mike Pall
747feb6e4e
x86: Don't spill an explicit REF_BASE in the IR.
...
Thanks to Vyacheslav Egorov.
2016-05-23 06:46:30 +02:00
Mike Pall
37e1e70313
Add guard for obscure aliasing between open upvalues and SSA slots.
...
Thanks to Peter Cawley.
2016-05-20 20:24:06 +02:00
Mike Pall
5837c2a2fb
Remove assumption that lj_math_random_step() doesn't clobber FPRs.
2016-05-20 19:43:34 +02:00
Mike Pall
f05280e415
x86/x64: Fix instruction length decoder.
...
Thanks to Peter Cawley.
2016-05-06 12:08:00 +02:00
Mike Pall
7b26e9c998
Fix GCC 6 -Wmisleading-indentation warnings.
...
Thanks to Roman Tsisyk.
2016-04-24 17:13:45 +02:00
Mike Pall
2f0001fad0
Fix handling of non-numeric strings in arithmetic coercions.
...
Thanks to Vyacheslav Egorov.
2016-04-21 17:00:58 +02:00
Mike Pall
cc4f5d056a
Whitespace.
2016-04-18 13:40:49 +02:00
Mike Pall
73680a5fc7
x86/x64: Search for exit jumps with instruction length decoder.
...
Contributed by Peter Cawley.
2016-04-18 11:16:13 +02:00
Mike Pall
e5b5e079c3
MIPS: Fix BC_ISNEXT fallback path.
...
Thanks to RT-RK.com.
2016-04-14 00:14:42 +02:00
Mike Pall
1c6fd13dbd
Fix recording of select(n, ...) with off-trace varargs
...
Thanks to Peter Cawley.
2016-04-03 19:12:28 +02:00
Mike Pall
4ab6367b21
Cygwin: Allow cross-builds to non-Cygwin targets.
2016-04-03 19:07:19 +02:00
Mike Pall
62af101524
MIPS: Fix use of ffgccheck delay slots in interpreter.
2016-03-30 16:26:27 +02:00
Mike Pall
9531eb235b
Windows: Remove intermediate files at end of build.
2016-03-28 22:23:37 +02:00
Mike Pall
e23fc10883
Fix display of NULL (light)userdata in -jdump.
...
Thanks to Peter Cawley.
2016-03-28 22:15:13 +02:00
Mike Pall
ddadbe8099
Fix compiler warnings.
...
Thanks to Demetri Obenour.
2016-03-22 20:40:41 +01:00
Mike Pall
db1b399af1
Bump copyright date to 2016.
2016-03-03 12:02:22 +01:00
Mike Pall
a443889677
Don't allocate unused 2nd result register in JIT compiler backend.
2016-02-10 18:51:02 +01:00
Mike Pall
3d4c9f9639
FFI: Fix SPLIT pass for CONV i64.u64.
...
Thanks to Vyacheslav Egorov.
2015-11-26 22:25:13 +01:00
Mike Pall
7991a669dd
Extend Valgrind suppressions for non-inlined C code.
...
Thanks to Dennis Schridde.
2015-11-04 14:02:33 +01:00
Mike Pall
f416cf6a64
OSX: Switch to Clang as the default compiler.
2015-10-24 19:10:40 +02:00
Mike Pall
3639ff4142
iOS: Disable os.execute() when building for iOS >= 8.0.
...
Thanks to Vyacheslav Egorov.
2015-10-24 19:02:15 +02:00
Mike Pall
e5f4cb1ccb
FFI: Fix ipairs() recording.
...
Thanks to Vyacheslav Egorov.
2015-10-24 17:59:44 +02:00
Mike Pall
4808e62a9a
Drop marks from replayed instructions when sinking.
...
Reported by Vyacheslav Egorov.
2015-10-15 02:28:04 +02:00
Mike Pall
2e85af8836
Flush symbol tables in jit.dump on trace flush.
2015-10-01 16:32:30 +02:00
Mike Pall
ef087aa678
Fix unsinking check.
...
Reported by Elias Hogstvedt. Debugged and fixed by Vyacheslav Egorov.
2015-10-01 16:12:48 +02:00
Mike Pall
076d625dc6
Fix Cygwin support. Note: this is not a supported target.
...
Contributed by Yaakov Selkowitz.
2015-09-20 19:17:02 +02:00
Mike Pall
8715ae65c1
Properly handle OOM in trace_save().
...
Thanks to Vyacheslav Egorov.
2015-08-20 01:10:30 +02:00
Mike Pall
424940ffc3
Fix NYICF error message.
...
Thanks to Vyacheslav Egorov.
2015-08-20 00:49:20 +02:00
Mike Pall
a5b1c4d98e
FFI: Don't propagate qualifiers into subtypes of complex.
2015-07-17 23:14:21 +02:00
Mike Pall
575bfe5028
Limit number of arguments given to io.lines() and fp:lines().
2015-07-10 03:42:51 +02:00
Mike Pall
7f454aed82
Fix narrowing of TOBIT.
2015-06-10 16:14:41 +02:00
Mike Pall
72347895ed
x64: Allow building without external unwinder.
...
Required for PS4 SDK 2.5. Thanks to James Park.
2015-06-09 22:08:40 +02:00
Mike Pall
69e5342eb8
RELEASE LuaJIT-2.0.4
2015-05-14 20:29:31 +02:00
Mike Pall
9622d6b8b2
x86/x64: Fix argument check for bit shifts.
2015-05-04 06:36:16 +02:00
Mike Pall
11106aa833
Fix stack check in narrowing optimization.
...
Thanks to Robert Nix.
2015-04-28 20:28:16 +02:00
Mike Pall
8b6af89ba7
Fix Lua/C API typecheck error for special indexes.
2015-03-05 12:19:11 +01:00