diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-02-04 11:38:23 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-03-26 11:03:06 +0000 |
commit | 91e5c439d3130a3c5ff3a3b72adedd50f3f72f76 (patch) | |
tree | 9da70206868983387be95edac1af9d871a74b26c /malloc | |
parent | 0ae773bba0ed6f5b06f8f2312162d8c0476e6b10 (diff) | |
download | glibc-91e5c439d3130a3c5ff3a3b72adedd50f3f72f76.tar.gz glibc-91e5c439d3130a3c5ff3a3b72adedd50f3f72f76.tar.xz glibc-91e5c439d3130a3c5ff3a3b72adedd50f3f72f76.zip |
malloc: Simplify __mtag_tag_new_usable
The chunk cannot be a dumped one here. The only non-obvious cases are free and realloc which may be called on a dumped area chunk, but in both cases it can be verified that tagging is already avoided for dumped area chunks. Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/arena.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index bf17be27d4..0777dc70c6 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -298,11 +298,6 @@ __mtag_tag_new_usable (void *ptr) if (ptr) { mchunkptr cp = mem2chunk(ptr); - /* This likely will never happen, but we can't handle retagging - chunks from the dumped main arena. So just return the - existing pointer. */ - if (DUMPED_MAIN_ARENA_CHUNK (cp)) - return ptr; ptr = __libc_mtag_tag_region (__libc_mtag_new_tag (ptr), CHUNK_AVAILABLE_SIZE (cp) - CHUNK_HDR_SZ); } |