zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@sunsite.dk
Subject: completing in the middle of the command line causes coredump
Date: Mon, 21 Apr 2008 18:56:55 +0900	[thread overview]
Message-ID: <a06001004c43214de24b1@kba.biglobe.ne.jp> (raw)

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


             reply	other threads:[~2008-04-21  9:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21  9:56 Jun T. [this message]
2008-04-21 10:11 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a06001004c43214de24b1@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).