Mike Pall
224129a8e6
Fix last commit.
...
Reported by PluMGMK.
2023-04-30 13:38:29 +02:00
Mike Pall
1c27912705
Print errors from __gc finalizers instead of rethrowing them.
...
Finalizers are not supposed to throw errors -- this is undefined behavior.
Lua 5.1 - 5.3 and (previously) LuaJIT rethrow the error. This randomly
breaks some unrelated code that just happens to do an allocation. Bad.
Lua 5.4 catches the error and emits a warning instead. But warnings are
not enabled by default, so it fails silently. Even worse.
LuaJIT (now) catches the error and emits a VM event. The default event
handler function prints "ERROR in finalizer: ...".
Set a custom handler function with: jit.attach(handler, "errfin")
2023-04-16 18:13:48 +02:00
Mike Pall
8bbd58e534
Merge branch 'master' into v2.1
2023-04-16 13:29:58 +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
505e2c03de
Merge branch 'master' into v2.1
2023-02-21 17:07:37 +01:00
Mike Pall
8135de2a02
Improve error reporting on stack overflow.
...
Thanks to Nicolas Lebedenco.
2023-02-21 17:05:12 +01:00
Mike Pall
eccdf6d6f8
Merge branch 'master' into v2.1
2023-02-21 16:54:04 +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
d0e88930dd
Fix compiler warning.
...
Reported by Christopher Ng.
2023-01-04 10:44:18 +01:00
Mike Pall
a4f4f5b835
Don't fail for Clang builds, which pretend to be an ancient GCC.
...
Reported by pkubaj.
2023-01-04 10:30:59 +01:00
Mike Pall
a04480e311
Merge branch 'master' into v2.1
2022-12-22 00:52:04 +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
8625eee71f
Merge branch 'master' into v2.1
2022-12-09 00:21:40 +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
de2e1ca9d3
Disable FMA by default. Use -Ofma or jit.opt.start("+fma") to enable.
...
See the discussion in #918 for the rationale.
2022-12-07 18:38:22 +01:00
Mike Pall
7d5d4a1b1a
Merge branch 'master' into v2.1
2022-12-07 17:21:36 +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
564147f518
ARM64: Fix code generation for IR_SLOAD with typecheck + conversion.
...
Reported by memcorrupt.
2022-12-01 12:03:09 +01:00
Mike Pall
637721d00f
PS4/PS5: Fix build scripts.
...
Thanks to Mathias Westerdahl.
2022-11-27 15:36:11 +01:00
Mike Pall
1d75cd4d7b
Avoid assertion in case of stack overflow from stitched trace.
...
Reported by Sergey Bronnikov. Fixed by Sergey Kaplun.
2022-11-27 15:25:32 +01:00
Mike Pall
46aa45dcbd
NX: Always compile with -fPIC.
...
Suggested by Mathias Westerdahl.
2022-11-22 09:52:56 +01:00
Mike Pall
e05371bdc3
Merge branch 'master' into v2.1
2022-11-14 09:56:07 +01:00
Mike Pall
1c5113aea9
Clarify contact page.
2022-11-14 09:55:38 +01:00
Mike Pall
7a0cf5fd4c
Merge branch 'master' into v2.1
2022-11-09 11:06:11 +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
6c4826f12c
ARM64: Fix IR_SLOAD assembly.
...
Reported by Gate88.
2022-10-04 12:04:17 +02:00
Mike Pall
dad04f1754
Fix trace join to BC_JLOOP originating from BC_ITERN.
...
Reported by OpenResty Inc.
2022-09-14 12:26:53 +02:00
Mike Pall
fffd3eafc4
Fix compiler warnings.
...
Reported by gan74.
2022-09-13 13:43:03 +02:00
Mike Pall
d13610a845
Merge branch 'master' into v2.1
2022-09-13 11:33:12 +02:00
Mike Pall
46e62cd963
Fix last edit.
2022-09-13 11:32:53 +02:00
Mike Pall
4aae8dc2f6
Merge branch 'master' into v2.1
2022-09-13 11:22:46 +02:00
Mike Pall
b907ffc49f
Remove dead Wiki links.
...
The lost content may be resurrected later.
2022-09-13 11:21:30 +02:00
Mike Pall
e19db60512
Fix QNX build.
...
Note: this is not an officially supported target.
Contributed by Wen Yang.
2022-09-12 11:16:20 +02:00
Mike Pall
03080b795a
Add -F option to override filename in jit.bcsave (luajit -b).
...
Suggested by Mathias Westerdahl.
2022-08-15 14:16:58 +02:00
Mike Pall
975ec13f5d
Merge branch 'master' into v2.1
2022-08-15 14:16:39 +02:00
Mike Pall
3b3d427ae3
Patch luajit.pc with INSTALL_INC, if customized.
...
Suggested by Henrique Bucher.
2022-08-15 14:16:14 +02:00
Mike Pall
633f265f67
LJ_GC64: Fix lua_concat().
...
Reported by Mathias Westerdahl.
2022-08-10 19:27:53 +02:00
Mike Pall
e61a1f961a
Merge branch 'master' into v2.1
2022-08-07 20:04:52 +02: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
a7d0265480
Improve GC estimation for userdata with attached managed memory.
...
This works well for string.buffers, but not for userdata or
cdata with attached unmanaged memory (malloc/free, mmap/munmap).
2022-07-28 15:40:28 +02:00
Mike Pall
9c3df68a1e
Add missing GC steps to string buffer methods.
...
Reported by Cosmin Apreutesei.
2022-07-28 15:38:54 +02:00
Mike Pall
e1339aed3d
x86/x64: Limit VLOAD fusion to simple cases.
...
Reported by ccagml.
2022-07-27 11:32:33 +02:00
Mike Pall
3065c910ad
OSX/iOS/ARM64: Fix generation of Mach-O object files.
...
Thanks to Carlo Cabrera.
2022-07-22 12:14:40 +02:00
Mike Pall
32984282dd
Prevent trace start at BC_ITERL after compiled BC_ITERN.
...
Reported by ccagml.
2022-07-21 17:30:56 +02:00
Mike Pall
5677985dc1
ARM64: Allow building with unwinding disabled.
2022-07-19 12:53:34 +02:00
Mike Pall
50936d7844
Merge branch 'master' into v2.1
2022-07-13 00:37:14 +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