]> git.ipfire.org Git - thirdparty/LuaJIT.git/log
thirdparty/LuaJIT.git
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.

4 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.

4 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

4 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

4 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

4 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.

4 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.

4 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.

4 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

4 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.

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

Suggested by Fezile Manana.

4 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

4 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.

4 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.

4 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.

4 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

4 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.

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

Reported by ExtReMLapin. #744

4 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

4 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.

4 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.

4 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

4 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

4 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

4 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().

4 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.

4 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.

4 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.

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

Sponsored by OpenResty Inc.

4 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.

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

4 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.

4 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.

4 years agoFix dependencies.
Mike Pall [Thu, 3 Jun 2021 08:07:00 +0000 (10:07 +0200)] 
Fix dependencies.

4 years agoFix IR_BUFHDR assembly.
Mike Pall [Thu, 3 Jun 2021 08:05:20 +0000 (10:05 +0200)] 
Fix IR_BUFHDR assembly.

4 years agoFFI: Support FFI numbers in string.format() and buf:putf().
Mike Pall [Thu, 3 Jun 2021 01:22:58 +0000 (03:22 +0200)] 
FFI: Support FFI numbers in string.format() and buf:putf().

4 years agoARM64: More improvements to the generation of immediates.
Mike Pall [Thu, 3 Jun 2021 01:21:56 +0000 (03:21 +0200)] 
ARM64: More improvements to the generation of immediates.

4 years agoString buffers, part 2d: basic string buffer methods.
Mike Pall [Tue, 1 Jun 2021 03:16:32 +0000 (05:16 +0200)] 
String buffers, part 2d: basic string buffer methods.

Sponsored by fmad.io.

4 years agoString buffers, part 2c: abstract out string.format.
Mike Pall [Tue, 1 Jun 2021 03:14:18 +0000 (05:14 +0200)] 
String buffers, part 2c: abstract out string.format.

Sponsored by fmad.io.

4 years agoAbstract out on-demand loading of FFI library.
Mike Pall [Mon, 31 May 2021 23:01:15 +0000 (01:01 +0200)] 
Abstract out on-demand loading of FFI library.

4 years agoString buffers, part 2b: Add extended string buffers. Use in serializer.
Mike Pall [Mon, 31 May 2021 22:55:51 +0000 (00:55 +0200)] 
String buffers, part 2b: Add extended string buffers. Use in serializer.

Sponsored by fmad.io.

4 years agoString buffers, part 2a: internal SBuf reorg. Use full pointers.
Mike Pall [Mon, 31 May 2021 22:45:06 +0000 (00:45 +0200)] 
String buffers, part 2a: internal SBuf reorg. Use full pointers.

Sponsored by fmad.io.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 31 May 2021 22:28:00 +0000 (00:28 +0200)] 
Merge branch 'master' into v2.1

4 years agoFFI: Fix dangling reference to CType.
Mike Pall [Mon, 31 May 2021 22:26:45 +0000 (00:26 +0200)] 
FFI: Fix dangling reference to CType.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 29 May 2021 13:38:37 +0000 (15:38 +0200)] 
Merge branch 'master' into v2.1

4 years agoPPC/PS3: Fix BC_ADD*/BC_SUB*.
Mike Pall [Sat, 29 May 2021 13:33:08 +0000 (15:33 +0200)] 
PPC/PS3: Fix BC_ADD*/BC_SUB*.

Thanks to MaryWan1982.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 29 May 2021 13:32:04 +0000 (15:32 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix use-def analysis for vararg functions.
Mike Pall [Sat, 29 May 2021 13:31:13 +0000 (15:31 +0200)] 
Fix use-def analysis for vararg functions.

Reported by Shmuel Zeigerman.

4 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 24 May 2021 20:28:58 +0000 (22:28 +0200)] 
Merge branch 'master' into v2.1

4 years agoFix use-def analysis for BC_VARG.
Mike Pall [Mon, 24 May 2021 20:25:26 +0000 (22:25 +0200)] 
Fix use-def analysis for BC_VARG.

Reported by Ryan Lucia.

4 years agoDynASM/ARM64: Fix ADRP encoding with absolute address.
Mike Pall [Sat, 22 May 2021 11:31:48 +0000 (13:31 +0200)] 
DynASM/ARM64: Fix ADRP encoding with absolute address.

Thanks to Dmitry Stogov.