Repository navigation
ext/session: Fix GH-25705: session_reset() destroys $_SESSION while PS(http_session_vars) still points to it - #25805
Open
Roman3349 wants to merge 1 commit into
Conversation
…sing the old one Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
Roman3349
force-pushed
the
fix/gh-25705-session-vars-release-order
branch
from
November 26, 2026 21:28
fe2e45c to
1af41ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
php_session_track_init() released the old session array before installing the new one, so destructors of its values ran against the array being destroyed. Install the new array first and release the old one afterwards. Do the same in php_rshutdown_session_globals(), the php_serialize decoder and session_unset(), and fail the initialization when a destructor closed the session.
Fixes GH-25705