Skip to content

Commit f106434

Browse files
committed
Merge tag 'php-8.5.10' into was-8.5.x
Tag for php-8.5.10
2 parents 49dcb53 + 34308a6 commit f106434

177 files changed

Lines changed: 5441 additions & 658 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
/ext/phar @LamentXU123
4848
/ext/random @TimWolla @zeriyoshi
4949
/ext/reflection @DanielEScherzer
50-
/ext/session @Girgias
50+
/ext/session @Girgias @jorgsowa
5151
/ext/simplexml @devnexen
5252
/ext/soap @devnexen
5353
/ext/sockets @devnexen

‎.github/matrix.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
187187
foreach ($branches as &$branch) {
188188
$php_version = $branch['version'][0] . '.' . $branch['version'][1];
189189
$branch['jobs'] = select_jobs($repository, $trigger, $nightly, $labels, $php_version, $branch['ref'], $all_variations);
190+
$branch['config']['default_run_test_jobs'] = version_compare($php_version, '8.6', '>=') ? '' : '-j2';
190191
$branch['config']['ubuntu_version'] = version_compare($php_version, '8.5', '>=') ? '24.04' : '22.04';
191192
}
192193

‎.github/scripts/windows/test_task.bat‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release
115115
if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS
116116

117117
rem prepare for mail
118-
curl -sLo hMailServer.exe https://www.hmailserver.com/download_file/?downloadid=271
119-
hMailServer.exe /verysilent
118+
curl -sLo hMailServer.zip https://downloads.php.net/~windows/php-sdk/deps/vs18/x64/hmailserver-5.7.0-vs18-x64.zip
119+
unzip -q hMailServer.zip -d hMailServer
120+
hMailServer\bin\hMailServer.exe /verysilent
120121
cd %APPVEYOR_BUILD_FOLDER%
121122
%PHP_BUILD_DIR%\php.exe -dextension_dir=%PHP_BUILD_DIR% -dextension=com_dotnet .github\setup_hmailserver.php
122123

‎.github/workflows/test-suite.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,10 @@ jobs:
573573
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
574574
# Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
575575
php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("public function testCastNonTrailingCharPointer()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
576+
# Causes massive amounts of system calls with USE_ZEND_ALLOC=0, exceeding the timeout
577+
if [ -e 'src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php' ]; then
578+
php -r '$c = file_get_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php"); $c = str_replace("public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", $c); file_put_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php", $c);'
579+
fi
576580
export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
577581
X=0
578582
for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
@@ -848,12 +852,12 @@ jobs:
848852
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
849853
PHP_BUILD_OBJ_DIR: C:\obj
850854
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
851-
PHP_BUILD_SDK_BRANCH: php-sdk-2.7.1
855+
PHP_BUILD_SDK_BRANCH: php-sdk-2.8.2
852856
PHP_BUILD_CRT: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}
853857
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
854858
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
855859
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
856-
PARALLEL: -j2
860+
PARALLEL: ${{ matrix.asan && '-j2' || fromJson(inputs.branch).config.default_run_test_jobs }}
857861
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
858862
ASAN: "${{ matrix.asan && '1' || '0' }}"
859863
CLANG_TOOLSET: "${{ matrix.clang && '1' || '0' }}"
@@ -915,6 +919,7 @@ jobs:
915919
with:
916920
ref: ${{ fromJson(inputs.branch).ref }}
917921
fetch-depth: 0
922+
filter: blob:none
918923
# ASLR can cause a lot of noise due to missed sse opportunities for memcpy
919924
# and other operations, so we disable it during benchmarking.
920925
- name: Disable ASLR

‎NEWS‎

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,110 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
27 Aug 2026, PHP 8.5.10
4+
5+
- Core:
6+
. Fixed bug GH-22782 (Const expr FCC crashes under preloading). (Arnaud)
7+
. Fixed bug GH-23088 (Stack overflow when comparing deeply nested arrays).
8+
(Lazizbek Ergashev)
9+
10+
- Date:
11+
. Fixed leak on double DatePeriod::__construct() call. (ilutov)
12+
13+
- DOM:
14+
. Fixed bug GH-23116 (Stack overflow when normalizing a deeply nested
15+
DOMDocument). (Lazizbek Ergashev)
16+
. Fixed bug GH-23117 (Stack overflow when normalizing a deeply nested
17+
Dom\XMLDocument). (Lazizbek Ergashev)
18+
. Fixed bug GH-22825 (DOMElement::setAttribute() fails silently when the DTD
19+
declares a default value for the attribute). (iliaal)
20+
. Fixed bug GH-23120 (Stack overflow when comparing deeply nested DOM nodes
21+
with DOMNode::isEqualNode()). (Weilin Du)
22+
23+
- Exif:
24+
. Fixed exif_read_data() allocating a HEIF meta box larger than the file
25+
it came from. (iliaal)
26+
27+
- Intl:
28+
. Fixed IntlListFormatter::__construct() leaving stale global error state
29+
after successful calls. (Weilin Du)
30+
31+
- Opcache:
32+
. Fixed GH-22693 (DT_TEXTREL in JIT-generated TLS access on x86_64).
33+
(David Carlier)
34+
. Fixed bug GH-22763 (JIT fails to clear ZREG_TYPE_ONLY after setting reg).
35+
(Arnaud)
36+
. Fixed bug GH-22857 (Function JIT emits wrong code for FETCH_OBJ_FUNC_ARG on
37+
a property hook getter, losing register-held variables). (Zhao Hao)
38+
. Fixed bug GH-22916 (Preserve parent regs in zend_jit_deoptimizer_start()).
39+
(Arnaud)
40+
41+
- OpenSSL:
42+
. Fix missing error check on invalid alpn protocols. (ndossche)
43+
44+
- MBString:
45+
. Fixed bug GH-22779 (mb_strrpos() returns the wrong position for a negative
46+
offset in a non-UTF-8 encoding). (Eyüp Can Akman)
47+
. Fixed bug GH-21036 (mb_ereg_search_getregs() crashes after mb_eregi()
48+
invalidates the regex cache). (Matthias Goergens)
49+
50+
- PCRE:
51+
. Fixed bug GH-21134 (Crash with \C + UTF-8). Using \C in UTF-8 patterns is
52+
now forbidden. (Arnaud)
53+
54+
- PDO_ODBC:
55+
. Fixed bug GH-23016 (NULL values in long columns come back as garbage
56+
binary strings). (Calvin Buckley, iliaal)
57+
58+
- PDO_PGSQL:
59+
. Fixed several lazy fetch (PDO::ATTR_PREFETCH => 0) defects: an infinite
60+
loop when cleaning up a fetch left in a COPY, a use-after-free when a
61+
statement with emulated or disabled prepares is destroyed, a connection
62+
left busy for the next fetch, and rows delivered from a result another
63+
statement took over. (KentarouTakeda)
64+
65+
- Reflection:
66+
. Fixed bug GH-22905 (Reflection exception messages truncate on null bytes).
67+
(DanielEScherzer)
68+
. Fixed ReflectionProperty::isLazy() and skipLazyInitialization() using the
69+
parent slot when a child class hooks an inherited property. (iliaal)
70+
. Fixed segfault in ReflectionMethod::createFromMethodName() on an
71+
uninstantiable subclass. (iliaal)
72+
73+
- Session:
74+
. Fix corruption in mod_mm. (ndossche)
75+
. Fixed bug GH-23043 (broken session id code can cause zend_mm_heap
76+
corrupted). (ndossche)
77+
78+
- SimpleXML:
79+
. Fixed integer element offsets that cannot resolve aliasing an existing
80+
element. (iliaal)
81+
. Fixed segfault when comparing uninitialized SimpleXMLElement
82+
instances. (iliaal)
83+
84+
- Sockets:
85+
. Fixed socket_set_option() validation error messages for UDP_SEGMENT and
86+
SO_LINGER options. (Weilin Du)
87+
. Fixed various memory related issues in ext/sockets. (David Carlier)
88+
89+
- SQLite:
90+
. Fix leak when trying to close db if blob stream is still open. (ndossche)
91+
92+
- Standard:
93+
. Fixed bug GH-23111 (Stack overflow in array_walk_recursive() with deeply
94+
nested arrays). (Lazizbek Ergashev)
95+
. Fixed bug GH-23113 (Stack overflow in array_replace_recursive() with deeply
96+
nested arrays). (Lazizbek Ergashev)
97+
. Fixed bug GH-23115 (Stack overflow in compact() with deeply nested
98+
arrays). (Lazizbek Ergashev)
99+
100+
- Streams:
101+
. Fixed bug GH-15836 (Use-after-free when a user stream filter accesses
102+
$this->stream during the close flush). (iliaal)
103+
104+
- XSL:
105+
. Fixed use-after-free when a DOMDocument subclass __clone() retains the
106+
stylesheet copy made by XSLTProcessor::importStylesheet(). (iliaal)
107+
3108
30 Jul 2026, PHP 8.5.9
4109

5110
- Core:

‎TSRM/TSRM.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ TSRM_API bool tsrm_is_managed_thread(void);
152152
# define __has_attribute(x) 0
153153
#endif
154154

155-
#if !__has_attribute(tls_model) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__MUSL__) || defined(__HAIKU__)
155+
#if !__has_attribute(tls_model) || defined(__FreeBSD__) || defined(__NetBSD__) \
156+
|| defined(__MUSL__) || defined(__HAIKU__) || defined(_AIX)
156157
# define TSRM_TLS_MODEL_ATTR
157158
# define TSRM_TLS_MODEL_DEFAULT
158159
#elif __PIC__
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
#[Attribute]
4+
class A {
5+
function __construct(public mixed $fn) {}
6+
}
7+
8+
#[A(strlen(...))]
9+
class C {
10+
const CC = strlen(...);
11+
12+
#[A(strlen(...))]
13+
function f($arg = strlen(...)) {
14+
return $arg;
15+
}
16+
}
17+
18+
const CC = strlen(...);
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
GH-22782: FCC preloading
3+
--EXTENSIONS--
4+
opcache
5+
--INI--
6+
opcache.enable=1
7+
opcache.enable_cli=1
8+
opcache.optimization_level=-1
9+
opcache.preload={PWD}/gh22782.inc
10+
opcache.file_cache_only=0
11+
--SKIPIF--
12+
<?php
13+
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
14+
?>
15+
--FILE--
16+
<?php
17+
18+
echo "# Class const\n";
19+
var_dump((C::CC)('hello'));
20+
echo "# Class attr\n";
21+
var_dump((new ReflectionClass(C::class)->getAttributes(A::class)[0]->newInstance()->fn)('hello'));
22+
echo "# Method attr\n";
23+
var_dump((new ReflectionMethod(C::class, 'f')->getAttributes(A::class)[0]->newInstance()->fn)('hello'));
24+
echo "# Method default value\n";
25+
var_dump((new C()->f())('hello'));
26+
27+
?>
28+
--EXPECT--
29+
# Class const
30+
int(5)
31+
# Class attr
32+
int(5)
33+
# Method attr
34+
int(5)
35+
# Method default value
36+
int(5)

‎Zend/tests/gh18572.phpt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ try {
3636
}
3737
?>
3838
--EXPECTREGEX--
39-
(Maximum call stack size reached during object comparison|Nesting level too deep - recursive dependency\?)
39+
(Maximum call stack size reached during (object )?comparison|Nesting level too deep - recursive dependency\?)

‎Zend/tests/gh23088.phpt‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
--TEST--
2+
GH-23088 (Stack overflow when comparing deeply nested arrays)
3+
--SKIPIF--
4+
<?php
5+
if (ini_get('zend.max_allowed_stack_size') === false) {
6+
die('skip No stack limit support');
7+
}
8+
if (getenv('SKIP_ASAN')) {
9+
die('skip ASAN needs different stack limit setting due to more stack space usage');
10+
}
11+
?>
12+
--INI--
13+
zend.max_allowed_stack_size=256K
14+
--FILE--
15+
<?php
16+
17+
$a = [];
18+
$b = [];
19+
20+
for ($i = 0; $i < 20000; $i++) {
21+
$a = [$a];
22+
$b = [$b];
23+
}
24+
25+
try {
26+
var_dump($a == $b);
27+
} catch (Error $e) {
28+
echo $e->getMessage(), PHP_EOL;
29+
}
30+
31+
try {
32+
var_dump($a === $b);
33+
} catch (Error $e) {
34+
echo $e->getMessage(), PHP_EOL;
35+
}
36+
37+
?>
38+
--EXPECT--
39+
Maximum call stack size reached during comparison
40+
Maximum call stack size reached during comparison

0 commit comments

Comments
 (0)