mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0
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. Closes GH-18813.
This commit is contained in:
3
NEWS
3
NEWS
@@ -39,6 +39,9 @@ PHP NEWS
|
||||
. Add missing filter cleanups on phar failure. (nielsdos)
|
||||
. Fixed bug GH-18642 (Signed integer overflow in ext/phar fseek). (nielsdos)
|
||||
|
||||
- PHPDBG:
|
||||
. Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0. (nielsdos)
|
||||
|
||||
- PDO ODBC:
|
||||
. Fix memory leak if WideCharToMultiByte() fails. (nielsdos)
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user