Skip to content
Commit 127fc561 authored by sayan paul's avatar sayan paul Committed by Arjun Shankar
Browse files

malloc: New test to check malloc alternate path using memory obstruction



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: default avatarArjun Shankar <arjun@redhat.com>
Reviewed-by: default avatarZack Weinberg <zack@owlfolio.org>
parent 2a9943b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment