From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27301 invoked by alias); 12 Dec 2014 09:48:54 -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: 33952 Received: (qmail 27149 invoked from network); 12 Dec 2014 09:48:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Message-ID: <548AB9F4.9080608@realraum.at> Date: Fri, 12 Dec 2014 10:48:36 +0100 From: Bernhard Tittelbach User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.23) Gecko/20091001 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Bart Schaefer , "zsh-workers@zsh.org >> Zsh hackers list" Subject: Re: zsh history bug ? References: <54655C0F.8020308@realraum.at> <5487D8CD.6080603@realraum.at> <141210091937.ZM11958@torch.brasslantern.com> In-Reply-To: <141210091937.ZM11958@torch.brasslantern.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-TUG-Backscatter-control: 0B1a6U/lEHC+vq3P81DLWg X-Scanned-By: MIMEDefang 2.74 Am 2014-12-10 um 18:19 schrieb Bart Schaefer: > On Dec 10, 6:23am, Bernhard Tittelbach wrote: > } Subject: Re: zsh history bug ? > } > } Am 2014-11-14 um 02:51 schrieb Mikael Magnusson: > } > On Fri, Nov 14, 2014 at 2:34 AM, Bernhard Tittelbach wrote: > } >> > } >> I've been working a few days with 5.0.7 now and can report the fol= lowing: > } >> > } >> 1) I seem to encounter the bug less often > } >> 2) The bug, or a variant thereof is still present > } >> > } >> i.e.: > } >> > } >> % mkdir -p libs/jquery > } >> % cd . > } >> resulted in > } >> % cd lib/jquuery > > I'm not able to reproduce this on MacOS (the platform where the bug > originally was reported, IIRC). > > Here was the patch: > > 2013-09-26 Barton E. Schaefer > > * 31770: Src/hist.c: memmove() instead of memcpy() for overlapp= ing > regions. > > I've re-checked Src/hist.c and there are no other cases where memcpy() = is > being used except with a newly-allocated buffer as the destination (so,= no > overlapping regions). > > } >> When I previously encountered the bug, I believe only the lookup f= rom > } >> history was garbled, i.e. the contents of .zsh_history were fine. > } >> I'll have to confirm this on a different system though. > > Are you sharing history via a network-mounted home directory from=20 > multiple hosts? The home directories are on local drives only. I don't share history between computers at all. > > } >> Now the .zsh_history definitely holds a garbled version of the exe= cuted > } >> command line: > } >> > } >> % ls > } >> libs/ > } >> % ls libs/ > } >> jquery/ > } >> % tail ~/.zsh_history | grep mkdir > } >> : 1415928181:0;mkdir -p lib/jquuery > } > Check if setopt nohistreduceblanks stops the problem. > } > > } Alright, I've not encountered the bug for quite some time now, > } your suggestion worked! > > Can you give us some additional details of the OS and hardware where yo= u > are seeing this error? The remaining possibility is that your build of= > zsh does not define HAVE_MEMMOVE *and* the implementation of its > replacement (which might be bcopy(), or might be a macro in the system > headers) does not properly handle overlapping pointers. sure.. There are two running Ubuntu x86_64. One CoreDuo Laptop, one Core i5 Desktop. I also have an old Pentium4 machine running Gentoo i686 and an Eeebook running Ubuntu i686 with the same zsh config. I don't think I've ever encountered the bug on these i686 machines, but then I don't use these very often. Thus It's hard to tell if the bug is present there, since it only appears sporadically and is hard to reproduce. Originally, on the x86_64 machine, I was running zsh 5.0.3 from the Ubuntu Package, but per your suggestion I compiled 5.0.7 from source last month. The bug persisted until Mikael suggested setting "nohistreduceblanks" i.e. disabling "histreduceblanks" Since then I've not encountered the bug anymore or at least the bug has become so seldom I've not encountered it yet again within the last month. Previously It appeared about once in a day of work on the shell.