com php-src: Fix infinite recursion issues (segfaults): phpdbg_prompt.c

From: Date: Sun, 05 Oct 2014 11:29:56 +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-82572@lists.php.net to get a copy of this message
Commit: 38e981bbdc69983fbe86c33054d8a53b97077482 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 5 Oct 2014 13:29:56 +0200 Parents: bedd503c3faa238c52e206af7fac9b69a66fed5e Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=38e981bbdc69983fbe86c33054d8a53b97077482 Log: Fix infinite recursion issues (segfaults) Changed paths: M phpdbg_prompt.c Diff: diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 9c24e94..a72292e 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -1248,7 +1248,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)) {

« previous php.cvs (#82572) next »