zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: _complete_debug crashes in zsh_directory_name
Date: Wed, 3 Aug 2011 05:26:53 +0200	[thread overview]
Message-ID: <CAHYJk3SVyQ-nPW0GPBO0nzwzoVv7POn83Ewk4sQNdh00yk1pTg@mail.gmail.com> (raw)

Any ideas? It doesn't crash if I don't have the zsh_directory_name function.

_complete_debug:9: failed to close file descriptor 3: bad file descriptor
/usr/local/bin/zsh:1: failed to close file descriptor 3: bad file descriptor

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5b74d8b in comp_wrapper (prog=0x804550, w=0x0,
    name=0x7ffff7f51750 "zsh_directory_name") at complete.c:1434
1434		    if ((m & 1) && ((*pp)->node.flags & PM_UNSET))
(gdb) bt
#0  0x00007ffff5b74d8b in comp_wrapper (prog=0x804550, w=0x0,
    name=0x7ffff7f51750 "zsh_directory_name") at complete.c:1434
#1  0x000000000043025b in runshfunc (prog=0x804550, wrap=0x7ffff5d92da0,
    name=0x7ffff7f51750 "zsh_directory_name") at exec.c:4651
#2  0x000000000042ffd3 in doshfunc (shfunc=0x804590,
doshargs=0x7ffff7f516b8, noreturnval=1)
    at exec.c:4560
#3  0x000000000049294b in subst_string_by_func (func=0x804590,
arg1=0x4a3c3b "d",
    orig=0x6d1970 "/home/mikachu") at utils.c:3233
#4  0x00000000004929ca in subst_string_by_hook (name=0x4a3c3d
"zsh_directory_name",
    arg1=0x4a3c3b "d", orig=0x6d1970 "/home/mikachu") at utils.c:3257
#5  0x000000000048db98 in finddir (s=0x6d0070 "/home/mikachu") at utils.c:931
#6  0x0000000000479a18 in promptpath (p=0x6d0070 "/home/mikachu",
npath=0, tilde=1)
    at prompt.c:124
#7  0x000000000047a518 in putpromptchar (doprint=1, endchar=0,
txtchangep=0x7ffff5fe6de0)
    at prompt.c:409
#8  0x000000000047c815 in prompttrunc (arg=40, truncchar=60,
doprint=1, endchar=0,
    txtchangep=0x7ffff5fe6de0) at prompt.c:1157
#9  0x000000000047b089 in putpromptchar (doprint=1, endchar=0,
txtchangep=0x7ffff5fe6de0)
    at prompt.c:546
#10 0x0000000000479cbf in promptexpand (
    s=0x6fb7c0 "%f%b%u%F{10}{%F{86}%D{%T}%F{2}|%40<...<%F{11}%~%<<%(3V.%F{13}/%3v%(4V.%F{7}%B:%F{9}%4v%b.).)%F{10}}%(2L.%{\033[1;%vm%}%(3L.(%L).).%{\033[0;%vm%})%(9V.(%9v).)%#%f%b
",
    ns=1, rs=0x0, Rs=0x0, txtchangep=0x7ffff5fe6de0) at prompt.c:212
#11 0x00007ffff5db8103 in reexpandprompt () at zle_main.c:1767
#12 0x00007ffff5dc0ca9 in zrefresh () at zle_refresh.c:1122
#13 0x00007ffff5db8637 in zle_main_entry (cmd=5, ap=0x7fffffffc990) at
zle_main.c:1890
#14 0x0000000000445847 in zleentry (cmd=5) at init.c:1374
#15 0x000000000047f901 in dotrapargs (sig=0, sigtr=0x7fffffffcb1c,
sigfn=0x7ddfb0)
    at signals.c:1262
#16 0x000000000047f413 in endtrapscope () at signals.c:1008
#17 0x0000000000430112 in doshfunc (shfunc=0x7d2570, doshargs=0x0,
noreturnval=0)
    at exec.c:4603
#18 0x00007ffff5b77936 in callcompfunc (s=0x7ffff7f6b660 "",
fn=0x79d080 "_complete_debug")
    at compcore.c:838
#19 0x00007ffff5b78211 in makecomplist (s=0x7ffff7f6b660 "", incmd=1, lst=0)
    at compcore.c:989
#20 0x00007ffff5b75e7f in do_completion (dummy=0x7ffff5fe6468,
dat=0x7fffffffced0)
    at compcore.c:349
#21 0x0000000000459593 in runhookdef (h=0x7ffff5fe6468,
d=0x7fffffffced0) at module.c:995
#22 0x00007ffff5dcdcf6 in docompletion (s=0x827ea0 "", lst=0, incmd=1)
at zle_tricky.c:2165
#23 0x00007ffff5dc95bc in docomplete (lst=0) at zle_tricky.c:849
#24 0x00007ffff5dc7ac6 in completeword (args=0x7ffff5fe69f0) at zle_tricky.c:232
#25 0x00007ffff5dc79a7 in completecall (args=0x7ffff5fe69f0) at zle_tricky.c:208
#26 0x00007ffff5db66f7 in execzlefunc (func=0x79d0a0,
args=0x7ffff5fe69f0, set_bindk=0)
    at zle_main.c:1311
#27 0x00007ffff5db5ba1 in zlecore () at zle_main.c:1058
#28 0x00007ffff5db62b5 in zleread (lp=0x6c4ab8, rp=0x6c49f8, flags=7, context=0)
    at zle_main.c:1219
#29 0x00007ffff5db85c2 in zle_main_entry (cmd=1, ap=0x7fffffffd350) at
zle_main.c:1874
#30 0x0000000000445847 in zleentry (cmd=1) at init.c:1374
#31 0x000000000044629f in inputline () at input.c:281
#32 0x0000000000446116 in ingetc () at input.c:217
#33 0x000000000043b912 in ihgetc () at hist.c:279
#34 0x000000000044e2ba in gettok () at lex.c:717
#35 0x000000000044da6b in zshlex () at lex.c:395
#36 0x000000000046b03b in parse_event () at parse.c:451
#37 0x0000000000442bcd in loop (toplevel=1, justonce=0) at init.c:132
#38 0x0000000000445d16 in zsh_main (argc=1, argv=0x7fffffffd738) at init.c:1528
#39 0x0000000000410784 in main (argc=1, argv=0x7fffffffd738) at ./main.c:93


-- 
Mikael Magnusson


             reply	other threads:[~2011-08-03  3:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03  3:26 Mikael Magnusson [this message]
2011-08-03  9:10 ` Peter Stephenson
2011-08-03 14:53   ` Mikael Magnusson
2011-08-03 15:39     ` Peter Stephenson
2011-08-03 16:00     ` Bart Schaefer

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=CAHYJk3SVyQ-nPW0GPBO0nzwzoVv7POn83Ewk4sQNdh00yk1pTg@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).