diff options
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -309,13 +309,13 @@ asan_mark_p (gimple *stmt, enum asan_mark_flags flag) bool asan_sanitize_stack_p (void) { - return (sanitize_flags_p (SANITIZE_ADDRESS) && ASAN_STACK); + return (sanitize_flags_p (SANITIZE_ADDRESS) && param_asan_stack); } bool asan_sanitize_allocas_p (void) { - return (asan_sanitize_stack_p () && ASAN_PROTECT_ALLOCAS); + return (asan_sanitize_stack_p () && param_asan_protect_allocas); } /* Checks whether section SEC should be sanitized. */ @@ -1429,7 +1429,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, /* Emit the prologue sequence. */ if (asan_frame_size > 32 && asan_frame_size <= 65536 && pbase - && ASAN_USE_AFTER_RETURN) + && param_asan_use_after_return) { use_after_return_class = floor_log2 (asan_frame_size - 1) - 5; /* __asan_stack_malloc_N guarantees alignment @@ -1750,7 +1750,7 @@ is_odr_indicator (tree decl) bool asan_protect_global (tree decl, bool ignore_decl_rtl_set_p) { - if (!ASAN_GLOBALS) + if (!param_asan_globals) return false; rtx rtl, symbol; @@ -2190,9 +2190,9 @@ static void instrument_derefs (gimple_stmt_iterator *iter, tree t, location_t location, bool is_store) { - if (is_store && !ASAN_INSTRUMENT_WRITES) + if (is_store && !param_asan_instrument_writes) return; - if (!is_store && !ASAN_INSTRUMENT_READS) + if (!is_store && !param_asan_instrument_reads) return; tree type, base; @@ -2253,7 +2253,7 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t, { if (DECL_THREAD_LOCAL_P (inner)) return; - if (!ASAN_GLOBALS && is_global_var (inner)) + if (!param_asan_globals && is_global_var (inner)) return; if (!TREE_STATIC (inner)) { @@ -2346,7 +2346,7 @@ instrument_mem_region_access (tree base, tree len, static bool instrument_builtin_call (gimple_stmt_iterator *iter) { - if (!ASAN_MEMINTRIN) + if (!param_asan_memintrin) return false; bool iter_advanced_p = false; @@ -3219,7 +3219,8 @@ asan_expand_mark_ifn (gimple_stmt_iterator *iter) tree base_addr = gimple_assign_lhs (g); /* Generate direct emission if size_in_bytes is small. */ - if (size_in_bytes <= ASAN_PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD) + if (size_in_bytes + <= (unsigned)param_use_after_scope_direct_emission_threshold) { const unsigned HOST_WIDE_INT shadow_size = shadow_mem_size (size_in_bytes); |