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 "sanitizer_common/sanitizer_common.h"
18 namespace __sanitizer {
20 bool AddDieCallback(DieCallbackType callback) { return true; }
22 bool RemoveDieCallback(DieCallbackType callback) { return true; }
24 void SetUserDieCallback(DieCallbackType callback) {}
27 if (common_flags()->abort_on_error)
29 internal__exit(common_flags()->exitcode);
32 void SetCheckFailedCallback(CheckFailedCallbackType callback) {}
34 void NORETURN CheckFailed(const char *file, int line, const char *cond,
36 Report("Sanitizer CHECK failed: %s:%d %s (%lld, %lld)\n", file, line, cond,
41 } // namespace __sanitizer