From: Jim Meyering Date: Tue, 24 Jul 2007 07:59:14 +0000 (+0200) Subject: sort: add a test to exercise the affected code. X-Git-Tag: v6.9.89~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c12bf5fb7ff8a40884a99332fb20abc9c53be75c;p=thirdparty%2Fcoreutils.git sort: add a test to exercise the affected code. * tests/sort/Test.pm (realloc-buf): Exercise the code that changed yesterday. No other test in all of "make check" does this. * NEWS: Mention the fix. --- diff --git a/ChangeLog b/ChangeLog index bc403ea6d5..d5be794f0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-24 Jim Meyering + + sort: add a test to exercise the affected code. + * tests/sort/Test.pm (realloc-buf): Exercise the code that changed + yesterday. No other test in all of "make check" does this. + * NEWS: Mention the fix. + 2007-07-23 Paul Eggert sort: avoid unaligned access. diff --git a/NEWS b/NEWS index dff643ff38..e04be6e530 100644 --- a/NEWS +++ b/NEWS @@ -90,6 +90,9 @@ GNU coreutils NEWS -*- outline -*- seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003", so workarounds like "seq 0 0.000001 0.0000031" are no longer needed. + sorting very long lines (relative to the amount of available memory) + no longer provokes unaligned memory access + split --line-bytes=N (-C N) no longer creates an empty file [this bug is present at least as far back as textutils-1.22 (Jan, 1997)] diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm index 134fe19dd8..7fd499999a 100644 --- a/tests/sort/Test.pm +++ b/tests/sort/Test.pm @@ -283,7 +283,11 @@ my @tv = ( # Using an old-style key-specifying option like +1 with an invalid # ordering-option character would cause sort to try to free an invalid # (non-malloc'd) pointer. This bug affects coreutils-6.5 through 6.9. -['obs-inval', '+1x', '', '', 2] +['obs-inval', '+1x', '', '', 2], + +# Exercise the code that enlarges the line buffer. See the thread here: +# http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/11006 +['realloc-buf', '-S1', 'a'x4000 ."\n", 'a'x4000 ."\n", 0], ); sub test_vector