[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: C stack overflow in Lua 5.4 in ackermann benchmark
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 18 Aug 2020 17:36:47 -0300
> For a long time I've used the following example to benchmark tail calls in
> Lua 5.1, 5.2, 5.3 and LuaJIT.
>
> ```
>
> However I've just noticed that Lua 5.4 fails to execute this, with the
> following error:
>
> ```
> lua5.4: benchmarks/lua/ackermann.lua:16: C stack overflow
> ...
Add the following in the first line of the script:
if debug.setcstacklimit then
assert(debug.setcstacklimit(30000))
end
-- Roberto