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.11-287-g3e259db


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  3e259dbb32c2456e7fc0fc751b8544fd0939a704 (commit)
      from  70c90289ff7e2f1ca976618bcf342d9c65c746fc (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e259dbb32c2456e7fc0fc751b8544fd0939a704

commit 3e259dbb32c2456e7fc0fc751b8544fd0939a704
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Fri Mar 26 04:00:10 2010 -0700

    Remove unwanted malloc changes, again.

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 0004c87..763852e 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4852,8 +4852,7 @@ _int_free(mstate av, mchunkptr p)
       free_perturb (chunk2mem(p), size - SIZE_SZ);
 
     set_fastchunks(av);
-    unsigned int idx = fastbin_index(size);
-    fb = &fastbin (av, idx);
+    fb = &fastbin (av, fastbin_index(size));
 
 #ifdef ATOMIC_FASTBINS
     mchunkptr fd;
@@ -4867,12 +4866,6 @@ _int_free(mstate av, mchunkptr p)
 	    errstr = "double free or corruption (fasttop)";
 	    goto errout;
 	  }
-	if (old != NULL
-	    && __builtin_expect (fastbin_index(chunksize(old)) != idx, 0))
-	  {
-	    errstr = "invalid fastbin entry (free)";
-	    goto errout;
-	  }
 	p->fd = fd = old;
       }
     while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
@@ -4884,12 +4877,6 @@ _int_free(mstate av, mchunkptr p)
 	errstr = "double free or corruption (fasttop)";
 	goto errout;
       }
-    if (*fb != NULL
-	&& __builtin_expect (fastbin_index(chunksize(*fb)) != idx, 0))
-      {
-	errstr = "invalid fastbin entry (free)";
-	goto errout;
-      }
 
     p->fd = *fb;
     *fb = p;
diff --git a/malloc/tst-mallocstate.c b/malloc/tst-mallocstate.c
index 2a1fd46..97a1058 100644
--- a/malloc/tst-mallocstate.c
+++ b/malloc/tst-mallocstate.c
@@ -51,7 +51,6 @@ main (void)
 
   for (i=0; i<100; ++i)
     {
-printf("round %li\n", i);
       save_state = malloc_get_state ();
       if (save_state == NULL)
 	{
@@ -65,18 +64,13 @@ printf("round %li\n", i);
 	merror ("realloc (i*4) failed.");
       free (save_state);
     }
-puts("done");
 
   p1 = realloc (p1, 40);
-puts("after realloc");
   free (p2);
-puts("after free 1");
   p2 = malloc (10);
-puts("after malloc");
   if (p2 == NULL)
     merror ("malloc (10) failed.");
   free (p1);
-puts("after free 2");
 
   return errors != 0;
 }

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

Summary of changes:
 malloc/malloc.c          |   15 +--------------
 malloc/tst-mallocstate.c |    6 ------
 2 files changed, 1 insertions(+), 20 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]