public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] malloc: remove redundant check of unsorted bin corruption
@ 2023-02-22 22:05 DJ Delorie
0 siblings, 0 replies; only message in thread
From: DJ Delorie @ 2023-02-22 22:05 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3f84f1159e9f3e9716eae46ba88616bb153fdd8c
commit 3f84f1159e9f3e9716eae46ba88616bb153fdd8c
Author: Ayush Mittal <ayush.m@samsung.com>
Date: Thu Apr 8 14:59:09 2021 +0530
malloc: remove redundant check of unsorted bin corruption
* malloc/malloc.c (_int_malloc): remove redundant check of
unsorted bin corruption
With commit "b90ddd08f6dd688e651df9ee89ca3a69ff88cd0c"
(malloc: Additional checks for unsorted bin integrity),
same check of (bck->fd != victim) is added before checking of unsorted
chunk corruption, which was added in "bdc3009b8ff0effdbbfb05eb6b10966753cbf9b8"
(Added check before removing from unsorted list).
..
3773 if (__glibc_unlikely (bck->fd != victim)
3774 || __glibc_unlikely (victim->fd != unsorted_chunks (av)))
3775 malloc_printerr ("malloc(): unsorted double linked list corrupted");
..
..
3815 /* remove from unsorted list */
3816 if (__glibc_unlikely (bck->fd != victim))
3817 malloc_printerr ("malloc(): corrupted unsorted chunks 3");
3818 unsorted_chunks (av)->bk = bck;
..
So this extra check can be removed.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Ayush Mittal <ayush.m@samsung.com>
Reviewed-by: DJ Delorie <dj@redhat.com>
Diff:
---
malloc/malloc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index fd8b52bfac..5829f3fa9b 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4034,8 +4034,6 @@ _int_malloc (mstate av, size_t bytes)
}
/* remove from unsorted list */
- if (__glibc_unlikely (bck->fd != victim))
- malloc_printerr ("malloc(): corrupted unsorted chunks 3");
unsorted_chunks (av)->bk = bck;
bck->fd = unsorted_chunks (av);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-22 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 22:05 [glibc] malloc: remove redundant check of unsorted bin corruption DJ Delorie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).