GNU bug report logs - #9780
sort -u throws out non-duplicates

Previous Next

Package: coreutils;

Reported by: Bernhard Rosenkraenzer <bero <at> bero.eu>

Date: Tue, 18 Oct 2011 01:04:02 UTC

Severity: normal

Tags: moreinfo

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>
Cc: 9780 <at> debbugs.gnu.org, Rasmus Borup Hansen <rbh <at> intomics.com>
Subject: Re: bug#9780: sort -u throws out non-duplicates
Date: Fri, 17 Aug 2012 13:01:48 -0700
On 08/17/2012 12:53 PM, Jim Meyering wrote:
> safe_text is initially NULL and we enter that block
> only when we're about to fread into a buffer that overlaps
> the current saved_line.text buffer.

Sorry, I wasn't clear enough.  I was worried about the
case when saved_line.text does not overlap the buffer
we're about to read into, because the buffer we're about
to read into has been realloc'ed.  The idea is that we
saved a line, then realloc'ed the buffer, and now we're
doing the overlap test.  There won't be an overlap (assuming
realloc gave us fresh space), but the saved line points
into freed memory.




This bug report was last modified 12 years and 278 days ago.

Previous Next


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