lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have some experience* on big endianess host on physical 64/32-bit 

lua: 5.1.5, 5.2.4 works as expected!
lua: 5.3+ random crash and dont works with large numbers, i.e.,  unixstamp ( os.date, os.time )

my project was need backport from 5.4.x to 5.2.4 =)
you can try run QEMU to verify (i.e. MIPS, openwrt, ...)
you need some compiler env (32 or 64-bitcpu and same size of int, float, double, ...) 
you maybe checkout about mixed endianness
you maybe need memory align OR a custom allocator

a classic 'crash test' is usage of https://github.com/ignacio/StackTracePlus in my case: crash on any lua from 5.1.5+

* 32-bit ARM1136J-S
* 32-bit ARM920T
* 32-bit powermac g4
* 64-bit powermac g5



---- Em Ter, 01 ago 2023 07:10:22 -0300 Dan Horák <dan@danny.cz> escreveu ---

Hello,

the calls test fails in Lua 5.4 on big endian platforms (ppc64, s390x),
please see https://bugzilla.redhat.com/show_bug.cgi?id=2226537 for the
original report. I suppose it is because the precompiled code added in
https://github.com/lua/lua/commit/ab859fe59b464a038a45552921cb2b23892343af
is from a little endian system (eg. x86) and is platform specific, thus
it won't load correctly on a big endian system. Is there a way how to
fix it?


    Thanks,

        Dan