com php-src: fix crash when .phpdbginit quits: phpdbg.c
| From: | Bob Weinand | Date: | Thu, 14 Nov 2013 17:03:36 +0000 |
| Subject: | com php-src: fix crash when .phpdbginit quits: phpdbg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74962@lists.php.net to get a copy of this message | ||
Commit: 6b864a8b0fb72a80de3cb7e2ea8d8a3d7647c765
Author: krakjoe <joe.watkins@live.co.uk> Thu, 14 Nov 2013 17:03:36 +0000
Parents: 5147c87f2c1c93bc9dce605ece22551a07f2bd8d
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6b864a8b0fb72a80de3cb7e2ea8d8a3d7647c765
Log:
fix crash when .phpdbginit quits
Changed paths:
M phpdbg.c
Diff:
diff --git a/phpdbg.c b/phpdbg.c
index 7eabfe9..443b603 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -494,7 +494,13 @@ phpdbg_main:
} zend_end_try();
/* initialize from file */
- phpdbg_init(init_file, init_file_len, init_file_default TSRMLS_CC);
+ zend_try {
+ phpdbg_init(init_file, init_file_len, init_file_default TSRMLS_CC);
+ } zend_catch {
+ if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
+ goto phpdbg_out;
+ }
+ } zend_end_try();
/* print blurb */
phpdbg_welcome(cleaning TSRMLS_CC);