Commit a4ae320c authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

build: s/__SANITIZER/ENABLE_SANITIZER/

parent c7eaf5d2
...@@ -614,7 +614,7 @@ pan_backtrace(struct vsb *vsb) ...@@ -614,7 +614,7 @@ pan_backtrace(struct vsb *vsb)
#else /* WITH_UNWIND */ #else /* WITH_UNWIND */
#if __SANITIZER #if ENABLE_SANITIZER
# define BACKTRACE_LEVELS 20 # define BACKTRACE_LEVELS 20
#else #else
# define BACKTRACE_LEVELS 10 # define BACKTRACE_LEVELS 10
......
...@@ -514,7 +514,7 @@ void VCL_TaskLeave(VRT_CTX, struct vrt_privs *); ...@@ -514,7 +514,7 @@ void VCL_TaskLeave(VRT_CTX, struct vrt_privs *);
void VMOD_Init(void); void VMOD_Init(void);
void VMOD_Panic(struct vsb *); void VMOD_Panic(struct vsb *);
#if defined(ENABLE_COVERAGE) || defined(__SANITIZER) #if defined(ENABLE_COVERAGE) || defined(ENABLE_SANITIZER)
# define DONT_DLCLOSE_VMODS # define DONT_DLCLOSE_VMODS
#endif #endif
......
...@@ -688,7 +688,7 @@ MCF_InitParams(struct cli *cli) ...@@ -688,7 +688,7 @@ MCF_InitParams(struct cli *cli)
low = sysconf(_SC_THREAD_STACK_MIN); low = sysconf(_SC_THREAD_STACK_MIN);
MCF_ParamConf(MCF_MINIMUM, "thread_pool_stack", "%jdb", (intmax_t)low); 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; def = 192 * 1024;
#endif #endif
......
...@@ -457,16 +457,16 @@ static const unsigned coverage = 1; ...@@ -457,16 +457,16 @@ static const unsigned coverage = 1;
static const unsigned coverage = 0; static const unsigned coverage = 0;
#endif #endif
#if WITH_PERSISTENT_STORAGE #if ENABLE_SANITIZER
static const unsigned with_persistent_storage = 1; static const unsigned sanitizer = 1;
#else #else
static const unsigned with_persistent_storage = 0; static const unsigned sanitizer = 0;
#endif #endif
#if __SANITIZER #if WITH_PERSISTENT_STORAGE
static const unsigned sanitizer = 1; static const unsigned with_persistent_storage = 1;
#else #else
static const unsigned sanitizer = 0; static const unsigned with_persistent_storage = 0;
#endif #endif
#ifdef SO_RCVTIMEO_WORKS #ifdef SO_RCVTIMEO_WORKS
......
...@@ -297,7 +297,8 @@ AC_ARG_ENABLE(msan, ...@@ -297,7 +297,8 @@ AC_ARG_ENABLE(msan,
[MSAN_FLAGS=-fsanitize=memory]) [MSAN_FLAGS=-fsanitize=memory])
if test "x$UBSAN_FLAGS$TSAN_FLAGS$ASAN_FLAGS$MSAN_FLAGS" != "x"; then 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_FLAGS="$ASAN_FLAGS $UBSAN_FLAGS $TSAN_FLAGS $MSAN_FLAGS"
SAN_CFLAGS="$SAN_FLAGS -fPIC -fPIE -fno-omit-frame-pointer" SAN_CFLAGS="$SAN_FLAGS -fPIC -fPIE -fno-omit-frame-pointer"
SAN_LDFLAGS= SAN_LDFLAGS=
......
...@@ -626,7 +626,7 @@ VTCP_Check(ssize_t a) ...@@ -626,7 +626,7 @@ VTCP_Check(ssize_t a)
if (errno == EINVAL) if (errno == EINVAL)
return (1); return (1);
#endif #endif
#if (defined(__SANITIZER) || __has_feature(address_sanitizer)) #if defined(ENABLE_SANITIZER)
if (errno == EINTR) if (errno == EINTR)
return (1); return (1);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment