GNU bug report logs - #13530
head: memory exhausted when printing all from stdin but last P/E bytes

Previous Next

Package: coreutils;

Reported by: Lei Zhang <lei.zhang <at> uwaterloo.ca>

Date: Wed, 23 Jan 2013 02:43:01 UTC

Severity: normal

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: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>
Cc: lei.zhang <at> uwaterloo.ca, 13530 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigBrady.com>, coreutils <at> gnu.org
Subject: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes
Date: Mon, 27 May 2013 18:14:32 -0700
On 05/27/2013 06:04 PM, Jim Meyering wrote:
> +lim=$(echo $SIZE_MAX | subtract_one_)
> +lim=$(expr $lim - $max_BUFSIZ)

Sorry, I don't see how this will work either.
It's common for a GMP-less expr to handle values
only up to SIZE_MAX / 2, and subtracting just 1
won't work around that problem.

Maybe divide by 10 instead?  That's easy to do
textually.  (I don't know what the test is about
so I'm not sure what to suggest.)




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

Previous Next


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