sort: add a test to exercise the affected code.
authorJim Meyering <jim@meyering.net>
Tue, 24 Jul 2007 07:59:14 +0000 (09:59 +0200)
committerJim Meyering <jim@meyering.net>
Tue, 24 Jul 2007 07:59:14 +0000 (09:59 +0200)
* 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.

ChangeLog
NEWS
tests/sort/Test.pm

index bc403ea..d5be794 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-24  Jim Meyering  <jim@meyering.net>
+
+       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  <eggert@cs.ucla.edu>
 
        sort: avoid unaligned access.
diff --git a/NEWS b/NEWS
index dff643f..e04be6e 100644 (file)
--- 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)]
 
index 134fe19..7fd4999 100644 (file)
@@ -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