[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Hardware trap while casting large doubles to int on PowerPC P2020
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 Mar 2014 11:20:13 -0300
> As you mention Lua 5.3: I haven't look too much into it, but if all
> double to in conversions go through "luaV_numtointeger" it seem to
> be safe for this problem.
Currently, there is only one exception, but that it is safe too:
conversions to lua_Unsigned, done only at the API (see lua_tounsignedx
in lapi.c), go through a more complicated process, to ensure that
all numbers are properly converted "mod 2^n". (Like the case for
luaV_numtointeger, in 5.3 these conversions should be rare.) We are
not sure we will keep this feature or make the conversion behave as
for regular integers.