lua-users home
lua-l archive

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

> After trying to update one of my projects from using lua 5.3 to lua 5.4, I
> encountered issues regarding recursion in c functions if it's happening in
> coroutines.
> The following code works correctly if it's compiled using lua 5.3, but
> breaks with a stack overflow error when benign run using lua 5.4
> Meanwhile an equivalent function written in lua works as expected
> It might be related to the restructuring of the c stack handling happened
> in 5.4, but in the incompatibilities section of the release notes there's
> nothing regarding this change in behaviour, that's why I think it might be
> a bug, is this intended?

See the function debug.setcstacklimit. You probably has to set a
larger C stack. (Or wait for 5.4.2; we are reversing back to a
stackless implementation, which uses less C-stack space.)

-- Roberto