Re: problems with Lua

"Andreas K. Foerster" <[email protected]> Sat, 20 Jul 2013 15:34:40 +0200
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
On Fri, Jul 19, 2013 at 09:48:31PM +0200, Andreas K. Foerster wrote:

> I use Lua-5.2.2. I compiled it with
>   > make ansi CC="diet gcc -m32"

Someone asked me offlist if I could write a small test
that triggers the bug.
For this test you need Lua compiled for x86 as shown above.
(My project is not needed.)

Here is a little Lua script:

----
t = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}

for k,v in pairs(t) do
  print(k,v)
end
----

I get the output:
----
0       65535
2       65535
3       65535
4       65535
5       65535
6       65535
7       nan
8       nan
---

Note: the first number should be 1, not 0.
And there should be no "nan".
Works fine with other libc's.

-- 
AKFoerster <http://AKFoerster.de/>