Bug 751195 - Mark GC function unsafe for AddressSanitizer, r=billm

This commit is contained in:
Christian Holler 2012-05-05 02:08:32 -04:00
parent 02f1f0ccb2
commit 83eee27c9f
2 changed files with 14 additions and 3 deletions

View File

@ -1085,9 +1085,7 @@ MarkWordConservatively(JSTracer *trc, uintptr_t w)
MarkIfGCThingWord(trc, w);
}
#ifdef MOZ_ASAN
JS_NEVER_INLINE
#endif
MOZ_ASAN_BLACKLIST
static void
MarkRangeConservatively(JSTracer *trc, const uintptr_t *begin, const uintptr_t *end)
{

View File

@ -180,6 +180,19 @@
# define MOZ_NORETURN /* no support */
#endif
/*
* MOZ_ASAN_BLACKLIST is a macro to tell AddressSanitizer (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 AddressSanitizer.
*/
#if defined(MOZ_ASAN)
# define MOZ_ASAN_BLACKLIST MOZ_NEVER_INLINE __attribute__((no_address_safety_analysis))
# else
# define MOZ_ASAN_BLACKLIST
#endif
#ifdef __cplusplus
/*