diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2018-12-27 21:31:52 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2018-12-27 21:31:52 +0000 |
commit | 9ce7b272885adbb6a5df3940b329214e8b0f31fb (patch) | |
tree | 0180b81b7a292174cf6dcf39f0a0f20e02c4ced7 /lib/sanitizer_common/sanitizer_procmaps.h | |
parent | 60b1bb1938911d3b7613ab9abf58413e7ca5e3ba (diff) | |
download | compiler-rt-9ce7b272885adbb6a5df3940b329214e8b0f31fb.tar.gz |
[asan] Support running without /proc.
Summary:
This patch lets ASan run when /proc is not accessible (ex. not mounted
yet). It includes a special test-only flag that emulates this condition
in an unpriviledged process.
This only matters on Linux, where /proc is necessary to enumerate
virtual memory mappings.
Reviewers: pcc, vitalybuka
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D55874
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@350101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_procmaps.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_procmaps.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_procmaps.h b/lib/sanitizer_common/sanitizer_procmaps.h index 9fde040a1..0b7ae1971 100644 --- a/lib/sanitizer_common/sanitizer_procmaps.h +++ b/lib/sanitizer_common/sanitizer_procmaps.h @@ -75,6 +75,7 @@ class MemoryMappingLayout { // to obtain the memory mappings. It should fall back to pre-cached data // instead of aborting. static void CacheMemoryMappings(); + static bool IsAvailable(); // Adds all mapped objects into a vector. void DumpListOfModules(InternalMmapVectorNoCtor<LoadedModule> *modules); |