Skip to content

Allow using fast destruction path when ASAN is in use #18835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ void shutdown_executor(void) /* {{{ */
zval *zv;
#if ZEND_DEBUG
bool fast_shutdown = 0;
#elif defined(__SANITIZE_ADDRESS__)
bool fast_shutdown = !EG(full_tables_cleanup);
#else
bool fast_shutdown = is_zend_mm() && !EG(full_tables_cleanup);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast_shutdown relays on Zend MM that frees the whole request heap at once. It doesn't make sense without it and will cause memory leaks.

#endif
Expand Down
Loading