Run standalone scudo tests in both configurations (with and without
GWP-ASan). Add test-only support for deinitialization to GWP-ASan.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 61768 tests passed, 0 failed and 780 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
I'm not sure this is a good idea after all.
We'd need to also bump sampling rate to 1 for reliable testing, and that does not work with scudo tests which specifically test the scudo implementation, and not a random posix-compliant allocator.
This is meant to go on top of
https://reviews.llvm.org/D72470
with the cmake bits that disable GWP-ASan reverted.
Unit tests: pass. 61637 tests passed, 0 failed and 777 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Thanks for doing this.
compiler-rt/lib/gwp_asan/guarded_pool_allocator.h | ||
---|---|---|
102 | I'd prefer that this was part of init() (of course adding the restriction that malloc() works to init()), rather than have two separate steps to init GWP-ASan. It's pretty easy for GWP-ASan for Scudo (just init in the post-init callback), bit more tricky for bionic. Both jemalloc_constructor and __libc_init_malloc are run as part of the init array (the latter via __libc_preinit. Might be able to delay GWP-ASan init until __libc_init, WDYT? | |
105 | I don't think either of these functions should be static. Other than that, can you add this comment? These functions are exported for use in Android's `malloc_disable()`. Disabling the allocator will spinlock any threads attempting to allocate memory until `enable()` is called. |
Oh, also, would you mind please updating the commit message to mention that this change adds enable/disable support, and fork protections? Thanks!
clang-tidy: error: 'gwp_asan/definitions.h' file not found [clang-diagnostic-error]