diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-10-25 16:01:25 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-10-25 16:01:25 +0200 |
| commit | b57a2691d5b72c3894e2d4e0f945cecc6b3a1953 (patch) | |
| tree | 012a1408ce8a738d45ae429ca7d7f5389c159915 /ext/session | |
| parent | 45c0aa447e02c80bd21a23245574231a110cf5a1 (diff) | |
| download | php-b57a2691d5b72c3894e2d4e0f945cecc6b3a1953.tar.gz | |
Imported Upstream version 5.4.8upstream/5.4.8
Diffstat (limited to 'ext/session')
| -rw-r--r-- | ext/session/mod_user.c | 17 | ||||
| -rw-r--r-- | ext/session/tests/bug60634_error_5.phpt | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 2ff5302f7..84a28d342 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -63,7 +63,7 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv TSRMLS_DC) } #define STDVARS \ - zval *retval; \ + zval *retval = NULL; \ int ret = FAILURE #define PSF(a) PS(mod_user_names).name.ps_##a @@ -99,6 +99,7 @@ PS_OPEN_FUNC(user) PS_CLOSE_FUNC(user) { + zend_bool bailout = 0; STDVARS; if (!PS(mod_user_implemented)) { @@ -106,9 +107,21 @@ PS_CLOSE_FUNC(user) return SUCCESS; } - retval = ps_call_handler(PSF(close), 0, NULL TSRMLS_CC); + zend_try { + retval = ps_call_handler(PSF(close), 0, NULL TSRMLS_CC); + } zend_catch { + bailout = 1; + } zend_end_try(); + PS(mod_user_implemented) = 0; + if (bailout) { + if (retval) { + zval_ptr_dtor(&retval); + } + zend_bailout(); + } + FINISH; } diff --git a/ext/session/tests/bug60634_error_5.phpt b/ext/session/tests/bug60634_error_5.phpt index 376b65f20..8081ab988 100644 --- a/ext/session/tests/bug60634_error_5.phpt +++ b/ext/session/tests/bug60634_error_5.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec ---XFAIL-- -Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID |
