summaryrefslogtreecommitdiff
path: root/lib/msan/msan.h
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-07-07 17:39:31 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-07-07 17:39:31 +0000
commit2ef0c30d2101ca6521b7ecbdd17e4fbcca09a951 (patch)
tree362337877acfa4824664514a5a3b54216bc670c1 /lib/msan/msan.h
parent58dd99ec88cc51a5a1adcd4eddff212576a9067c (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.h')
-rw-r--r--lib/msan/msan.h6
1 files changed, 4 insertions, 2 deletions
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