diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-07-07 17:39:31 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-07-07 17:39:31 +0000 |
commit | 2ef0c30d2101ca6521b7ecbdd17e4fbcca09a951 (patch) | |
tree | 362337877acfa4824664514a5a3b54216bc670c1 /lib/msan/msan_interface_internal.h | |
parent | 58dd99ec88cc51a5a1adcd4eddff212576a9067c (diff) |
Generalize sanitizer allocator public interface.
Introduce new public header <sanitizer/allocator_interface.h> and a set
of functions __sanitizer_get_ownership(), __sanitizer_malloc_hook() etc.
that will eventually replace their tool-specific equivalents
(__asan_get_ownership(), __msan_get_ownership() etc.). Tool-specific
functions are now deprecated and implemented as stubs redirecting
to __sanitizer_ versions (which are implemented differently in each tool).
Replace all uses of __xsan_ versions with __sanitizer_ versions in unit
and lit tests.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_interface_internal.h')
-rw-r--r-- | lib/msan/msan_interface_internal.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/msan/msan_interface_internal.h b/lib/msan/msan_interface_internal.h index c005c2a36..47b47dc4b 100644 --- a/lib/msan/msan_interface_internal.h +++ b/lib/msan/msan_interface_internal.h @@ -161,32 +161,27 @@ void __sanitizer_unaligned_store32(uu32 *p, u32 x); SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_unaligned_store64(uu64 *p, u64 x); +// --------------------------- +// FIXME: Replace these functions with __sanitizer equivalent. SANITIZER_INTERFACE_ATTRIBUTE uptr __msan_get_estimated_allocated_size(uptr size); - SANITIZER_INTERFACE_ATTRIBUTE int __msan_get_ownership(const void *p); - SANITIZER_INTERFACE_ATTRIBUTE uptr __msan_get_allocated_size(const void *p); - SANITIZER_INTERFACE_ATTRIBUTE uptr __msan_get_current_allocated_bytes(); - SANITIZER_INTERFACE_ATTRIBUTE uptr __msan_get_heap_size(); - SANITIZER_INTERFACE_ATTRIBUTE uptr __msan_get_free_bytes(); - SANITIZER_INTERFACE_ATTRIBUTE uptr __msan_get_unmapped_bytes(); - SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE /* OPTIONAL */ void __msan_malloc_hook(void *ptr, uptr size); - SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE /* OPTIONAL */ void __msan_free_hook(void *ptr); +// --------------------------- SANITIZER_INTERFACE_ATTRIBUTE void __msan_dr_is_initialized(); |