GNU bug report logs - #6600
[PATCH] sort: add --threads option to parallelize internal sort.

Previous Next

Package: coreutils;

Reported by: Pádraig Brady <P <at> draigBrady.com>

Date: Sat, 10 Jul 2010 01:09:02 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 6600 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#6600: [PATCH] sort: add --threads option to parallelize internal sort.
Date: Thu, 15 Jul 2010 16:08:29 +0200
Pádraig Brady wrote:

> On 15/07/10 01:07, Pádraig Brady wrote:
>> On 13/07/10 01:59, Pádraig Brady wrote:
>>> I've finally applied the patch.
>>> http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=9face836
>>>
>>> I made a few comment tweaks and added
>>> some dependencies for the heap module.
>>>
>>> I also removed the xmemcoll0() calls
>>> which are separate to this concurrent functionality.
>>> I will add those back in Chen's name after updating to
>>> the latest gnulib.
>>>
>>> Thanks everyone for their work on this!
>>>
>>> Pádraig.
>>
>> Here's the xmemcoll0 follow up:
>
> And a follow up fix to that which
> fixes 2 test failures noticed on our integration server:
> http://hydra.nixos.org/build/486508
>
> commit aadc67dfdb47f28bb8d1fa5e0fe0f52e2a8c51bf
> Author: Pádraig Brady <P <at> draigBrady.com>
> Date:   Thu Jul 15 12:06:04 2010 +0100
>
>     sort: fix a bug when sorting unterminated lines
>
>     * src/sort.c (fillbuf): The previous commit incorrectly
>     terminated the buffer when the last line of input
>     didn't contain a terminating character.
>
> diff --git a/src/sort.c b/src/sort.c
> index 45cb78f..7d31878 100644
> --- a/src/sort.c
> +++ b/src/sort.c
> @@ -1743,7 +1743,7 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
>                    if (buf->buf == ptrlim)
>                      return false;
>                    if (ptrlim[-1] != eol)
> -                    *ptrlim++ = '\0';
> +                    *ptrlim++ = eol;

Thanks.
FYI, here's a simple demo of that bug:

    $ printf a |src/sort
    src/sort: memory exhausted




This bug report was last modified 15 years and 3 days ago.

Previous Next


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