Skip to content

Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0#18813

Closed
ndossche wants to merge 1 commit into
php:PHP-8.3from
ndossche:phpdbg-segv
Closed

Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0#18813
ndossche wants to merge 1 commit into
php:PHP-8.3from
ndossche:phpdbg-segv

Conversation

@ndossche
Copy link
Copy Markdown
Member

@ndossche ndossche commented Jun 9, 2025

This hack not only breaks the handling of custom allocators, but also breaks if zend_alloc is compiled with USE_CUSTOM_MM. This hack is just no good, if you want leak information then use ASAN.

This hack not only breaks the handling of custom allocators, but also
breaks if zend_alloc is compiled with USE_CUSTOM_MM.
This hack is just no good, if you want leak information then use ASAN.
@bwoebi
Copy link
Copy Markdown
Member

bwoebi commented Jun 10, 2025

@nielsdos Yeah, that hack is quite meh.

The proper way is using the gc and shutdown custom handlers, which exist since PHP 8.4.

@ndossche ndossche closed this in 0cd3ebf Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants