Skip to content

v6.3.0-rc2

Choose a tag to compare

@NathanFreeman NathanFreeman released this 18 Nov 13:07
62310ca

New Features

  • Support for the HTTP QUERY method.
  • The coroutine HTTP server can send 100 Continue.
  • Runtime hooks for socket-based standard streams STDIN/STDOUT/STDERR.
  • Coroutine preemption enabled in threaded builds.
  • Coroutine cancellation now carries a cancellation reason.
  • sendfile supports passing a file object.
  • The HTTP/2 coroutine client exposes trailing HEADERS frames via Response::$trailers.
  • Socket\Coro adds export() to duplicate a socket fd.
  • The sockets extension warns about non-blocking and UNIX datagram limitations.
  • Sockets now track observed stream EOF separately.
  • Atomic adds acquire/release atomic operations.
  • name-resolver adds automatic service discovery lifecycle and isolates resolver state.
  • Added ssh2_set_timeout().
  • Added ssh2_keepalive_config() and ssh2_keepalive_send().
  • Added ssh2_send_signal().

Fixes: HTTP/1, Uploads, and Static Files

  • Accept trailing OWS after chunked transfer coding.
  • Handle optional whitespace in HTTP/1 headers.
  • Ignore 100-continue for HTTP/1.0 requests.
  • Handle HTTP body boundaries and 100 Continue.
  • Parse chunked requests precisely in the coroutine server.
  • The coroutine server's chunked request buffer can now grow.
  • Clean up trailers before terminating a chunked response.
  • Fix the completion determination for HTTP/1 trailers.
  • Ignore HTTP/1 request trailers.
  • Re-parse when subsequent data arrives while the request line is incomplete.
  • Preserve request fields across multiple parse calls.
  • Prevent underflow in the package length limit.
  • Preserve response header values from being rewritten.
  • Free the captured HTTP/1 content type.
  • Decompress the response body before passing it to write_func.
  • Output the Date header of static responses in GMT.
  • Harden static file response handling.
  • The upgrade/redis handler tolerates connections being closed concurrently.
  • Fix an HTTP IP memory leak.
  • Reject oversized HTTP Upgrade values.
  • Fix multipart upload temporary file errors.
  • Harden multipart parsing and upload lifecycle.
  • Keep uploaded file paths alive.
  • Retain upload cleanup after tmpfiles replacement.
  • Preserve overly long upload temporary directory paths.
  • Add bounds checking to URL encoding and allocate the output in one pass.

Fixes: HTTP/2

  • Fix HTTP/2 header and frame size handling.
  • Finalize HPACK decoding when response headers end.
  • Defer Content-Type setting until headers are complete.
  • Isolate request trailers and unify the body completion path.
  • The connection-level flow control window starts at 65535.
  • Validate the payload length of fixed-length frames before reading.
  • Reject GOAWAY frames with insufficient field length.
  • Limit GOAWAY debug data to the peer's frame size.
  • Send the correct PING payload and reject PING frames with an incorrect length.
  • Control frames no longer kill the worker when the buffer is full.
  • Reuse stream reset when rejecting an oversized body.
  • Fix HTTP/2 write stalls after stream termination.
  • Fix client sending while another write is pending.
  • Close the client connection on write failure.
  • Avoid crashes when releasing an incomplete response.

Fixes: WebSocket

  • Fix double free and UAF caused by callbacks closing the connection in BASE mode.
  • Fix unpacking of masked compressed WebSocket frames.
  • Negotiate compression across multiple extension offers.
  • Grow the compression output buffer safely.
  • Reject unsuccessful WebSocket upgrades.
  • Reject WebSocket token parsing errors.

Fixes: HTTP Client, curl, FastCGI, and Async Client

  • Fix socket initialization for the coroutine HTTP client.
  • Reject truncated responses at EOF.
  • Connection close state is tracked per request exchange.
  • Clean up download state without losing the retry target.
  • Preserve the request error on repeated close.
  • Handle chunked HTTP proxy responses.
  • Preserve SOCKS5 response boundaries.
  • Fix the lifecycle of queued cURL resume.
  • Sync curl fixes published in php-src for PHP 8.4.
  • Preserve curl multi select readiness when using the socket API.
  • Keep PHP stream callbacks on the request thread.
  • FastCGI preserves cookies and accepts response frames with padding.
  • Update the built-in FastCGI client and add response regressions.
  • Release async client references after the callback ends.
  • Check socket status before returning a connection to the pool.
  • Allow receiving fragmented packets under a custom package_length_func.
  • Allocate the swoole_client_select() pollfd array based on the total size of the three arrays.

Fixes: Database Hooks

  • Fix Redis server receive buffer handling.
  • Re-parse Redis fragmented requests from a clean state.
  • Add bounds checking for RESP numbers in get_number and parse.
  • Pass packet boundaries to Redis server number parsing.
  • Preserve exec errors, Redis command names, and cookie state.
  • pgsql tries the next host after a blocking connection timeout.
  • The PDO pgsql driver enforces connect_timeout.
  • Fix cancellation of pgsql query waits.
  • Empty PDO pgsql error messages no longer read ahead prematurely.
  • Move ODBC SQLParamData/SQLDescribeParam to the AIO thread pool.
  • Move ODBC SQLCloseCursor and statement SQLFreeHandle to the AIO thread pool.
  • Normalize empty credential lengths in the ODBC connection pool.
  • Oracle hooks server attachment during PDO connection.
  • Keep Oracle statement re-execution safe.

Fixes: SSH2

  • Fix SSH2 resource release lifecycle.
  • Wait for the shell exit status.
  • Refresh poll direction after EAGAIN.
  • Avoid integer overflow in ssh2_set_timeout().
  • Allocate libssh2 memory using malloc.
  • Free the parsed URL when the wrapper path is rejected.
  • SFTP wrapper paths preserve # and ?.
  • SCP receive stops at premature EOF.
  • Sync upstream SCP receive write checks.

Fixes: Coroutines, Locks, Timers, and Table

  • Fix Coroutine::setTimeLimit() precision and cleanup.
  • Allow clearing the time limit with 0.
  • Ignore external interrupts when preemption is disabled.
  • Fix coroutine exception delivery during SPL directory iteration.
  • Delayed resume no longer touches a finished EventWaiter.
  • Allocate the saved timeout array by element count.
  • Retain queued tasks after coroutine creation failure.
  • ssl_sendfile does not send more data than the requested size.
  • Limit header reception in length protocol recv.
  • swoole_coroutine_accept respects the caller's address buffer.
  • Coroutine lock count reentrancy and validate the holder on unlock.
  • Reject timer deadlines that would overflow before insertion.
  • Detach global timers before releasing them.
  • RSHUTDOWN cleans up PHP timers when there is no request heap.
  • Validate timer intervals on Windows and protect process tests.
  • After a force-unlock timeout, retain row locks for live holders (previous force unlocks have been rolled back).
  • Cache the configured default value for error reporting.
  • Propagate UnwindExit to ZendVM.

Fixes: Runtime and PHP Stream Hooks

  • Preserve native zero-timeout stream behavior.
  • Apply stream timeouts to hooked write operations.
  • Hooked write operations cancelled after a partial write must fail.
  • Fix socket_recv behavior for empty datagrams and EOF.
  • Reject null bytes in IP stream addresses.
  • Let mysqlnd recognize hooked Unix sockets.
  • Reject setting global HTTP response headers in coroutines.
  • Preserve the cleanup path for synchronous failures in the factory.
  • Release streams on connection errors and stop after cancellation.
  • Initialize Windows stdio operations for include.
  • Register the after-fork hook during the MINIT phase.
  • Settings accept empty arrays and preserve enabled SSL.
  • Settings propagate exceptions and isolate thread callbacks.
  • Preserve the package limit when partially configuring settings.

Fixes: Server, Processes, Tasks, and Signals

  • Manage worker lifecycle and improve shutdown handling.
  • Preserve worker exit and advance reload in order.
  • Release the reactor of a worker stopped by a fatal error.
  • Restore the caller's worker when a BASE server stops.
  • Keep BASE connection boundaries local.
  • Initialize the port protocol only once before starting reactor threads.
  • get_port for worker threads can match SSL ports.
  • Fix server SSL context initialization.
  • Enforce server-side TLS peer verification.
  • Fix the return handling of Server Port set.
  • Accept pre-bound datagram sockets passed in by systemd.
  • Send FIN after peer shutdown on macOS.
  • Close the connection when a queued sendfile cannot start.
  • Close the connection when a queued sendfile cannot complete.
  • Close the connection directly on unrecoverable send errors.
  • Parse buffered packets when a paused connection resumes.
  • Keep the connection and avoid duplicate delivery when onPackage pauses an EOF protocol connection.
  • Settle delivered packets when onPackage pauses a connection.
  • Keep length protocol header reception within the buffer.
  • recv_with_length_protocol resets stale HTTP parse offsets.
  • Avoid signed overflow in default_length_func.
  • Fail pipe reads when readv errors on a chunk.
  • Keep the dgram pipe send buffer above the maximum IPC datagram size.
  • Unify the result contract of taskCo and taskWaitMulti.
  • Share atomic task IDs between workers and threads.
  • Isolate task results and fix idle and DTLS handling.
  • Validate task results and tighten failure cleanup.
  • Handle force-kill alarms synchronously and skip packaging stale large results.
  • Reject illegal task reply sources.
  • Clarify warnings for illegal task reply workers.
  • Name task stream sockets with the creator PID.
  • Restrict access to task stream sockets.
  • Restrict task message queues to the worker account.
  • process-pool supports explicit message queue access.
  • Reject message queue keys outside the key_t range.
  • Reuse the message bus across multiple starts.
  • Reject oversized worker_num instead of aborting.
  • Fix truncated ProcessPool stream packets.
  • Validate ProcessPool packet boundaries.
  • Release the master's system timers after start().
  • Dispatch timers for synchronous workers.
  • Release MessageBus resources when the owner closes.
  • Release BASE event pool resources after shutdown.
  • Fix queued writes for thread workers.
  • Release startup arguments when thread creation fails.
  • Preserve the main thread's signal handlers when other threads exit.
  • PHP and server workers inherit blocked signals.
  • Preserve the signal mask when starting background threads.
  • Register SIGCHLD to the reactor thread in thread context.
  • Do not discard signals that arrive while a signal handler is executing.
  • Restore signal actions when removing listeners.
  • Reset signal listener state in forked child processes.
  • Clean up inherited handlers when there is no kqueue reactor.
  • Prevent worker processes from executing manager-specific signal handlers.
  • Child processes that inherited manager handlers no longer lose SIGTERM.
  • Reset inherited manager runtime state.
  • Defer handling of log reopen signals in synchronous processes.
  • Harden manager signals, task timeout cleanup, and core helper functions.
  • Retain pending reload tasks before initialization completes.
  • Prevent losing reload wakeups before waiting.
  • Cancel shutdown timers after worker exit.
  • Use pcntl_waitpid to preserve exit statuses of unrelated child processes.
  • Apply the configured CPU affinity to workers.
  • Fix cpu_affinity_ignore handling.
  • Fix CPU affinity IDs.
  • Validate affinity IDs against the number of CPUs.
  • get_connection_by_session_id validates the session id.
  • Do not narrow admin numeric identifier validation.
  • Restrict reactor thread information to the reactor owner.
  • Free exit callback results and validate admin parameters.
  • Fix handler types and stop on conversion exceptions.
  • Function aliases preserve variadic arguments.
  • Use reentrant localtime/gmtime for the logger and static handlers.
  • Reject duplicate construction of native resource objects.

Fixes: Socket, DNS, io_uring, and Windows

  • Allow TCP listeners to rebind.
  • Complete pending closes and clean up UNIX paths.
  • Fix UNIX datagram address ownership.
  • recvfrom preserves the source address for empty datagrams.
  • Fix the length parameter of socket send and improve peek.
  • Interpret socket options at their respective protocol levels.
  • Initialize the option buffer before a short kernel reply.
  • Preserve incomplete packets after a receive timeout.
  • Allow SSL descriptor duplication and fix cross-platform regressions.
  • Preserve native coroutine socket errors.
  • Drain Windows IOCP operations before PHP close returns.
  • Fix IOCP completion errors and stale readiness dispatch.
  • Pass null to getaddrinfo() when no service is given.
  • Handle EPOLLERR on c-ares sockets to stop worker busy loops.
  • Use ares_socket_t for c-ares socket callbacks.
  • Randomize DNS request ids and only accept replies from DNS servers.
  • Change DNS request ids to sequential increments starting from a random value.
  • Avoid invalid weight conversion warnings in name-resolver.
  • io_uring records SSL_ERROR_ZERO_RETURN as SW_ERROR_SSL_RESET.
  • io_uring validates runtime compatibility.
  • io_uring allows compatible liburing minor versions.
  • Improve io_uring initialization error messages.
  • Preserve Atomic wakeups during interrupted waits.
  • Preserve futex timeout and non-zero value semantics.
  • Use usleep for non-futex atomic waits.
  • Prevent lost wakeups when the AIO thread pool shuts down.
  • Fix crashes caused by PHP requests starting in threads not created by Swoole.

新特性

  • 支持 HTTP QUERY 方法。
  • 协程 HTTP 服务器可发送 100 Continue。
  • 运行时 hook 基于 socket 的标准流 STDIN/STDOUT/STDERR。
  • 线程模式构建启用协程抢占。
  • 协程取消带上原因 cancellation reason。
  • sendfile 支持传文件对象。
  • HTTP/2 协程客户端在 Response::$trailers 暴露 trailing HEADERS 帧。
  • Socket\Coro 新增 export() 复制 socket fd。
  • sockets 扩展对非阻塞与 UNIX 数据报限制给出警告。
  • socket 单独跟踪已观察到的流 EOF。
  • Atomic 增加 acquire/release 原子操作。
  • name-resolver 增加自动服务发现生命周期并隔离解析器状态。
  • 新增 ssh2_set_timeout()。
  • 新增 ssh2_keepalive_config() 与 ssh2_keepalive_send()。
  • 新增 ssh2_send_signal()。

修复:HTTP/1、上传与静态文件

  • 接受 chunked transfer coding 之后的尾部 OWS。
  • 处理 HTTP/1 头里的可选空白。
  • HTTP/1.0 请求忽略 100-continue。
  • 处理 HTTP body 边界与 100 Continue。
  • 精确解析协程服务器的 chunked 请求。
  • 协程服务器 chunked 请求缓冲可增长。
  • 清理 trailers 后再终止 chunked 响应。
  • 修正 HTTP/1 trailer 的完成判定。
  • 忽略 HTTP/1 请求 trailers。
  • 请求行不完整时后续数据到达会重新解析。
  • 跨多次 parse 调用保留请求字段。
  • 防止包长限制下溢。
  • 保留响应头的值不被改写。
  • 释放捕获的 HTTP/1 content type。
  • 响应体先解压再交给 write_func。
  • 静态响应的 Date 头输出 GMT。
  • 加固静态文件响应处理。
  • upgrade/redis 处理器容忍连接被并发关闭。
  • 修复 HTTP ip 内存泄漏。
  • 拒绝超大的 HTTP Upgrade 值。
  • 修复 multipart 上传临时文件错误。
  • 加固 multipart 解析与上传生命周期。
  • 保持已上传文件路径存活。
  • tmpfiles 替换后仍保留上传清理。
  • 保留过长的上传临时目录路径。
  • URL 编码加边界并一次性分配输出。

修复:HTTP/2

  • 修正 HTTP/2 头与帧大小处理。
  • 响应头结束时收尾 HPACK 解码。
  • Content-Type 设置延后到 headers 完整之后。
  • 隔离请求 trailers 并统一 body 完成路径。
  • 连接级流控窗口从 65535 起算。
  • 读取前校验定长帧的 payload 长度。
  • 拒绝字段长度不足的 GOAWAY 帧。
  • GOAWAY 的 debug 数据按对端帧大小限长。
  • 发送正确的 PING payload 并拒绝长度错误的 PING。
  • 控制帧遇到满缓冲时不再杀掉 worker。
  • 拒绝超大 body 时复用 stream reset。
  • 修复 stream 终止后 HTTP/2 写停滞。
  • 修复另一个写正在等待时的客户端发送。
  • 写失败时关闭客户端连接。
  • 释放未完成响应时避免崩溃。

修复:WebSocket

  • BASE 模式下回调关闭连接导致的 double free 与 UAF。
  • 修复带掩码的压缩 WebSocket 帧解包。
  • 跨多个扩展 offer 协商压缩。
  • 压缩输出缓冲安全增长。
  • 拒绝不成功的 WebSocket 升级。
  • 拒绝 websocket token 解析错误。

修复:HTTP 客户端、curl、FastCGI、异步客户端

  • 修复协程 HTTP 客户端 socket 初始化。
  • 在 EOF 处拒绝被截断的响应。
  • 连接关闭状态按每次请求交换独立。
  • 清理下载状态但不丢重试目标。
  • 重复 close 时保留请求错误。
  • 处理分片的 HTTP 代理响应。
  • 保留 SOCKS5 响应边界。
  • 修复排队 cURL resume 的生命周期。
  • 同步 php-src 已发布的 PHP 8.4 curl 修复。
  • 用 socket API 时保留 curl multi select 的就绪状态。
  • PHP 流回调保持在请求线程上。
  • FastCGI 保留 cookie 并接受带 padding 的响应帧。
  • 更新内置 FastCGI 客户端并补响应回归。
  • 回调结束后释放异步客户端引用。
  • 连接入池前检查 socket 状态。
  • 自定义 package_length_func 下能接收分片包。
  • swoole_client_select() 的 pollfd 数组按三个数组总量分配。

修复:数据库钩子

  • 修复 Redis server 接收缓冲处理。
  • Redis 分片请求从干净状态重新解析。
  • RESP 数字在 get_number 与 parse 中做边界检查。
  • Redis 服务端数字解析传入包边界。
  • 保留 exec 错误、Redis 命令名与 cookie 状态。
  • pgsql 阻塞连接超时后尝试下一个 host。
  • PDO pgsql 驱动强制执行 connect_timeout。
  • 修复 pgsql 查询等待的取消。
  • 空的 PDO pgsql 错误消息不再提前读取。
  • ODBC 的 SQLParamData/SQLDescribeParam 放到 AIO 线程池。
  • ODBC 的 SQLCloseCursor 与语句 SQLFreeHandle 放到 AIO 线程池。
  • ODBC 连接池归一化空凭据长度。
  • Oracle 在 PDO 连接期间 hook server attachment。
  • Oracle 语句重复执行保持安全。

修复:SSH2

  • 修复 SSH2 资源释放生命周期。
  • 等待 shell 退出状态。
  • EAGAIN 之后刷新 poll 方向。
  • 避免 ssh2_set_timeout() 整数溢出。
  • libssh2 内存改用 malloc 分配。
  • wrapper 路径被拒绝时释放已解析的 URL。
  • SFTP wrapper 路径保留 # 与 ?。
  • SCP 接收在过早 EOF 处停止。
  • 同步上游 SCP 接收的写检查。

修复:协程、锁、定时器、Table

  • 修正 Coroutine::setTimeLimit() 精度与清理。
  • 允许用 0 清除时间限制。
  • 抢占关闭时忽略外部中断。
  • 修复 SPL 目录迭代期间的协程异常投递。
  • 延迟 resume 不再触碰已结束的 EventWaiter。
  • 保存的 timeout 数组按元素个数分配。
  • 协程创建失败后保留已排队任务。
  • ssl_sendfile 不发送超过请求大小的数据。
  • length 协议 recv 的 header 接收限长。
  • swoole_coroutine_accept 尊重调用方的地址缓冲。
  • 协程锁计数重入并在 unlock 时校验持有者。
  • 插入前拒绝会溢出的定时器 deadline。
  • 释放全局定时器前先摘除。
  • RSHUTDOWN 在没有请求堆的情况下清理 PHP 定时器。
  • Windows 校验定时器间隔并保护 process 测试。
  • force-unlock 超时后为存活持有者保留行锁(先前的强制解锁已被回滚)。
  • 缓存配置好的 error reporting 默认值。
  • 把 UnwindExit 传播到 ZendVM。

修复:Runtime 与 PHP 流钩子

  • 保留原生 zero-timeout 流行为。
  • 把流超时应用到被 hook 的写操作。
  • 部分写出后被取消的 hook 写操作要失败。
  • 修正空数据报与 EOF 下的 socket_recv 行为。
  • 拒绝 IP 流地址中的空字节。
  • 让 mysqlnd 识别被 hook 的 Unix socket。
  • 协程中拒绝设置全局 HTTP 响应头。
  • 工厂里保留同步失败的清理路径。
  • 连接出错时释放流,取消后停止。
  • 为 include 初始化 Windows stdio 操作。
  • 在 MINIT 阶段注册 after-fork 钩子。
  • settings 接受空数组并保留已启用的 SSL。
  • settings 传播异常并隔离线程回调。
  • 部分设置时保留 package limit。

修复:服务器、进程、任务与信号

  • 管理 worker 生命周期并改进关闭处理。
  • 保留 worker 退出并按序推进 reload。
  • 释放因 fatal error 停掉的 worker 的 reactor。
  • BASE 服务器停止时恢复调用方的 worker。
  • BASE 连接边界保持局部。
  • reactor 线程启动前只初始化一次端口协议。
  • worker 线程的 get_port 能匹配 SSL 端口。
  • 修复服务器 SSL 上下文初始化。
  • 强制执行服务端 TLS 对端校验。
  • 修正 Server Port set 的返回处理。
  • 接受 systemd 传入的已绑定数据报 socket。
  • macOS 上对端 shutdown 后发送 FIN。
  • 排队的 sendfile 无法启动时关闭连接。
  • 排队的 sendfile 无法完成时关闭连接。
  • 不可恢复的发送错误直接关闭连接。
  • 暂停的连接恢复时解析已缓冲的包。
  • onPackage 暂停 EOF 协议连接时保持连接且不重复投递。
  • onPackage 暂停连接时结清已投递的包。
  • length 协议的 header 接收保持在缓冲内。
  • recv_with_length_protocol 重置过期的 HTTP parse offset。
  • 避免 default_length_func 的有符号溢出。
  • 某个 chunk 的 readv 出错时让 pipe 读失败。
  • dgram pipe 发送缓冲保持在最大 IPC 数据报之上。
  • 统一 taskCo 与 taskWaitMulti 的结果契约。
  • worker 与线程之间共享原子任务 ID。
  • 隔离任务结果并修正 idle 与 DTLS 处理。
  • 校验任务结果并收紧失败清理。
  • 同步处理 force-kill 闹钟并跳过打包过期的大结果。
  • 拒绝非法的任务回复来源。
  • 澄清非法任务回复 worker 的告警。
  • 任务流 socket 用创建者 PID 命名。
  • 限制任务流 socket 的访问。
  • 任务消息队列限制为 worker 账户。
  • process-pool 支持显式消息队列访问。
  • 拒绝超出 key_t 范围的消息队列 key。
  • 多次 start 之间复用消息总线。
  • 超大的 worker_num 改为拒绝而不是 abort。
  • 修复 ProcessPool 流包被截断。
  • 校验 ProcessPool 包边界。
  • start() 之后释放 master 的系统定时器。
  • 派发同步 worker 的定时器。
  • 属主关闭时释放 MessageBus 资源。
  • 关闭后释放 BASE 事件池资源。
  • 修复线程 worker 的排队写。
  • 线程创建失败时释放启动参数。
  • 其他线程退出时保留主线程信号处理器。
  • PHP 与服务器 worker 继承被阻塞的信号。
  • 启动后台线程时保留信号掩码。
  • 线程上下文下把 SIGCHLD 注册到 reactor 线程。
  • 不丢弃在信号处理器执行期间到达的信号。
  • 移除监听器时恢复信号动作。
  • fork 出的子进程重置信号监听器状态。
  • 没有 kqueue reactor 时清理继承的处理器。
  • 阻止 worker 进程执行 manager 专属信号处理器。
  • 继承了 manager 处理器的子进程不再丢 SIGTERM。
  • 重置继承的 manager 运行时状态。
  • 同步进程里延迟处理日志重开信号。
  • 加固 manager 信号、任务超时清理与 core 辅助函数。
  • 初始化完成前保留待处理的 reload 任务。
  • 防止等待前丢失 reload 唤醒。
  • worker 退出后取消关闭定时器。
  • 用 pcntl_waitpid 保留无关子进程的退出状态。
  • 把配置的 CPU 亲和性应用到 worker。
  • 修正 cpu_affinity_ignore 处理。
  • 修正 CPU 亲和性 ID。
  • 亲和性 ID 按 CPU 数量校验。
  • get_connection_by_session_id 校验 session id。
  • admin 数字标识符校验不做窄化。
  • reactor 线程信息只对 reactor 属主开放。
  • 释放 exit 回调结果并校验 admin 参数。
  • 修正 handler 类型并在转换异常时停止。
  • 函数别名保留可变参数。
  • logger 与静态处理器改用可重入的 localtime/gmtime。
  • 拒绝重复构造原生资源对象。

修复:Socket、DNS、io_uring、Windows

  • 允许 TCP 监听器重新 bind。
  • 完成待处理的 close 并清理 UNIX 路径。
  • 修复 UNIX 数据报地址归属。
  • recvfrom 对空数据报保留源地址。
  • 修正 socket send 的长度参数并改进 peek。
  • socket 选项按各自协议层级解释。
  • 内核短回复前先初始化选项缓冲。
  • 接收超时后保留不完整的包。
  • 允许 SSL 描述符复制并修跨平台回归。
  • 保留原生协程 socket 错误。
  • PHP close 返回前排空 Windows IOCP 操作。
  • 修复 IOCP 完成错误与过期就绪派发。
  • 未给 service 时向 getaddrinfo() 传 null。
  • 处理 c-ares socket 的 EPOLLERR,止住 worker 忙循环。
  • c-ares socket 回调改用 ares_socket_t。
  • 随机化 DNS 请求 id 且只接受来自 DNS 服务器的回复。
  • DNS 请求 id 改为随机起点的顺序递增。
  • name-resolver 避免非法权重转换告警。
  • io_uring 把 SSL_ERROR_ZERO_RETURN 记为 SW_ERROR_SSL_RESET。
  • io_uring 校验运行时兼容性。
  • io_uring 允许兼容的 liburing 次版本。
  • 改进 io_uring 初始化错误提示。
  • 被中断的等待中保留 Atomic 唤醒。
  • 保留 futex 超时与非零值语义。
  • 非 futex 的原子等待改用 usleep。
  • 防止 AIO 线程池关闭时丢唤醒。
  • 修复 PHP 请求在非 Swoole 创建的线程中启动导致的崩溃。