-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix GH-14506: Closing a userspace stream inside a userspace handler causes heap corruption #18797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test failures were unrelated and due to an issue at the time of branching on the master branch. Rebased for a CI run again now. |
|
Rebased because the userspace code changed in between opening this PR and now. |
|
You don't need to ping RM's for bug fix... Why is this master only? I can see the memory corruption and this seems like somthing that should not break real code if I'm not missing anything? |
We don't always apply those engine protections on lower branches if we can't fully gauge the consequences. |
|
Yeah I guess there is a small chance that some code could relay on stream being closed in this way so probably master only is better. |
bukka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge it. No need to wait for RM.
If really necessary, it is always possible to backport in the future anyway once this code has sat into master long enough. |
…r causes heap corruption Use the PHP_STREAM_FLAG_NO_FCLOSE flag to prevent closing a stream while a handler is running. We already do this in some other places as well. Only handlers that do something with the stream afterwards need changes.
Use the PHP_STREAM_FLAG_NO_FCLOSE flag to prevent closing a stream while a handler is running. We already do this in some other places as well. Only handlers that do something with the stream afterwards need changes.