aboutsummaryrefslogtreecommitdiff
path: root/gcc/asan.h
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-04-10 10:55:56 +0200
committerThomas Schwinge <tschwinge@baylibre.com>2024-04-10 10:55:56 +0200
commit1af2c40d7595c91f8c8f3573c1bec30556e35bb6 (patch)
tree38b5d5ec8fbb0f53621f676e35611cc092b8da42 /gcc/asan.h
parent17ee9c68cbc9ba7a13b77ea458fbbc6275c38d02 (diff)
parent830d4659604e4d0f6e908d1cdb5bf1638a60bb21 (diff)
downloadgcc-1af2c40d7595c91f8c8f3573c1bec30556e35bb6.zip
gcc-1af2c40d7595c91f8c8f3573c1bec30556e35bb6.tar.gz
gcc-1af2c40d7595c91f8c8f3573c1bec30556e35bb6.tar.bz2
Merge commit 'f89186f962421f6d972035fc4b4c20490e7b1c5b^' into HEAD
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