Eduardo Barthel
2014-10-20 20:17:55 UTC
While using LuaJIT in my apps I found this bug while declaring a new table
with "nil" value in the middle, read the following examples, while in Lua
the output is 3 in LuajIT is 1.
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
***@archrox:~ $ lua5.1
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
***@archrox:~ $ luajit
LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
with "nil" value in the middle, read the following examples, while in Lua
the output is 3 in LuajIT is 1.
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
a = {1,nil,2}
print(#a)
3print(#a)
***@archrox:~ $ lua5.1
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
a = {1,nil,2}
print(#a)
3print(#a)
***@archrox:~ $ luajit
LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
a = {1,nil,2}
print(#a)
1print(#a)