diff options
| author | Yury Gribov <y.gribov@samsung.com> | 2015-02-03 10:15:15 +0000 |
|---|---|---|
| committer | Yury Gribov <y.gribov@samsung.com> | 2015-02-03 10:15:15 +0000 |
| commit | 8f848ff5ed5b5bfbe69ced0618b1a766f3dadde5 (patch) | |
| tree | 32a378e0c77c79e7d4cc05aeb961cf65c561317c /compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc | |
| parent | 0d51c1563b8c37ee34a82e7f7592d7a27ba28822 (diff) | |
| download | bcm5719-llvm-8f848ff5ed5b5bfbe69ced0618b1a766f3dadde5.tar.gz bcm5719-llvm-8f848ff5ed5b5bfbe69ced0618b1a766f3dadde5.zip | |
[ASan] Add use_madv_dontdump flag.
Differential Revision: http://reviews.llvm.org/D7294
llvm-svn: 227959
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc index 1ecbffed5bc..11828e6cdf5 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc @@ -50,6 +50,12 @@ void NoHugePagesInRegion(uptr addr, uptr size) { #endif // MADV_NOHUGEPAGE } +void DontDumpShadowMemory(uptr addr, uptr length) { +#ifdef MADV_DONTDUMP + madvise((void *)addr, length, MADV_DONTDUMP); +#endif +} + static rlim_t getlim(int res) { rlimit rlim; CHECK_EQ(0, getrlimit(res, &rlim)); |

