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

Re: Bug#251378: zsh: segfaults when globing includes too many files



> Attached is a script from Peter Palfrader which seems to trigger the
> same type of segfault in zhalloc().

This is HEAD with the mremap patch, which seems to be irrelevant.
Should dyncat(s,"") just duplicate s, or should that be avoided earlier?

#0  0x0007cb78 in zhalloc (size=32) at /home/clint/tmp/zsh/Src/mem.c:353
#1  0x000b2bd0 in dyncat (s1=0x10de88 ".Maillists.aaaa.2004.06/", s2=0x7001e1cc "")
    at /home/clint/tmp/zsh/Src/string.c:100
#2  0x00046644 in insert (s=0x7001e1cc "", checked=0) at /home/clint/tmp/zsh/Src/glob.c:352
#3  0x0004720c in scanner (q=0x7001e1d0) at /home/clint/tmp/zsh/Src/glob.c:514
#4  0x000478e0 in scanner (q=0x7001e198) at /home/clint/tmp/zsh/Src/glob.c:615
#5  0x0004b428 in zglob (list=0x7001e0f0, np=0x7001e104, nountok=0)
    at /home/clint/tmp/zsh/Src/glob.c:1578
#6  0x000b48b8 in globlist (list=0x7001e0f0, nountok=0) at /home/clint/tmp/zsh/Src/subst.c:273
#7  0x0003dd1c in execcmd (state=0xeffffae8, input=0, output=0, how=18, last1=2)
    at /home/clint/tmp/zsh/Src/exec.c:2161
#8  0x00039e54 in execpline2 (state=0xeffffae8, pcode=45699, how=18, input=0, output=0, last1=0)
    at /home/clint/tmp/zsh/Src/exec.c:1274
#9  0x00038c30 in execpline (state=0xeffffae8, slcode=4098, how=18, last1=0)
    at /home/clint/tmp/zsh/Src/exec.c:1064
#10 0x000380a0 in execlist (state=0xeffffae8, dont_change_job=0, exiting=0)
    at /home/clint/tmp/zsh/Src/exec.c:870
#11 0x00037bc8 in execode (p=0x7001e090, dont_change_job=0, exiting=0)
    at /home/clint/tmp/zsh/Src/exec.c:771
#12 0x0005da74 in loop (toplevel=1, justonce=0) at /home/clint/tmp/zsh/Src/init.c:165
#13 0x00061c78 in zsh_main (argc=3, argv=0xeffffd34) at /home/clint/tmp/zsh/Src/init.c:1274
#14 0x00019d90 in main (argc=3, argv=0xeffffd34) at /home/clint/tmp/zsh/Src/main.c:93



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