Commit 4cbcb23e authored by Christian Holler's avatar Christian Holler
Browse files

Bug 1587066 - Use native abort() for ThreadSanitizer. r=jseward

Differential Revision: https://phabricator.services.mozilla.com/D48532

--HG--
extra : moz-landing-system : lando
parent 665bdb85
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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] = {};