Skip to content

Commit cafd64a

Browse files
committed
Merge tag 'php-8.3.27' into was-8.3.x
Tag for php-8.3.27
2 parents 69f2c13 + ae65e64 commit cafd64a

File tree

84 files changed

+1474
-259
lines changed

Some content is hidden

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

84 files changed

+1474
-259
lines changed

.gdbinit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ define print_cvs
4242

4343
printf "Compiled variables count: %d\n\n", $cv_count
4444
while $cv_idx < $cv_count
45-
printf "[%d] '%s'\n", $cv_idx, $cv[$cv_idx].val
45+
printf "[%d] '$%s'\n", $cv_idx, $cv[$cv_idx].val@$cv[$cv_idx].len
4646
set $zvalue = ((zval *) $cv_ex_ptr) + $callFrameSize + $cv_idx
4747
printzv $zvalue
4848
set $cv_idx = $cv_idx + 1

.github/nightly_matrix.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22

33
const BRANCHES = [
4-
['ref' => 'master', 'version' => [8, 5]],
4+
['ref' => 'master', 'version' => [8, 6]],
5+
['ref' => 'PHP-8.5', 'version' => [8, 5]],
56
['ref' => 'PHP-8.4', 'version' => [8, 4]],
67
['ref' => 'PHP-8.3', 'version' => [8, 3]],
78
['ref' => 'PHP-8.2', 'version' => [8, 2]],

.github/scripts/windows/find-target-branch.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
for /f "usebackq tokens=3" %%i in (`findstr PHP_MAJOR_VERSION main\php_version.h`) do set BRANCH=%%i
44
for /f "usebackq tokens=3" %%i in (`findstr PHP_MINOR_VERSION main\php_version.h`) do set BRANCH=%BRANCH%.%%i
55

6-
if /i "%BRANCH%" equ "8.5" (
6+
if /i "%BRANCH%" equ "8.6" (
77
set BRANCH=master
88
)

.github/workflows/nightly.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ on:
4444
skip_wordpress:
4545
required: true
4646
type: boolean
47+
variation_enable_zend_max_execution_timers:
48+
required: true
49+
type: boolean
4750
permissions:
4851
contents: read
4952
jobs:
@@ -90,21 +93,16 @@ jobs:
9093
ALPINE:
9194
if: inputs.run_alpine
9295
name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS
93-
runs-on: ubuntu-22.04
96+
runs-on: ubuntu-24.04
9497
container:
95-
image: 'alpine:3.20.1'
98+
image: 'alpine:3.22'
9699
steps:
97100
- name: git checkout
98101
uses: actions/checkout@v5
99102
with:
100103
ref: ${{ inputs.branch }}
101104
- name: apk
102105
uses: ./.github/actions/apk
103-
- name: LLVM 17 (ASAN-only)
104-
# libclang_rt.asan-x86_64.a is provided by compiler-rt, and only for clang17:
105-
# https://pkgs.alpinelinux.org/contents?file=libclang_rt.asan-x86_64.a&path=&name=&branch=v3.20
106-
run: |
107-
apk add clang17 compiler-rt
108106
- name: System info
109107
run: |
110108
echo "::group::Show host CPU info"
@@ -119,8 +117,8 @@ jobs:
119117
configurationParameters: >-
120118
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
121119
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
122-
CC=clang-17
123-
CXX=clang++-17
120+
CC=clang-20
121+
CXX=clang++-20
124122
--enable-debug
125123
--enable-zts
126124
skipSlow: true # FIXME: This should likely include slow extensions
@@ -199,6 +197,7 @@ jobs:
199197
zts: true
200198
configuration_parameters: >-
201199
CFLAGS="-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1 -DZEND_VERIFY_TYPE_INFERENCE"
200+
${{ inputs.variation_enable_zend_max_execution_timers && '--enable-zend-max-execution-timers' || '' }}
202201
run_tests_parameters: -d zend_test.observer.enabled=1 -d zend_test.observer.show_output=0
203202
timeout_minutes: 360
204203
test_function_jit: true

.github/workflows/push.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ jobs:
162162
with:
163163
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
164164
append-timestamp: false
165+
save: ${{ github.event_name != 'pull_request' }}
165166
- name: ./configure
166167
uses: ./.github/actions/configure-x32
167168
with:

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ jobs:
6464
skip_laravel: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6565
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6666
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
67+
variation_enable_zend_max_execution_timers: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
6768
secrets: inherit

NEWS

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
23 Oct 2025, PHP 8.3.27
4+
5+
- Core:
6+
. Fixed bug GH-19765 (object_properties_load() bypasses readonly property
7+
checks). (timwolla)
8+
. Fixed hard_timeout with --enable-zend-max-execution-timers. (Appla)
9+
. Fixed bug GH-19792 (SCCP causes UAF for return value if both warning and
10+
exception are triggered). (nielsdos)
11+
. Fixed bug GH-19653 (Closure named argument unpacking between temporary
12+
closures can cause a crash). (nielsdos, Arnaud, Bob)
13+
. Fixed bug GH-19839 (Incorrect HASH_FLAG_HAS_EMPTY_IND flag on userland
14+
array). (ilutov)
15+
. Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is
16+
configured). (nielsdos)
17+
. Fixed bug GH-20002 (Broken build on *BSD with MSAN). (outtersg)
18+
19+
- CLI:
20+
. Fix useless "Failed to poll event" error logs due to EAGAIN in CLI server
21+
with PHP_CLI_SERVER_WORKERS. (leotaku)
22+
23+
- Curl:
24+
. Fix cloning of CURLOPT_POSTFIELDS when using the clone operator instead
25+
of the curl_copy_handle() function to clone a CurlHandle. (timwolla)
26+
. Fix curl build and test failures with version 8.16.
27+
(nielsdos, ilutov, Jakub Zelenka)
28+
29+
- Date:
30+
. Fixed GH-17159: "P" format for ::createFromFormat swallows string literals.
31+
(nielsdos)
32+
33+
- DBA:
34+
. Fixed GH-19885 (dba_fetch() overflow on skip argument). (David Carlier)
35+
36+
- GD:
37+
. Fixed GH-19955 (imagefttext() memory leak). (David Carlier)
38+
39+
- MySQLnd:
40+
. Fixed bug #67563 (mysqli compiled with mysqlnd does not take ipv6 adress
41+
as parameter). (nielsdos)
42+
43+
- Phar:
44+
. Fix memory leak and invalid continuation after tar header writing fails.
45+
(nielsdos)
46+
. Fix memory leaks when creating temp file fails when applying zip signature.
47+
(nielsdos)
48+
49+
- SimpleXML:
50+
. Fixed bug GH-19988 (zend_string_init with NULL pointer in simplexml (UB)).
51+
(nielsdos)
52+
53+
- Soap:
54+
. Fixed bug GH-19784 (SoapServer memory leak). (nielsdos)
55+
. Fixed bug GH-20011 (Array of SoapVar of unknown type causes crash).
56+
(nielsdos)
57+
58+
- Standard:
59+
. Fixed bug GH-12265 (Cloning an object breaks serialization recursion).
60+
(nielsdos)
61+
. Fixed bug GH-19701 (Serialize/deserialize loses some data). (nielsdos)
62+
. Fixed bug GH-19801 (leaks in var_dump() and debug_zval_dump()).
63+
(alexandre-daubois)
64+
. Fixed bug GH-20043 (array_unique assertion failure with RC1 array
65+
causing an exception on sort). (nielsdos)
66+
. Fixed bug GH-19926 (reset internal pointer earlier while splicing array
67+
while COW violation flag is still set). (alexandre-daubois)
68+
. Fixed bug GH-19570 (unable to fseek in /dev/zero and /dev/null).
69+
(nielsdos, divinity76)
70+
71+
- Streams:
72+
. Fixed bug GH-19248 (Use strerror_r instead of strerror in main).
73+
(Jakub Zelenka)
74+
. Fixed bug GH-17345 (Bug #35916 was not completely fixed). (nielsdos)
75+
. Fixed bug GH-19705 (segmentation when attempting to flush on non seekable
76+
stream. (bukka/David Carlier)
77+
78+
- XMLReader:
79+
. Fixed bug GH-20009 (XMLReader leak on RelaxNG schema failure). (nielsdos)
80+
81+
- Zip:
82+
. Fixed bug GH-19688 (Remove pattern overflow in zip addGlob()). (nielsdos)
83+
. Fixed bug GH-19932 (Memory leak in zip setEncryptionName()/setEncryptionIndex()).
84+
(David Carlier)
85+
86+
- Zlib:
87+
. Fixed bug GH-19922 (Double free on gzopen). (David Carlier)
88+
389
25 Sep 2025, PHP 8.3.26
490

591
- Core:

Zend/Optimizer/sccp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,7 @@ static inline zend_result ct_eval_func_call(
845845
zval_ptr_dtor(result);
846846
zend_clear_exception();
847847
retval = FAILURE;
848-
}
849-
850-
if (EG(capture_warnings_during_sccp) > 1) {
848+
} else if (EG(capture_warnings_during_sccp) > 1) {
851849
zval_ptr_dtor(result);
852850
retval = FAILURE;
853851
}

Zend/tests/closures/gh19653_1.phpt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
GH-19653 (Closure named argument unpacking between temporary closures can cause a crash)
3+
--CREDITS--
4+
ivan-u7n
5+
--FILE--
6+
<?php
7+
8+
function func1(string $a1 = 'a1', string $a2 = 'a2', string $a3 = 'a3') {
9+
echo __FUNCTION__ . "() a1=$a1 a2=$a2 a3=$a3\n";
10+
}
11+
12+
function usage1(?Closure $func1 = null) {
13+
echo __FUNCTION__ . "() ";
14+
($func1 ?? func1(...))(a3: 'm3+');
15+
}
16+
usage1();
17+
18+
$func1 = function (string ...$args) {
19+
echo "[function] ";
20+
func1(...$args, a2: 'm2+');
21+
};
22+
usage1(func1: $func1);
23+
24+
?>
25+
--EXPECT--
26+
usage1() func1() a1=a1 a2=a2 a3=m3+
27+
usage1() [function] func1() a1=a1 a2=m2+ a3=m3+

Zend/tests/closures/gh19653_2.phpt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
GH-19653 (Closure named argument unpacking between temporary closures can cause a crash) - eval variation
3+
--CREDITS--
4+
arnaud-lb
5+
--FILE--
6+
<?php
7+
8+
function usage1(Closure $c) {
9+
$c(a: 1);
10+
}
11+
12+
usage1(eval('return function($a) { var_dump($a); };'));
13+
usage1(eval('return function($b) { var_dump($b); };'));
14+
15+
?>
16+
--EXPECTF--
17+
int(1)
18+
19+
Fatal error: Uncaught Error: Unknown named parameter $a in %s:%d
20+
Stack trace:
21+
#0 %s(%d): usage1(Object(Closure))
22+
#1 {main}
23+
thrown in %s on line %d

0 commit comments

Comments
 (0)