[GWP-ASan] Configuration options [3].
authorMitch Phillips <mitchphillips@outlook.com>
Tue, 4 Jun 2019 17:01:11 +0000 (17:01 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Tue, 4 Jun 2019 17:01:11 +0000 (17:01 +0000)
commit2133daf232c5ee8f9cee5662e5b31f584992d3a6
treee83c6b91576fa2af4a010206113f42643189c9d2
parentc33944832c3821d83402a866bba22f71d21a09a0
[GWP-ASan] Configuration options [3].

Summary:
See D60593 for further information.

This patch introduces the configuration options for GWP-ASan. In general, we expect the supporting allocator to populate the options struct, and give that to GWP-ASan during initialisation. For allocators that are okay with pulling in sanitizer_common, we also provide an optional parser that populates the gwp_asan::Options struct with values provided in the GWP_ASAN_OPTIONS environment variable.

This patch contains very little logic, and all of the testable components (i.e. the optional parser's internal logic) is tested as part of the sanitizer_common testbed.

Reviewers: vlad.tsyrklevich, morehouse, jfb

Reviewed By: morehouse

Subscribers: dexonsmith, kubamracek, mgorny, #sanitizers, llvm-commits, vitalybuka

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D62698

llvm-svn: 362527
compiler-rt/lib/gwp_asan/CMakeLists.txt
compiler-rt/lib/gwp_asan/optional/options_parser.cpp [new file with mode: 0644]
compiler-rt/lib/gwp_asan/optional/options_parser.h [new file with mode: 0644]
compiler-rt/lib/gwp_asan/options.h [new file with mode: 0644]
compiler-rt/lib/gwp_asan/options.inc [new file with mode: 0644]