69#define ASAN_SHADOW_SHIFT 3
70#define ASAN_SHADOW_GRANULARITY (1UL << ASAN_SHADOW_SHIFT)
74#define ASAN_RED_ZONE_SIZE 32
79#define ASAN_MIN_RED_ZONE_SIZE 16
87#define ASAN_STACK_MAGIC_LEFT 0xf1
88#define ASAN_STACK_MAGIC_MIDDLE 0xf2
89#define ASAN_STACK_MAGIC_RIGHT 0xf3
90#define ASAN_STACK_MAGIC_USE_AFTER_RET 0xf5
91#define ASAN_STACK_MAGIC_USE_AFTER_SCOPE 0xf8
93#define ASAN_STACK_FRAME_MAGIC 0x41b58ab3
94#define ASAN_STACK_RETIRED_MAGIC 0x45e0360e
96#define ASAN_USE_AFTER_SCOPE_ATTRIBUTE "use after scope memory"
103#define HWASAN_TAG_SIZE targetm.memtag.tag_size ()
111#define HWASAN_TAG_GRANULE_SIZE targetm.memtag.granule_size ()
116#define HWASAN_STACK_BACKGROUND gen_int_mode (0, QImode)
128#define IFN_ASAN_MARK_FLAGS DEF(POISON), DEF(UNPOISON)
132#define DEF(X) ASAN_MARK_##X
160 else if (size <= 128)
162 else if (size <= 512)
164 else if (size <= 4096)
245 if (result_flags == 0)
void asan_finish_file(void)
Definition asan.cc:3640
void hwasan_record_frame_init()
Definition asan.cc:4540
rtx_insn * hwasan_emit_untag_frame(rtx, rtx)
Definition asan.cc:4642
rtx_insn * asan_emit_allocas_unpoison(rtx, rtx, rtx_insn *)
Definition asan.cc:2230
void hwasan_maybe_emit_frame_base_init(void)
Definition asan.cc:4438
bool gate_hwasan(void)
Definition asan.cc:4852
bool hwasan_expand_mark_ifn(gimple_stmt_iterator *)
Definition asan.cc:4846
rtx_insn * asan_emit_stack_protection(rtx, rtx, unsigned int, HOST_WIDE_INT *, tree *, int)
Definition asan.cc:1848
bool asan_intercepted_p(enum built_in_function fcode)
Definition asan.h:186
bool asan_protect_stack_decl(tree decl)
Definition asan.h:231
bool asan_expand_check_ifn(gimple_stmt_iterator *, bool)
Definition asan.cc:3897
gimple_stmt_iterator create_cond_insert_point(gimple_stmt_iterator *, bool, bool, bool, basic_block *, basic_block *)
Definition asan.cc:2450
tree asan_dynamic_init_call(bool)
Definition asan.cc:3172
hash_set< tree > * asan_used_labels
Definition asan.cc:260
bool sanitize_coverage_p(const_tree fn=current_function_decl)
Definition asan.h:261
rtx asan_memfn_rtl(tree)
Definition asan.cc:398
#define IFN_ASAN_MARK_FLAGS
Definition asan.h:128
bool hwasan_sanitize_p(void)
Definition asan.cc:1794
rtx hwasan_truncate_to_tag_size(rtx, rtx)
Definition asan.cc:4707
bool asan_sanitize_use_after_scope(void)
Definition asan.h:222
#define ASAN_RED_ZONE_SIZE
Definition asan.h:74
bool asan_protect_global(tree, bool ignore_decl_rtl_set_p=false)
Definition asan.cc:2273
bool asan_sanitize_allocas_p(void)
Definition asan.cc:370
void set_sanitized_sections(const char *)
Definition asan.cc:338
asan_mark_flags
Definition asan.h:131
bool stack_vars_base_reg_p(rtx)
Definition asan.cc:4420
unsigned HOST_WIDE_INT asan_var_and_redzone_size(unsigned HOST_WIDE_INT size)
Definition asan.h:154
alias_set_type asan_shadow_set
Definition asan.cc:467
void hwasan_finish_file(void)
Definition asan.cc:4686
bool asan_expand_mark_ifn(gimple_stmt_iterator *)
Definition asan.cc:3783
bool asan_expand_poison_ifn(gimple_stmt_iterator *, bool *, hash_map< tree, tree > &)
Definition asan.cc:4133
void hwasan_increment_frame_tag()
Definition asan.cc:4492
void asan_function_start(void)
Definition asan.cc:1487
bool set_asan_shadow_offset(const char *)
Definition asan.cc:317
asan_check_flags
Definition asan.h:120
@ ASAN_CHECK_NON_ZERO_LEN
Definition asan.h:123
@ ASAN_CHECK_LAST
Definition asan.h:124
@ ASAN_CHECK_SCALAR_ACCESS
Definition asan.h:122
@ ASAN_CHECK_STORE
Definition asan.h:121
bool asan_mark_p(gimple *stmt, enum asan_mark_flags flag)
Definition asan.cc:357
bool hwasan_expand_check_ifn(gimple_stmt_iterator *, bool)
Definition asan.cc:4760
rtx hwasan_get_frame_extent()
Definition asan.cc:4481
rtx hwasan_frame_base()
Definition asan.cc:4398
bool asan_shadow_offset_set_p()
Definition asan.cc:462
bool asan_sanitize_stack_p(void)
Definition asan.cc:364
void initialize_sanitizer_builtins(void)
Definition asan.cc:3420
bool sanitize_flags_p(unsigned int flag, const_tree fn=current_function_decl)
Definition asan.h:242
bool hwasan_sanitize_allocas_p(void)
Definition asan.cc:1808
void hwasan_record_stack_var(rtx, rtx, poly_int64, poly_int64)
Definition asan.cc:4461
uint8_t hwasan_current_frame_tag()
Definition asan.cc:4386
unsigned int asan_red_zone_size(unsigned int size)
Definition asan.h:144
hash_set< tree > * asan_handled_variables
Definition asan.cc:258
bool hwasan_sanitize_stack_p(void)
Definition asan.cc:1801
void hwasan_emit_prologue()
Definition asan.cc:4580
tree lookup_attribute(const char *attr_name, tree list)
Definition attribs.h:223
const union tree_node * const_tree
Definition coretypes.h:98
union tree_node * tree
Definition coretypes.h:97
int alias_set_type
Definition coretypes.h:339
built_in_function
Definition genmatch.cc:354
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
Definition basic-block.h:117
Definition genautomata.cc:499
Definition gimple-iterator.h:26
tree current_function_decl
Definition toplev.cc:124
#define TREE_VALUE(NODE)
Definition tree.h:1210
#define DECL_ATTRIBUTES(NODE)
Definition tree.h:2763
#define DECL_ARTIFICIAL(NODE)
Definition tree.h:2889
#define TREE_ADDRESSABLE(NODE)
Definition tree.h:744
#define NULL_TREE
Definition tree.h:317
#define DECL_P(NODE)
Definition tree.h:231