lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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