diff options
author | Mitch Phillips <mitchp@google.com> | 2020-01-31 19:57:04 -0800 |
---|---|---|
committer | Mitch Phillips <mitchp@google.com> | 2020-02-10 10:51:23 -0800 |
commit | f3968e89cb72400951f93a2a8237ac1428d2627c (patch) | |
tree | 2c3542797f95d584e876abd5e3ac7386173a91a3 /libc/malloc_hooks/malloc_hooks.cpp | |
parent | a399ede44ec4aa81e4b4cf655496e4618e94ad62 (diff) |
[GWP-ASan] Integrate GWP-ASan into bionc's malloc() (using hooks).
This patch introduces GWP-ASan - a sampled allocator framework that
finds use-after-free and heap-buffer-overflow bugs in production
environments.
GWP-ASan is being introduced in an always-disabled mode. This means that
GWP-ASan will be permanently disabled until a further patch turns on
support. As such, there should be no visible functional change for the
time being.
GWP-ASan requires -fno-emulated-tls wherever it's linked from. We
intentionally link GWP-ASan into libc so that it's part of the initial
set of libraries, and thus has static TLS storage (so we can use
Initial-Exec TLS instead of Global-Dynamic). As a benefit, this reduces
overhead for a sampled process.
GWP-ASan is always initialised via. a call to
mallopt(M_INITIALIZE_GWP_ASAN, which must be done before a process is
multithreaded).
More information about GWP-ASan can be found in the upstream
documentation: http://llvm.org/docs/GwpAsan.html
Bug: 135634846
Test: atest bionic
Change-Id: Ib9bd33337d17dab39ac32f4536bff71bd23498b0
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions