-
Notifications
You must be signed in to change notification settings - Fork 7.9k
7.4 — curl/interface.c: avoid crashing, when PHP is compiled without IPv6 support, and CURL has IPv6 support #7669
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
17cb48e
to
f5aa274
Compare
f5aa274
to
d54f206
Compare
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.
Thank you! Looks good to me. @derickr, since 7.4.27 is the last regular bug fix release, is this good for you?
d54f206
to
ba78f6d
Compare
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.
LGTM for PHP 7.4 if the error message gets fixed.
ba78f6d
to
c142637
Compare
Regarding https://bugs.php.net/bug.php?id=75862: Even if no IPv6 routing is configured, this should never result in a crash, even if PHP is built with IPv6 support. Something else must be wrong. |
I do not remember the details. Back in 2017 for PHP 7.1.13 this has helped. The configuration was likely PHP is |
In fact, the original patch at https://bugs.php.net/bug.php?id=75862 does not contain |
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.
Apparently, HAVE_IPV6 comes from PHP, while ENABLE_IPV6 comes from curl.
Ah, right! And as such, I think, we would need to check !ENABLE_IPV6
, but that might not be available (when build without curl's config.h, what we at least do on Windows). Then again, why would that even be related to PHP's IPv6 support? Isn't that solely a libcurl issue, and ideally should be resolved there (unless it already has been resolved in the meantime)?
If we need to do something in ext/curl, I think we need to employ curl_version_info
, and check whether CURL_VERSION_IPV6
is enabled. That would, of course, be a runtime, and not a compile time check.
…upport, and CURL has IPv6 support I have this patch since 2018, PHP-7.1. My kernel knows about IPv6, but the system has no IPv6 routing configured and PHP is configured without IPv6 support. Fixes https://bugs.php.net/bug.php?id=75862 .
c142637
to
7416ce2
Compare
I changed ×2 |
That can't (generally) work. |
Why do the test fail? I have reverted on my system the patch and could not bring PHP to crash. I am closing the current case for now, unless I manage to reproduce the crash. |
I have this patch since 2018, PHP-7.1. My kernel knows about IPv6, but the system has no IPv6 routing configured and PHP is configured without IPv6 support.
Fixes https://bugs.php.net/bug.php?id=75862 .