GNU bug report logs - #15459

Previous Next

Package: diffutils;

Reported by: leila karami <karami.leila1 <at> gmail.com>

Date: Tue, 24 Sep 2013 21:57:03 UTC

Severity: normal

Merged with 15458

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 15459 <at> debbugs.gnu.org (full text, mbox):

From: Hugo.Mildenberger <at> web.de
To: Eric Blake <eblake <at> redhat.com>
Cc: 15459 <at> debbugs.gnu.org, leila karami <karami.leila1 <at> gmail.com>
Subject: Re: [bug-diffutils] bug#15459: diff -Z hangs [was: bug#15459:
 bug#15459: bug#15459: bug#15459:]
Date: Wed, 25 Sep 2013 19:05:09 +0200
On Wed, 25 Sep 2013 10:20:20 -0600
Eric Blake <eblake <at> redhat.com> wrote:

> On 09/25/2013 10:05 AM, Eric Blake wrote:
> > On 09/25/2013 09:52 AM, leila karami wrote:
> >> Dear Eric
> >>
> >> I obtained old.gro file from linux, then I changed and saved it in windows
> >> (new.gro). I want to use new.gro file in linux again.
> >>
> >> I attached files in free compression format (such as gzip).
> >>
> >> I want to do some works to obtained new.gro file exactly similar to style
> >> and format of the old.gro to use new.gro in linux.
> >> Please tell me how to do this work exactly?
> > 
> > If line endings are all that differs, use 'diff -Z' to ignore the
> > trailing space differences, or download the 'dos2unix' utility and
> > reconvert your file back into desired line endings before doing the diff.
> 
> Hmm, you may have found a real bug after all:
> 
> $ diff --version | head -n1
> diff (GNU diffutils) 3.3
> $ diff -Z <(printf 'a\nb\n') <(printf 'a\nb\n'); echo $?
> 0
> $ timeout 10s diff -Z <(printf 'a\r\nb\n') <(printf 'a\nb\r\n'); echo $?
> 124
> 
> Why is 'diff -Z' going into an infinite loop and timing out after ten
> seconds, instead of ignoring differences caused by mixed-mode carriage
> returns?
> 
> -- 
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 

diff 3.3 (probably compiled with gcc-4.7.3 p1.0, pie-0.5.5, 
glibc-2.17 on amd64) does not timeout on my system:

 $ diff -Z <(printf 'a\nb\n') <(printf 'a\nb\n'); echo $?
 0
 $ timeout 10s diff -Z <(printf 'a\r\nb\n') <(printf 'a\nb\r\n'); echo $?
 0

Hugo Mildenberger
 




This bug report was last modified 11 years and 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.