> I use Lua in some embedded device and I have found some mysterious restart
> records in log.
> I dig into the problem and I discover this error mechanics:
> -ftrapv in C_FLAGS
> LUA_NUMBER int
> Lua code: local n = 12345678901234567890
> My function strtod used by parser returns LUA_MININTEGER without signaling
> an error through endptr.
> Then function luaH_getint is invoked from assignment with key =
Would you be so nice as to tell us what version of Lua you are talking
Anyway, this problem has been already reported in Lua 5.3 . I guess
the best fix is this ene, which achieves the original intention of the
- if (l_castS2U(key - 1) < t->sizearray)
+ if (l_castS2U(key) - 1 < t->sizearray)
There are a few other problems detected with -ftrapv. They are all easily
fixed (and will be fixed in our next release).