Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV on running regression tests with LuaJIT #1

Open
ligurio opened this issue May 24, 2022 · 2 comments
Open

SIGSEGV on running regression tests with LuaJIT #1

ligurio opened this issue May 24, 2022 · 2 comments

Comments

@ligurio
Copy link
Owner

ligurio commented May 24, 2022

sergeyb@pony:~/sources/molly$ LUA_PATH="?/init.lua;./?.lua;/home/sergeyb/.luarocks/share/lua/5.1/?.lua;/home/sergeyb/.luarocks/share/lua/5.1/?/init.lua;
/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua" LUA_CPATH="/home/sergeyb/.luarocks/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so" gdb /usr/bin/luajit test/tests.lua                                             
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2                                                                                                               
...
(gdb) run test/tests.lua
...
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7fc0540 in ?? ()
(gdb) bt
#0  0x00007ffff7fc0540 in ?? ()
#1  0x00005555555b52f7 in lj_BC_FUNCC () at buildvm_x86.dasc:809
#2  0x0000555555567a4a in gc_call_finalizer (g=g@entry=0x400003b8, L=L@entry=0x40000378, o=o@entry=0x4002e6e8, mo=<optimized out>) at lj_gc.c:475
#3  0x0000555555587ff6 in gc_finalize (L=L@entry=0x40000378) at lj_gc.c:521
#4  0x0000555555588158 in lj_gc_finalize_udata (L=<optimized out>) at lj_gc.c:528
#5  cpfinalize (L=0x40000378, dummy=<optimized out>, ud=<optimized out>) at lj_state.c:236
#6  0x00005555555b5666 in lj_vm_cpcall () at buildvm_x86.dasc:1179
#7  0x00005555555aa86e in lua_close (L=0x40000378) at lj_state.c:262
#8  0x000055555555b68e in main (argc=2, argv=<optimized out>) at luajit.c:580
(gdb) 

LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/

@ligurio
Copy link
Owner Author

ligurio commented May 31, 2022

Short reproducer:

-- $ luarocks install --local lunitx 0.8-1
-- $ luarocks install --local lua-cjson 2.1.0.6-1
-- $ LUA_PATH=$(luarocks path --lr-path) LUA_CPATH=$(luarocks path --lr-cpath) luajit mini.lua
--
-- LUA_PATH="?/init.lua;./?.lua;/home/sergeyb/.luarocks/share/lua/5.1/?.lua;/home/sergeyb/.luarocks/share/lua/5.1/?/init.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua" LUA_CPATH="/home/sergeyb/.luarocks/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so" /usr/bin/luajit mini.lua

local lunit = require('lunitx')
local json = require('cjson')

local history_suite = lunit.module('history', 'seeall')
function history_suite.test_to_json()
    local a = json.encode({})
end

@ligurio
Copy link
Owner Author

ligurio commented Jun 14, 2024

LuaJIT issue is WONTFIX, see LuaJIT#961.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant