Skip to content

Fix GH-25816: stream_lock() can close the stream while it is in use - #25821

Open
lazerg wants to merge 1 commit into
php:PHP-8.5from
lazerg:fix/gh-25816
Open

lazerg wants to merge 1 commit into
php:PHP-8.5from
lazerg:fix/gh-25816

Conversation

@lazerg

@lazerg lazerg commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes GH-25816.

Same gap as GH-25586: stream_lock() was still called without PHP_STREAM_FLAG_NO_FCLOSE set, so an fclose() of the stream from inside it went through while flock() was still using the stream. This sets the flag around the stream_lock() call too, so the fclose() there only warns, like it does for the other handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant