diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp index e3eb02466231..e691c7bdec97 100644 --- a/memory/mozalloc/mozalloc_abort.cpp +++ b/memory/mozalloc/mozalloc_abort.cpp @@ -55,7 +55,7 @@ void fillAbortMessage(char (&msg)[N], uintptr_t retAddress) { } #endif -#if defined(XP_UNIX) && !defined(MOZ_ASAN) +#if defined(XP_UNIX) && !defined(MOZ_ASAN) && !defined(MOZ_TSAN) // Define abort() here, so that it is used instead of the system abort(). This // lets us control the behavior when aborting, in order to get better results // on *NIX platforms. See mozalloc_abort for details. @@ -68,6 +68,9 @@ void fillAbortMessage(char (&msg)[N], uintptr_t retAddress) { // // That segmentation fault will be interpreted as another bug by ASan and as a // result, ASan will just exit(1) instead of aborting. +// +// The same applies to ThreadSanitizer when run with "halt_on_error=1" in +// combination with "abort_on_error=1". extern "C" void abort(void) { # ifdef MOZ_WIDGET_ANDROID char msg[64] = {};