summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_flags.inc
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-02-06 01:14:50 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-02-06 01:14:50 +0000
commit5da976d2f8c847633c9475d1e48312418145ee66 (patch)
tree0400d5cf013d145952474a6fcfd2652b1d77b33e /lib/sanitizer_common/sanitizer_flags.inc
parent8db4dac52386acb55d18964334ce696c32aa5e67 (diff)
downloadcompiler-rt-5da976d2f8c847633c9475d1e48312418145ee66.tar.gz
[sanitizer] Decorate /proc/self/maps better.
Summary: Refactor the way /proc/self/maps entries are annotated to support most (all?) posix platforms, with a special implementation for Android. Extend the set of decorated Mmap* calls. Replace shm_open with internal_open("/dev/shm/%s"). Shm_open is problematic because it calls libc open() which may be intercepted. Generic implementation has limits (max number of files under /dev/shm is 64K on my machine), which can be conceivably reached when sanitizing multiple programs at once. Android implemenation is essentially free, and enabled by default. The test in sanitizer_common is copied to hwasan and not reused directly because hwasan fails way too many common tests at the moment. Reviewers: pcc, vitalybuka Subscribers: srhines, kubamracek, jfb, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D57720 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.inc')
-rw-r--r--lib/sanitizer_common/sanitizer_flags.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.inc b/lib/sanitizer_common/sanitizer_flags.inc
index aa2689483..7d592bdcb 100644
--- a/lib/sanitizer_common/sanitizer_flags.inc
+++ b/lib/sanitizer_common/sanitizer_flags.inc
@@ -218,9 +218,9 @@ COMMON_FLAG(bool, intercept_stat, true,
COMMON_FLAG(bool, intercept_send, true,
"If set, uses custom wrappers for send* functions "
"to find more errors.")
-COMMON_FLAG(bool, decorate_proc_maps, false, "If set, decorate sanitizer "
- "mappings in /proc/self/maps with "
- "user-readable names")
+COMMON_FLAG(bool, decorate_proc_maps, (bool)SANITIZER_ANDROID,
+ "If set, decorate sanitizer mappings in /proc/self/maps with "
+ "user-readable names")
COMMON_FLAG(int, exitcode, 1, "Override the program exit status if the tool "
"found an error")
COMMON_FLAG(