tree-wide: use new macro HAS_FEATURE_ADDRESS_SANITIZER everywhere

This commit is contained in:
Lennart Poettering
2018-12-03 17:38:50 +01:00
parent 02e062262f
commit 0df54921bc
5 changed files with 7 additions and 7 deletions

View 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)
{

View 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;

View 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

View 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;

View 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