[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: LuaJIT bytecode issue with integer literals
- From: Loren Kirkby <loren@...>
- Date: Fri, 3 Feb 2012 14:44:44 -0800
I have recently begun experimenting with LuaJIT and ran into an issue with certain ranges of integer literals and the new LuaJIT bytecode system.
If I have the following test program defined as test.lua:
local v = -2130706432
print('v: ' .. v)
Running test.lua with Lua 5.1.4 or with LuaJIT 2.0.0-beta9, I get the expected output:
But if I use LuaJIT to generate bytecode (luajit -b test.lua test.out) and then run the bytecode version I get:
I have reproduced this with LuaJIT 2.0.0-beta9 on OS X 10.7.3 (x86_64) and Ubuntu 11.10 32-bit. Any ideas what's happening here? Is something going wrong (de)serializing the literal in the bytecode?