Open
Description
$ lua -e 'require"cqueues.thread".start(print, "foo", 1):join()'
lua: /usr/share/lua/5.3/cqueues/thread.lua:72: bad argument #15 to 'start' (/usr/lib/lua: cannot read file data: Is a directory)
stack traceback:
[C]: in upvalue 'start'
/usr/share/lua/5.3/cqueues/thread.lua:72: in function '_cqueues.thread.start'
(command line):1: in main chunk
[C]: in ?
(Linux, glibc)
It appears that dladdr
on a static symbol returns some slightly odd things. In this case, dli_fname
is lua
(I guess from argv[0]
?). When passed to dlopen as this non-absolute path, it tries to look for /usr/lib/lua, which of course doesn't exist.
FWIW I checked what dladdr1
returned in extra_info
, and lname
was an empty string (not NULL
as I would have understood, but an empty string).