Skip to content

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

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sapi/phpdbg/phpdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,6 @@ static PHP_MSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
phpdbg_notice("Script ended normally");
}

/* hack to restore mm_heap->use_custom_heap in order to receive memory leak info */
if (use_mm_wrappers) {
/* ASSUMING that mm_heap->use_custom_heap is the first element of the struct ... */
*(int *) zend_mm_get_heap() = 0;
}

if (PHPDBG_G(buffer)) {
free(PHPDBG_G(buffer));
PHPDBG_G(buffer) = NULL;
Expand Down
Loading