summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-07-24 09:59:14 +0200
committerJim Meyering <jim@meyering.net>2007-07-24 09:59:14 +0200
commitc12bf5fb7ff8a40884a99332fb20abc9c53be75c (patch)
treed7f11b42e22fff9770aa7b937334438c86093e3b
parent9d8e077ca1f4402b608d1464794e390bc7fc5b81 (diff)
downloadcoreutils-c12bf5fb7ff8a40884a99332fb20abc9c53be75c.tar.xz
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.
-rw-r--r--ChangeLog7
-rw-r--r--NEWS3
-rw-r--r--tests/sort/Test.pm6
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bc403ea6d..d5be794f0 100644
--- 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 dff643ff3..e04be6e53 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 134fe19dd..7fd499999 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