SAPI: clear current_user and content_type_dup after releasing them - #22974
Open
iliaal wants to merge 1 commit into
Open
SAPI: clear current_user and content_type_dup after releasing them#22974iliaal wants to merge 1 commit into
iliaal wants to merge 1 commit into
Conversation
sapi_deactivate_module() frees both without resetting the pointer, unlike the auth_user, auth_password and auth_digest fields next to them. Nothing reads them between the free and the next sapi_activate() today, so this is consistency rather than a live bug. Closes phpGH-22974
iliaal
force-pushed
the
fix/sapi-clear-released-request-info
branch
from
July 31, 2026 14:44
f8ff8f2 to
063c6b7
Compare
Member
|
Hmmm the change is not wrong, but to qualify it as bug fix worthy of release branches is really stretching it. |
Contributor
Author
|
I figured it would be ok as it purely defensive change with no risk of regression |
Member
|
in my side not a clear big no, but would need a little bit more convincing ; because it s not fixing an actual bug. |
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.
sapi_deactivate_module()freescurrent_userandcontent_type_dupbut leaves both pointers set, unlikeauth_user,auth_passwordandauth_digestright above them. Nothing reads either field between the free and the nextsapi_activate(), so this is consistency rather than a live bug, and a second deactivate would double-free.This is older than the zend_string conversion in #22902, so it targets 8.4.