Bug 847350 - Add/Update MOZ_ASAN/TSAN_BLACKLIST macros. r=waldo

--HG--
extra : rebase_source : c4c58d30ff0b46ca57093cc0b3bbc37af56f2095
This commit is contained in:
Christian Holler 2013-10-17 16:29:11 +02:00
Родитель 44499419fe
Коммит 6f7607f758
1 изменённых файлов: 23 добавлений и 4 удалений

Просмотреть файл

@ -170,12 +170,31 @@
* Furthermore, it will prevent the compiler from inlining the function because
* inlining currently breaks the blacklisting mechanism of AddressSanitizer.
*/
#if defined(MOZ_ASAN)
# define MOZ_ASAN_BLACKLIST MOZ_NEVER_INLINE __attribute__((no_address_safety_analysis))
# else
# define MOZ_ASAN_BLACKLIST
#if defined(__has_feature)
# if __has_feature(address_sanitizer)
# define MOZ_ASAN_BLACKLIST MOZ_NEVER_INLINE __attribute__((no_sanitize_address))
# else
# define MOZ_ASAN_BLACKLIST /* nothing */
# endif
#else
# define MOZ_ASAN_BLACKLIST /* nothing */
#endif
/*
* MOZ_TSAN_BLACKLIST is a macro to tell ThreadSanitizer (a compile-time
* instrumentation shipped with Clang) to not instrument the annotated function.
* Furthermore, it will prevent the compiler from inlining the function because
* inlining currently breaks the blacklisting mechanism of ThreadSanitizer.
*/
#if defined(__has_feature)
# if __has_feature(thread_sanitizer)
# define MOZ_TSAN_BLACKLIST MOZ_NEVER_INLINE __attribute__((no_sanitize_thread))
# else
# define MOZ_TSAN_BLACKLIST /* nothing */
# endif
#else
# define MOZ_TSAN_BLACKLIST /* nothing */
#endif
#ifdef __cplusplus