From 4f90e2ec9d1d93652cef813789fa3aa3545e007f Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 2 Oct 2015 12:37:17 +0200 Subject: Ensure proper set_exception_handler() handling with exit() inside it --- sapi/phpdbg/phpdbg_prompt.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sapi/phpdbg/phpdbg_prompt.c') diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index c16836c872..50971b25ec 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -748,12 +748,20 @@ PHPDBG_COMMAND(run) /* {{{ */ if (restore) { zend_exception_restore(); - zend_try_exception_handler(); + zend_try { + zend_try_exception_handler(); + PHPDBG_G(in_execution) = 1; + } zend_catch { + PHPDBG_G(in_execution) = 0; + + if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { + zend_bailout(); + } + } zend_end_try(); + if (EG(exception)) { phpdbg_handle_exception(); } - - PHPDBG_G(in_execution) = 1; } PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING; -- cgit v1.2.1