Commit: da3660a4c42cb90c8d5626ac1da71c1201f98d4b Author: Xinchen Hui <larue...@php.net> Wed, 15 Aug 2012 00:15:34 +0800 Parents: 49e91151c0ac1e39caab14c2d323dc70acb723c0 Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da3660a4c42cb90c8d5626ac1da71c1201f98d4b Log: Fixed bug (segfault due to PS(mod_user_implemented) not be reseted when closing handler call exit) Changed paths: M NEWS M ext/session/mod_user.c Diff: diff --git a/NEWS b/NEWS index da53df0..78b8652 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,11 @@ PHP NEWS . Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result). (Laruence) +- Session: + . Fixed bug (segfault due to PS(mod_user_implemented) not be reseted + when close handler call exit). (Laruence) + + ?? ??? 2012, PHP 5.4.6 - CLI Server: diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 2ff5302..41a63fc 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -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,22 @@ 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; + PS(mod_user_implemented) = 0; + } zend_end_try(); + PS(mod_user_implemented) = 0; + if (bailout) { + if (retval) { + zval_ptr_dtor(&retval); + } + zend_bailout(); + } + FINISH; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php