luajit2
luajit2 copied to clipboard
FFI will fail when calling C function with varadic parameters on apple silicon machine
On my macpro book with m1 processor (arm64), the FFI call to printf will output random garbage characters for all varadic args.
local ffi=require'ffi'
ffi.cdef[[
int printf(const char *fmt,...);
]]
ffi.C.printf("hello %s\n","world")
Apple has mentioned the ABI difference here. I think that's the reason. Is it complicate to support this new ABI in LuaJIT?
Looks like this issue is resolved by LuaJIT/LuaJIT#695 in the upstream.