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

Re: If someone wants to try...



With the three patches applied I can reproduce the following segfault.
The idea is to make a completion (here on filenames, after cat)
just before completing for $functions (it look like it will
hang only when completing the varname `$functions').

% zsh -f
phobos% autoload -U compinit; compinit
phobos% cat <TAB>
foo.tar.gz   foo.tgz      foobar/
phobos% echo $funct<TAB>
zsh: segmentation fault (core dumped)  zsh -f

(gdb) bt
#0  0x400f19db in strlen () from /lib/libc.so.6
#1  0x80a038a in taddstr (s=0x81636d3 <Address 0x81636d3 out of bounds>)
    at ../../last/Src/text.c:60
#2  0x80a19ad in gettext2 (state=0xbffff0c0) at ../../last/Src/text.c:672
#3  0x80a0576 in getpermtext (prog=0x8113d80, c=0x813d330)
    at ../../last/Src/text.c:125
#4  0x401bc602 in scanfunctions (ht=0x81146b0, func=0x8086594 <scanparamvals>, 
    flags=32, dis=0) at ../../../last/Src/Modules/parameter.c:530
#5  0x401bc696 in scanpmfunctions (ht=0x81146b0, 
    func=0x8086594 <scanparamvals>, flags=32)
    at ../../../last/Src/Modules/parameter.c:546
#6  0x806c35d in scanhashtable (ht=0x81146b0, sorted=0, flags1=0, 
    flags2=1048576, scanfunc=0x8086594 <scanparamvals>, scanflags=32)
    at ../../last/Src/hashtable.c:367
#7  0x808682e in paramvalarr (ht=0x81146b0, flags=32)
    at ../../last/Src/params.c:416
#8  0x80868fa in getvaluearr (v=0x400160c8) at ../../last/Src/params.c:434
#9  0x808971c in getarrvalue (v=0x400160c8) at ../../last/Src/params.c:1365
#10 0x809d212 in paramsubst (l=0x400160b0, n=0x400160b8, str=0xbffff400, qt=1, 
    ssub=4) at ../../last/Src/subst.c:1120
#11 0x809a293 in stringsubst (list=0x400160b0, node=0x400160b8, ssub=4)
    at ../../last/Src/subst.c:122
...

-- 
Alexandre Duret-Lutz



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