This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.20-317-gf5f46d5


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  f5f46d51f75083e27fae79cee6cd7707888faba3 (commit)
      from  b987c89126b84b06c22b13c2827499bc9d9e5e88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5f46d51f75083e27fae79cee6cd7707888faba3

commit f5f46d51f75083e27fae79cee6cd7707888faba3
Author: Anders Kaseorg <andersk@MIT.EDU>
Date:   Wed Jul 2 21:17:50 2014 -0400

    manual: Remove incorrect claim that qsort() can be stabilized
    
    Under certain conditions on the size of the array and its items,
    qsort() may fall back to an in-place quicksort if it cannot allocate
    memory for a temporary array with malloc().  This algorithm is not a
    stable sort even if the comparison function is written in the
    described manner.
    
    Fixes #10672.
    
    Signed-off-by: Anders Kaseorg <andersk@mit.edu>

diff --git a/ChangeLog b/ChangeLog
index c2d99a0..bf140d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-10  Anders Kaseorg  <andersk@MIT.EDU>
+
+	[BZ #10672]
+	* manual/search.texi: (Array Sort Function): Remove claim how make
+	qsort stable.
+
 2014-12-10  Andreas Schwab  <schwab@suse.de>
 
 	[BZ #12847]
diff --git a/NEWS b/NEWS
index 7b32c03..4235d37 100644
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,12 @@ Version 2.21
 
 * The following bugs are resolved with this release:
 
-  6652, 12847, 12926, 13862, 14132, 14138, 14171, 14498, 15215, 15884,
-  16469, 16619, 16740, 16857, 17192, 17266, 17344, 17363, 17370, 17371,
-  17411, 17460, 17475, 17485, 17501, 17506, 17508, 17522, 17555, 17570,
-  17571, 17572, 17573, 17574, 17581, 17582, 17583, 17584, 17585, 17589,
-  17594, 17601, 17608, 17616, 17625, 17633, 17647, 17653, 17664, 17665,
-  17668, 17682.
+  6652, 10672, 12847, 12926, 13862, 14132, 14138, 14171, 14498, 15215,
+  15884, 16469, 16619, 16740, 16857, 17192, 17266, 17344, 17363, 17370,
+  17371, 17411, 17460, 17475, 17485, 17501, 17506, 17508, 17522, 17555,
+  17570, 17571, 17572, 17573, 17574, 17581, 17582, 17583, 17584, 17585,
+  17589, 17594, 17601, 17608, 17616, 17625, 17633, 17647, 17653, 17664,
+  17665, 17668, 17682.
 
 * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
   under certain input conditions resulting in the execution of a shell for
diff --git a/manual/search.texi b/manual/search.texi
index 509a543..8aff574 100644
--- a/manual/search.texi
+++ b/manual/search.texi
@@ -180,11 +180,10 @@ This can make a difference when the comparison considers only part of
 the elements.  Two elements with the same sort key may differ in other
 respects.
 
-If you want the effect of a stable sort, you can get this result by
-writing the comparison function so that, lacking other reason
-distinguish between two elements, it compares them by their addresses.
-Note that doing this may make the sorting algorithm less efficient, so
-do it only if necessary.
+The addresses passed to the comparison function need not correspond with
+the original location of the objects, and need not even lie within the
+original array.  The only way to perform a stable sort with @var{qsort}
+is to first augment the objects with a monotonic counter of some kind.
 
 Here is a simple example of sorting an array of doubles in numerical
 order, using the comparison function defined above (@pxref{Comparison

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    6 ++++++
 NEWS               |   12 ++++++------
 manual/search.texi |    9 ++++-----
 3 files changed, 16 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]