diff options
| -rw-r--r-- | compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc b/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc index 5a5675c983f..f25a75a863c 100644 --- a/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc +++ b/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc @@ -61,6 +61,19 @@ static void abort_with_message(const char *msg) {  static void abort_with_message(const char *) { abort(); }  #endif +#if SANITIZER_DEBUG +namespace __sanitizer { +// The DCHECK macro needs this symbol to be defined. +void NORETURN CheckFailed(const char *file, int, const char *cond, u64, u64) { +  message("Sanitizer CHECK failed: "); +  message(file); +  message(":?? : "); // FIXME: Show line number. +  message(cond); +  abort(); +} +} // namespace __sanitizer +#endif +  #define INTERFACE extern "C" __attribute__((visibility("default")))  // FIXME: add caller pc to the error message (possibly as "ubsan: error-type  | 

