[php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
| From: | Weilin Du | Date: | Sat, 10 Oct 2026 07:12:30 +0000 |
| Subject: | [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142143@lists.php.net to get a copy of this message | ||
Author: Weilin Du (LamentXU123)
Date: 2026-10-10T15:08:03+08:00
Commit: https://github.com/php/php-src/commit/7d7daae4ea068995aa676082d237bcdd0715910a
Raw diff: https://github.com/php/php-src/commit/7d7daae4ea068995aa676082d237bcdd0715910a.diff
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
Fix GH-24229: Use SHUT_WR when closing FastCGI connections (#24230)
Changed paths:
M NEWS
M main/fastcgi.c
Diff:
diff --git a/NEWS b/NEWS
index 99cee71b9d1a..747f07197ef1 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,10 @@ PHP NEWS
the next smaller bin in its larger bin, which efree_size() then freed
into the wrong one. (Marc Bennewitz)
+- FPM:
+ . Fixed bug GH-24229 (fcgi_close() passes shutdown() a literal 1, which is
+ SHUT_RD in WASI). (Ryosuke Ishibashi)
+
- Opcache:
. Fixed bug GH-17626 (JIT corrupts an opline handler when blacklisting a
root trace at the opcache.jit_max_root_traces limit, causing spurious
diff --git a/main/fastcgi.c b/main/fastcgi.c
index a393283fcb0b..5a525a9d66be 100644
--- a/main/fastcgi.c
+++ b/main/fastcgi.c
@@ -1279,7 +1279,7 @@ void fcgi_close(fcgi_request *req, int force, int destroy)
if (!force) {
char buf[8];
- shutdown(req->fd, 1);
+ shutdown(req->fd, SHUT_WR);
/* read any remaining data, it may be omitted */
while (recv(req->fd, buf, sizeof(buf), 0) > 0) {}
}