summaryrefslogtreecommitdiff
path: root/lib/asan/asan_flags.cc
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-01-12 18:51:25 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-01-12 18:51:25 +0000
commitebf4bc96909c0a03185023fb12da0a60f0975462 (patch)
tree7da3889e16e2f90bae687e37ef32178a9d64a39a /lib/asan/asan_flags.cc
parentc4c8246ca04399c9f0b6f4972c7451a4b1209fe3 (diff)
ASAN activate/deactive controls thread_local_quarantine_size_kb option.
Summary: Bypass quarantine altogether when quarantine size is set ot zero. Also, relax atomic load/store of quarantine parameters, the release/acquire semantics is an overkill here. Reviewers: eugenis Subscribers: kubabrecka, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D28586 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_flags.cc')
-rw-r--r--lib/asan/asan_flags.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/asan/asan_flags.cc b/lib/asan/asan_flags.cc
index 4db407d45..ad5bbff28 100644
--- a/lib/asan/asan_flags.cc
+++ b/lib/asan/asan_flags.cc
@@ -169,6 +169,11 @@ void InitializeFlags() {
(ASAN_LOW_MEMORY) ? 1 << 6 : FIRST_32_SECOND_64(1 << 8, 1 << 10);
f->thread_local_quarantine_size_kb = kDefaultThreadLocalQuarantineSizeKb;
}
+ if (f->thread_local_quarantine_size_kb == 0 && f->quarantine_size_mb > 0) {
+ Report("%s: thread_local_quarantine_size_kb can be set to 0 only when "
+ "quarantine_size_mb is set to 0\n", SanitizerToolName);
+ Die();
+ }
if (!f->replace_str && common_flags()->intercept_strlen) {
Report("WARNING: strlen interceptor is enabled even though replace_str=0. "
"Use intercept_strlen=0 to disable it.");