#include "sanitizer_allocator.h"
#include "sanitizer_allocator_interface.h"
#include "sanitizer_common.h"
#include "sanitizer_flags.h"
#include "sanitizer_interface_internal.h"
#include "sanitizer_procmaps.h"
#include "sanitizer_stackdepot.h"
namespace __sanitizer {
#if (SANITIZER_LINUX || SANITIZER_NETBSD) && !SANITIZER_GO
SANITIZER_WEAK_ATTRIBUTE StackDepotStats StackDepotGetStats() { … }
void *BackgroundThread(void *arg) { … }
void MaybeStartBackgroudThread() { … }
# if !SANITIZER_START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
# ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wglobal-constructors"
# endif
static struct BackgroudThreadStarted { … } background_thread_strarter UNUSED;
# ifdef __clang__
# pragma clang diagnostic pop
# endif
# endif
#else
void MaybeStartBackgroudThread() {}
#endif
void WriteToSyslog(const char *msg) { … }
static void (*sandboxing_callback)();
void SetSandboxingCallback(void (*f)()) { … }
uptr ReservedAddressRange::InitAligned(uptr size, uptr align,
const char *name) { … }
#if !SANITIZER_FUCHSIA
void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name,
bool madvise_shadow) { … }
void ProtectGap(uptr addr, uptr size, uptr zero_base_shadow_start,
uptr zero_base_max_shadow_start) { … }
#endif
#if !SANITIZER_WINDOWS && !SANITIZER_GO
SANITIZER_WEAK_ATTRIBUTE void StackDepotStopBackgroundThread() { … }
static void StopStackDepotBackgroundThread() { … }
#else
static void StopStackDepotBackgroundThread() {}
#endif
}
SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_sandbox_on_notify,
__sanitizer_sandbox_arguments *args) { … }