summaryrefslogtreecommitdiff
path: root/lib/msan
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-08-12 20:28:20 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-08-12 20:28:20 +0000
commit2ec75e88aa57ba5e49fc60ee7b137f40b81a2888 (patch)
treeacb085d3e4356920eda7c62f9a84c5990982278b /lib/msan
parentb8778f5427609e9f75a58f1c56f7533851ca0292 (diff)
[Sanitizer] Kill deprecated allocator interfaces in ASan, MSan and TSan in favor of
a unified interface in <sanitizer/allocator_interface.h>. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan')
-rw-r--r--lib/msan/msan.h2
-rw-r--r--lib/msan/msan_allocator.cc21
-rw-r--r--lib/msan/msan_interface_internal.h22
3 files changed, 0 insertions, 45 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h
index 05a8c476b..7bdb6a57c 100644
--- a/lib/msan/msan.h
+++ b/lib/msan/msan.h
@@ -141,10 +141,8 @@ void MsanTSDDtor(void *tsd);
} // namespace __msan
#define MSAN_MALLOC_HOOK(ptr, size) \
- if (&__msan_malloc_hook) __msan_malloc_hook(ptr, size); \
if (&__sanitizer_malloc_hook) __sanitizer_malloc_hook(ptr, size)
#define MSAN_FREE_HOOK(ptr) \
- if (&__msan_free_hook) __msan_free_hook(ptr); \
if (&__sanitizer_free_hook) __sanitizer_free_hook(ptr)
#endif // MSAN_H
diff --git a/lib/msan/msan_allocator.cc b/lib/msan/msan_allocator.cc
index fb1788f2a..69492970d 100644
--- a/lib/msan/msan_allocator.cc
+++ b/lib/msan/msan_allocator.cc
@@ -188,40 +188,19 @@ uptr __sanitizer_get_current_allocated_bytes() {
allocator.GetStats(stats);
return stats[AllocatorStatAllocated];
}
-uptr __msan_get_current_allocated_bytes() {
- return __sanitizer_get_current_allocated_bytes();
-}
uptr __sanitizer_get_heap_size() {
uptr stats[AllocatorStatCount];
allocator.GetStats(stats);
return stats[AllocatorStatMapped];
}
-uptr __msan_get_heap_size() {
- return __sanitizer_get_heap_size();
-}
uptr __sanitizer_get_free_bytes() { return 1; }
-uptr __msan_get_free_bytes() {
- return __sanitizer_get_free_bytes();
-}
uptr __sanitizer_get_unmapped_bytes() { return 1; }
-uptr __msan_get_unmapped_bytes() {
- return __sanitizer_get_unmapped_bytes();
-}
uptr __sanitizer_get_estimated_allocated_size(uptr size) { return size; }
-uptr __msan_get_estimated_allocated_size(uptr size) {
- return __sanitizer_get_estimated_allocated_size(size);
-}
int __sanitizer_get_ownership(const void *p) { return AllocationSize(p) != 0; }
-int __msan_get_ownership(const void *p) {
- return __sanitizer_get_ownership(p);
-}
uptr __sanitizer_get_allocated_size(const void *p) { return AllocationSize(p); }
-uptr __msan_get_allocated_size(const void *p) {
- return __sanitizer_get_allocated_size(p);
-}
diff --git a/lib/msan/msan_interface_internal.h b/lib/msan/msan_interface_internal.h
index 47b47dc4b..21bfbc986 100644
--- a/lib/msan/msan_interface_internal.h
+++ b/lib/msan/msan_interface_internal.h
@@ -161,28 +161,6 @@ 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();