diff options
| author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-03-12 09:46:15 +0000 |
|---|---|---|
| committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-03-26 11:03:06 +0000 |
| commit | 14652f60a425458ad6e8eefdae6ff4003124b321 (patch) | |
| tree | 585549e5e30c83366c92c17681ad0b69ff2ca78a /malloc | |
| parent | faf003ed8de7c1b1b4794ae15c90241825caeea4 (diff) | |
| download | glibc-14652f60a425458ad6e8eefdae6ff4003124b321.tar.xz glibc-14652f60a425458ad6e8eefdae6ff4003124b321.zip | |
malloc: Use different tag after mremap
The comment explained why different tag is used after mremap, but
for that correctly tagged pointer should be passed to tag_new_usable.
Use chunk2mem to get the tag.
Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'malloc')
| -rw-r--r-- | malloc/malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index a2c550df06..ebcf1ff960 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -3411,7 +3411,7 @@ __libc_realloc (void *oldmem, size_t bytes) newp = mremap_chunk (oldp, nb); if (newp) { - void *newmem = chunk2rawmem (newp); + void *newmem = chunk2mem (newp); /* Give the new block a different tag. This helps to ensure that stale handles to the previous mapping are not reused. There's a performance hit for both us and the |
