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.18-357-g8b35e35


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  8b35e35d0f4eae28a47c23e2aa15ddf570fa86ef (commit)
      from  8f5de63892b491856400a394632b46c3b1be642d (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=8b35e35d0f4eae28a47c23e2aa15ddf570fa86ef

commit 8b35e35d0f4eae28a47c23e2aa15ddf570fa86ef
Author: OndÅ?ej Bílka <neleai@seznam.cz>
Date:   Fri Nov 1 15:39:26 2013 +0100

    Fix malloc_info statistic. Fixes bug 16112

diff --git a/ChangeLog b/ChangeLog
index 34eacc9..7629934 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-01  OndÅ?ej Bílka  <neleai@seznam.cz>
+
+	[BZ #16112]
+	* malloc/malloc (malloc_info): Do not handle first bin as
+	special case.
+
 2013-11-01  Chris Leonard  <cjl@sugarlabs.org>
 
 	* locale/iso-639.def: Add Central Nahuatl (nhn).
diff --git a/NEWS b/NEWS
index f24d329..38ed440 100644
--- a/NEWS
+++ b/NEWS
@@ -17,7 +17,7 @@ Version 2.19
   15847, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890,
   15892, 15893, 15895, 15897, 15905, 15909, 15917, 15919, 15921, 15923,
   15939, 15948, 15963, 15966, 15988, 16032, 16034, 16036, 16037, 16041,
-  16071, 16072, 16074, 16078.
+  16071, 16072, 16074, 16078, 16112.
 
 * CVE-2012-4412 The strcoll implementation caches indices and rules for
   large collation sequences to optimize multiple passes.  This cache
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 29796fe..897c43a 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5049,23 +5049,11 @@ malloc_info (int options, FILE *fp)
 	sizes[i].total = sizes[i].count * sizes[i].to;
       }
 
-    mbinptr bin = bin_at (ar_ptr, 1);
-    struct malloc_chunk *r = bin->fd;
-    if (r != NULL)
-      {
-	while (r != bin)
-	  {
-	    ++sizes[NFASTBINS].count;
-	    sizes[NFASTBINS].total += r->size;
-	    sizes[NFASTBINS].from = MIN (sizes[NFASTBINS].from, r->size);
-	    sizes[NFASTBINS].to = MAX (sizes[NFASTBINS].to, r->size);
-	    r = r->fd;
-	  }
-	nblocks += sizes[NFASTBINS].count;
-	avail += sizes[NFASTBINS].total;
-      }
 
-    for (size_t i = 2; i < NBINS; ++i)
+    mbinptr bin;
+    struct malloc_chunk *r;
+
+    for (size_t i = 1; i < NBINS; ++i)
       {
 	bin = bin_at (ar_ptr, i);
 	r = bin->fd;

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

Summary of changes:
 ChangeLog       |    6 ++++++
 NEWS            |    2 +-
 malloc/malloc.c |   20 ++++----------------
 3 files changed, 11 insertions(+), 17 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]