Re: Beta10: some issues on Efika/ARM

  • From: Mike Pall <mike-1205@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 10 May 2012 16:24:38 +0200

François Perrad wrote:
> I found some issues on efika (with test suite from
> https://github.com/fperrad/lua-TestMore/tree/master/test_lua52)
> 
> 1) tonumber doesn't handle base
> LuaJIT 2.0.0-beta10 -- Copyright (C) 2005-2012 Mike Pall. http://luajit.org/
> JIT: ON ARMv6 ARMv6T2 ARMv7 fold cse dce fwd dse narrow loop abc fuse
> > print(tonumber(111,2))
> 111

Fixed.

> 2) a segfault with a pathological __tostring
> LuaJIT 2.0.0-beta10 -- Copyright (C) 2005-2012 Mike Pall. http://luajit.org/
> JIT: ON ARMv6 ARMv6T2 ARMv7 fold cse dce fwd dse narrow loop abc fuse
> > t = {}
> > mt = {}
> > setmetatable(t, mt)
> > mt.__tostring = "not a function"
> > tostring(t)
> Segmentation fault

Fixed. The PPC and MIPS ports were affected, too.

> 3) an ARM specific behaviour of modulo ?
> LuaJIT 2.0.0-beta10 -- Copyright (C) 2005-2012 Mike Pall. http://luajit.org/
> JIT: ON ARMv6 ARMv6T2 ARMv7 fold cse dce fwd dse narrow loop abc fuse
> > print(1%0)
> 1

Fixed to return nan.

Fixes pushed to git HEAD. Thank you for the bug report!

--Mike

Other related posts: