From 2ef0c30d2101ca6521b7ecbdd17e4fbcca09a951 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 7 Jul 2014 17:39:31 +0000 Subject: Generalize sanitizer allocator public interface. Introduce new public header 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 --- lib/msan/msan.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/msan/msan.h') diff --git a/lib/msan/msan.h b/lib/msan/msan.h index f8b79a7d1..05a8c476b 100644 --- a/lib/msan/msan.h +++ b/lib/msan/msan.h @@ -141,8 +141,10 @@ void MsanTSDDtor(void *tsd); } // namespace __msan #define MSAN_MALLOC_HOOK(ptr, size) \ - if (&__msan_malloc_hook) __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 (&__msan_free_hook) __msan_free_hook(ptr); \ + if (&__sanitizer_free_hook) __sanitizer_free_hook(ptr) #endif // MSAN_H -- cgit v1.2.3