1 //===-- scudo_termination.cpp -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 /// This file contains bare-bones termination functions to replace the
11 /// __sanitizer ones, in order to avoid any potential abuse of the callbacks
14 //===----------------------------------------------------------------------===//
16 #include "scudo_utils.h"
18 #include "sanitizer_common/sanitizer_common.h"
20 namespace __sanitizer {
22 bool AddDieCallback(DieCallbackType Callback) { return true; }
24 bool RemoveDieCallback(DieCallbackType Callback) { return true; }
26 void SetUserDieCallback(DieCallbackType Callback) {}
29 if (common_flags()->abort_on_error)
31 internal__exit(common_flags()->exitcode);
34 void SetCheckFailedCallback(CheckFailedCallbackType callback) {}
36 void NORETURN CheckFailed(const char *File, int Line, const char *Condition,
37 u64 Value1, u64 Value2) {
38 __scudo::dieWithMessage("CHECK failed at %s:%d %s (%lld, %lld)\n",
39 File, Line, Condition, Value1, Value2);
42 } // namespace __sanitizer