Commit f6f0aed9f3b for php.net
commit f6f0aed9f3bc9c8758a3f81be7047684827b0d36
Author: Daniil Gentili <daniil@daniil.it>
Date: Mon Jun 30 18:37:20 2025 +0200
Allow using fast destruction path when ASAN is in use (#18835)
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 9a7803e44e6..18e7028957f 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -438,6 +438,12 @@ void shutdown_executor(void) /* {{{ */
zval *zv;
#if ZEND_DEBUG
bool fast_shutdown = 0;
+#elif defined(__SANITIZE_ADDRESS__)
+ char *force_fast_shutdown = getenv("ZEND_ASAN_FORCE_FAST_SHUTDOWN");
+ bool fast_shutdown = (
+ is_zend_mm()
+ || (force_fast_shutdown && ZEND_ATOL(force_fast_shutdown))
+ ) && !EG(full_tables_cleanup);
#else
bool fast_shutdown = is_zend_mm() && !EG(full_tables_cleanup);
#endif