forked from mirrors/gecko-dev
Bug 1657857 - Call native abort in UBSan builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D86334
This commit is contained in:
parent
cbcdeefeb3
commit
d157c468a9
1 changed files with 5 additions and 1 deletions
|
|
@ -55,7 +55,8 @@ void fillAbortMessage(char (&msg)[N], uintptr_t retAddress) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(XP_UNIX) && !defined(MOZ_ASAN) && !defined(MOZ_TSAN)
|
#if defined(XP_UNIX) && !defined(MOZ_ASAN) && !defined(MOZ_TSAN) && \
|
||||||
|
!defined(LIBFUZZER)
|
||||||
// Define abort() here, so that it is used instead of the system abort(). This
|
// 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
|
// lets us control the behavior when aborting, in order to get better results
|
||||||
// on *NIX platforms. See mozalloc_abort for details.
|
// on *NIX platforms. See mozalloc_abort for details.
|
||||||
|
|
@ -71,6 +72,9 @@ void fillAbortMessage(char (&msg)[N], uintptr_t retAddress) {
|
||||||
//
|
//
|
||||||
// The same applies to ThreadSanitizer when run with "halt_on_error=1" in
|
// The same applies to ThreadSanitizer when run with "halt_on_error=1" in
|
||||||
// combination with "abort_on_error=1".
|
// combination with "abort_on_error=1".
|
||||||
|
//
|
||||||
|
// When building with libFuzzer, it pulls in the UndefinedBehaviorSanitizer
|
||||||
|
// runtime which also requires the same workaround as with ASan or TSan.
|
||||||
extern "C" void abort(void) {
|
extern "C" void abort(void) {
|
||||||
# ifdef MOZ_WIDGET_ANDROID
|
# ifdef MOZ_WIDGET_ANDROID
|
||||||
char msg[64] = {};
|
char msg[64] = {};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue