possible bug with LuaJIT 2.0.3

  • From: Francesco Abbate <francesco.bbt@xxxxxxxxx>
  • To: luajit <luajit@xxxxxxxxxxxxx>
  • Date: Thu, 27 Mar 2014 21:44:26 +0100

Hi,

working in the LuaJIT language toolkit I've found what seems to be a
bug in LuaJIT 2.0.3. If you run the code:

https://github.com/franko/luajit-lang-toolkit/blob/master/tests/fft-1.lua

you will sometimes obtain garbage output for the final inverse FFT
transform. It does not happen all the time but if you compile luajit
with debugging options:

# Disable optimization flags
#CCOPT= -O2 -fomit-frame-pointer
CCDEBUG= -g
XCFLAGS+= -DLUAJIT_USE_SYSMALLOC -DLUAJIT_USE_VALGRIND -DLUA_USE_ASSERT

then it happens all the time (at least on my system) and it disappears
if you use "-joff".

Here the LuaJIT welcome message on my system:

> LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/
> JIT: ON CMOV SSE2 SSE3 ATOM fold cse dce fwd dse narrow loop abc sink fuse

The FFT code is extracted from the Scimark.lua benchmark but I was
checking the output instead of just checking the timing.

Francesco

Other related posts: