Author: Dan Albert Date: 2022-08-10T01:35:24Z New Revision: cd3c173222711ec43e7fc658e32e5f0864da87d1
URL: https://github.com/llvm/llvm-project/commit/cd3c173222711ec43e7fc658e32e5f0864da87d1 DIFF: https://github.com/llvm/llvm-project/commit/cd3c173222711ec43e7fc658e32e5f0864da87d1.diff LOG: DO NOT SUBMIT: Foribly enable sanitizer logging. Bug: None Test: None Change-Id: I2cf9d46d17ce50596fa4868e1ec5da46b8f51c23 Added: Modified: compiler-rt/lib/sanitizer_common/sanitizer_common.h compiler-rt/lib/sanitizer_common/sanitizer_file.cpp compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp Removed: ################################################################################ diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h index 899fc0bb6960..66286574568f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h @@ -226,14 +226,8 @@ void RemoveANSIEscapeSequencesFromString(char *buffer); void Printf(const char *format, ...) FORMAT(1, 2); void Report(const char *format, ...) FORMAT(1, 2); void SetPrintfAndReportCallback(void (*callback)(const char *)); -#define VReport(level, ...) \ - do { \ - if ((uptr)Verbosity() >= (level)) Report(__VA_ARGS__); \ - } while (0) -#define VPrintf(level, ...) \ - do { \ - if ((uptr)Verbosity() >= (level)) Printf(__VA_ARGS__); \ - } while (0) +#define VReport(level, ...) Report(__VA_ARGS__); +#define VPrintf(level, ...) Printf(__VA_ARGS__); // Lock sanitizer error reporting and protects against nested errors. class ScopedErrorReportLock { diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp index 7ef499ce07b1..e35e364397d8 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp @@ -13,6 +13,8 @@ // //===---------------------------------------------------------------------===// +#include <unistd.h> + #include "sanitizer_platform.h" #if !SANITIZER_FUCHSIA diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp index 6a54734353c5..d09a3bfcde07 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp @@ -11,6 +11,8 @@ /// //===----------------------------------------------------------------------===// +#include <stdlib.h> + #include "sanitizer_common.h" #include "sanitizer_libc.h" @@ -48,6 +50,7 @@ void SetUserDieCallback(DieCallbackType callback) { } void NORETURN Die() { + abort(); if (UserDieCallback) UserDieCallback(); for (int i = kMaxNumOfInternalDieCallbacks - 1; i >= 0; i--) { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits