From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,MALFORMED_FREEMAIL, RCVD_IN_DNSWL_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 06466ae1 for ; Mon, 20 May 2019 20:56:58 +0000 (UTC) Received: (qmail 9010 invoked by alias); 20 May 2019 20:56:41 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44344 Received: (qmail 25597 invoked by uid 1010); 20 May 2019 20:56:40 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25454. spamassassin: 3.4.2. Clear:RC:0(205.235.26.22):SA:0(-0.3/5.0):. Processed in 3.747748 secs); 20 May 2019 20:56:40 -0000 X-Envelope-From: SRS0=v3NY=TU=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at bounces.park01.gkg.net designates 205.235.26.22 as permitted sender) X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 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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pPKnXgBeO640uLuLCYujpqqqSUWOA2f i1SxswMhDQBzEkzhfzvwfgRp3VUBhbujJhnwq4Lg7LEn5OTcpch7CsGa8jfq7mvTf9aZez_jnmR5 v_WggNIylmCnFx0oiCM8GWehcrzRoQSY21W82QixXKY7cKWhXpyEq5paYavPDDJsaoQio0QeptVc KT5bpcPbfOPNH2JXL8BB9FLvdelKj.WyDgvLcbvwZRAbnuTcO2J0F6kHzk1fenJdHVURG8jvBXHF 73Fzktl6uJThOHL5goHNZa0azy4uMpoLZHmbbdfhuU32BlKkSf7WzhKQc54sjPDLsx72UgPqT5ek VGFmmGixkVEQAyBabP5L.ZvJvBRz3RRunC6tWIcwWeqMysls.HewiWvOAzp6Dyf_PgcXwdAEyYed ofJRjlVjU0wQHmetYHznHKvEXgAUs3x.iGZZT9yv_xtnAAwoES1jqeEHQGlRLbaSnaTeyd0wzQ7u b.QNBYBv8sBF5DYj7AYNsnPt7wACsSoWLNNFZMJzX.QbcTA-- cc: zsh-workers@zsh.org In-reply-to: From: Oliver Kiddle References: To: Wesley Schwengle Subject: Re: segfault via completion menu MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <92605.1558385755.1@hydra> Date: Mon, 20 May 2019 22:55:55 +0200 Message-ID: <92606-1558385755.382793@sll5.5oha.0as1> 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@github.com:git/git.git > * zsh -f > * source the zshrc provided in this e-mail > * vi Zaaksysteem::Bar::voo::vooo::voo > * You now get a message: Killed by signal in compadd after 0s > * vi # 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