This is the mail archive of the glibc-bugs@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]

[Bug malloc/15321] malloc/free can't give the memory back to kernel when main_arena is discontinous


https://sourceware.org/bugzilla/show_bug.cgi?id=15321

--- Comment #10 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Carlos O'Donell from comment #9)
> (In reply to ma.jiang from comment #8)
> > 	void *tt = mmap(mem[i-1]+1024*1024, 1024*213, PROT_READ |
> > PROT_WRITE,MAP_SHARED | MAP_ANONYMOUS, -1, 0);
> 
> This corrupts the arena and the chunk metadata by writing zero (if the
> kernel honours the address hint).


If it does, it's a kernel bug.  If the break point overlaps with the mapping,
the mmap call must fail because MAP_FIXED hasn't been specified.

Even without the hint, something like that could happen under virtual address
space pressure.

I think this needs further analysis.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]