From 1504f5e5ec8c6738e6996f54c357e098a8234be25d4b9ebcb69c43885eefe26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Tue, 25 Mar 2025 17:12:44 +0100 Subject: [PATCH] Update to version 5.1.2.1.0+git.1741730670.538a821: * Change handling of nil value markers in template tables. * REVERT: Change handling of nil value markers in template tables. * macOS: Fix Apple hardened runtime support and put behind build option. * macOS: Fix support for Apple hardened runtime. * Fix handling of nil value markers in template tables. * Avoid unpatching bytecode twice after a trace flush. * Fix state restore when recording __concat metamethod. * Windows: Allow mixed builds with msvcbuild.bat. * macOS: Add suport for Apple hardened runtime. * Add compatibility string coercion for fp:seek() argument. * Windows: Clarify installation directory layout. * Remove Cygwin from docs, since it's not a supported target. * Improve CLI signal handling on POSIX. * FFI: Add pre-declared int128_t, uint128_t, __int128 types. * Use dylib extension for iOS installs, too. * Change handling of nil value markers in template tables. * Fix recording of BC_VARG. * Reject negative getfenv()/setfenv() levels to prevent compiler warning. * Bump copyright date. * Force fallback source name for stripped bytecode. * Remove dependency on . * Restore state when recording __concat metamethod throws OOM. * MIPS64: Fix pcall() error case. * Fix detection of inconsistent renames due to sunk values. --- .gitignore | 1 + ...nable-debugging-symbols-in-the-build.patch | 8 +- ...T_VERSION_SYM-that-changes-ABI-on-ev.patch | 24 +-- ...T-5.1.2.1.0+git.1731601260.fe71d0f.obscpio | 3 - ...T-5.1.2.1.0+git.1741730670.538a821.obscpio | 3 + LuaJIT.obsinfo | 6 +- _servicedata | 2 +- luajit-lua-versioned.patch | 38 +++-- luajit-s390x.patch | 142 +++++++++++------- luajit.changes | 29 ++++ luajit.spec | 2 +- 11 files changed, 170 insertions(+), 88 deletions(-) delete mode 100644 LuaJIT-5.1.2.1.0+git.1731601260.fe71d0f.obscpio create mode 100644 LuaJIT-5.1.2.1.0+git.1741730670.538a821.obscpio diff --git a/.gitignore b/.gitignore index 57affb6..00d012f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .osc +LuaJIT/ diff --git a/0002-Enable-debugging-symbols-in-the-build.patch b/0002-Enable-debugging-symbols-in-the-build.patch index cc4c206..4e545db 100644 --- a/0002-Enable-debugging-symbols-in-the-build.patch +++ b/0002-Enable-debugging-symbols-in-the-build.patch @@ -6,9 +6,11 @@ Subject: Enable debugging symbols in the build src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- a/src/Makefile -+++ b/src/Makefile -@@ -54,9 +54,9 @@ CCOPT_arm64= +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/Makefile +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/Makefile 2025-03-25 17:07:13.482265396 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/Makefile 2025-03-25 17:07:21.367645582 +0100 +@@ -54,9 +54,9 @@ CCOPT_ppc= CCOPT_mips= # diff --git a/0003-Get-rid-of-LUAJIT_VERSION_SYM-that-changes-ABI-on-ev.patch b/0003-Get-rid-of-LUAJIT_VERSION_SYM-that-changes-ABI-on-ev.patch index c9a3d1d..1b2d28b 100644 --- a/0003-Get-rid-of-LUAJIT_VERSION_SYM-that-changes-ABI-on-ev.patch +++ b/0003-Get-rid-of-LUAJIT_VERSION_SYM-that-changes-ABI-on-ev.patch @@ -8,9 +8,11 @@ Subject: Get rid of LUAJIT_VERSION_SYM that changes ABI on every patch release src/luajit_rolling.h | 3 --- 3 files changed, 9 deletions(-) ---- a/src/lj_dispatch.c -+++ b/src/lj_dispatch.c -@@ -318,11 +318,6 @@ int luaJIT_setmode(lua_State *L, int idx +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_dispatch.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_dispatch.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_dispatch.c 2025-03-25 17:07:26.955530316 +0100 +@@ -318,11 +318,6 @@ return 1; /* OK. */ } @@ -22,9 +24,11 @@ Subject: Get rid of LUAJIT_VERSION_SYM that changes ABI on every patch release /* -- Hooks --------------------------------------------------------------- */ /* This function can be called asynchronously (e.g. during a signal). */ ---- a/src/luajit.c -+++ b/src/luajit.c -@@ -515,7 +515,6 @@ static int pmain(lua_State *L) +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/luajit.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/luajit.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/luajit.c 2025-03-25 17:07:26.956030878 +0100 +@@ -530,7 +530,6 @@ int argn; int flags = 0; globalL = L; @@ -32,9 +36,11 @@ Subject: Get rid of LUAJIT_VERSION_SYM that changes ABI on every patch release argn = collectargs(argv, &flags); if (argn < 0) { /* Invalid args? */ ---- a/src/luajit_rolling.h -+++ b/src/luajit_rolling.h -@@ -73,8 +73,5 @@ LUA_API void luaJIT_profile_stop(lua_Sta +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/luajit_rolling.h +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/luajit_rolling.h 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/luajit_rolling.h 2025-03-25 17:07:26.956298722 +0100 +@@ -73,8 +73,5 @@ LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt, int depth, size_t *len); diff --git a/LuaJIT-5.1.2.1.0+git.1731601260.fe71d0f.obscpio b/LuaJIT-5.1.2.1.0+git.1731601260.fe71d0f.obscpio deleted file mode 100644 index 779990e..0000000 --- a/LuaJIT-5.1.2.1.0+git.1731601260.fe71d0f.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:159ac574d7bac1273cde9cfbe0a970fffa353c480dce3fa50ca37ab899dc80f6 -size 4384780 diff --git a/LuaJIT-5.1.2.1.0+git.1741730670.538a821.obscpio b/LuaJIT-5.1.2.1.0+git.1741730670.538a821.obscpio new file mode 100644 index 0000000..8c3b584 --- /dev/null +++ b/LuaJIT-5.1.2.1.0+git.1741730670.538a821.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afebd7d8e46649e344a730317fcff467dadee7fbbb94c02d81b8cc006dbc17cd +size 4386828 diff --git a/LuaJIT.obsinfo b/LuaJIT.obsinfo index c353963..35261bd 100644 --- a/LuaJIT.obsinfo +++ b/LuaJIT.obsinfo @@ -1,4 +1,4 @@ name: LuaJIT -version: 5.1.2.1.0+git.1731601260.fe71d0f -mtime: 1731601260 -commit: fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059 +version: 5.1.2.1.0+git.1741730670.538a821 +mtime: 1741730670 +commit: 538a82133ad6fddfd0ca64de167c4aca3bc1a2da diff --git a/_servicedata b/_servicedata index 56183bf..50701fa 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/LuaJIT/LuaJIT.git - fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059 \ No newline at end of file + 538a82133ad6fddfd0ca64de167c4aca3bc1a2da \ No newline at end of file diff --git a/luajit-lua-versioned.patch b/luajit-lua-versioned.patch index c642ed0..f598f40 100644 --- a/luajit-lua-versioned.patch +++ b/luajit-lua-versioned.patch @@ -5,8 +5,10 @@ src/luaconf.h | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) ---- a/Makefile -+++ b/Makefile +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/Makefile +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/Makefile 2025-03-25 17:07:06.248742356 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/Makefile 2025-03-25 17:07:13.480809547 +0100 @@ -16,13 +16,14 @@ MAJVER= 2 MINVER= 1 @@ -23,7 +25,7 @@ VERSION= $(MMVERSION).$(RELVER) ############################################################################## -@@ -52,7 +53,7 @@ INSTALL_MAN= $(INSTALL_SHARE)/man/man1 +@@ -52,7 +53,7 @@ INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig INSTALL_TNAME= luajit-$(VERSION) @@ -32,7 +34,7 @@ INSTALL_ANAME= libluajit-$(ABIVER).a INSTALL_SOSHORT1= libluajit-$(ABIVER).so INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER) -@@ -90,7 +91,7 @@ ifneq ($(INSTALL_DEFINC),$(INSTALL_INC)) +@@ -90,7 +91,7 @@ SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|" endif @@ -41,7 +43,7 @@ FILE_A= libluajit.a FILE_SO= libluajit.so FILE_MAN= luajit.1 -@@ -138,7 +139,7 @@ install: $(INSTALL_DEP) +@@ -138,7 +139,7 @@ ( $(LDCONFIG) $(INSTALL_LIB) || : ) && \ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : @@ -50,9 +52,11 @@ cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \ $(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \ $(RM) $(FILE_PC).tmp ---- a/etc/luajit.pc -+++ b/etc/luajit.pc -@@ -10,7 +10,7 @@ multilib=lib +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/etc/luajit.pc +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/etc/luajit.pc 2025-03-25 17:07:06.250442675 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/etc/luajit.pc 2025-03-25 17:07:13.482070760 +0100 +@@ -10,7 +10,7 @@ exec_prefix=${prefix} libdir=${exec_prefix}/${multilib} libname=luajit-${abiver} @@ -61,9 +65,11 @@ INSTALL_LMOD=${prefix}/share/lua/${abiver} INSTALL_CMOD=${prefix}/${multilib}/lua/${abiver} ---- a/src/Makefile -+++ b/src/Makefile -@@ -14,6 +14,7 @@ MAJVER= 2 +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/Makefile +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/Makefile 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/Makefile 2025-03-25 17:07:13.482265396 +0100 +@@ -14,6 +14,7 @@ MINVER= 1 ABIVER= 5.1 NODOTABIVER= 51 @@ -71,7 +77,7 @@ ############################################################################## ############################# COMPILER OPTIONS ############################# -@@ -527,7 +528,7 @@ LIB_VMDEFP= $(LIB_VMDEF) +@@ -527,7 +528,7 @@ LUAJIT_O= luajit.o LUAJIT_A= libluajit.a LUAJIT_SO= libluajit.so @@ -80,9 +86,11 @@ ALL_T= $(LUAJIT_T) $(LUAJIT_A) $(LUAJIT_SO) $(HOST_T) ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \ ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -51,7 +51,7 @@ +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/luaconf.h +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/luaconf.h 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/luaconf.h 2025-03-25 17:07:13.482427381 +0100 +@@ -50,7 +50,7 @@ #endif #ifndef LUA_LJDIR diff --git a/luajit-s390x.patch b/luajit-s390x.patch index aa30d1f..227c256 100644 --- a/luajit-s390x.patch +++ b/luajit-s390x.patch @@ -42,8 +42,10 @@ Signed-off-by: Ilya Leoshkevich create mode 100644 dynasm/dasm_s390x.h create mode 100644 dynasm/dasm_s390x.lua ---- /dev/null -+++ b/dynasm/dasm_s390x.h +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/dynasm/dasm_s390x.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/dynasm/dasm_s390x.h 2025-03-25 17:07:33.832996980 +0100 @@ -0,0 +1,546 @@ +/* +** DynASM s390x encoding engine. @@ -591,8 +593,10 @@ Signed-off-by: Ilya Leoshkevich + return D->status; +} +#endif ---- /dev/null -+++ b/dynasm/dasm_s390x.lua +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/dynasm/dasm_s390x.lua +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/dynasm/dasm_s390x.lua 2025-03-25 17:07:33.833187298 +0100 @@ -0,0 +1,1634 @@ +------------------------------------------------------------------------------ +-- DynASM s390x module. @@ -2228,9 +2232,11 @@ Signed-off-by: Ilya Leoshkevich +end +return _M +------------------------------------------------------------------------------ ---- a/src/Makefile -+++ b/src/Makefile -@@ -244,6 +244,9 @@ else +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/Makefile +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/Makefile 2025-03-25 17:07:21.367645582 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/Makefile 2025-03-25 17:07:33.833662692 +0100 +@@ -244,6 +244,9 @@ ifneq (,$(findstring LJ_TARGET_ARM ,$(TARGET_TESTARCH))) TARGET_LJARCH= arm else @@ -2240,7 +2246,7 @@ Signed-off-by: Ilya Leoshkevich ifneq (,$(findstring LJ_TARGET_ARM64 ,$(TARGET_TESTARCH))) ifneq (,$(findstring __AARCH64EB__ ,$(TARGET_TESTARCH))) TARGET_ARCH= -D__AARCH64EB__=1 -@@ -272,6 +275,7 @@ else +@@ -272,6 +275,7 @@ endif endif endif @@ -2248,9 +2254,11 @@ Signed-off-by: Ilya Leoshkevich endif endif endif ---- a/src/host/buildvm.c -+++ b/src/host/buildvm.c -@@ -67,6 +67,8 @@ static int collect_reloc(BuildCtx *ctx, +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/host/buildvm.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/host/buildvm.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/host/buildvm.c 2025-03-25 17:07:33.833850987 +0100 +@@ -67,6 +67,8 @@ #include "../dynasm/dasm_ppc.h" #elif LJ_TARGET_MIPS #include "../dynasm/dasm_mips.h" @@ -2259,9 +2267,11 @@ Signed-off-by: Ilya Leoshkevich #else #error "No support for this architecture (yet)" #endif ---- a/src/host/buildvm_asm.c -+++ b/src/host/buildvm_asm.c -@@ -87,6 +87,54 @@ err: +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/host/buildvm_asm.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/host/buildvm_asm.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/host/buildvm_asm.c 2025-03-25 17:07:33.833994637 +0100 +@@ -87,6 +87,54 @@ } fprintf(ctx->fp, "\t%s %s\n", opname, sym); } @@ -2316,7 +2326,7 @@ Signed-off-by: Ilya Leoshkevich #else /* Emit words piecewise as assembler text. */ static void emit_asm_words(BuildCtx *ctx, uint8_t *p, int n) -@@ -302,6 +350,9 @@ void emit_asm(BuildCtx *ctx) +@@ -302,6 +350,9 @@ emit_asm_reloc(ctx, r->type, ctx->relocsym[r->sym]); } ofs += n+4; @@ -2326,7 +2336,7 @@ Signed-off-by: Ilya Leoshkevich #else emit_asm_wordreloc(ctx, ctx->code+ofs, n, ctx->relocsym[r->sym]); ofs += n; -@@ -310,6 +361,8 @@ void emit_asm(BuildCtx *ctx) +@@ -310,6 +361,8 @@ } #if LJ_TARGET_X86ORX64 emit_asm_bytes(ctx, ctx->code+ofs, next-ofs); @@ -2335,9 +2345,11 @@ Signed-off-by: Ilya Leoshkevich #else emit_asm_words(ctx, ctx->code+ofs, next-ofs); #endif ---- a/src/jit/bcsave.lua -+++ b/src/jit/bcsave.lua -@@ -101,6 +101,7 @@ local map_arch = { +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/jit/bcsave.lua +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/jit/bcsave.lua 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/jit/bcsave.lua 2025-03-25 17:07:33.834150631 +0100 +@@ -101,6 +101,7 @@ mips64el = { e = "le", b = 64, m = 8, f = 0x80000007, }, mips64r6 = { e = "be", b = 64, m = 8, f = 0xa0000407, }, mips64r6el = { e = "le", b = 64, m = 8, f = 0xa0000407, }, @@ -2345,13 +2357,17 @@ Signed-off-by: Ilya Leoshkevich } local map_os = { ---- /dev/null -+++ b/src/jit/dis_s390x.lua +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/jit/dis_s390x.lua +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/jit/dis_s390x.lua 2025-03-25 17:07:33.834355236 +0100 @@ -0,0 +1 @@ +-- Not yet implemented. ---- a/src/lib_jit.c -+++ b/src/lib_jit.c -@@ -702,6 +702,8 @@ static uint32_t jit_cpudetect(void) +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lib_jit.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lib_jit.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lib_jit.c 2025-03-25 17:07:33.834600527 +0100 +@@ -702,6 +702,8 @@ } #endif @@ -2360,8 +2376,10 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing CPU detection for this architecture" #endif ---- a/src/lj_arch.h -+++ b/src/lj_arch.h +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_arch.h +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_arch.h 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_arch.h 2025-03-25 17:07:33.834744177 +0100 @@ -31,6 +31,8 @@ #define LUAJIT_ARCH_mips32 6 #define LUAJIT_ARCH_MIPS64 7 @@ -2402,9 +2420,11 @@ Signed-off-by: Ilya Leoshkevich #else #error "No target architecture defined" #endif ---- a/src/lj_asm.c -+++ b/src/lj_asm.c -@@ -1708,6 +1708,8 @@ static void asm_loop(ASMState *as) +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_asm.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_asm.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_asm.c 2025-03-25 17:07:33.834947239 +0100 +@@ -1708,6 +1708,8 @@ #include "lj_asm_ppc.h" #elif LJ_TARGET_MIPS #include "lj_asm_mips.h" @@ -2413,8 +2433,10 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing assembler for target CPU" #endif ---- a/src/lj_ccall.c -+++ b/src/lj_ccall.c +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_ccall.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_ccall.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_ccall.c 2025-03-25 17:07:33.835193593 +0100 @@ -575,6 +575,40 @@ goto done; \ } @@ -2456,7 +2478,7 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing calling convention definitions for this architecture" #endif -@@ -999,6 +1033,9 @@ static int ccall_set_args(lua_State *L, +@@ -999,6 +1033,9 @@ CType *d; CTSize sz; MSize n, isfp = 0, isva = 0; @@ -2466,7 +2488,7 @@ Signed-off-by: Ilya Leoshkevich void *dp, *rp = NULL; if (fid) { /* Get argument type from field. */ -@@ -1037,6 +1074,9 @@ static int ccall_set_args(lua_State *L, +@@ -1037,6 +1074,9 @@ CCALL_HANDLE_REGARG /* Handle register arguments. */ /* Otherwise pass argument on stack. */ @@ -2476,7 +2498,7 @@ Signed-off-by: Ilya Leoshkevich if (CCALL_ALIGN_STACKARG) { /* Align argument on stack. */ MSize align = (1u << ctype_align(d->info)) - 1; if (rp || (CCALL_PACK_STACKARG && isva && align < CTSIZE_PTR-1)) -@@ -1086,6 +1126,16 @@ static int ccall_set_args(lua_State *L, +@@ -1086,6 +1126,16 @@ *(int64_t *)dp = (int64_t)*(int32_t *)dp; /* Sign-extend to 64 bit. */ } #endif @@ -2493,9 +2515,11 @@ Signed-off-by: Ilya Leoshkevich #if LJ_TARGET_X64 && LJ_ABI_WIN if (isva) { /* Windows/x64 mirrors varargs in both register sets. */ if (nfpr == ngpr) ---- a/src/lj_ccall.h -+++ b/src/lj_ccall.h -@@ -129,6 +129,21 @@ typedef union FPRArg { +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_ccall.h +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_ccall.h 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_ccall.h 2025-03-25 17:07:33.835369284 +0100 +@@ -129,6 +129,21 @@ struct { LJ_ENDIAN_LOHI(float f; , float g;) }; } FPRArg; @@ -2517,9 +2541,11 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing calling convention definitions for this architecture" #endif ---- a/src/lj_ccallback.c -+++ b/src/lj_ccallback.c -@@ -516,6 +516,15 @@ void lj_ccallback_mcode_free(CTState *ct +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_ccallback.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_ccallback.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_ccallback.c 2025-03-25 17:07:33.835500911 +0100 +@@ -531,6 +531,15 @@ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ ((float *)dp)[1] = *(float *)dp; @@ -2535,9 +2561,11 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing calling convention definitions for this architecture" #endif ---- a/src/lj_err.c -+++ b/src/lj_err.c -@@ -442,6 +442,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int ver +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_err.c +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_err.c 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_err.c 2025-03-25 17:07:33.835648018 +0100 +@@ -442,6 +442,9 @@ if (version != 1) return _URC_FATAL_PHASE1_ERROR; cf = (void *)_Unwind_GetCFA(ctx); @@ -2547,9 +2575,11 @@ Signed-off-by: Ilya Leoshkevich L = cframe_L(cf); if ((actions & _UA_SEARCH_PHASE)) { #if LJ_UNWIND_EXT ---- a/src/lj_frame.h -+++ b/src/lj_frame.h -@@ -264,6 +264,20 @@ enum { LJ_CONT_TAILCALL, LJ_CONT_FFI_CAL +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_frame.h +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_frame.h 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_frame.h 2025-03-25 17:07:33.835810764 +0100 +@@ -264,6 +264,20 @@ #endif #define CFRAME_OFS_MULTRES 0 #define CFRAME_SHIFT_MULTRES 3 @@ -2570,9 +2600,11 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing CFRAME_* definitions for this architecture" #endif ---- a/src/lj_target.h -+++ b/src/lj_target.h -@@ -143,6 +143,8 @@ typedef uint32_t RegCost; +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_target.h +=================================================================== +--- LuaJIT-5.1.2.1.0+git.1741730670.538a821.orig/src/lj_target.h 2025-03-11 23:04:30.000000000 +0100 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_target.h 2025-03-25 17:07:33.835917646 +0100 +@@ -143,6 +143,8 @@ #include "lj_target_ppc.h" #elif LJ_TARGET_MIPS #include "lj_target_mips.h" @@ -2581,8 +2613,10 @@ Signed-off-by: Ilya Leoshkevich #else #error "Missing include for target CPU" #endif ---- /dev/null -+++ b/src/lj_target_s390x.h +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_target_s390x.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/lj_target_s390x.h 2025-03-25 17:07:33.836051678 +0100 @@ -0,0 +1,80 @@ +/* +** Definitions for IBM z/Architecture (s390x) CPUs. @@ -2664,8 +2698,10 @@ Signed-off-by: Ilya Leoshkevich +/* -- Instructions -------------------------------------------------------- */ + +#endif ---- /dev/null -+++ b/src/vm_s390x.dasc +Index: LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/vm_s390x.dasc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ LuaJIT-5.1.2.1.0+git.1741730670.538a821/src/vm_s390x.dasc 2025-03-25 17:07:33.836167776 +0100 @@ -0,0 +1,4269 @@ +|// Low-level VM code for IBM z/Architecture (s390x) CPUs in LJ_GC64 mode. +|// Bytecode interpreter, fast functions and helper functions. diff --git a/luajit.changes b/luajit.changes index b7b4a70..69e1cb3 100644 --- a/luajit.changes +++ b/luajit.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Tue Mar 25 16:04:27 UTC 2025 - mcepl@cepl.eu + +- Update to version 5.1.2.1.0+git.1741730670.538a821: + * Change handling of nil value markers in template tables. + * REVERT: Change handling of nil value markers in template tables. + * macOS: Fix Apple hardened runtime support and put behind build option. + * macOS: Fix support for Apple hardened runtime. + * Fix handling of nil value markers in template tables. + * Avoid unpatching bytecode twice after a trace flush. + * Fix state restore when recording __concat metamethod. + * Windows: Allow mixed builds with msvcbuild.bat. + * macOS: Add suport for Apple hardened runtime. + * Add compatibility string coercion for fp:seek() argument. + * Windows: Clarify installation directory layout. + * Remove Cygwin from docs, since it's not a supported target. + * Improve CLI signal handling on POSIX. + * FFI: Add pre-declared int128_t, uint128_t, __int128 types. + * Use dylib extension for iOS installs, too. + * Change handling of nil value markers in template tables. + * Fix recording of BC_VARG. + * Reject negative getfenv()/setfenv() levels to prevent compiler warning. + * Bump copyright date. + * Force fallback source name for stripped bytecode. + * Remove dependency on . + * Restore state when recording __concat metamethod throws OOM. + * MIPS64: Fix pcall() error case. + * Fix detection of inconsistent renames due to sunk values. + ------------------------------------------------------------------- Fri Dec 6 07:23:43 UTC 2024 - Adrian Schröter diff --git a/luajit.spec b/luajit.spec index 980f990..0038527 100644 --- a/luajit.spec +++ b/luajit.spec @@ -21,7 +21,7 @@ %define so_version 2 %define upname LuaJIT Name: luajit -Version: 5.1.2.1.0+git.1731601260.fe71d0f +Version: 5.1.2.1.0+git.1741730670.538a821 Release: 0 Summary: JIT compiler for Lua language License: MIT -- 2.51.1