summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-21 17:01:47 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-21 17:01:47 +0200
commite4371ef158cb545f7ffbd890cee07d053c70cc31 (patch)
treef451df80265830395b6cae5a0f69103d01836d5b /sapi/phpdbg/phpdbg_prompt.c
parent611c57eaf7e3f44fb14ec154cf5614be3406bcbb (diff)
parent152ccfb08dd766cdb76583b061dcc2c8a73a7255 (diff)
downloadphp-git-e4371ef158cb545f7ffbd890cee07d053c70cc31.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index d8a31184d3..bd6f7349ac 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1632,7 +1632,14 @@ int phpdbg_interactive(zend_bool allow_async_unsafe, char *input) /* {{{ */
sigio_watcher_start();
}
#endif
- switch (ret = phpdbg_stack_execute(&stack, allow_async_unsafe)) {
+ zend_try {
+ ret = phpdbg_stack_execute(&stack, allow_async_unsafe);
+ } zend_catch {
+ phpdbg_stack_free(&stack);
+ zend_bailout();
+ } zend_end_try();
+
+ switch (ret) {
case FAILURE:
if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) {
if (!allow_async_unsafe || phpdbg_call_register(&stack) == FAILURE) {