[master] a4ae320cf build: s/__SANITIZER/ENABLE_SANITIZER/
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Aug 25 10:21:06 UTC 2021
commit a4ae320cfdf1cdae065f8c4f584a78737ae69d94
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Aug 24 18:06:53 2021 +0200
build: s/__SANITIZER/ENABLE_SANITIZER/
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 799cf354c..190ac90b7 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -614,7 +614,7 @@ pan_backtrace(struct vsb *vsb)
#else /* WITH_UNWIND */
-#if __SANITIZER
+#if ENABLE_SANITIZER
# define BACKTRACE_LEVELS 20
#else
# define BACKTRACE_LEVELS 10
diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index 4d436cd11..df9ca6286 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -514,7 +514,7 @@ void VCL_TaskLeave(VRT_CTX, struct vrt_privs *);
void VMOD_Init(void);
void VMOD_Panic(struct vsb *);
-#if defined(ENABLE_COVERAGE) || defined(__SANITIZER)
+#if defined(ENABLE_COVERAGE) || defined(ENABLE_SANITIZER)
# define DONT_DLCLOSE_VMODS
#endif
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index af70b1b09..d80033269 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -688,7 +688,7 @@ MCF_InitParams(struct cli *cli)
low = sysconf(_SC_THREAD_STACK_MIN);
MCF_ParamConf(MCF_MINIMUM, "thread_pool_stack", "%jdb", (intmax_t)low);
-#if defined(__SANITIZER) || __has_feature(address_sanitizer) || defined(ENABLE_COVERAGE)
+#if defined(ENABLE_SANITIZER) || defined(ENABLE_COVERAGE)
def = 192 * 1024;
#endif
diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c
index f19714c6b..35df80fb8 100644
--- a/bin/varnishtest/vtc_misc.c
+++ b/bin/varnishtest/vtc_misc.c
@@ -457,16 +457,16 @@ static const unsigned coverage = 1;
static const unsigned coverage = 0;
#endif
-#if WITH_PERSISTENT_STORAGE
-static const unsigned with_persistent_storage = 1;
+#if ENABLE_SANITIZER
+static const unsigned sanitizer = 1;
#else
-static const unsigned with_persistent_storage = 0;
+static const unsigned sanitizer = 0;
#endif
-#if __SANITIZER
-static const unsigned sanitizer = 1;
+#if WITH_PERSISTENT_STORAGE
+static const unsigned with_persistent_storage = 1;
#else
-static const unsigned sanitizer = 0;
+static const unsigned with_persistent_storage = 0;
#endif
#ifdef SO_RCVTIMEO_WORKS
diff --git a/configure.ac b/configure.ac
index ab32052f4..d34fdf8c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -297,7 +297,8 @@ AC_ARG_ENABLE(msan,
[MSAN_FLAGS=-fsanitize=memory])
if test "x$UBSAN_FLAGS$TSAN_FLAGS$ASAN_FLAGS$MSAN_FLAGS" != "x"; then
- AC_DEFINE([__SANITIZER], [1], [Define to 1 if any sanitizer is enabled.])
+ AC_DEFINE([ENABLE_SANITIZER], [1],
+ [Define to 1 if any sanitizer is enabled.])
SAN_FLAGS="$ASAN_FLAGS $UBSAN_FLAGS $TSAN_FLAGS $MSAN_FLAGS"
SAN_CFLAGS="$SAN_FLAGS -fPIC -fPIE -fno-omit-frame-pointer"
SAN_LDFLAGS=
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 1dca3c6ce..9e43f5da0 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -626,7 +626,7 @@ VTCP_Check(ssize_t a)
if (errno == EINVAL)
return (1);
#endif
-#if (defined(__SANITIZER) || __has_feature(address_sanitizer))
+#if defined(ENABLE_SANITIZER)
if (errno == EINTR)
return (1);
#endif
More information about the varnish-commit
mailing list