zsh-users
 help / color / mirror / code / Atom feed
* history distortion
@ 2014-02-12 17:28 Manfred Lotz
  2014-02-12 18:40 ` Micah Elliott
  0 siblings, 1 reply; 5+ messages in thread
From: Manfred Lotz @ 2014-02-12 17:28 UTC (permalink / raw)
  To: zsh-users

Hi all,
I have a strange phenomen that history entries get distorted.

Example: 
 while ....;done

will be changed to
  while ....;onee

when I retrieve the command.


zsh is zsh 5.0.2 (x86_64-redhat-linux-gnu).


History related options:

extendedhistory
histignorealldups
histignorespace
histnofunctions
histnostore
histreduceblanks
sharehistory


Any idea where this could come from. I didn't change locale or
terminal.  



-- 
Manfred


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: history distortion
  2014-02-12 17:28 history distortion Manfred Lotz
@ 2014-02-12 18:40 ` Micah Elliott
  2014-02-12 20:09   ` Manfred Lotz
  0 siblings, 1 reply; 5+ messages in thread
From: Micah Elliott @ 2014-02-12 18:40 UTC (permalink / raw)
  To: Zsh Users

I was seeing this too, up to a couple months ago (apologies for being
too lazy to report). I'm on an Arch rolling release and it's fixed
now, so not sure if the problem was specific to the zsh version or
something else on the system that updated (saw an earlier thread about
a memcmp bug, I think). I saw it fix itself in zsh-5.0.5, but it was
possibly earlier. You should try upgrading to it to see if that does
the trick.

--
twitter:@MicahElliott  |  email:mde@MicahElliott.com  |  http://membean.com
Remember your words with Membean!


On Wed, Feb 12, 2014 at 9:28 AM, Manfred Lotz <manfred.lotz@arcor.de> wrote:
> Hi all,
> I have a strange phenomen that history entries get distorted.
>
> Example:
>  while ....;done
>
> will be changed to
>   while ....;onee
>
> when I retrieve the command.
>
>
> zsh is zsh 5.0.2 (x86_64-redhat-linux-gnu).
>
>
> History related options:
>
> extendedhistory
> histignorealldups
> histignorespace
> histnofunctions
> histnostore
> histreduceblanks
> sharehistory
>
>
> Any idea where this could come from. I didn't change locale or
> terminal.
>
>
>
> --
> Manfred


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: history distortion
  2014-02-12 18:40 ` Micah Elliott
@ 2014-02-12 20:09   ` Manfred Lotz
  2014-02-12 23:15     ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Manfred Lotz @ 2014-02-12 20:09 UTC (permalink / raw)
  To: zsh-users

On Wed, 12 Feb 2014 10:40:45 -0800
Micah Elliott <mde@micahelliott.com> wrote:

> I was seeing this too, up to a couple months ago (apologies for being
> too lazy to report). I'm on an Arch rolling release and it's fixed
> now, so not sure if the problem was specific to the zsh version or
> something else on the system that updated (saw an earlier thread about
> a memcmp bug, I think). I saw it fix itself in zsh-5.0.5, but it was
> possibly earlier. You should try upgrading to it to see if that does
> the trick.
> 

I have installed the newest zsh package in Fedora 20, Hm, upgrading
means I have to build zsh by myself. 

I tried out omitting hist_reduce_blanks and it seems that the problem
doesn't show up.

Will keep watching it.


-- 
Manfred



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: history distortion
  2014-02-12 20:09   ` Manfred Lotz
@ 2014-02-12 23:15     ` Bart Schaefer
  2014-02-13  4:37       ` Manfred Lotz
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2014-02-12 23:15 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]

On Wed, Feb 12, 2014 at 12:09 PM, Manfred Lotz <manfred.lotz@arcor.de>wrote:

> On Wed, 12 Feb 2014 10:40:45 -0800
> Micah Elliott <mde@micahelliott.com> wrote:
>
> > I was seeing this too, up to a couple months ago (apologies for being
> > too lazy to report). I'm on an Arch rolling release and it's fixed
> > now, so not sure if the problem was specific to the zsh version or
> > something else on the system that updated (saw an earlier thread about
> > a memcmp bug, I think).
>
> I tried out omitting hist_reduce_blanks and it seems that the problem
> doesn't show up.
>

Yes, in zsh prior to 5.0.3 part of the hist_reduce_blanks implementation
was using memcpy on overlapping regions of the command line.  memcpy is
allowed to optimize the copy by moving several bytes at a time, copying
right-to-left instead of left-to-right, etc., so is not safe for overlaps.
 The release of a new shared C library that changed the memcpy
implementation to such an optimized one could break existing zsh installs
when they started dynamically linking against the new library.

This is very likely what happened to you.  The distro you are using will
need to either update zsh or back out the C library incompatibility.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: history distortion
  2014-02-12 23:15     ` Bart Schaefer
@ 2014-02-13  4:37       ` Manfred Lotz
  0 siblings, 0 replies; 5+ messages in thread
From: Manfred Lotz @ 2014-02-13  4:37 UTC (permalink / raw)
  To: zsh-users

On Wed, 12 Feb 2014 15:15:07 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:

> On Wed, Feb 12, 2014 at 12:09 PM, Manfred Lotz
> <manfred.lotz@arcor.de>wrote:
> 
> > On Wed, 12 Feb 2014 10:40:45 -0800
> > Micah Elliott <mde@micahelliott.com> wrote:
> >
> > > I was seeing this too, up to a couple months ago (apologies for
> > > being too lazy to report). I'm on an Arch rolling release and
> > > it's fixed now, so not sure if the problem was specific to the
> > > zsh version or something else on the system that updated (saw an
> > > earlier thread about a memcmp bug, I think).
> >
> > I tried out omitting hist_reduce_blanks and it seems that the
> > problem doesn't show up.
> >
> 
> Yes, in zsh prior to 5.0.3 part of the hist_reduce_blanks
> implementation was using memcpy on overlapping regions of the command
> line.  memcpy is allowed to optimize the copy by moving several bytes
> at a time, copying right-to-left instead of left-to-right, etc., so
> is not safe for overlaps. The release of a new shared C library that
> changed the memcpy implementation to such an optimized one could
> break existing zsh installs when they started dynamically linking
> against the new library.
> 
> This is very likely what happened to you.  The distro you are using
> will need to either update zsh or back out the C library
> incompatibility.
> 

Good to know that my observation was right. For the time being I leave
out hist_reduce_blanks till the Fedora zsh package has been updated.

Thanks.


-- 
Manfred




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-13  4:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 17:28 history distortion Manfred Lotz
2014-02-12 18:40 ` Micah Elliott
2014-02-12 20:09   ` Manfred Lotz
2014-02-12 23:15     ` Bart Schaefer
2014-02-13  4:37       ` Manfred Lotz

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).