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

https://pastebin.com/i8f8gVA0

Meanwhile an equivalent function written in lua works as expected

https://pastebin.com/rF2M7h8L

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?

Regards,
Edoardo Lolletti.