]> git.ipfire.org Git - thirdparty/LuaJIT.git/log
thirdparty/LuaJIT.git
3 years agoFix command-line argv handling.
Mike Pall [Thu, 27 Jan 2022 21:18:39 +0000 (22:18 +0100)] 
Fix command-line argv handling.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 25 Jan 2022 21:18:20 +0000 (22:18 +0100)] 
Merge branch 'master' into v2.1

3 years agoDon't export internal symbol.
Mike Pall [Tue, 25 Jan 2022 21:17:56 +0000 (22:17 +0100)] 
Don't export internal symbol.

3 years agoFix pow() optimization inconsistencies.
Mike Pall [Mon, 24 Jan 2022 13:37:50 +0000 (14:37 +0100)] 
Fix pow() optimization inconsistencies.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 23 Jan 2022 18:19:26 +0000 (19:19 +0100)] 
Merge branch 'master' into v2.1

3 years agoAlways exit after machine code page protection change fails.
Mike Pall [Sun, 23 Jan 2022 18:16:53 +0000 (19:16 +0100)] 
Always exit after machine code page protection change fails.

Reported by Sergey Kaplun.

3 years agoFix FOLD rule for BUFHDR append with intervening buffer use.
Mike Pall [Sun, 23 Jan 2022 18:13:53 +0000 (19:13 +0100)] 
Fix FOLD rule for BUFHDR append with intervening buffer use.

Reported by XmiliaH.

3 years agoFix compiled error handling for buffer methods.
Mike Pall [Sun, 23 Jan 2022 18:10:47 +0000 (19:10 +0100)] 
Fix compiled error handling for buffer methods.

Contributed by XmiliaH.

3 years agoPrevent unroll across BC_ITERN.
Mike Pall [Sun, 16 Jan 2022 20:01:52 +0000 (21:01 +0100)] 
Prevent unroll across BC_ITERN.

Reported by Marukyu.

3 years agoPrevent replay of buffer operation for PHI operands.
Mike Pall [Sun, 16 Jan 2022 20:00:24 +0000 (21:00 +0100)] 
Prevent replay of buffer operation for PHI operands.

Contributed by XmiliaH.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 16 Jan 2022 19:59:10 +0000 (20:59 +0100)] 
Merge branch 'master' into v2.1

3 years agoSave trace recorder state around VM event call.
Mike Pall [Sun, 16 Jan 2022 19:58:42 +0000 (20:58 +0100)] 
Save trace recorder state around VM event call.

Reported by Sergey Kaplun.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 15 Jan 2022 18:42:30 +0000 (19:42 +0100)] 
Merge branch 'master' into v2.1

3 years agoBump copyright date.
Mike Pall [Sat, 15 Jan 2022 18:30:54 +0000 (19:30 +0100)] 
Bump copyright date.

3 years agoFFI: Ensure library is loaded before de-serializing FFI types.
Mike Pall [Sat, 15 Jan 2022 17:32:34 +0000 (18:32 +0100)] 
FFI: Ensure library is loaded before de-serializing FFI types.

Reported by ImagicTheCat.

3 years agoFix HREFK forwarding vs. table.clear().
Mike Pall [Sat, 15 Jan 2022 16:52:21 +0000 (17:52 +0100)] 
Fix HREFK forwarding vs. table.clear().

Reported by XmiliaH.

3 years agoFix FOLD rule for BUFHDR append.
Mike Pall [Thu, 13 Jan 2022 17:33:04 +0000 (18:33 +0100)] 
Fix FOLD rule for BUFHDR append.

Reported by XmiliaH.

3 years agoOSX: Disable unreliable assertion for external frame unwinding.
Mike Pall [Thu, 13 Jan 2022 16:57:03 +0000 (17:57 +0100)] 
OSX: Disable unreliable assertion for external frame unwinding.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Thu, 13 Jan 2022 16:51:09 +0000 (17:51 +0100)] 
Merge branch 'master' into v2.1

3 years agoLimit exponent range in number parsing.
Mike Pall [Thu, 13 Jan 2022 16:48:43 +0000 (17:48 +0100)] 
Limit exponent range in number parsing.

Reported by XmiliaH.

3 years agoFix tonumber("-0") in dual-number mode.
Mike Pall [Thu, 13 Jan 2022 14:38:56 +0000 (15:38 +0100)] 
Fix tonumber("-0") in dual-number mode.

Reported by Sergey Kaplun.

3 years agoLimit work done in SINK pass.
Mike Pall [Thu, 13 Jan 2022 14:13:59 +0000 (15:13 +0100)] 
Limit work done in SINK pass.

Reported by XmiliaH.

3 years agoFix ABC FOLD rule with constants.
Mike Pall [Thu, 13 Jan 2022 13:40:11 +0000 (14:40 +0100)] 
Fix ABC FOLD rule with constants.

Reported by XmiliaH.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 19 Dec 2021 17:37:06 +0000 (18:37 +0100)] 
Merge branch 'master' into v2.1

3 years agoPrevent CSE of a REF_BASE operand across IR_RETF.
Mike Pall [Sun, 19 Dec 2021 17:35:27 +0000 (18:35 +0100)] 
Prevent CSE of a REF_BASE operand across IR_RETF.

Reported by XmiliaH.

3 years agoWindows: Fix binary output of jit.bcsave to stdout.
Mike Pall [Fri, 17 Dec 2021 13:30:44 +0000 (14:30 +0100)] 
Windows: Fix binary output of jit.bcsave to stdout.

Thanks to erw7.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Fri, 17 Dec 2021 13:17:16 +0000 (14:17 +0100)] 
Merge branch 'master' into v2.1

3 years agoFix FOLD rule for x-0.
Mike Pall [Fri, 17 Dec 2021 13:15:40 +0000 (14:15 +0100)] 
Fix FOLD rule for x-0.

Reported by XmiliaH.

3 years agoUpdate Android build docs.
Mike Pall [Sat, 13 Nov 2021 19:39:37 +0000 (20:39 +0100)] 
Update Android build docs.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 13 Nov 2021 19:39:20 +0000 (20:39 +0100)] 
Merge branch 'master' into v2.1

3 years agoUpdate Android build docs.
Mike Pall [Sat, 13 Nov 2021 19:24:06 +0000 (20:24 +0100)] 
Update Android build docs.

3 years agoARM64: Fix pcall() error case.
Mike Pall [Wed, 27 Oct 2021 19:56:07 +0000 (21:56 +0200)] 
ARM64: Fix pcall() error case.

Reported by Alex Orlenko.

3 years agoOSX/ARM64: Fix external unwinding.
Mike Pall [Sun, 17 Oct 2021 11:14:41 +0000 (13:14 +0200)] 
OSX/ARM64: Fix external unwinding.

Contributed by Edmund Kapusniak. #698 #757

3 years agoFix string buffer method recording.
Mike Pall [Tue, 12 Oct 2021 21:49:47 +0000 (23:49 +0200)] 
Fix string buffer method recording.

Reported and analyzed by vfprintf. #755

3 years agoFix interaction of profiler and ITERN recording.
Mike Pall [Fri, 8 Oct 2021 14:50:35 +0000 (16:50 +0200)] 
Fix interaction of profiler and ITERN recording.

Reported and analyzed by vfprintf. #754

3 years agoFix compilation of multi-result call to next().
Mike Pall [Wed, 6 Oct 2021 15:31:46 +0000 (17:31 +0200)] 
Fix compilation of multi-result call to next().

Thanks to Vyacheslav Egorov.

3 years agoARM64: Fix IR_HREF code generation.
Mike Pall [Sat, 2 Oct 2021 15:49:50 +0000 (17:49 +0200)] 
ARM64: Fix IR_HREF code generation.

3 years agoMIPS64: Fix soft-float IR_TOSTR.
Mike Pall [Sat, 2 Oct 2021 15:48:19 +0000 (17:48 +0200)] 
MIPS64: Fix soft-float IR_TOSTR.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 2 Oct 2021 14:58:29 +0000 (16:58 +0200)] 
Merge branch 'master' into v2.1

3 years agoMIPS: Fix register allocation in assembly of HREF.
Mike Pall [Sat, 2 Oct 2021 14:52:57 +0000 (16:52 +0200)] 
MIPS: Fix register allocation in assembly of HREF.

Reported by Jakub Piotr Cłapa.

3 years agoFix compiler warning.
Mike Pall [Wed, 29 Sep 2021 09:59:27 +0000 (11:59 +0200)] 
Fix compiler warning.

Suggested by Fezile Manana.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Fri, 24 Sep 2021 10:11:55 +0000 (12:11 +0200)] 
Merge branch 'master' into v2.1

3 years agoWindows/x64: Document MSVC flags for C++ exception interoperability.
Mike Pall [Fri, 24 Sep 2021 10:10:44 +0000 (12:10 +0200)] 
Windows/x64: Document MSVC flags for C++ exception interoperability.

Suggested by Julien Cugnière.

3 years agoFFI: Ensure returned string is alive in ffi.typeinfo().
Mike Pall [Thu, 23 Sep 2021 17:07:30 +0000 (19:07 +0200)] 
FFI: Ensure returned string is alive in ffi.typeinfo().

Reported by zhuizhuhaomeng.

3 years agoOSX/ARM64: Disable unwind info.
Mike Pall [Tue, 21 Sep 2021 15:49:06 +0000 (17:49 +0200)] 
OSX/ARM64: Disable unwind info.

See #698.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 21 Sep 2021 14:44:06 +0000 (16:44 +0200)] 
Merge branch 'master' into v2.1

3 years agoFix stack allocation after on-trace stack check.
Mike Pall [Tue, 21 Sep 2021 14:42:35 +0000 (16:42 +0200)] 
Fix stack allocation after on-trace stack check.

3 years agoFix ITERN blacklisting.
Mike Pall [Tue, 21 Sep 2021 12:30:28 +0000 (14:30 +0200)] 
Fix ITERN blacklisting.

Reported by ExtReMLapin. #744

3 years agoEnsure ITERN forward progress on interpreter bailout.
Mike Pall [Tue, 21 Sep 2021 11:15:06 +0000 (13:15 +0200)] 
Ensure ITERN forward progress on interpreter bailout.

Reported by Yichun Zhang and ExtReMLapin. #744

3 years agoARM64: Reorder interpreter stack frame and fix unwinding.
Mike Pall [Mon, 20 Sep 2021 20:37:07 +0000 (22:37 +0200)] 
ARM64: Reorder interpreter stack frame and fix unwinding.

Reported by Yichun Zhang. Fixes #722.
May help towards fixing #698, too.

3 years agoDon't bail out to interpreter to JLOOP originating from ITERN.
Mike Pall [Mon, 20 Sep 2021 12:40:23 +0000 (14:40 +0200)] 
Don't bail out to interpreter to JLOOP originating from ITERN.

Otherwise forward progress is not guaranteed.
Reported by Yichun Zhang.

3 years agoFFI: Don't load PC from non-function object in FFI continuation.
Mike Pall [Mon, 20 Sep 2021 12:39:26 +0000 (14:39 +0200)] 
FFI: Don't load PC from non-function object in FFI continuation.

Reported by Yichun Zhang. #743

3 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 20 Sep 2021 12:39:50 +0000 (14:39 +0200)] 
Merge branch 'master' into v2.1

3 years agoFFI: Don't load PC from non-function object in FFI continuation.
Mike Pall [Mon, 20 Sep 2021 12:36:52 +0000 (14:36 +0200)] 
FFI: Don't load PC from non-function object in FFI continuation.

Reported by Yichun Zhang. #743

3 years agoFFI: Fix missing cts->L initialization in argv2ctype().
Mike Pall [Mon, 20 Sep 2021 12:34:47 +0000 (14:34 +0200)] 
FFI: Fix missing cts->L initialization in argv2ctype().

3 years agoOSX/ARM64: Disable external unwinding for now.
Mike Pall [Sun, 19 Sep 2021 15:58:24 +0000 (17:58 +0200)] 
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.

3 years agoCompile table traversals: next(), pairs(), BC_ISNEXT/BC_ITERN.
Mike Pall [Sun, 19 Sep 2021 15:49:25 +0000 (17:49 +0200)] 
Compile table traversals: next(), pairs(), BC_ISNEXT/BC_ITERN.

Sponsored by OpenResty Inc.

3 years agoUse IR_HIOP for generalized two-register returns.
Mike Pall [Sun, 19 Sep 2021 15:47:11 +0000 (17:47 +0200)] 
Use IR_HIOP for generalized two-register returns.

Sponsored by OpenResty Inc.

3 years agoRefactor table traversal.
Mike Pall [Sun, 19 Sep 2021 15:38:49 +0000 (17:38 +0200)] 
Refactor table traversal.

Sponsored by OpenResty Inc.

3 years agoARM: Fix symbol display in trace disassembly.
Mike Pall [Sun, 19 Sep 2021 15:27:18 +0000 (17:27 +0200)] 
ARM: Fix symbol display in trace disassembly.

3 years agoRefactor IR_TMPREF generation.
Mike Pall [Sun, 19 Sep 2021 15:25:27 +0000 (17:25 +0200)] 
Refactor IR_TMPREF generation.

3 years agoRefactor IR_VLOAD to take an offset.
Mike Pall [Sun, 19 Sep 2021 15:18:16 +0000 (17:18 +0200)] 
Refactor IR_VLOAD to take an offset.

3 years agoMIPS: Fix trace linking.
Mike Pall [Sun, 19 Sep 2021 14:09:48 +0000 (16:09 +0200)] 
MIPS: Fix trace linking.

4 years agoString buffers, part 4b: Improve de-serialization checks.
Mike Pall [Thu, 12 Aug 2021 19:28:17 +0000 (21:28 +0200)] 
String buffers, part 4b: Improve de-serialization checks.

Sponsored by fmad.io.

4 years agoString buffers, part 4a: Add metatable serialization dictionary.
Mike Pall [Thu, 12 Aug 2021 19:10:13 +0000 (21:10 +0200)] 
String buffers, part 4a: Add metatable serialization dictionary.

Sponsored by fmad.io.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 27 Jul 2021 12:50:40 +0000 (14:50 +0200)] 
Merge branch 'master' into v2.1

4 years agoConsider slots used by upvalues in use-def analysis.
Mike Pall [Tue, 27 Jul 2021 12:47:41 +0000 (14:47 +0200)] 
Consider slots used by upvalues in use-def analysis.

Reported by XmiliaH.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Fri, 23 Jul 2021 19:36:17 +0000 (21:36 +0200)] 
Merge branch 'master' into v2.1

4 years agoPrevent loop in snap_usedef().
Mike Pall [Fri, 23 Jul 2021 19:33:59 +0000 (21:33 +0200)] 
Prevent loop in snap_usedef().

Reported by XmiliaH.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Thu, 22 Jul 2021 14:22:53 +0000 (16:22 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix io.close() error message.
Mike Pall [Thu, 22 Jul 2021 14:21:45 +0000 (16:21 +0200)] 
Fix io.close() error message.

Reported by François Perrad.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Thu, 22 Jul 2021 00:35:00 +0000 (02:35 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix io.close().
Mike Pall [Thu, 22 Jul 2021 00:33:04 +0000 (02:33 +0200)] 
Fix io.close().

Reported by farmboy0.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 21 Jul 2021 10:32:19 +0000 (12:32 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix minilua vararg stack handling.
Mike Pall [Wed, 21 Jul 2021 10:14:09 +0000 (12:14 +0200)] 
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.

4 years agoPS4: Fix compile.
Mike Pall [Mon, 19 Jul 2021 16:15:18 +0000 (18:15 +0200)] 
PS4: Fix compile.

Thanks to Eric Lavesson.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 19 Jul 2021 15:05:48 +0000 (17:05 +0200)] 
Merge branch 'master' into v2.1

4 years agoAvoid out-of-range number of results when compiling select(k, ...).
Mike Pall [Mon, 19 Jul 2021 15:03:16 +0000 (17:03 +0200)] 
Avoid out-of-range number of results when compiling select(k, ...).

The interpreter will throw and abort the trace, anyway.

4 years agoString buffers, part 3d: Compile string buffer methods and functions.
Mike Pall [Mon, 19 Jul 2021 14:53:30 +0000 (16:53 +0200)] 
String buffers, part 3d: Compile string buffer methods and functions.

Sponsored by fmad.io.

4 years agoMinor improvements of optimizations.
Mike Pall [Mon, 19 Jul 2021 14:50:05 +0000 (16:50 +0200)] 
Minor improvements of optimizations.

4 years agoFix error message in lj_lib_checkintrange().
Mike Pall [Mon, 19 Jul 2021 14:47:46 +0000 (16:47 +0200)] 
Fix error message in lj_lib_checkintrange().

4 years agoString buffers, part 2f: Prevent self-put of buffer.
Mike Pall [Mon, 19 Jul 2021 14:45:26 +0000 (16:45 +0200)] 
String buffers, part 2f: Prevent self-put of buffer.

Sponsored by fmad.io.

4 years agoString buffers, part 3c: Add IRBUFHDR_WRITE mode.
Mike Pall [Mon, 19 Jul 2021 14:41:29 +0000 (16:41 +0200)] 
String buffers, part 3c: Add IRBUFHDR_WRITE mode.

Sponsored by fmad.io.

4 years agoFix IRXLOAD_* mode bits description.
Mike Pall [Mon, 19 Jul 2021 14:36:00 +0000 (16:36 +0200)] 
Fix IRXLOAD_* mode bits description.

4 years agoString buffers, part 3b: Change IR_BUFHDR op2 mode bits to mode.
Mike Pall [Mon, 19 Jul 2021 14:33:13 +0000 (16:33 +0200)] 
String buffers, part 3b: Change IR_BUFHDR op2 mode bits to mode.

Sponsored by fmad.io.

4 years agoString buffers, part 3a: Add IR_TMPREF for passing TValues to helpers.
Mike Pall [Mon, 19 Jul 2021 14:23:12 +0000 (16:23 +0200)] 
String buffers, part 3a: Add IR_TMPREF for passing TValues to helpers.

Sponsored by fmad.io.

4 years agoAdd IRCONV_NONE for pass-through INT to I64/U64 type change.
Mike Pall [Mon, 19 Jul 2021 14:11:39 +0000 (16:11 +0200)] 
Add IRCONV_NONE for pass-through INT to I64/U64 type change.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 19 Jul 2021 14:07:23 +0000 (16:07 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix jit.dump() output for IR_CONV.
Mike Pall [Mon, 19 Jul 2021 14:05:05 +0000 (16:05 +0200)] 
Fix jit.dump() output for IR_CONV.

4 years agoDisable unreliable assertion for external frame unwinding.
Mike Pall [Fri, 25 Jun 2021 10:53:23 +0000 (12:53 +0200)] 
Disable unreliable assertion for external frame unwinding.

Broken on Fedora/ARM64. Reported by Yichun Zhang.

4 years agoFlush and close output file after profiling run.
Mike Pall [Fri, 25 Jun 2021 10:48:42 +0000 (12:48 +0200)] 
Flush and close output file after profiling run.

Thanks to Sergey Ostanevich.

4 years agoAvoid conflict between 64 bit lightuserdata and ITERN key.
Mike Pall [Fri, 25 Jun 2021 10:45:51 +0000 (12:45 +0200)] 
Avoid conflict between 64 bit lightuserdata and ITERN key.

Reported by XmiliaH.

4 years agoThrow any errors before stack changes in trace stitching.
Mike Pall [Mon, 14 Jun 2021 12:56:54 +0000 (14:56 +0200)] 
Throw any errors before stack changes in trace stitching.

Thanks to doujiang24.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 8 Jun 2021 20:35:23 +0000 (22:35 +0200)] 
Merge branch 'master' into v2.1

4 years agoDynASM/x86: Add missing escape in pattern.
Mike Pall [Tue, 8 Jun 2021 20:34:22 +0000 (22:34 +0200)] 
DynASM/x86: Add missing escape in pattern.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 7 Jun 2021 10:06:02 +0000 (12:06 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix HTML.
Mike Pall [Mon, 7 Jun 2021 10:05:34 +0000 (12:05 +0200)] 
Fix HTML.

4 years agoString buffers, part 2e: add serialization string dictionary.
Mike Pall [Mon, 7 Jun 2021 10:03:22 +0000 (12:03 +0200)] 
String buffers, part 2e: add serialization string dictionary.

Sponsored by fmad.io.

4 years agoDynASM/ARM64: Fix LSL/BFI* encoding with variable shifts.
Mike Pall [Fri, 4 Jun 2021 11:51:56 +0000 (13:51 +0200)] 
DynASM/ARM64: Fix LSL/BFI* encoding with variable shifts.

Thanks to Dmitry Stogov.

4 years agoFix MinGW static build.
Mike Pall [Thu, 3 Jun 2021 18:28:48 +0000 (20:28 +0200)] 
Fix MinGW static build.

Reported by Sundaram Ramaswamy.