-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix regression from GH-8587 #8615
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
15202bd
to
d8cd754
Compare
@cmb69 Do you know if |
The stream function prefixed with underscore are usually not called directly, but rather the respective macros without that prefix. |
@cmb69 Oh sorry, I totally missed that one usage was a macro. Sorry. |
np The streams layer is in need of better documentation; there is https://github.com/php/php-src/blob/master/docs/streams.md, but that is incomplete and likely not really up to date, and should probably better be moved to phpinternalsbook.com. |
Sorry for the delay. Should be good now. @nicolas-grekas Can you verify that this fixes your issue? |
Works like a charm, thank you! |
Streams hold a reference to the stream wrapper. User stream wrappers must not be released until the streams themselves are closed.
c85865e
to
b7c4342
Compare
Is there anything pending on this PR? The issue keeps the Symfony CI red, I'm eager to see it fixed ;) |
I was just waiting for the build to be green 🙂 |
{ | ||
struct php_user_stream_wrapper *uwrap = (struct php_user_stream_wrapper*)wrapper->abstract; | ||
zend_list_delete(uwrap->resource); | ||
// FIXME: Unused? |
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.
Should this be kept?
Streams hold a reference to the stream wrapper. User stream wrappers
must not be released until the streams themselves are closed.
Does overridingNostream_closer
mean the stream has to be closed manually now?user_wrapper_opendir
is also closed throughuser_wrapper_close
. I haven't figured out how to trigger that code path yet.@nicolas-grekas FYI