From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers mailing list <zsh-workers@zsh.org>
Subject: Re: segfault on menu-select
Date: Fri, 13 Aug 2010 08:57:08 -0700 [thread overview]
Message-ID: <100813085709.ZM22377@torch.brasslantern.com> (raw)
In-Reply-To: <20100813080811.GB495@ph>
On Aug 13, 10:08am, Philipp Hartwig wrote:
}
} Note that in order to reproduce the issue it really seems to be
} necessary to have the 4 lines
}
} autoload -Uz compinit
} compinit
} zmodload -i zsh/complist
} bindkey '^o' menu-select
}
} in your .zshrc. Just typing them or sourcing a file containing them will
} not lead to the crash in my case, even without the "-f" option.
Hmm, indeed. I'm finally able to reproduce this. It's also necessary to
have invoked completion once before trying menu-select, just hitting ^o
won't do it (in fact, won't do *anything*, which is slightly suspicious).
The more direct symptom is that there's garbage in minfo.group->matches
("minfo" is a global). I tried putting a watchpoint on minfo.group but
because matches is a pointer that's not very helpful; all I determined
is that it's last assigned here:
Hardware watchpoint 1: minfo.group
Old value = 0x8853ea8
New value = 0x8872690
0x08103002 in do_allmatches (end=0)
at ../../../zsh-4.0/Src/Zle/compresult.c:902
902 for (minfo.group = amatches;
At which point the contents of ->matches look like this:
(gdb) p m
$6 = 0x8d1efa8
(gdb) p *m
$7 = {str = 0x0, orig = 0x21 <Address 0x21 out of bounds>,
ipre = 0x886fcf8 "",
ripre = 0x8b6870 "(·Ô\b@\031\205\b¨ïÑ\b\230\032\207\b
ÔÔ\b\210õ\206\b \211Ò\b eÏ\b mÔ\b0ûÑ\b8oÏ\b(nÏ\b°éÒ\bhÆÓ\b@`Ô\b@`Ô\b¨<\205\b¨<\205\b\b|\206\b¸Â\204\b¸h\213",
isuf = 0x5f73756f <Address 0x5f73756f out of bounds>,
ppre = 0x69736f70 <Address 0x69736f70 out of bounds>,
psuf = 0x6e6f6974 <Address 0x6e6f6974 out of bounds>, prpre = 0x8d10073 "",
pre = 0x20 <Address 0x20 out of bounds>,
suf = 0x10 <Address 0x10 out of bounds>,
disp = 0x6d75645f <Address 0x6d75645f out of bounds>,
autoq = 0x6d646170 <Address 0x6d646170 out of bounds>, flags = 0,
brpl = 0x19, brsl = 0x0, rems = 0x8d23720 "dmeventd", remf = 0x0,
qipl = 142976480, qisl = 0, rnum = 17, gnum = 7173740, mode = 9136216,
modec = 0 '\0', fmode = 25, fmodec = -112 '\220'}
However, the crash doesn't always happen that deep in the call stack;
having the hardware watchpoint present changes the behavior a bit, so I
suspect *amatches has already been messed up for a while at this point.
Unfortunately I'm out of time to poke at it just now.
--
next prev parent reply other threads:[~2010-08-13 15:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 14:46 Philipp Hartwig
2010-08-12 14:53 ` Frank Terbeck
2010-08-12 15:20 ` Philipp Hartwig
2010-08-12 15:49 ` Frank Terbeck
2010-08-12 16:53 ` Philipp Hartwig
2010-08-12 17:07 ` Frank Terbeck
2010-08-12 17:33 ` Philipp Hartwig
2010-08-12 18:04 ` Frank Terbeck
2010-08-12 23:07 ` Bart Schaefer
2010-08-13 8:08 ` Philipp Hartwig
2010-08-13 15:57 ` Bart Schaefer [this message]
2010-08-13 20:43 ` Peter Stephenson
2010-08-15 20:43 ` Bart Schaefer
2010-08-15 22:34 ` Bart Schaefer
2010-08-31 14:33 ` Philipp Hartwig
2010-09-06 4:11 ` Bart Schaefer
2011-01-09 18:56 ` Philipp Hartwig
2011-01-09 19:54 ` Bart Schaefer
2011-01-09 20:57 ` Philipp Hartwig
2010-08-12 16:04 ` Bart Schaefer
2010-08-12 17:03 ` Philipp Hartwig
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=100813085709.ZM22377@torch.brasslantern.com \
--to=schaefer@brasslantern.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).