Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: segfault via completion menu
- X-seq: zsh-workers 44344
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Wesley Schwengle <wesley@xxxxxxxxxx>
- Subject: Re: segfault via completion menu
- Date: Mon, 20 May 2019 22:55:55 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1558385756; bh=nxTQH7hYSfXN+s+o0ICekNA+I3JFfg7yYNh2XQpXso8=; h=From:References:To:Subject:Date:From:Subject; b=LJm+CbizXVhCf1z2p+aM4O3e0g6DaxcMilWFF7nf69lzWhOp915PW/qXmzKulEEmRWL7j9Gy8ZyGolgtSJEyFJt04OR5KoRzC1QQIeWINwF6N3piEqGRGFsf6YmByqVyUmpQItKNfoKCM8SqR7TRIYamT3E/YLUgo2PVsxA79uCZx9opQ4VafQ77pCy/h79tquOyOiBEnJNTn97quVkJ25cDKvzGP4/Am2lcR6N11U/qwowjQoIopmfPV/LTvW23rLsv2hJgPzBJZFzLxU/qJ7/9WOTeFGY3S3scqWzkg1Q9VufzQh+dJ8YUGXVObZGvHANCE4eE+ndVDnjK2wn//g==
- In-reply-to: <CAEpdsiaGRHHZMnV1Aq7+9wwZpE3qH9dV4c-jVfTxMRO810TyHg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAEpdsiaGRHHZMnV1Aq7+9wwZpE3qH9dV4c-jVfTxMRO810TyHg@mail.gmail.com>
On 9 Apr, Wesley Schwengle wrote:
> today I've experiences a segfault running on an update to date zsh
> from git (6f35d6c0d0eeb80c0145e5226285a8a45ffb5f25)
Thanks for sending this to us.
> I can trigger this in a fairly "large" git repo such as the one I have
> at work, or using the repository of git itself. I've included the
> output of gdb
>
> I can trigger the bug with zsh -f and the attached zshrc:
>
> * cd ~code/git # the git repo from git@xxxxxxxxxx:git/git.git
> * zsh -f
> * source the zshrc provided in this e-mail
> * vi Zaaksysteem::Bar::voo::vooo::voo<tab> <nowwaitafewsecs> <ctrl-c>
> * You now get a message: Killed by signal in compadd after 0s
> * vi <tab> # yields a segfault
This seems to be due to interrupting of pattern matching. I was able to
cut this down to something that doesn't involve completion:
zsh -f
setopt extendedglob
() {
TRAPINT() {
return 1
}
: **/*~(#a10)Zaaksysteem::Bar::voo::vooo::voo
}
interrupt the function with Ctrl-C and now do something that involves
pattern matching, e.g:
[[ a = :*: ]]
The glob can be varied, it just needs to take long enough to give you
time to catch it with Ctrl-C so pick a big enough directory.
Older versions of zsh didn't have the problem so I've been able to
bisect it down to the change that introduced it:
[827d36077641ca87d1796b9c5cb05e7c44b01919] 36853: replace pushheap/popheap by NEWHEAPS/OLDHEAPS in doshfunc() to optimize memory management
Backing that out on top of master appears to fix the issue. As it was an
optimisation, that might be an option. From reading comments in mem.c,
it's not especially clear to me what newheaps/oldheaps do. There's only
the one other use.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author