#include "asan_poisoning.h"
#include "asan_report.h"
#include "asan_stack.h"
#include "sanitizer_common/sanitizer_atomic.h"
#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_interface_internal.h"
#include "sanitizer_common/sanitizer_libc.h"
namespace __asan {
static atomic_uint8_t can_poison_memory;
void SetCanPoisonMemory(bool value) { … }
bool CanPoisonMemory() { … }
void PoisonShadow(uptr addr, uptr size, u8 value) { … }
void PoisonShadowPartialRightRedzone(uptr addr,
uptr size,
uptr redzone_size,
u8 value) { … }
struct ShadowSegmentEndpoint { … };
void AsanPoisonOrUnpoisonIntraObjectRedzone(uptr ptr, uptr size, bool poison) { … }
}
usingnamespace__asan;
void __asan_poison_memory_region(void const volatile *addr, uptr size) { … }
void __asan_unpoison_memory_region(void const volatile *addr, uptr size) { … }
int __asan_address_is_poisoned(void const volatile *addr) { … }
uptr __asan_region_is_poisoned(uptr beg, uptr size) { … }
#define CHECK_SMALL_REGION(p, size, isWrite) …
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
u16 __sanitizer_unaligned_load16(const uu16 *p) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
u32 __sanitizer_unaligned_load32(const uu32 *p) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
u64 __sanitizer_unaligned_load64(const uu64 *p) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_unaligned_store16(uu16 *p, u16 x) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_unaligned_store32(uu32 *p, u32 x) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_unaligned_store64(uu64 *p, u64 x) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __asan_poison_cxx_array_cookie(uptr p) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
uptr __asan_load_cxx_array_cookie(uptr *p) { … }
static void PoisonAlignedStackMemory(uptr addr, uptr size, bool do_poison) { … }
void __asan_set_shadow_00(uptr addr, uptr size) { … }
void __asan_set_shadow_01(uptr addr, uptr size) { … }
void __asan_set_shadow_02(uptr addr, uptr size) { … }
void __asan_set_shadow_03(uptr addr, uptr size) { … }
void __asan_set_shadow_04(uptr addr, uptr size) { … }
void __asan_set_shadow_05(uptr addr, uptr size) { … }
void __asan_set_shadow_06(uptr addr, uptr size) { … }
void __asan_set_shadow_07(uptr addr, uptr size) { … }
void __asan_set_shadow_f1(uptr addr, uptr size) { … }
void __asan_set_shadow_f2(uptr addr, uptr size) { … }
void __asan_set_shadow_f3(uptr addr, uptr size) { … }
void __asan_set_shadow_f5(uptr addr, uptr size) { … }
void __asan_set_shadow_f8(uptr addr, uptr size) { … }
void __asan_poison_stack_memory(uptr addr, uptr size) { … }
void __asan_unpoison_stack_memory(uptr addr, uptr size) { … }
static void FixUnalignedStorage(uptr storage_beg, uptr storage_end,
uptr &old_beg, uptr &old_end, uptr &new_beg,
uptr &new_end) { … }
void __sanitizer_annotate_contiguous_container(const void *beg_p,
const void *end_p,
const void *old_mid_p,
const void *new_mid_p) { … }
void __sanitizer_annotate_double_ended_contiguous_container(
const void *storage_beg_p, const void *storage_end_p,
const void *old_container_beg_p, const void *old_container_end_p,
const void *new_container_beg_p, const void *new_container_end_p) { … }
static const void *FindBadAddress(uptr begin, uptr end, bool poisoned) { … }
const void *__sanitizer_contiguous_container_find_bad_address(
const void *beg_p, const void *mid_p, const void *end_p) { … }
int __sanitizer_verify_contiguous_container(const void *beg_p,
const void *mid_p,
const void *end_p) { … }
const void *__sanitizer_double_ended_contiguous_container_find_bad_address(
const void *storage_beg_p, const void *container_beg_p,
const void *container_end_p, const void *storage_end_p) { … }
int __sanitizer_verify_double_ended_contiguous_container(
const void *storage_beg_p, const void *container_beg_p,
const void *container_end_p, const void *storage_end_p) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __asan_poison_intra_object_redzone(uptr ptr, uptr size) { … }
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __asan_unpoison_intra_object_redzone(uptr ptr, uptr size) { … }
namespace __lsan {
bool WordIsPoisoned(uptr addr) { … }
}