new_thread function dump not working with lua 5.4.3
cryptomilk opened this issue · comments
I've tried to get the lua-luv building on Fedora 34, but it fails with the first tests:
+ lua tests/run.lua
1..107
./tests/test-async.lua:16: Error: unable to dump given function
stack traceback:
[C]: in function 'luv.new_thread'
./tests/test-async.lua:16: in field 'fn'
./lib/tap.lua:59: in function <./lib/tap.lua:48>
[C]: in function 'xpcall'
./lib/tap.lua:48: in upvalue 'run'
./lib/tap.lua:146: in function 'lib/tap'
tests/run.lua:23: in main chunk
[C]: in ?
not ok 1 async - test pass async between threads
https://kojipkgs.fedoraproject.org//work/tasks/9063/71199063/build.log
The correct label would be test I guess ;-)
Relevant code:
https://github.com/luvit/luv/blob/master/tests/test-async.lua
Lines 210 to 233 in b85b9ef
https://www.lua.org/source/5.4/lapi.c.html#lua_dump
I wonder if the value of the return is useful.
Can reproduce this locally after updating the submodule to Lua 5.4.3 and using WITH_LUA_ENGINE=Lua
. Seems to be new in either Lua 5.4.2 or 5.4.3, as the tests pass fine on 5.4.0 and 5.4.1.
EDIT: Specifically this is a 5.4.3-introduced problem. Tests pass on 5.4.2 as well.
Bisected it down to:
cf23a93d820558acdb8b1f0db85fdb94e709fee2 is the first bad commit
commit cf23a93d820558acdb8b1f0db85fdb94e709fee2
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue Mar 2 11:39:42 2021 -0300
Added assertions for proper use of string buffers
lauxlib.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)