[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Faults on Raspberry Pi and PPC Linux with Lua 5.4.0 RC 5 in lobjects.c/str2num
- From: Andrew Gierth <andrew@...>
- Date: Fri, 19 Jun 2020 19:52:18 +0100
>>>>> "Alexander" == Alexander Walz <email@example.com> writes:
Alexander> when merging Lua 5.4 code into a Lua 5.1 fork, I noticed
Alexander> problems on my Raspberry Pi 4 and also on Power PC with
Alexander> lobjects.c/str2num returning 2^32 with integral arguments
Alexander> that are within its range, when reading values from files.
What values, and in what way did you modify l_str2int? And what types
are you using for lua_Integer, lua_Unsigned etc? It all works fine for
me on my ARM systems.
(A common error that shows up on ARM platforms is if you try and cast a
negative float value to an unsigned integer; this is undefined in C.)