Skip to content

Commit f6f0aed

Browse files
authored
Allow using fast destruction path when ASAN is in use (#18835)
1 parent a1d4b18 commit f6f0aed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎Zend/zend_execute_API.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,12 @@ void shutdown_executor(void) /* {{{ */
438438
zval *zv;
439439
#if ZEND_DEBUG
440440
bool fast_shutdown = 0;
441+
#elif defined(__SANITIZE_ADDRESS__)
442+
char *force_fast_shutdown = getenv("ZEND_ASAN_FORCE_FAST_SHUTDOWN");
443+
bool fast_shutdown = (
444+
is_zend_mm()
445+
|| (force_fast_shutdown && ZEND_ATOL(force_fast_shutdown))
446+
) && !EG(full_tables_cleanup);
441447
#else
442448
bool fast_shutdown = is_zend_mm() && !EG(full_tables_cleanup);
443449
#endif

0 commit comments

Comments
 (0)