Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: segfault in 'ls' completion



On Wed, Dec 15, 2021 at 8:47 AM Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx> wrote:
ls /usr/lib/libpy<TAB>zsh: segmentation fault (core dumped)  /opt/bin/zsh -f


I was able to reproduce this; the stack trace is 161 frames deep, last 36 ending here:

#0  0x000055555569614f in ca_parse_line (d=0x55555584de10, all=0x55555584de10,
    multi=0, first=1) at computil.c:2220
#1  0x0000555555697b16 in bin_comparguments (
    nam=0x7ffff7613cf8 "comparguments", args=0x7ffff7615fc0,
    ops=0x7fffffff0680, func=0) at computil.c:2647
#2  0x0000555555576c5d in execbuiltin (args=0x7ffff7613d38, assigns=0x0,
    bn=0x5555557137c0 <bintab>) at builtin.c:506
#3  0x00005555555a1895 in execcmd_exec (state=0x7fffffff1810,
    eparams=0x7fffffff0bc0, input=0, output=0, how=18, last1=2,
    close_if_forked=-1) at exec.c:4141
#4  0x000055555559b041 in execpline2 (state=0x7fffffff1810, pcode=20995,
    how=18, input=0, output=0, last1=0) at exec.c:1957
#5  0x0000555555599bfa in execpline (state=0x7fffffff1810, slcode=7170,
    how=18, last1=0) at exec.c:1687
#6  0x0000555555598eac in execlist (state=0x7fffffff1810, dont_change_job=1,
    exiting=0) at exec.c:1442
#7  0x00005555555d46fe in execif (state=0x7fffffff1810, do_exec=0)
    at loop.c:561
#8  0x00005555555a0f3c in execcmd_exec (state=0x7fffffff1810,
    eparams=0x7fffffff1430, input=0, output=0, how=18, last1=2,
    close_if_forked=-1) at exec.c:3961
#9  0x000055555559b041 in execpline2 (state=0x7fffffff1810, pcode=20995,
    how=18, input=0, output=0, last1=0) at exec.c:1957
#10 0x0000555555599bfa in execpline (state=0x7fffffff1810, slcode=1342466,
    how=18, last1=0) at exec.c:1687
#11 0x0000555555598eac in execlist (state=0x7fffffff1810, dont_change_job=1,
    exiting=0) at exec.c:1442
#12 0x00005555555984d0 in execode (p=0x5555557ea7b0, dont_change_job=1,
    exiting=0, context=0x5555556d3faa "loadautofunc") at exec.c:1219
#13 0x00005555555a52f4 in execautofn_basic (state=0x7fffffff20f0, do_exec=0)
    at exec.c:5528
#14 0x00005555555a0eff in execcmd_exec (state=0x7fffffff20f0,
    eparams=0x7fffffff1d10, input=0, output=0, how=18, last1=2,
    close_if_forked=-1) at exec.c:3959
#15 0x000055555559b041 in execpline2 (state=0x7fffffff20f0, pcode=3, how=18,
    input=0, output=0, last1=0) at exec.c:1957
#16 0x0000555555599bfa in execpline (state=0x7fffffff20f0, slcode=3074,
    how=18, last1=0) at exec.c:1687
#17 0x0000555555598eac in execlist (state=0x7fffffff20f0, dont_change_job=1,
    exiting=0) at exec.c:1442
#18 0x00005555555984d0 in execode (p=0x5555557a8900, dont_change_job=1,
    exiting=0, context=0x5555556d412a "shfunc") at exec.c:1219
#19 0x00005555555a6d29 in runshfunc (prog=0x5555557a8900, wrap=0x0,
    name=0x7ffff7613168 "_arguments") at exec.c:6063
#20 0x000055555566b6d0 in comp_wrapper (prog=0x5555557a8900, w=0x0,
    name=0x7ffff7613168 "_arguments") at complete.c:1588
#21 0x00005555555a6b12 in runshfunc (prog=0x5555557a8900,
    wrap=0x5555557134a0 <wrapper>, name=0x7ffff7613168 "_arguments")
    at exec.c:6047
#22 0x00005555555a62e6 in doshfunc (shfunc=0x5555557a7fb0,
    doshargs=0x7ffff761e050, noreturnval=0) at exec.c:5913
#23 0x00005555555a5085 in execshfunc (shf=0x5555557a7fb0, args=0x7ffff761e050)
    at exec.c:5482
#24 0x00005555555a113f in execcmd_exec (state=0x7fffffff2ff0,
    eparams=0x7fffffff2c10, input=0, output=0, how=18, last1=2,
    close_if_forked=-1) at exec.c:4012
#25 0x000055555559b041 in execpline2 (state=0x7fffffff2ff0, pcode=13379,
    how=18, input=0, output=0, last1=0) at exec.c:1957
#26 0x0000555555599bfa in execpline (state=0x7fffffff2ff0, slcode=7170,
    how=18, last1=0) at exec.c:1687
#27 0x0000555555598eac in execlist (state=0x7fffffff2ff0, dont_change_job=1,
    exiting=0) at exec.c:1442
#28 0x00005555555984d0 in execode (p=0x5555557ab7b0, dont_change_job=1,
    exiting=0, context=0x5555556d3faa "loadautofunc") at exec.c:1219
#29 0x00005555555a52f4 in execautofn_basic (state=0x7fffffff38d0, do_exec=0)
    at exec.c:5528
#30 0x00005555555a0eff in execcmd_exec (state=0x7fffffff38d0,
    eparams=0x7fffffff34f0, input=0, output=0, how=18, last1=2,
    close_if_forked=-1) at exec.c:3959
#31 0x000055555559b041 in execpline2 (state=0x7fffffff38d0, pcode=3, how=18,
    input=0, output=0, last1=0) at exec.c:1957
#32 0x0000555555599bfa in execpline (state=0x7fffffff38d0, slcode=3074,
    how=18, last1=0) at exec.c:1687
#33 0x0000555555598eac in execlist (state=0x7fffffff38d0, dont_change_job=1,
    exiting=0) at exec.c:1442
#34 0x00005555555984d0 in execode (p=0x5555557fb5f0, dont_change_job=1,
    exiting=0, context=0x5555556d412a "shfunc") at exec.c:1219
#35 0x00005555555a6d29 in runshfunc (prog=0x5555557fb5f0, wrap=0x0,
    name=0x7ffff761b168 "_ls") at exec.c:6063
#36 0x000055555566b6d0 in comp_wrapper (prog=0x5555557fb5f0, w=0x0,
    name=0x7ffff761b168 "_ls") at complete.c:1588


Messages sorted by: Reverse Date, Date, Thread, Author