aboutsummaryrefslogtreecommitdiff
path: root/gcc/asan.h
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-04-10 15:49:21 +0200
committerThomas Schwinge <tschwinge@baylibre.com>2024-04-10 15:49:21 +0200
commit0201fa189fbc53a542c8bb9744db480f3ea9b665 (patch)
treef040f32c2d4893478ba5c47b2e2776591770e9fe /gcc/asan.h
parentedd018d8c7b7a0229e10430ee61ac50f390670c2 (diff)
parent013b520529d5f1bddec27dd921eab5e917663693 (diff)
downloadgcc-0201fa189fbc53a542c8bb9744db480f3ea9b665.zip
gcc-0201fa189fbc53a542c8bb9744db480f3ea9b665.tar.gz
gcc-0201fa189fbc53a542c8bb9744db480f3ea9b665.tar.bz2
Merge commit '013b520529d5f1bddec27dd921eab5e917663693' into HEAD [#2944]
This resolves #2802 "Merge gcc/trunk into us".
Diffstat (limited to 'gcc/asan.h')
-rw-r--r--gcc/asan.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/asan.h b/gcc/asan.h
index 82811bd..d1bf8b1 100644
--- a/gcc/asan.h
+++ b/gcc/asan.h
@@ -185,8 +185,13 @@ extern hash_set<tree> *asan_handled_variables;
inline bool
asan_intercepted_p (enum built_in_function fcode)
{
+ /* This list should be kept up-to-date with upstream's version at
+ compiler-rt/lib/hwasan/hwasan_platform_interceptors.h. */
if (hwasan_sanitize_p ())
- return false;
+ return fcode == BUILT_IN_MEMCMP
+ || fcode == BUILT_IN_MEMCPY
+ || fcode == BUILT_IN_MEMMOVE
+ || fcode == BUILT_IN_MEMSET;
return fcode == BUILT_IN_INDEX
|| fcode == BUILT_IN_MEMCHR