]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
utils: Define ADDRESS_SANITIZER_EXCLUDE to exclude a function from sanitizer
authorMartin Willi <martin@revosec.ch>
Wed, 15 Apr 2015 12:21:38 +0000 (14:21 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 15 Sep 2022 10:16:12 +0000 (12:16 +0200)
src/libstrongswan/utils/utils.h

index 120b159508c086cd0e249f031892013398fbf4fa..083f5534410859aa0648cb2c01c283c8b146b45d 100644 (file)
@@ -119,6 +119,16 @@ void utils_deinit();
 # define __has_feature(x) 0
 #endif
 
+/**
+ * Address santizer support
+ */
+#if __has_feature(address_sanitizer) || \
+       (defined(__GNUC__) && defined(__SANITIZE_ADDRESS__))
+# define ADDRESS_SANITIZER_EXCLUDE __attribute__((no_sanitize_address))
+#else
+# define ADDRESS_SANITIZER_EXCLUDE
+#endif
+
 /**
  * Debug macro to follow control flow
  */