llvm-project/compiler-rt/lib/gwp_asan
Mitch Phillips e78b64df98 [Scudo] Use GWP-ASan's aligned allocations and fixup postalloc hooks.
This patch does a few cleanup things:
 1. The non-standalone scudo has a problem where GWP-ASan allocations
 may not meet alignment requirements where Scudo was requested to have
 alignment >= 16. Use the new GWP-ASan API to fix this.
 2. The standalone variant loses some debugging information inside of
 GWP-ASan because we ask GWP-ASan to allocate an aligned size in the
 frontend. This means reports end up with 'UaF on a 16-byte allocation'
 for a 1-byte allocation with 16-byte alignment. Also use the new API to
 fix this.
 3. Add post-alloc hooks for GWP-ASan intercepted allocations, and add
 stats tracking for GWP-ASan allocations.
 4. Add a small test that checks the alignment of the frontend
 allocator, so that it can be used under GWP-ASan torture mode.
 5. Add GWP-ASan torture mode as a testing configuration to catch these
 regressions.

Depends on D94830, D95889.

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D95884
2021-05-10 12:56:18 -07:00
..
optional [gwp_asan] Use __sanitizer_fast_backtrace on Fuchsia 2021-04-28 16:48:14 -07:00
platform_specific [GWP-ASan] Change sys/cdefs.h to features.h 2021-02-17 20:03:16 -08:00
scripts [GWP-ASan] Add public-facing documentation [6]. 2019-08-21 17:53:51 +00:00
tests [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
CMakeLists.txt [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
common.cpp [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
common.h [Scudo] Use GWP-ASan's aligned allocations and fixup postalloc hooks. 2021-05-10 12:56:18 -07:00
crash_handler.cpp [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
crash_handler.h [GWP-ASan] Cleanup (NFC) 2020-10-19 18:13:11 -07:00
definitions.h [GWP-ASan] Cleanup (NFC) 2020-10-19 18:13:11 -07:00
guarded_pool_allocator.cpp [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
guarded_pool_allocator.h [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
mutex.h [GWP-ASan] IWYU & clang-format 2020-12-10 12:42:01 -08:00
options.h [GWP-ASan] Crash Handler API. 2020-02-05 15:39:17 -08:00
options.inc [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
stack_trace_compressor.cpp [GWP-ASan] Implement stack frame compression. 2019-08-15 21:09:09 +00:00
stack_trace_compressor.h [GWP-ASan] Implement stack frame compression. 2019-08-15 21:09:09 +00:00
utilities.h [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00