From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27902 invoked by alias); 14 Jan 2017 20:26:31 -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: X-Seq: 40360 Received: (qmail 26271 invoked from network); 14 Jan 2017 20:26:31 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-5.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.0.253.69):SA:0(-1.2/5.0):. Processed in 1.061406 secs); 14 Jan 2017 20:26:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _smtprelay.virginmedia.com designates 80.0.253.69 as permitted sender) X-Originating-IP: [86.21.219.59] X-Spam: 0 X-Authority: v=2.1 cv=CMjXJkfD c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=MWUjAzoEKyAA:10 a=NEAV23lmAAAA:8 a=ScqyStf4xAMx_hiwL2QA:9 a=CjuIK1q_8ugA:10 a=Bn2pgwyD2vrAyMmN8A2t:22 Date: Sat, 14 Jan 2017 20:19:23 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: BUG: Zsh crashes Message-ID: <20170114201923.51bffa66@ntlworld.com> In-Reply-To: <20170114024833.GA26958@fujitsu.shahaf.local2> References: <20170113175242.16210658@pwslap01u.europe.root.pri> <20170114010859.GA22474@tower.spodhuis.org> <20170114024833.GA26958@fujitsu.shahaf.local2> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 14 Jan 2017 02:48:33 +0000 Daniel Shahaf wrote: > More minimal reproducer: > > % git clone --depth 5 gitn://github.com/robbyrussell/oh-my-zsh.git > % mkdir d > % cp */plugins/rust/_rust d > % fpath+=($PWD/d) > % autoload compinit > % compinit > % rustc --pretty flowgraph== > > This uses the _rust from omz but nothing else from it. Excellent, just what we need, thanks. With ZSH_SECURE_FREE this goes wrong with the error message at line 1506 of mem.c. That comes from a bad free of a parameter. I'm guessing this is (a) earlier than the crash, obviously (b) already somewhat later than the fundamental problem, which is presumably memory related. Interestingly, even with exactly the same steps I've seen two slightly different versions: - the free came from scanendscope for function _normal - the free came from deleting a hashtable associated with _lastcomp. and within those the symptoms aren't stable, either. In both cases it's from a parameter, but it doesn't look like it's a single particular erroneous parameter that's the problem; I suspect the original error has come much earlier. The relationship to the hash table of a hash parameter could well be just because that has a particular large memory footprint for the problem to hit. Normal valgrind didn't show anything helfupl. Valgrind integration with heaps with --enble-zsh-valgrind hasn't been working properly for a while now, but the circumstantial evidence points more to permanent allocation problem anyway. The fact that it's the second tab must be relevant in some way. Some state may not be being preserved properly. This is going to take some lateral thinking. Anyone who can think laterally might be able to help. Playing with the completer, for example. pws