#include "rtsan/rtsan.h"
#include "rtsan/rtsan_assertions.h"
#include "rtsan/rtsan_diagnostics.h"
#include "rtsan/rtsan_flags.h"
#include "rtsan/rtsan_interceptors.h"
#include "rtsan/rtsan_stats.h"
#include "sanitizer_common/sanitizer_atomic.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_mutex.h"
#include "sanitizer_common/sanitizer_stackdepot.h"
#include "sanitizer_common/sanitizer_stacktrace.h"
usingnamespace__rtsan;
usingnamespace__sanitizer;
namespace {
enum class InitializationState : u8 { … };
}
static StaticSpinMutex rtsan_inited_mutex;
static atomic_uint8_t rtsan_initialized = …;
static void SetInitializationState(InitializationState state) { … }
static InitializationState GetInitializationState() { … }
static auto OnViolationAction(DiagnosticsInfo info) { … }
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_init() { … }
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_ensure_initialized() { … }
SANITIZER_INTERFACE_ATTRIBUTE bool __rtsan_is_initialized() { … }
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_realtime_enter() { … }
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_realtime_exit() { … }
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_disable() { … }
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_enable() { … }
SANITIZER_INTERFACE_ATTRIBUTE void
__rtsan_notify_intercepted_call(const char *func_name) { … }
SANITIZER_INTERFACE_ATTRIBUTE void
__rtsan_notify_blocking_call(const char *func_name) { … }
}