mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* malloc/malloc.c (public_cALLOc): For arena other than
main_arena, count all bytes inside the mprotect_size range of the heap as uninitialized.
This commit is contained in:
@ -3886,6 +3886,12 @@ public_cALLOc(size_t n, size_t elem_size)
|
||||
oldtopsize < mp_.sbrk_base + av->max_system_mem - (char *)oldtop)
|
||||
oldtopsize = (mp_.sbrk_base + av->max_system_mem - (char *)oldtop);
|
||||
#endif
|
||||
if (av != &main_arena)
|
||||
{
|
||||
heap_info *heap = heap_for_ptr (oldtop);
|
||||
if (oldtopsize < (char *) heap + heap->mprotect_size - (char *) oldtop)
|
||||
oldtopsize = (char *) heap + heap->mprotect_size - (char *) oldtop;
|
||||
}
|
||||
#endif
|
||||
mem = _int_malloc(av, sz);
|
||||
|
||||
|
Reference in New Issue
Block a user