[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#13530: head: memory exhausted when printing all from stdin but l
From: |
Pádraig Brady |
Subject: |
Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes |
Date: |
Sun, 26 May 2013 19:50:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 05/26/2013 06:07 PM, Jim Meyering wrote:
> Pádraig Brady wrote:
> ...
>> I expect to push soon, the attached more complete fix to realloc the array.
>
> That new test would still fail on 32-bit systems, and on any system
> with SIZE_MAX < 1E. I expect to push the additional fix below.
The change looks good thanks.
Ideally the test should be system independent,
which could be done by also including this in your change:
diff --git a/tests/misc/head-c.sh b/tests/misc/head-c.sh
index 37a86ce..8b4df5c 100755
--- a/tests/misc/head-c.sh
+++ b/tests/misc/head-c.sh
@@ -19,6 +19,7 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ head
require_ulimit_v_
+getlimits_
# exercise the fix of 2001-08-18, based on test case from Ian Bruce
echo abc > in || framework_failure_
@@ -31,6 +32,6 @@ esac
# Only allocate memory as needed.
# Coreutils <= 8.21 would allocate memory up front
# based on the value passed to -c
-(ulimit -v 20000; head --bytes=-E < /dev/null) || fail=1
+(ulimit -v 20000; head --bytes=-$OFF_T_MAX < /dev/null) || fail=1
> As for testing, I can't think of anything better than to suggest
> testing in a 32-bit virtual machine.
This works for me:
make clean
make CFLAGS=-m32
make check
I have those in my personal release prep notes,
so it would have been caught at release at least.
I'll probably adjust README-release accordingly.
I notice some factor test failures with -m32 now,
which I need to look into...
thanks!
Pádraig.
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes,
Pádraig Brady <=
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Pádraig Brady, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Pádraig Brady, 2013/05/26
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/27
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Paul Eggert, 2013/05/27
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/27
- Re: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes, Jim Meyering, 2013/05/27