Commit graph

9 commits

Author SHA1 Message Date
Florian Mayer
750dcd326e Use SKIP_WITH_HWASAN macro from libbase.
Change-Id: I83681d2191bf4184e52d84d1107d61065927bb24
2022-04-15 16:14:56 -07:00
Edgar Arriaga
d02148c31a Add a flag to distinguish shared VMAs
This flag is required to filter out shared VMAs when compacting memory
using process_madvise.

Test: atest bionic-unit-tests-static
Bug: 173258203

Change-Id: I01fc0cc614b03128a5a9b0a6c8c5c2d829b701f9
2021-01-14 19:34:39 -08:00
Mitch Phillips
242387d0cf [GWP-ASan] [malloc-tests] Scan GWP-ASan regions in maps.
GWP-ASan is part of the native allocator, and may allocate some memory.
When GWP-ASan is enabled, the malloc tests need to look inside of
GWP-ASan regions as well for native allocations.

Bug: 135634846
Test: atest bionic-unit-tests
Change-Id: Ibb78f9c9e7e96a437cffce013facd18708799b0e
2020-02-11 16:08:17 -08:00
Christopher Ferris
88b2f0d8f0 Add support for scudo.
Bug: 137795072

Test: Unit tests pass on jemalloc and scudo.
Change-Id: I764cdad2507d322ff36dd5d28bd8ff9719601e6a
2019-10-02 12:48:23 -07:00
Christopher Ferris
8ea85afde5 Use ReadMapFileAsyncSafe in malloc_iterate tests.
This avoids issues where an allocation could create a map while trying
to check data from the maps and running malloc_iterate.

Bug: 137795072

Test: Runs in unit tests.
Change-Id: If8509845d86dd9d002aeac3aa9278fbcf026af17
2019-08-23 10:07:31 -07:00
Elliott Hughes
bcaa454d32 bionic tests: use GTEST_SKIP.
Also be a bit more to the point in our messages, focusing on "why" not
"what".

Test: ran tests
Change-Id: I297806c7a102bd52602dcd2fcf7a2cd34aba3a11
2019-03-12 10:26:39 -07:00
Sandeep Patil
7d2aea09dd bionic/malloc_iterate_test: Adjust callback for procinfo::ReadMapFile
Bug: 123532375
Test: Builds

Change-Id: I8e782d9050b4d6a0726e8c880d4064df99c763e5
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-02-10 17:27:39 -08:00
Evgenii Stepanov
acd6f4f9f5 Disable a few bionic tests under HWASan.
* HWASan report invalid use of the allocator api (like alignment not
being power of two, or allocation size too large) in a way tests do not
expect.
* Code in .preinit_array runs before HWASan shadow is initialized and
needs to be excluded from instrumentation.
* It looks that mm system calls (mmap/mprotect/etc) will not allow
tagged pointers. In fact, the use of mprotect on malloc()ed memory is
doubtful - one can imagine some kind of speculative load from such
memory, as compiler knows that it is addressable.

Bug: 114279110
Test: bionic-unit-tests with hwasan

Change-Id: I6ba4b46a0d554de77c923ad134cf156ce4ddba1b
2018-11-06 16:59:25 -08:00
Christopher Ferris
bfd3dc497c Add test for malloc_iterate.
Bug: 62621531

Test: New unit tests pass.
Change-Id: Icc50f5b19642225c8f812844d42c904babde8acf
2018-10-30 18:38:39 -07:00