[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luajit 2.0 jit bug with and/or expression?
- From: Felix Wu <fsw534@...>
- Date: Tue, 10 Apr 2012 11:32:37 -0700
The following function ran fine with JIT off (-joff) for both LuaJIT
2.0 beta 8 and 9, but got erroneous results with JIT on. Is this a
known bug?
(1) with -joff
> function fib(n) return (n < 2) and 1 or fib(n-1)+fib(n-2) end
> = fib(10)
89
> =fib(20)
10946
(2) without -joff
> function fib(n) return (n < 2) and 1 or fib(n-1)+fib(n-2) end
> = fib(10)
79
> = fib(20)
stdin:1: attempt to perform arithmetic on a nil value