lua-users home
lua-l archive

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


Hello!
I've created a universal CMake list for building Lua releases in my projects, and added there the user tests suite run.

So during the various Lua version testing on MSVC 2019 and MSVC 2022 I've got a segfault for Lua 5.4.2..5.4.4  due to the stack overflow in x64 Debug configuration.
1: ***** FILE 'cstack.lua'*****
1: testing stack overflow detection
1: testing stack overflow in message handling
1: .final count:        250036
1: testing recursion inside pattern matching
1: testing stack-overflow in recursive 'gsub'
1/1 Test #1: lua-basic-test ...................***Exception: SegFault  1.94 sec

To mitigate the issue I've added the preprocessor definition LUAI_MAXCCALLS=165 for x64 Debug Configuration.

I've also tested 5.4.0 and 5.4.1, for those versions I've got crashes for  x64 Debug and x86 Debug as well
For x86(Win32)   the solution is LUAI_MAXCSTACK=350
For x64 LUAI_MAXCSTACK=250 but the testsuite fails on coroutine tests anyway
1: ***** FILE 'coroutine.lua'*****
1: testing coroutines
1: C:/prj/test/Debug/luaD.exe: coroutine.lua:116: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: coroutine.lua:106: C stack overflow
1: stack traceback:
1:      [C]: in local 'x'
1:      coroutine.lua:116: in main chunk
1:      (...tail calls...)
1:      all.lua:198: in main chunk
1:      [C]: in ?
1: .>>> closing state <<<

--
With best regards,
Alexander Voronkoff