zsh-workers
 help / color / mirror / code / Atom feed
From: Bernhard Tittelbach <xro@realraum.at>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>,
	"zsh-workers@zsh.org >> Zsh hackers list" <zsh-workers@zsh.org>
Subject: Re: zsh history bug ?
Date: Sat, 20 Dec 2014 02:54:35 +0100	[thread overview]
Message-ID: <5494D6DB.7060401@realraum.at> (raw)
In-Reply-To: <CAHYJk3R0c4u3nqo6Ce5SGx3dVaHx78jaeiP66YwVnXemD9Tyfg@mail.gmail.com>

On 2014-12-12 13:24, Mikael Magnusson wrote:
> On Fri, Dec 12, 2014 at 11:11 AM, Bernhard Tittelbach <xro@realraum.at> wrote:
>> Am 2014-12-12 um 11:01 schrieb Mikael Magnusson:
>>> On Fri, Dec 12, 2014 at 10:48 AM, Bernhard Tittelbach <xro@realraum.at> wrote:
>>>> Am 2014-12-10 um 18:19 schrieb Bart Schaefer:
>>>>> On Dec 10,  6:23am, Bernhard Tittelbach wrote:
>>>>>
>>>>> 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  <schaefer@zsh.org>
>>>>>
>>>>>         * 31770: Src/hist.c: memmove() instead of memcpy() for overlapping
>>>>>         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 from
>>>>> } >> 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
>>>>> multiple hosts?
>>>> The home directories are on local drives only.
>>>> I don't share history between computers at all.
>>>>> [...]
>>>> 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.
>>> Are you totally sure there were no more 5.0.3 instances running at
>>> that time? Or are you saying it works with histreduceblanks enabled
>>> again?
>>>
>>
>> I'm saying If I enable histreduceblanks, the bug is present.
>> Regardles of the zsh version. Both 5.0.3 and 5.0.7 are affected.
> 
> And just to make sure, if you run
> echo $ZSH_VERSION
> in a shell, it displays 5.0.7? (We had an instance recently in #zsh
> where someone upgraded, but their login shell was actually /bin/zsh5,
> and they used zsh --version to check the version).
> 

Well caught !!

indeed, $ZSH_VERSION was different from zsh --version. My mistake!

I installed zsh 5.0.7 in /usr/bin which comes first in $path,
while zsh 5.0.2 was still in /bin/ where passwd pointed to.

I fixed this now, re-enabled histreduceblanks and since then I haven't
encountered the error again. (Though I haven't tested quite long enough
to really be sure.)

Sorry for the trouble. Thanks for your help!


-- 
Remarkable Claims Require Remarkable Proof - Carl Sagan


      reply	other threads:[~2014-12-20  2:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 23:09 Bernhard Tittelbach
2014-11-05  0:12 ` Bart Schaefer
2014-11-14  1:34   ` Bernhard Tittelbach
2014-11-14  1:51     ` Mikael Magnusson
2014-12-10  5:23       ` Bernhard Tittelbach
2014-12-10 17:19         ` Bart Schaefer
2014-12-12  9:48           ` Bernhard Tittelbach
2014-12-12 10:01             ` Mikael Magnusson
2014-12-12 10:11               ` Bernhard Tittelbach
2014-12-12 12:24                 ` Mikael Magnusson
2014-12-20  1:54                   ` Bernhard Tittelbach [this message]

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=5494D6DB.7060401@realraum.at \
    --to=xro@realraum.at \
    --cc=mikachu@gmail.com \
    --cc=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).