summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-06-04 02:15:34 +0200
committerBob Weinand <bobwei9@hotmail.com>2014-06-04 02:15:34 +0200
commit79519f7e30f35838203e13dc31d45426d6d28ab3 (patch)
tree23cef03c3bd70f66cb5f3bfece76fe1e603be88e
parent467b19a9486a745aca86d7aff22bb2a3b669d52d (diff)
downloadphp-git-79519f7e30f35838203e13dc31d45426d6d28ab3.tar.gz
Fix possible segfault depending on memory location...
-rw-r--r--phpdbg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpdbg.c b/phpdbg.c
index 0239e692b4..93fdbd7424 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 {