llvm-project/compiler-rt/lib
Kostya Kortchinsky 6f00f3b56e [scudo][standalone] mallopt runtime configuration options
Summary:
Partners have requested the ability to configure more parts of Scudo
at runtime, notably the Secondary cache options (maximum number of
blocks cached, maximum size) as well as the TSD registry options
(the maximum number of TSDs in use).

This CL adds a few more Scudo specific `mallopt` parameters that are
passed down to the various subcomponents of the Combined allocator.

- `M_CACHE_COUNT_MAX`: sets the maximum number of Secondary cached items
- `M_CACHE_SIZE_MAX`: sets the maximum size of a cacheable item in the Secondary
- `M_TSDS_COUNT_MAX`: sets the maximum number of TSDs that can be used (Shared Registry only)

Regarding the TSDs maximum count, this is a one way option, only
allowing to increase the count.

In order to allow for this, I rearranged the code to have some `setOption`
member function to the relevant classes, using the `scudo::Option` class
enum to determine what is to be set.

This also fixes an issue where a static variable (`Ready`) was used in
templated functions without being set back to `false` every time.

Reviewers: pcc, eugenis, hctim, cferris

Subscribers: jfb, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D84667
2020-07-28 11:57:54 -07:00
..
BlocksRuntime
asan [compiler-rt][cmake] Don't pass --version-script to Illumos ld 2020-07-28 13:21:36 +02:00
builtins [CMake] Bump CMake minimum version to 3.13.4 2020-07-22 14:25:07 -04:00
cfi Improve error message when '=' is missing in {ASAN,...}_OPTIONS. 2019-06-15 01:37:14 +00:00
crt [cmake] Strip quotes in compiler-rt/lib/crt; error if checks fail 2020-03-09 15:52:39 -07:00
dfsan Reland "[DFSan] Handle fast16labels for all API functions." 2020-07-23 21:19:39 +00:00
fuzzer Replace fuzzer::FuzzerDriver's INTERFACE marking with new LLVMRunFuzzerDriver. 2020-07-27 18:38:04 +00:00
gwp_asan [GWP-ASan] Crash handler API returns sizeof(collected trace) 2020-07-27 10:51:55 -07:00
hwasan [compiler-rt][asan][hwasan] Refactor shadow setup into sanitizer_common (NFCI) 2020-07-16 11:47:05 -07:00
interception Fix check-interception link error in compiler-rt debug mode 2019-10-10 23:30:54 +00:00
lsan [LSan] Enable for SystemZ 2020-06-16 13:45:29 +02:00
msan [MSAN] Pass Origin by parameter to __msan_warning functions 2020-06-15 17:49:18 -07:00
profile [compiler-rt][CMake] Remove unused -stdlib when passing -nostdinc++ 2020-07-24 21:04:40 +00:00
safestack compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cpp 2019-08-01 13:56:52 +00:00
sanitizer_common [Darwin] Cleanup code via improved GetMacosAlignedVersion() 2020-07-28 09:48:34 -07:00
scudo [scudo][standalone] mallopt runtime configuration options 2020-07-28 11:57:54 -07:00
stats compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
tsan [tsan][go] Fix for missing symbols needed by GotsanRuntimeCheck 2020-07-16 17:01:15 -06:00
ubsan [compiler-rt][cmake] Don't pass --version-script to Illumos ld 2020-07-28 13:21:36 +02:00
ubsan_minimal [ubsan] Check implicit casts in ObjC for-in statements 2020-07-13 15:11:18 -07:00
xray [xray] Option to omit the function index 2020-06-17 13:49:01 -04:00
CMakeLists.txt scudo: Add support for diagnosing memory errors when memory tagging is enabled. 2020-04-17 17:26:30 -07:00