com php-src: Fix possible segfault depending on memory location...: phpdbg.c

From: Date: Wed, 04 Jun 2014 00:15:34 +0000
Subject: com php-src: Fix possible segfault depending on memory location...: phpdbg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78682@lists.php.net to get a copy of this message
Commit: 79519f7e30f35838203e13dc31d45426d6d28ab3 Author: Bob Weinand <bobwei9@hotmail.com> Wed, 4 Jun 2014 02:15:34 +0200 Parents: 467b19a9486a745aca86d7aff22bb2a3b669d52d Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=79519f7e30f35838203e13dc31d45426d6d28ab3 Log: Fix possible segfault depending on memory location... Changed paths: M phpdbg.c Diff: diff --git a/phpdbg.c b/phpdbg.c index 0239e69..93fdbd7 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -159,8 +159,6 @@ static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */ zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], 8, NULL, php_phpdbg_destroy_bp_condition, 0); zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP], 8, NULL, NULL, 0); - phpdbg_setup_watchpoints(TSRMLS_C); - zend_hash_init(&PHPDBG_G(seek), 8, NULL, NULL, 0); zend_hash_init(&PHPDBG_G(registered), 8, NULL, php_phpdbg_destroy_registered, 0); @@ -1256,10 +1254,12 @@ phpdbg_main: mm_heap->use_zend_alloc = 0; } + zend_activate(TSRMLS_C); + PHPDBG_G(original_free_function) = mm_heap->_free; mm_heap->_free = phpdbg_watch_efree; - zend_activate(TSRMLS_C); + phpdbg_setup_watchpoints(TSRMLS_C); #if defined(ZEND_SIGNALS) && !defined(_WIN32) zend_try {

« previous php.cvs (#78682) next »