Skip to content

Fix #76735: Incorrect message in fopen on invalid mode #6187

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

Closed
wants to merge 2 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Sep 22, 2020

We have to log errors in stream_opener callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated errno or a
most generic message.


Does anybody know why we toggle REPORT_ERRORS when opening the stream:

path_to_open, mode, options ^ REPORT_ERRORS,

We have to log errors in `stream_opener` callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated `errno` or a
most generic message.
@cmb69 cmb69 added the Bug label Sep 22, 2020
@nikic
Copy link
Member

nikic commented Sep 22, 2020

Does anybody know why we toggle REPORT_ERRORS when opening the stream:

Huh, that's pretty weird. What happens if we stop doing that?

@cmb69
Copy link
Member Author

cmb69 commented Sep 22, 2020

Well, depends on what we do instead. If we just pass the unmodified options, we likely may see multiple potentially bogus error messages sometimes. This is all about 5a21ab4 ; I wonder whether clearing the REPORT_ERRORS flag was actually intended (i.e. options & ~REPORT_ERRORS).

@nikic
Copy link
Member

nikic commented Sep 23, 2020

I wonder whether clearing the REPORT_ERRORS flag was actually intended (i.e. options & ~REPORT_ERRORS).

That seems likely.

@php-pulls php-pulls closed this in 2576c57 Sep 23, 2020
@cmb69 cmb69 deleted the cmb/76735 branch September 23, 2020 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants