Skip to content

Commit

Permalink
* malloc/malloc.c (public_cALLOc): For arena other than
Browse files Browse the repository at this point in the history
	main_arena, count all bytes inside the mprotect_size range of the
	heap as uninitialized.
  • Loading branch information
Ulrich Drepper committed Dec 17, 2007
1 parent d9961b6 commit 4cd4c5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2007-12-17 Ulrich Drepper <drepper@redhat.com>

* malloc/malloc.c (public_cALLOc): For arena other than
main_arena, count all bytes inside the mprotect_size range of the
heap as uninitialized.

2007-12-16 Ulrich Drepper <drepper@redhat.com>

* elf/tst-execstack.c (do_test): Don't fail if SELinux forbids
Expand Down
6 changes: 6 additions & 0 deletions malloc/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4cd4c5d

Please sign in to comment.