#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/stack_canary_linux.h"
#include <dlfcn.h>
#include <stdint.h>
#include <sys/mman.h>
#include "base/bits.h"
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/memory/page_size.h"
#include "base/rand_util.h"
#include "build/build_config.h"
namespace base {
#if defined(LIBC_GLIBC)
#if defined(ARCH_CPU_ARM_FAMILY)
extern "C" {
extern uintptr_t __stack_chk_guard;
}
#endif
#if !defined(NDEBUG)
static bool g_emit_debug_message = …;
extern "C" {
GLibcStackChkFailFunction;
__attribute__((visibility("default"), noinline, noreturn)) void
__stack_chk_fail() { … }
}
#endif
void NO_STACK_PROTECTOR ResetStackCanaryIfPossible() { … }
void SetStackSmashingEmitsDebugMessage() { … }
#else
void ResetStackCanaryIfPossible() {}
void SetStackSmashingEmitsDebugMessage() {}
#endif
}