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); MarkIfGCThingWord(trc, w);
} }
#ifdef MOZ_ASAN MOZ_ASAN_BLACKLIST
JS_NEVER_INLINE
#endif
static void static void
MarkRangeConservatively(JSTracer *trc, const uintptr_t *begin, const uintptr_t *end) MarkRangeConservatively(JSTracer *trc, const uintptr_t *begin, const uintptr_t *end)
{ {

View File

@ -180,6 +180,19 @@
# define MOZ_NORETURN /* no support */ # define MOZ_NORETURN /* no support */
#endif #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 #ifdef __cplusplus
/* /*