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

completing in the middle of the command line causes coredump



zsh (the latest CVS) coredumps while completing in the middle of the command line.

zsh -f
setopt combiningchars
ls a<TAB>       # this is OK
ls a<^B><TAB>   # coredump

Here, <^B> is to move the cursor back to 'a'.
zsh coredumps if you hit <TAB> when the cursor is on 'a'.

coredump is at line 58 of zle_move.c:

58          if (!iswpunct(zleline[loccs]) || wcwidth(zleline[loccs]) != 0)

zleline is NULL because the command line is metafied.

If there is no files staring with 'a' in the current directory, the gdb back
trace is

(gdb) bt
#0  0x00215584 in alignmultiwordleft (pos=0x236c40, setpos=0) at zle_move.c:58
#1  0x00215725 in alignmultiwordright (pos=0x236c40, setpos=1) at zle_move.c:98
#2  0x0022a96f in foredel (ct=4, flags=4) at zle_utils.c:667
#3  0x000ddc7d in do_completion (dummy=0x2363d4, dat=0xbffff584) at compcore.c:352
#4  0x0004e95a in runhookdef (h=0x2363d4, d=0xbffff584) at module.c:996
#5  0x00227142 in docompletion (s=0x310de0 "a", lst=0, incmd=0) at zle_tricky.c:2135
#6  0x00222d22 in docomplete (lst=0) at zle_tricky.c:859
#7  0x002215f5 in expandorcomplete (args=0x236320) at zle_tricky.c:315
#8  0x0020fe32 in execzlefunc (func=0x2341f0, args=0x236320, set_bindk=0) at zle_main.c:1298
#9  0x0020f20d in zlecore () at zle_main.c:1043
#10 0x0020f9e4 in zleread (lp=0xa1f60, rp=0x0, flags=3, context=0) at zle_main.c:1205
#11 0x000391d4 in inputline () at input.c:278
#12 0x00038fe6 in ingetc () at input.c:214
#13 0x0002d74d in ihgetc () at hist.c:240
#14 0x00041fa2 in gettok () at lex.c:663
#15 0x00041484 in yylex () at lex.c:350
#16 0x00060739 in parse_event () at parse.c:451
#17 0x00035400 in loop (toplevel=1, justonce=0) at init.c:129
#18 0x00038b64 in zsh_main (argc=2, argv=0xbffffb3c) at init.c:1352
#19 0x00001b6a in main (argc=2, argv=0xbffffb3c) at main.c:93
(gdb) 

If there are files staring with 'a', #0 to #4 is replaced by the following 5 lines:

(gdb) bt
#0  0x00215584 in alignmultiwordleft (pos=0x236c40, setpos=0) at zle_move.c:58
#1  0x00215725 in alignmultiwordright (pos=0x236c40, setpos=1) at zle_move.c:98
#2  0x0022a96f in foredel (ct=3, flags=4) at zle_utils.c:667
#3  0x000f171a in do_single (m=0x314410) at compresult.c:981
#4  0x000ddff3 in do_completion (dummy=0x2363d4, dat=0xbffff584) at compcore.c:413
#5  0x0004e95a in runhookdef (h=0x2363d4, d=0xbffff584) at module.c:996



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