com php-src: Fix infinite recursion issues (segfaults): phpdbg_prompt.c
| From: | Bob Weinand | Date: | Sun, 05 Oct 2014 11:33:31 +0000 |
| Subject: | com php-src: Fix infinite recursion issues (segfaults): phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82574@lists.php.net to get a copy of this message | ||
Commit: 2f6317c4835b1256679fa0a3127e9301fed66b69
Author: Bob Weinand <bobwei9@hotmail.com> Sun, 5 Oct 2014 13:29:56 +0200
Parents: 62465b6d821d3e074af06880d7d3e25fb7a9a038
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2f6317c4835b1256679fa0a3127e9301fed66b69
Log:
Fix infinite recursion issues (segfaults)
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 0abb75a..9341f5a 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -1323,7 +1323,12 @@ next:
PHPDBG_G(last_line) = execute_data->opline->lineno;
+ /* stupid hack to make zend_do_fcall_common_helper return ZEND_VM_ENTER() instead of recursively
calling zend_execute() and eventually segfaulting */
+ if ((execute_data->opline->opcode == ZEND_DO_FCALL_BY_NAME ||
execute_data->opline->opcode == ZEND_DO_FCALL) &&
execute_data->function_state.function->type == ZEND_USER_FUNCTION) {
+ zend_execute_ex = execute_ex;
+ }
PHPDBG_G(vmret) = execute_data->opline->handler(execute_data TSRMLS_CC);
+ zend_execute_ex = phpdbg_execute_ex;
if (PHPDBG_G(vmret) > 0) {
switch (PHPDBG_G(vmret)) {