Commit f6d8d04f13e for php.net
commit f6d8d04f13ea501df5ea58b457245ac0f8f59316
Merge: 24448191436 1c196d0ee56
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date: Wed Jul 1 12:04:09 2026 +0200
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
Fixed timeout for supplemental read at end of a blocking stream in SSL stream wrapper
diff --cc NEWS
index 020afbcc719,feb9221c2e0..a08132d60b5
--- a/NEWS
+++ b/NEWS
@@@ -12,13 -6,6 +12,17 @@@ PH
. Fixed bug GH-18173 (ext/hash relies on implementation-defined malloc
alignment). (iliaal)
+- Opcache:
+ . Fixed bug GH-22158 (Tracing JIT dispatches the observer begin handler
+ through the wrong run_time_cache slot on megamorphic calls). (ptondereau,
+ iliaal)
+ . Fixed bug GH-22443 (Tracing JIT SIGSEGV on megamorphic dynamic calls from
+ an undereferenced run_time_cache map_ptr offset). (iliaal)
+
++- OpenSSL:
++ . Fixed timeout for supplemental read at end of a blocking stream in SSL
++ stream wrapper. (ilutov)
++
- Intl:
. Fixed Locale::lookup() and locale_lookup() to return NULL instead of the
fallback locale when a language tag cannot be canonicalized. (Weilin Du)
diff --cc ext/openssl/xp_ssl.c
index c1b0332dca1,77c98f65b51..cab8f9c859b
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@@ -1950,11 -2069,15 +1950,15 @@@ static ssize_t php_openssl_sockop_io(in
/* Only do this if SSL is active. */
if (sslsock->ssl_active) {
- int retry = 1;
+ /* We have already returned some buffered data. Don't retry and don't
+ * block. We're just trying to fill the buffer more, but the stream might
+ * be empty, so we don't want to wait in vain. */
+ bool supplemental = stream->has_buffered_data;
+ int retry = !supplemental;
struct timeval start_time;
struct timeval *timeout = NULL;
- int began_blocked = sslsock->s.is_blocked;
- int has_timeout = 0;
+ bool began_blocked = sslsock->s.is_blocked;
+ bool has_timeout = false;
int nr_bytes = 0;
/* prevent overflow in openssl */