mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-26 12:41:05 +00:00
elf: Align argument of __munmap to page size [BZ #28676]
On Linux/x86-64, for elf/tst-align3, we now get munmap(0x7f88f9401000, 1126424) = 0 instead of munmap(0x7f1615200018, 544768) = -1 EINVAL (Invalid argument) Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
0884724a95
commit
fd6062ede3
@ -55,6 +55,7 @@ _dl_map_segment (const struct loadcmd *c, ElfW(Addr) mappref,
|
||||
if (delta)
|
||||
__munmap ((void *) map_start, delta);
|
||||
ElfW(Addr) map_end = map_start_aligned + maplength;
|
||||
map_end = ALIGN_UP (map_end, GLRO(dl_pagesize));
|
||||
delta = map_start + maplen - map_end;
|
||||
if (delta)
|
||||
__munmap ((void *) map_end, delta);
|
||||
|
Loading…
Reference in New Issue
Block a user