#include "sanitizer_common.h"
#include "sanitizer_libc.h"
namespace __sanitizer {
static const int kMaxNumOfInternalDieCallbacks = …;
static DieCallbackType InternalDieCallbacks[kMaxNumOfInternalDieCallbacks];
bool AddDieCallback(DieCallbackType callback) { … }
bool RemoveDieCallback(DieCallbackType callback) { … }
static DieCallbackType UserDieCallback;
void SetUserDieCallback(DieCallbackType callback) { … }
void NORETURN Die() { … }
static void (*CheckUnwindCallback)();
void SetCheckUnwindCallback(void (*callback)()) { … }
void NORETURN CheckFailed(const char *file, int line, const char *cond,
u64 v1, u64 v2) { … }
}
usingnamespace__sanitizer;
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_set_death_callback(void (*callback)(void)) { … }
}