Commit f58a4b853f5 for php

commit f58a4b853f5d0295987600dde15488b8fc1d9adf
Merge: 79bfe96f2d6 6ac67bcd326
Author: Jakub Zelenka <bukka@php.net>
Date:   Mon Nov 30 22:26:08 2026 +0100

    Merge branch 'PHP-8.3' into PHP-8.4

    * PHP-8.3:
      ext/soap: fix DTD node being matched as an element

diff --cc NEWS
index 601a48e9365,7b90da9df57..cf825696a91
--- a/NEWS
+++ b/NEWS
@@@ -1,399 -1,12 +1,401 @@@
  PHP                                                                        NEWS
  |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 -?? ??? ????, PHP 8.3.38
 +?? ??? ????, PHP 8.4.29
 +
 +- BZ2:
 +  . Fixed a crash when opening a compress.bzip2:// stream for writing fails.
 +    (Schwarzemann)
 +  . Fixed bug GH-25903 (bzip2.decompress write filter writes past its input
 +    buffer after a data error). (Artem Ukrainskiy)
 +
 +- CLI:
 +  . Fixed built-in server rejecting long request paths, or paths received in
 +    several pieces, as malformed. (Ilia Alshanetsky)
 +
 +- Core:
 +  . Fixed AST printing of interface extends list as implements. (Jorg Sowa)
 +  . Fixed AST printing dropping fully qualified and namespace-relative prefixes
 +    of class names in implements, catch, and trait use lists. (Jorg Sowa)
 +  . Fixed AST export dropping the braces of dynamic class constant fetches.
 +    (Jorg Sowa)
 +  . Fixed bug GH-25265 (Misaligned read for virtual internal props in
 +    hooked subclass). (Lazizbek Ergashev)
 +  . Fixed bug GH-25299 (Exception string code is lost after unserialize()).
 +    (Lazizbek Ergashev, David Carlier)
 +  . Fixed bug GH-25302 (Use-after-free in zend_compile_const_decl() with
 +    OPcache during concurrent compilation). (Nicolas Grekas)
 +  . Fixed use-after-free when the error handler releases a string while an
 +    "Illegal string offset" warning is raised for its offset in a read, ?? or
 +    nested isset()/empty(). (Jorg Sowa)
 +  . Fixed AST printing dropping readonly on promoted constructor parameters.
 +    (Jorg Sowa)
 +  . Fixed bug GH-25311 (Assertion ret == SUCCESS in array_map()/array_filter()
 +    after delayed out-of-memory). (ndossche)
 +  . Fixed AST export of by-reference property hooks. (Jorg Sowa)
 +  . Fixed object_properties_load() adding integer keys to property tables, which
 +    made the properties unreadable and clone hit an assertion.
 +    (Nicolas Grekas)
 +  . Fixed stack limit on OpenBSD threads other than the main one.
 +    (Ostap Brehin)
 +  . Fixed stack limit fallback on FreeBSD threads other than the main one.
 +    (Ostap Brehin)
 +  . Fixed propagation of public(set) of readonly trait property. (ilutov)
 +  . Fixed bug GH-25313 (Assertion !EG(exception) in ZEND_FE_FREE when unpacking
 +    a generator into a by-ref parameter throws). (ndossche)
 +  . Fix OSS-Fuzz #588264417. (ndossche)
 +  . Fixed bug GH-24701 (Use-after-free on typed trait constants during
 +    opcache preload). (sanklamm, lazerg)
 +  . Fixed NULL dereference at startup when the ini file found in the search
 +    path has an absolute path exceeding MAXPATHLEN. (Jorg Sowa)
 +  . Fixed bug GH-25304 (JIT: SEGV in exception handler stub after OOM inside
 +    an output-buffer callback). (David Carlier)
 +
 +- Curl:
 +  . Fixed curl_reset() retaining CURLOPT_PRIVATE after reset. (lacatoire)
 +
 +- Date:
 +  . Fixed truncated timezone name for UTC offsets of 100 hours or more
 +    created by DateTime::createFromFormat(). (Jorg Sowa)
 +
 +- DBA:
 +  . Fixed dba_close() not closing a database opened with dba_popen().
 +    (Ilia Alshanetsky)
 +  . Fixed bug GH-24640 (tcadb handler allows injecting Tokyo Cabinet
 +    parameters via "#" in the path). (Lazizbek Ergashev)
 +
 +- DOM:
 +  . Fixed bug GH-25268 (NULL php_libxml_ref_obj dereference in
 +    dom_objects_store_clone_obj when cloning Dom\Notation). (David Carlier)
 +  . Fixed bug GH-25306 (Assertion status == LXB_STATUS_OK in dom_parse_selector
 +    when lexbor allocation fails). (ndossche)
 +  . Fixed bug GH-25434 (C14NFile() on a Dom\XMLDocument leaves the document
 +    changed and leaks memory). (lazerg)
 +  . Fixed crash when registerNodeClass() is given a class with a constant
 +    expression that cannot be evaluated; registerNodeClass() now throws the
 +    evaluation Error instead. (Ilia Alshanetsky)
 +  . Fixed bug GH-25501 (querySelector() rejects a selector whose identifier
 +    starts with a non-ASCII character). (David Carlier)
 +  . Fixed a crash and a use-after-free in key() of an attribute or DTD named
 +    node map iterator that has no current item. (Ilia Alshanetsky)
 +  . Fixed use-after-free in getElementById() after a removed ID attribute is
 +    freed. (Ilia Alshanetsky)
 +  . Fixed bug GH-25752 (Reading Dom\Notation publicId or systemId can crash).
 +    (Ian Mattas)
 +  . Fixed bug GH-25750 (adoptNode() accepts DTD declaration nodes, which can
 +    crash at document teardown). (Ian Mattas)
 +  . Fixed crash in Dom\Node::lookupPrefix() on a text node inside a DTD entity
 +    declaration. (Ian Mattas)
 +
 +- FFI:
 +  . Fixed bug GH-25558 (struct with an enum field passed by value is described
 +    to libffi with a void element). (Davide Peressoni)
 +  . Fixed FFI::string(), FFI::memcpy(), FFI::memcmp() and FFI::memset()
 +    reading or writing out of bounds for a negative size. (Marc Bennewitz)
 +
 +- Filter:
 +  . Fixed stack overflow in filter_var() and filter_var_array() with deeply
 +    nested arrays. (Eyüp Can Akman)
 +
 +- FPM:
 +  . Fixed stack buffer overflow when logging an error with errno text and
 +    log_limit above 2048. (Jorg Sowa)
 +
 +- GD:
 +  . Fixed use-after-free when drawing with a brush or tile image that was
 +    released after imagesetbrush() or imagesettile(). (lacatoire)
 +  . Fixed the argument blamed by the imagepolygon(), imageopenpolygon() and
 +    imagefilledpolygon() too few points error. (lacatoire)
 +
 +- Gettext:
 +  . Fixed bug GH-25584 (JIT frees the string returned by gettext(),
 +    dgettext() or dcgettext() while it is still in use). (Ilia Alshanetsky)
 +
 +- Hash:
 +  . Fixed hash() and hash_file() hanging on invalid xxh3/xxh128 options.
 +    (lacatoire)
 +
 +- Iconv:
 +  . Fixed iconv_mime_encode() failing with an integer overflow error for a
 +    negative line-length. (lacatoire)
 +
 +- Intl:
 +  . Fixed Locale::lookup() ignoring the default locale when the language tag
 +    list is empty. (Weilin Du)
 +  . Fixed intl_error_name() truncating error codes outside the int range.
 +    (lacatoire)
 +  . Fixed IntlCalendar::setTime() accepting non-finite timestamps. (Weilin Du)
 +  . Fixed MessageFormatter::setPattern() losing the previous pattern when
 +    the new pattern is invalid. (Weilin Du, David Carlier)
 +  . Fixed a crash when Intl formatters receive an uninitialized DateTime
 +    subclass (GH-25878). (Ho Hoang Phu)
 +  . Fixed NULL pointer dereference in Locale::parseLocale() and
 +    Locale::getAllVariants() with delimiter-only private or variant subtags.
 +    (Ho Hoang Phu)
 +  . Fixed use-after-free in MessageFormatter::format() when the __toString()
 +    of an argument calls MessageFormatter::setPattern(). (Ho Hoang Phu,
 +    David Carlier)
 +  . Fixed use-after-free in UConverter::convert() when toUCallback() or
 +    fromUCallback() changes the encodings or calls the constructor again.
 +    (Ho Hoang Phu)
 +
 +- JSON:
 +  . Fixed json_decode() and json_validate() error messages. (lacatoire)
 +
 +- MBString:
 +  . Fixed stack overflow in mb_check_encoding() and mb_convert_encoding() with
 +    deeply nested arrays. (Eyüp Can Akman)
 +  . Fixed the JIT freeing the string returned by mb_encode_mimeheader() or
 +    mb_output_handler() while it is still in use. (Ilia Alshanetsky)
 +  . Fixed ISO-2022-JP-2004 output omitting the plane designation when switching
 +    between JIS X 0213 plane 1 and plane 2. (Jorg Sowa)
 +  . Fixed ISO-2022-JP-2004 output dropping a trailing combining base character
 +    after switching to JIS X 0213 plane 1. (Jorg Sowa)
 +  . Fixed integer overflow in the string count of mb_convert_variables()
 +    leading to a heap out-of-bounds write. (Jorg Sowa)
 +
 +- MySQLi:
 +  . Fixed bug GH-25779 (mysqli_fetch_object() crashes with JIT when the
 +    constructor keeps a reference and the result is discarded).
 +    (Tomasz Kowalczyk)
 +
 +- Opcache:
 +  . Fixed bug GH-24801 (JIT: SIGFPE in ir_fold MUL_OV constant folding).
 +    (waroad)
 +  . Fixed bug GH-25165 (Tracing JIT loops forever once opcache.jit_buffer_size
 +    is exhausted while compiling side traces). (Ilia Alshanetsky)
 +  . Fixed bug GH-25164 (Function JIT loop calling a user function runs once
 +    or never terminates). (Ilia Alshanetsky)
 +  . Fixed memory leak in JIT ASSIGN_DIM when the assignment fails. (Jorg Sowa)
 +  . Fixed bug GH-16396 (Failed to invoke user error handler during index
 +    conversion in JIT). (Jorg Sowa)
 +  . Fixed bug GH-25037 (Function JIT ENTRY live var assertion).
 +    (Ilia Alshanetsky)
 +  . Fixed JIT ignoring leading-numeric string offsets in isset(), empty() and
 +    ??. (Jorg Sowa)
 +  . Fixed use-after-free in JIT when the error handler releases a string while
 +    an "Undefined variable" warning is raised for its offset in ?? or nested
 +    isset()/empty(). (Jorg Sowa)
 +  . Fixed tracing JIT reading the int result of ++/-- on a reference as a
 +    double. (ChrisAbner)
 +  . Fixed bug GH-25359 (Tracing JIT drops reference type of a named by-ref
 +    argument). (David Carlier)
 +  . Fixed bug GH-8739 (OPcache restart corrupts SHM in threaded SAPIs).
 +    (pavimus)
 +  . Fixed opcache.enable_file_override lookups racing with OPcache restarts
 +    (pavimus)
 +  . Fixed incorrect constant propagation when unpacking into partially known
 +    arrays. (Weilin Du)
 +  . Fixed function JIT ASSIGN_DIM reporting an undefined value or key out of
 +    order, or when the VM does not, on non-array containers. (Jorg Sowa)
 +  . Fix JIT register allocation for ASSIGN to traced reference. (ndossche)
 +  . Fixed a double free when a destructor throws while freeing a temporary
 +    whose result the optimizer discarded. (Ilia Alshanetsky)
 +
 +- PDO_DBLIB:
 +  . Fixed a crash on persistent connections after an error raised through
 +    PDO::exec(). (Ilia Alshanetsky)
 +
 +- PDO_Firebird:
 +  . Fixed stack buffer overflow with long connection user names, passwords,
 +    charsets, or roles. (Ilia Alshanetsky)
 +
 +- PCNTL:
 +  . Fixed pcntl_signal() raising a fatal error for SIGKILL and SIGSTOP.
 +    (lacatoire)
 +
 +- PCRE:
 +  . Fixed \C being allowed in patterns enabling UTF mode with (*UTF) instead
 +    of the u modifier. (Jorg Sowa)
 +
 +- PDO_MYSQL:
 +  . Fixed a crash when executing a prepared statement again after a failed
 +    execute() with libmysqlclient. (Ilia Alshanetsky)
 +
 +- PDO_SQLite:
 +  . Fixed bug GH-25588 (Use-after-free of a string parameter omitted on a later
 +    execute() or rebound while fetching). (Ilia Alshanetsky)
 +  . Fixed bug GH-23756 (Crash when a callback closes the cursor of or
 +    re-executes the statement being executed). (Lazizbek Ergashev)
 +
 +- PGSQL:
 +  . Fixed bug GH-25772 (pg_fetch_object() crashes with JIT when the constructor
 +    keeps a reference and the result is discarded). (Tomasz Kowalczyk)
 +  . Fixed bug GH-25802 (pg_get_notify() result is never === false with opcache
 +    enabled). (Tomasz Kowalczyk)
 +  . Fixed bug GH-25825 (pg_meta_data() numeric column names are not integer keys
 +    with opcache enabled). (Tomasz Kowalczyk)
 +
 +- Phar:
 +  . Fixed bug GH-25528 (Phar::setSignatureAlgorithm(): OpenSSL signing reads a
 +    freed private key). (Artem Ukrainskiy)
 +  . Fixed use-after-free when unsetting an entry with an open handle.
 +    (David Carlier)
 +  . Fixed bug GH-25722 (phar_archive_delref() double free on shared archive at
 +    shutdown). (David Carlier)
 +
 +- POSIX:
 +  . Fixed bug GH-25530 (posix_get_last_error() returns an error from a
 +    previous request). (Artem Ukrainskiy)
 +  . Fixed posix_access() returning false for an empty filename instead of
 +    throwing a ValueError (GH-25589). (lacatoire)
 +
 +- Readline:
 +  . Fixed incorrect handling of non-ASCII pending_input bytes in readline_info(),
 +    which could cause readline() to return false prematurely. (Weilin Du)
 +
 +- Reflection:
 +  . Fix trampoline leak when object construction fails for lazy object.
 +    (ndossche)
 +  . Fixed ReflectionMethod::getClosure() returning a closure for abstract
 +    methods, which crashed when called for the ones of internal classes.
 +    (Nicolas Grekas)
 +  . Don't call destructor when constructor is not public in newInstance(Args)().
 +    (ndossche)
 +
 +- SNMP:
 +  . Fixed use-after-free of the context name set by SNMP::setSecurity().
 +    (lacatoire)

  - SOAP:
 +  . Fixed bug GH-25267 (NULL dereference in to_xml_any() with integer key).
 +    (lazerg)
 +  . Fixed bug GH-25094 (NULL dereference in get_doc_function() with missing
 +    parts). (lazerg)
 +  . Fixed SOAP error handler dropping a custom HTTP status line on a non-fatal
 +    error. (lacatoire)
+   . Fixed bug GH-25628 (SOAP crashes when importing the XMLDSIG schema).
+     (Jakub Zelenka, ndossche)

 -19 Nov 2026, PHP 8.3.37
 +- Sockets:
 +  . Fixed bug GH-25530 (socket_last_error() without a socket returns an error
 +    from a previous request). (Artem Ukrainskiy)
 +  . Fixed host names being truncated at NUL bytes in socket_addrinfo_lookup(),
 +    socket_bind(), socket_connect(), socket_sendto() and socket_sendmsg().
 +    (Jorg Sowa)
 +  . Fixed socket_close() leaking the stream resource of a Socket created by
 +    socket_import_stream() or socket_export_stream(). (lacatoire)
 +
 +- Session:
 +  . Fixed session upload progress to respect session.use_only_cookies.
 +    (jorgsowa)
 +
 +- SimpleXML:
 +  . Fixed a crash with opcache when simplexml_load_string(),
 +    simplexml_load_file() or simplexml_import_dom() is given a class whose
 +    property defaults use constants. A class with an undefined constant now
 +    throws an Error instead of returning an object with unresolved values.
 +    (Ilia Alshanetsky)
 +
 +- Sodium:
 +  . Fixed sodium_add() and sodium_increment() retaining stale string hashes
 +    and UTF-8 validity flags. (lacatoire)
 +
 +- SQLite:
 +  . Fixed bug GH-25809 (SQLite3::backup() returns true when the backup fails).
 +    (Tomasz Kowalczyk)
 +
 +- Standard:
 +  . Fixed bug GH-25474 (version_compare() treats large numeric parts as equal
 +    on 64-bit Windows). (lazerg, timwolla)
 +  . Fixed dns_get_record() returning partially built records for malformed
 +    DNS responses. (Marti2203)
 +  . Fixed bug GH-25387 (Uploaded files leak in request_parse_body()).
 +    (Kévin Dunglas)
 +  . Fixed bug GH-24743 (var_export() ignores exceptions from lazy object
 +    initialization). (lazerg)
 +  . Fixed memory leak in get_meta_tags() when a tag opens while an attribute
 +    value is expected. (Jorg Sowa)
 +  . Fixed bug GH-25284 (quoted_printable_encode() splits UTF-8 characters).
 +    (Lazizbek Ergashev, Matthijs Kooijman)
 +  . Fixed bug GH-24441 (quoted_printable_encode() produces lines longer than
 +    76 characters for bytes 0xF5 to 0xFF). (Sebastian Turner,
 +    Lazizbek Ergashev)
 +  . Fixed getimagesize() reporting wrapped dimensions for XBM images with
 +    out-of-range width or height. (Ilia Alshanetsky)
 +  . Fixed bug GH-25281 (Use-after-free when proc_open() pipe is closed from
 +    its user filter). (Jakub Zelenka)
 +
 +- Streams:
 +  . Fixed bug GH-22063 (Stream filter chain UAF on self-removal during
 +    callback). (Ilia Alshanetsky)
 +  . Fixed leaks and data loss when user filter leaves buckets on input
 +    brigade. (ndossche, Matthias Goergens, Jakub Zelenka)
 +  . Fixed bug GH-24175 (Use-after-free when pclose() closes a stream from its
 +    user filter). (Edmond)
 +  . Fixed bug GH-15701 (Build failure: incompatible funopen() seeker pointer
 +    type on 32-bit platforms). (Kamil Tekiela)
 +  . Fixed bug GH-25464 (Segfault reading from php://memory after
 +    stream_filter_remove() on a read filter). (David Carlier)
 +  . Fixed stream_context_create() and stream_context_set_params() rejecting
 +    an options array passed by reference in the context parameters. (lacatoire)
 +  . Fixed bug GH-25862 (Heap buffer overflow in _php_stream_fill_read_buffer()
 +    when a read filter increases the stream chunk size). (matyapiro31, lazerg)
 +
 +- XML:
 +  . Fixed xml_error_string() returning the wrong message for libxml error
 +    codes 1 to 4. (lacatoire)
 +  . Fixed xml_set_element_handler() blaming the wrong argument for an invalid
 +    end handler and emitting a false null deprecation. (lacatoire)
 +
 +- XSL:
 +  . Fixed a crash in XSLTProcessor::transformToDoc() when the return class
 +    cannot be instantiated. (Ilia Alshanetsky)
 +
 +- Zlib:
 +  . Fixed gzwrite() and fwrite() on a compress.zlib:// stream reporting a
 +    failed write as a successful write of 0 bytes. (lacatoire)
 +  . Fixed a file descriptor leak when opening a compress.zlib:// stream
 +    fails. (lacatoire)
 +
 +19 Nov 2026, PHP 8.4.28
 +
 +- Core:
 +  . Fixed bug GH-24184 (System ID not being reinitialized after an Apache
 +    graceful restart, potentially causing incompatible OPcache file cache
 +    entries to be reused). (Levi Morrison)
 +  . Fixed memory leak when an exception already contains the pending exception
 +    in its previous chain. (Edmond)
 +  . Fixed bug GH-23979 (Nullsafe operator must not flush delayed oplines of an
 +    enclosing function). (ndossche)
 +  . Fixed memory manager keeping a block reallocated to exactly the size of
 +    the next smaller bin in its larger bin, which efree_size() then freed
 +    into the wrong one. (Marc Bennewitz)
 +  . Fixed bug GH-24218 (Invalid opcode for count() of a literal array
 +    without SCCP). (lazerg)
 +  . Fix throwing behaviour with recursive arrays in VM. (ndossche)
 +  . Fixed skipped catch block when switching fibers during exception unwinding
 +    (Nicolas Grekas)
 +  . Fix escape analysis for objects implementing ArrayAccess. (ndossche, Arnaud)
 +  . Fix UAF for resolved callable zval. (EdmondDantes)
 +  . Fix memory leak for nested HTTP calls. (EdmondDantes)
 +  . Fixed pthread attribute leak in zend_call_stack_get_netbsd_pthread().
 +    (David Carlier)
 +  . Fixed bug GH-24321 (ZTS: global_map_ptr_last survives zend_shutdown(),
 +    so an in-process engine restart keeps growing the map_ptr table).
 +    (David Carlier)
 +  . Fix function and constant imports in compile_to_ast and add support
 +    for grouping. (Klaas Skelte van der Werf)
 +  . Fixed bug GH-24265 (Unwind/GracefulExit discarded in
 +    zend_fiber_execute()). (David Carlier)
 +  . Fixed bug GH-24668 (zend_set_local_var() leaks the previous value of an
 +    existing CV). (yasu20200121web-prog, lazerg)
 +  . Fixed unmapping of an unrelated range when the aligned chunk mmap fails
 +    (Marti2203).
 +  . Fixed bug GH-24989 (Use-after-free in GC when an exception is thrown).
 +    (David Carlier)
 +  . Fixed bug GH-24534 (Segfault in zend_try_early_bind when a parent class
 +    autoloads its cached child during linking). (David Carlier)
 +  . Fixed AST printing dropping final on class constants and properties, and
 +    abstract on properties. (Jorg Sowa)
 +  . Fixed AST export of readonly anonymous classes dropping the readonly
 +    modifier. (Jorg Sowa)
 +  . Fixed memory leak of a duplicate named argument in new in initializer.
 +    (Jorg Sowa)
 +  . Fixed bug GH-25061 ($x = $x - 1 on null is optimized to PRE_DEC).
 +    (Lazizbek Ergashev)
 +  . Fixed bug GH-24480 (Finally block running a second time when a VM interrupt
 +    throws as the finally block returns to a "return" in its try block).
 +    (C. Scott Ananian)

  - CGI:
    . Fixed GHSA-5j3f-64r7-f564 (PHP-CGI out-of-bounds read and write during