From c9908ee5ebacd00108b960d03e9c7e1cb299b27b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Dec 2019 14:28:28 +0100 Subject: Disable optimizations for ASan instrumented builds ASan instrumentation does not support the MSVC debug runtime, but still it does not make sense to enable optimizations for such builds, since they are not meant for production usage anyway, and although memory corruption issues are still found in optimized builds, the generated diagnostics are close to being useless, and apparently sometimes even outright wrong. Therefore, we disable all optimizations for ASan instrumented builds. We also introduce and use `ZEND_WIN32_NEVER_INLINE` for ASan enabled builds to avoid inlining of functions, so we get even better diagnostics. --- Zend/zend_portability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_portability.h') diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index dd518aebbb..a2bb020451 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -289,7 +289,7 @@ char *alloca(); (_default) #endif -#if ZEND_DEBUG +#if ZEND_DEBUG || defined(ZEND_WIN32_NEVER_INLINE) # define zend_always_inline inline # define zend_never_inline #else -- cgit v1.2.1