summaryrefslogtreecommitdiff
path: root/lib/asan/asan_internal.h
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-05-29 22:31:28 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-05-29 22:31:28 +0000
commit3a91a308cdb78df8e50fdec2d64dfdb1e1f6bb8f (patch)
tree9824d644e15c8847b21d83a166e78dd23d788d5b /lib/asan/asan_internal.h
parentc401872a6a445a7cacbb352a1c70e8d04dcdeb43 (diff)
Add descriptive names to sanitizer entries in /proc/self/maps. Helps debugging.
This is done by creating a named shared memory region, unlinking it and setting up a private (i.e. copy-on-write) mapping of that instead of a regular anonymous mapping. I've experimented with regular (sparse) files, but they can not be scaled to the size of MSan shadow mapping, at least on Linux/X86_64 and ext3 fs. Controlled by a common flag, decorate_proc_maps, disabled by default. This patch has a few shortcomings: * not all mappings are annotated, especially in TSan. * our handling of memset() of shadow via mmap() puts small anonymous mappings inside larger named mappings, which looks ugly and can, in theory, hit the mapping number limit. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_internal.h')
-rw-r--r--lib/asan/asan_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asan/asan_internal.h b/lib/asan/asan_internal.h
index 394e46063..107e16ee3 100644
--- a/lib/asan/asan_internal.h
+++ b/lib/asan/asan_internal.h
@@ -93,7 +93,7 @@ void AppendToErrorMessageBuffer(const char *buffer);
void *AsanDlSymNext(const char *sym);
-void ReserveShadowMemoryRange(uptr beg, uptr end);
+void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name);
// Platform-specific options.
#if SANITIZER_MAC