diff options
author | sayan paul <saypaul@redhat.com> | 2024-05-29 15:31:04 +0530 |
---|---|---|
committer | Arjun Shankar <arjun@redhat.com> | 2024-06-04 18:00:29 +0200 |
commit | 127fc56152347d73cb7c1c283e60e1cb1f15e9f9 (patch) | |
tree | 4b131058040f3a582c83c05fdb7eda4cf5ddb296 /malloc/Makefile | |
parent | 2a9943b4a03b6bce7c2b1b047592eee38ab74fab (diff) | |
download | glibc-127fc56152347d73cb7c1c283e60e1cb1f15e9f9.tar.gz glibc-127fc56152347d73cb7c1c283e60e1cb1f15e9f9.tar.xz glibc-127fc56152347d73cb7c1c283e60e1cb1f15e9f9.zip |
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: Arjun Shankar <arjun@redhat.com> Reviewed-by: Zack Weinberg <zack@owlfolio.org>
Diffstat (limited to 'malloc/Makefile')
-rw-r--r-- | malloc/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/malloc/Makefile b/malloc/Makefile index c1a03f3cb0..cc14cf66c9 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -34,6 +34,7 @@ tests := \ tst-interpose-nothread \ tst-interpose-thread \ tst-malloc \ + tst-malloc-alternate-path \ tst-malloc-backtrace \ tst-malloc-check \ tst-malloc-fork-deadlock \ |