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

Re: Bug? in complist when filenames are longer than the screen

On Tuesday 04 October 2005 21:13, DervishD wrote:

We seem to have two bugs here.

>     I'm going to make another test, using a clean environment. OK,
> here are the results with the UNPATCHED version of zsh: if I use very
> long names (much longer than COLUMNS), the bug doesn't happen!. It
> only happens with a list of files in one directory :??? Mmm,
> interesting, it looks like a corner case: the bug only happens when
> in the file listing is there a file whose name length is *exactly*
> $COLUMNS. Longer or shorter files doesn't cause the bug to happen.

Yes, this was claimed to have been fixed at least twice. It has something to 
do with terminals (not) going to next line when getting NL in the last 

>     I've found the bug to be repeatable with this sequence (try this
> in a clean zsh environment, no /etc/zshenv, no any other rcfile, and
> it must be a login shell, just to make sure):
>     $ rm -rf test
>     $ mkdir test ; cd test
>     $ PS1=
>     $ touch ${(l:$COLUMNS::a:):-} a b c
>     $ zmodload zsh/complist
>     $ MENUSELECT=0
>     It's very important to create the other three files (a, b and c)
> in the directory (otherwise you won't get a list ;)).
>     This causes a crash, always, without looping, even with your
> patches.

Does it happen only in current CVS or in older versions too?

#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d52ef1 in raise () from /lib/tls/libc.so.6
#2  0xb7d5483b in abort () from /lib/tls/libc.so.6
#3  0xb7d88ff5 in __fsetlocking () from /lib/tls/libc.so.6
#4  0xb7d8f587 in malloc_usable_size () from /lib/tls/libc.so.6
#5  0xb7d8fa02 in free () from /lib/tls/libc.so.6
#6  0xb7bdc272 in unmetafy_line ()
    at /home/bor/src/zsh/Src/Zle/zle_tricky.c:964
#7  0xb7bd4958 in zrefresh () at /home/bor/src/zsh/Src/Zle/zle_refresh.c:366
#8  0xb7bd69c2 in zrefresh () at /home/bor/src/zsh/Src/Zle/zle_refresh.c:769
#9  0xb7b81267 in domenuselect (dummy=0xb7bb8a74, dat=0xbfe015e0)
    at /home/bor/src/zsh/Src/Zle/complist.c:2230
#10 0x08096c37 in runhookdef (h=0xb7bb8a74, d=0xbfe015e0)
    at /home/bor/src/zsh/Src/module.c:1883
#11 0xb7ba0b52 in after_complete (dummy=0xb7bef39c, dat=0xbfe0166c)
    at /home/bor/src/zsh/Src/Zle/compcore.c:513
#12 0x08096c9c in runhookdef (h=0xb7bef39c, d=0xbfe0166c)
    at /home/bor/src/zsh/Src/module.c:1889
#13 0xb7bdbd71 in docomplete (lst=0)
    at /home/bor/src/zsh/Src/Zle/zle_tricky.c:851
#14 0xb7bda7b5 in expandorcomplete (args=0xb7bef5dc)
    at /home/bor/src/zsh/Src/Zle/zle_tricky.c:315
#15 0xb7bcd0e2 in execzlefunc (func=0xb7bed748, args=0xb7bef5dc)
    at /home/bor/src/zsh/Src/Zle/zle_main.c:1094
#16 0xb7bcc602 in zlecore () at /home/bor/src/zsh/Src/Zle/zle_main.c:862
#17 0xb7bcccf2 in zleread (lp=0x80e7940, rp=0x0, flags=3, context=0)
    at /home/bor/src/zsh/Src/Zle/zle_main.c:1016
#18 0x08081527 in inputline () at /home/bor/src/zsh/Src/input.c:278
#19 0x080813dc in ingetc () at /home/bor/src/zsh/Src/input.c:214
#20 0x0807810f in ihgetc () at /home/bor/src/zsh/Src/hist.c:240
#21 0x08088b98 in gettok () at /home/bor/src/zsh/Src/lex.c:628
#22 0x080883d0 in yylex () at /home/bor/src/zsh/Src/lex.c:344
#23 0x080a1d8d in parse_event () at /home/bor/src/zsh/Src/parse.c:451
#24 0x0807e31e in loop (toplevel=1, justonce=0)
    at /home/bor/src/zsh/Src/init.c:128
#25 0x0808101e in zsh_main (argc=2, argv=0xbfe01bf4)
    at /home/bor/src/zsh/Src/init.c:1312
#26 0x08052972 in main (argc=2, argv=0xbfe01bf4)
    at /home/bor/src/zsh/Src/main.c:93

Attachment: pgpgLVrf80zLe.pgp
Description: PGP signature

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