Commit Graph

2703 Commits

Author SHA1 Message Date
Mike Pall
4a70bd71ac MIPS64: Fix soft-float IR_TOSTR. 2021-10-02 17:48:19 +02:00
Mike Pall
10c9d9a214 Merge branch 'master' into v2.1 2021-10-02 17:23:51 +02: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
a2047d3f18 Fix compiler warning.
Suggested by Fezile Manana.
2021-09-29 11:59:27 +02:00
Mike Pall
cb0f124f8f Merge branch 'master' into v2.1 2021-09-24 12:11:55 +02:00
Mike Pall
1811c4b0f1 Windows/x64: Document MSVC flags for C++ exception interoperability.
Suggested by Julien Cugnière.
2021-09-24 12:10:44 +02:00
Mike Pall
94a40bb238 FFI: Ensure returned string is alive in ffi.typeinfo().
Reported by zhuizhuhaomeng.
2021-09-23 19:07:30 +02:00
Mike Pall
78350a2565 OSX/ARM64: Disable unwind info.
See #698.
2021-09-21 17:49:06 +02:00
Mike Pall
e2b9797ba1 Merge branch 'master' into v2.1 2021-09-21 16:44:06 +02:00
Mike Pall
204cee2c91 Fix stack allocation after on-trace stack check. 2021-09-21 16:42:35 +02:00
Mike Pall
191d87f531 Fix ITERN blacklisting.
Reported by ExtReMLapin. #744
2021-09-21 14:30:28 +02:00
Mike Pall
1aa4af0b83 Ensure ITERN forward progress on interpreter bailout.
Reported by Yichun Zhang and ExtReMLapin. #744
2021-09-21 13:15:06 +02:00
Mike Pall
421c4c7987 ARM64: Reorder interpreter stack frame and fix unwinding.
Reported by Yichun Zhang. Fixes #722.
May help towards fixing #698, too.
2021-09-20 22:37:07 +02:00
Mike Pall
28440544ba Don't bail out to interpreter to JLOOP originating from ITERN.
Otherwise forward progress is not guaranteed.
Reported by Yichun Zhang.
2021-09-20 14:40:23 +02:00
Mike Pall
003f68565d FFI: Don't load PC from non-function object in FFI continuation.
Reported by Yichun Zhang. #743
2021-09-20 14:39:26 +02:00
Mike Pall
98b7d9a3b2 Merge branch 'master' into v2.1 2021-09-20 14:39:50 +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
27ee3bcd79 OSX/ARM64: Disable external unwinding for now.
This reduces functionality, e.g. no handling of on-trace errors.
Someone with very deep knowledge about macOS and MACH-O/DWARF stack
unwinding internals is needed to fix this. See issue #698.
2021-09-19 17:58:24 +02:00
Mike Pall
bb0f241015 Compile table traversals: next(), pairs(), BC_ISNEXT/BC_ITERN.
Sponsored by OpenResty Inc.
2021-09-19 17:49:25 +02:00
Mike Pall
986bb406ad Use IR_HIOP for generalized two-register returns.
Sponsored by OpenResty Inc.
2021-09-19 17:47:11 +02:00
Mike Pall
c6f5ef649b Refactor table traversal.
Sponsored by OpenResty Inc.
2021-09-19 17:38:49 +02:00
Mike Pall
4e0ea654a8 ARM: Fix symbol display in trace disassembly. 2021-09-19 17:27:18 +02:00
Mike Pall
5ee78fd8e3 Refactor IR_TMPREF generation. 2021-09-19 17:25:27 +02:00
Mike Pall
9211f0b03b Refactor IR_VLOAD to take an offset. 2021-09-19 17:18:16 +02:00
Mike Pall
f2d333c1ac MIPS: Fix trace linking. 2021-09-19 16:09:48 +02:00
Mike Pall
8ff09d9f5a String buffers, part 4b: Improve de-serialization checks.
Sponsored by fmad.io.
2021-08-12 21:28:17 +02:00
Mike Pall
15ed84bd49 String buffers, part 4a: Add metatable serialization dictionary.
Sponsored by fmad.io.
2021-08-12 21:27:58 +02:00
Mike Pall
983d66b8c5 Merge branch 'master' into v2.1 2021-07-27 14:50:40 +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
89a6740ffd Merge branch 'master' into v2.1 2021-07-23 21:36:17 +02:00
Mike Pall
0e66fc9637 Prevent loop in snap_usedef().
Reported by XmiliaH.
2021-07-23 21:33:59 +02:00
Mike Pall
dbb6c39f7c Merge branch 'master' into v2.1 2021-07-22 16:22:53 +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
bff9298090 Merge branch 'master' into v2.1 2021-07-22 02:35:00 +02:00
Mike Pall
8430f774e6 Fix io.close().
Reported by farmboy0.
2021-07-22 02:33:04 +02:00
Mike Pall
c2dd3b4d34 Merge branch 'master' into v2.1 2021-07-21 12:32:19 +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
bc98a3ade5 PS4: Fix compile.
Thanks to Eric Lavesson.
2021-07-19 18:15:18 +02:00
Mike Pall
4deb5a1588 Merge branch 'master' into v2.1 2021-07-19 17:05:48 +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
29bc1f04ac String buffers, part 3d: Compile string buffer methods and functions.
Sponsored by fmad.io.
2021-07-19 16:53:30 +02:00
Mike Pall
2182630903 Minor improvements of optimizations. 2021-07-19 16:50:05 +02:00
Mike Pall
09547f9f6e Fix error message in lj_lib_checkintrange(). 2021-07-19 16:47:46 +02:00
Mike Pall
a689e9dc43 String buffers, part 2f: Prevent self-put of buffer.
Sponsored by fmad.io.
2021-07-19 16:45:26 +02:00
Mike Pall
02bcbea8b0 String buffers, part 3c: Add IRBUFHDR_WRITE mode.
Sponsored by fmad.io.
2021-07-19 16:46:27 +02:00
Mike Pall
1d5ef35fed Fix IRXLOAD_* mode bits description. 2021-07-19 16:36:00 +02:00
Mike Pall
3a0cf69730 String buffers, part 3b: Change IR_BUFHDR op2 mode bits to mode.
Sponsored by fmad.io.
2021-07-19 16:33:13 +02:00
Mike Pall
6df650fe3f String buffers, part 3a: Add IR_TMPREF for passing TValues to helpers.
Sponsored by fmad.io.
2021-07-19 16:23:12 +02:00
Mike Pall
71db0cf043 Add IRCONV_NONE for pass-through INT to I64/U64 type change. 2021-07-19 16:11:39 +02:00