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/asan/asan_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/asan/asan_interface_internal.h')
-rw-r--r-- | lib/asan/asan_interface_internal.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/asan/asan_interface_internal.h b/lib/asan/asan_interface_internal.h index 6d95ad819..939534170 100644 --- a/lib/asan/asan_interface_internal.h +++ b/lib/asan/asan_interface_internal.h @@ -110,24 +110,26 @@ extern "C" { SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE /* OPTIONAL */ void __asan_on_error(); + // --------------------------- + // FIXME: Replace these functions with __sanitizer equivalent. SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_estimated_allocated_size(uptr size); - SANITIZER_INTERFACE_ATTRIBUTE int __asan_get_ownership(const void *p); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_allocated_size(const void *p); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_current_allocated_bytes(); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_heap_size(); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_free_bytes(); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_unmapped_bytes(); - SANITIZER_INTERFACE_ATTRIBUTE void __asan_print_accumulated_stats(); - - SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE - /* OPTIONAL */ const char* __asan_default_options(); - SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE /* OPTIONAL */ void __asan_malloc_hook(void *ptr, uptr size); SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE /* OPTIONAL */ void __asan_free_hook(void *ptr); + // --------------------------- + + SANITIZER_INTERFACE_ATTRIBUTE void __asan_print_accumulated_stats(); + + SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE + /* OPTIONAL */ const char* __asan_default_options(); // Global flag, copy of ASAN_OPTIONS=detect_stack_use_after_return SANITIZER_INTERFACE_ATTRIBUTE |