Assertion in luaK_codeABCk

106 views
Skip to first unread message

Sergey Bronnikov

unread,
Aug 10, 2024, 1:55:46 AM8/10/24
to lua-l
Hello,

latest commits (no bisect, sorry) introduced an issue:

$ sed -i "s/MYCFLAGS= /MYCFLAGS= -DLUAI_ASSERT /" makefile
$ make -j
$ cat << EOF > chunk.lua
return a,a,a,a,a,c,V,V,k,U,V,c,V,V,c,M,c,V,V,c,V,V,V,V,c,M,c,V,V,k,U,V,c,V,V,c,M,c,V,V,c,V,V,M,c,V,M,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,a,a,a,a,a,a,e,r,a,a,a,a,a,a,a,e,r,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,a,a,a,a,a,a,e,r,a,a,a,a,e,r,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,c,V,V,M,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,a,a,a,a,a,a,e,r,a,a,a,a,a,a,a,a,e,r,c,V,V,c,c,a,a,a,a,a,a,a,a,a,a,a,a,a,a,e,r,a,a,a,a,a,a,e,r  
EOF
$ ./lua chunk.lua
lua: lcode.c:395: luaK_codeABCk: Assertion `A <= ((1<<8)-1) && B <= ((1<<8)-1) && C <= ((1<<8)-1) && (k & ~1) == 0' failed.
Aborted (core dumped)

Backtrace:

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737352787776) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737352787776) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737352787776, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff7c42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff7c287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7c2871b in __assert_fail_base (fmt=0x7ffff7ddd130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=0x55555559cf20 "A <= ((1<<8)-1) && B <= ((1<<8)-1) && C <= ((1<<8)-1) && (k & ~1) == 0", file=0x55555559c926 "lcode.c",
    line=395, function=<optimized out>) at ./assert/assert.c:92
#6  0x00007ffff7c39e96 in __GI___assert_fail (
    assertion=0x55555559cf20 "A <= ((1<<8)-1) && B <= ((1<<8)-1) && C <= ((1<<8)-1) && (k & ~1) == 0", file=0x55555559c926 "lcode.c",
    line=395, function=0x55555559dad8 <__PRETTY_FUNCTION__.35> "luaK_codeABCk") at ./assert/assert.c:101
#7  0x0000555555583351 in luaK_ret ()
#8  0x000055555556e840 in statement ()
#9  0x0000555555570f40 in luaY_parser ()
#10 0x00005555555644ec in f_parser ()
#11 0x00005555555645e2 in luaD_rawrunprotected ()
#12 0x0000555555566494 in luaD_pcall ()
#13 0x00005555555665b9 in luaD_protectedparser ()
#14 0x0000555555560e6a in lua_load ()
#15 0x0000555555580b60 in luaL_loadfilex ()
#16 0x000055555555cc92 in pmain ()
#17 0x0000555555565966 in luaD_precall ()
#18 0x0000555555565ee4 in luaD_callnoyield ()
#19 0x00005555555645e2 in luaD_rawrunprotected ()
#20 0x0000555555566494 in luaD_pcall ()
#21 0x0000555555560c98 in lua_pcallk ()
#22 0x000055555555bbbb in main ()
(gdb)

Sergey

Roberto Ierusalimschy

unread,
Aug 14, 2024, 2:16:25 PM8/14/24
to lu...@googlegroups.com
> latest commits (no bisect, sorry) introduced an issue:
>
> [...]

Thanks for the feedback.

-- Roberto
Reply all
Reply to author
Forward
0 new messages