]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use new macro HAS_FEATURE_ADDRESS_SANITIZER everywhere 11031/head
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Dec 2018 16:38:50 +0000 (17:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 3 Dec 2018 16:38:50 +0000 (17:38 +0100)
src/journal/lookup3.c
src/libsystemd/sd-bus/test-bus-marshal.c
src/test/test-capability.c
src/test/test-execute.c
src/test/test-sigbus.c

index ff194dd95176c472458e0c61c3cc29ec5ac36aa8..6c61f17c7db80fe895556c6eb44993b43fd6e89e 100644 (file)
@@ -319,7 +319,7 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
      * still catch it and complain.  The masking trick does make the hash
      * noticeably faster for short strings (like English words).
      */
-#if !VALGRIND && !defined(__SANITIZE_ADDRESS__)
+#if !VALGRIND && !HAS_FEATURE_ADDRESS_SANITIZER
 
     switch(length)
     {
@@ -504,7 +504,7 @@ void jenkins_hashlittle2(
      * still catch it and complain.  The masking trick does make the hash
      * noticeably faster for short strings (like English words).
      */
-#if !VALGRIND && !defined(__SANITIZE_ADDRESS__)
+#if !VALGRIND && !HAS_FEATURE_ADDRESS_SANITIZER
 
     switch(length)
     {
@@ -680,7 +680,7 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
      * still catch it and complain.  The masking trick does make the hash
      * noticeably faster for short strings (like English words).
      */
-#if !VALGRIND && !defined(__SANITIZE_ADDRESS__)
+#if !VALGRIND && !HAS_FEATURE_ADDRESS_SANITIZER
 
     switch(length)
     {
index d1c674b223afcdcf587d5234ab69d25c9214ceac..1e9810ce4fb13b1ea14a52870552188530c7e7ea 100644 (file)
@@ -202,7 +202,7 @@ int main(int argc, char *argv[]) {
         log_info("message size = %zu, contents =\n%s", sz, h);
 
 #if HAVE_GLIB
-#ifndef __SANITIZE_ADDRESS__
+#if !HAS_FEATURE_ADDRESS_SANITIZER
         {
                 GDBusMessage *g;
                 char *p;
index 5bfcc385d9e45584ddca6e9e588bfaf1dee389b5..dae85f2f91c5ab619405a6579a774c035d02a327 100644 (file)
@@ -20,7 +20,7 @@
 static uid_t test_uid = -1;
 static gid_t test_gid = -1;
 
-#ifdef __SANITIZE_ADDRESS__
+#if HAS_FEATURE_ADDRESS_SANITIZER
 /* Keep CAP_SYS_PTRACE when running under Address Sanitizer */
 static const uint64_t test_flags = UINT64_C(1) << CAP_SYS_PTRACE;
 #else
index fdde079cefc1cf46f2688f5262a60a3d281935f5..2115061addc1b1a13f633c3ae1e07dcf24e6d409 100644 (file)
@@ -759,7 +759,7 @@ int main(int argc, char *argv[]) {
 
         test_setup_logging(LOG_DEBUG);
 
-#ifdef __SANITIZE_ADDRESS__
+#if HAS_FEATURE_ADDRESS_SANITIZER
         if (is_run_on_travis_ci()) {
                 log_notice("Running on TravisCI under ASan, skipping, see https://github.com/systemd/systemd/issues/10696");
                 return EXIT_TEST_SKIP;
index 33c9d42e9e3711a3c7c1353dcca862a3d39eb8ce..d2666dd1d8ebe5d8f8a29e19c85ee538056331ff 100644 (file)
@@ -19,7 +19,7 @@ int main(int argc, char *argv[]) {
 
         test_setup_logging(LOG_INFO);
 
-#ifdef __SANITIZE_ADDRESS__
+#if HAS_FEATURE_ADDRESS_SANITIZER
         return log_tests_skipped("address-sanitizer is enabled");
 #endif
 #if HAVE_VALGRIND_VALGRIND_H