com php-src: Merge branch 'PHP-7.0' into PHP-7.1: sapi/phpdbg/phpdbg.c
[email protected] (Joe Watkins)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 7aa59a444039908c0d42371fa4eaffb4089decbf Author: Joe Watkins <[email protected]> Mon, 27 Feb 2017 17:55:14 +0000 Parents: 59acca2062d00f187f5066306f07e60ee3e87824 008fb28eafa3740b1e3696b1a5cf7566d493b97d Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7aa59a444039908c0d42371fa4eaffb4089decbf Log: Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: fix crash in phpdbg shutdown process when opcache is loaded Changed paths: MM sapi/phpdbg/phpdbg.c Diff: diff --cc sapi/phpdbg/phpdbg.c index 320c8af,37314e6..121f1ed --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@@ -231,20 -228,10 +231,19 @@@ static PHP_MSHUTDOWN_FUNCTION(phpdbg) / zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD]); zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]); zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP]); - zend_hash_destroy(&PHPDBG_G(file_sources)); zend_hash_destroy(&PHPDBG_G(seek)); zend_hash_destroy(&PHPDBG_G(registered)); - zend_hash_destroy(&PHPDBG_G(watchpoints)); - zend_llist_destroy(&PHPDBG_G(watchlist_mem)); + phpdbg_destroy_watchpoints(); + + if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { + phpdbg_notice("stop", "type=\"normal\"", "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));