aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsayan paul <saypaul@redhat.com>2024-05-29 15:31:04 +0530
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-06-11 21:07:05 +0200
commitf7658f91f6b6f6af1bca8270d1df77783e772eec (patch)
tree4d79ea09cd8c64eae2401aa9a5a38da097fedd04 /stdlib/cmp.c
parentmalloc: Improve aligned_alloc and calloc test coverage. (diff)
downloadglibc-f7658f91f6b6f6af1bca8270d1df77783e772eec.tar.gz
glibc-f7658f91f6b6f6af1bca8270d1df77783e772eec.tar.bz2
glibc-f7658f91f6b6f6af1bca8270d1df77783e772eec.zip
malloc: New test to check malloc alternate path using memory obstructiongentoo/glibc-2.39-8
The test aims to ensure that malloc uses the alternate path to allocate memory when sbrk() or brk() fails.To achieve this, the test first creates an obstruction at current program break, tests that obstruction with a failing sbrk(), then checks if malloc is still returning a valid ptr thus inferring that malloc() used mmap() instead of brk() or sbrk() to allocate the memory. Reviewed-by: Arjun Shankar <arjun@redhat.com> Reviewed-by: Zack Weinberg <zack@owlfolio.org> (cherry picked from commit 127fc56152347d73cb7c1c283e60e1cb1f15e9f9) (cherry picked from commit 9de9cd17e73db0ba9af9ef11dc12d490fb59720c)
Diffstat (limited to 'stdlib/cmp.c')
0 files changed, 0 insertions, 0 deletions