Skip to content

Commit 1575fca

Browse files
committed
Merge tag 'php-8.3.20' into was-8.3.x
Tag for php-8.3.20
2 parents eabd68b + 324861b commit 1575fca

File tree

80 files changed

+2236
-1178
lines changed

Some content is hidden

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

80 files changed

+2236
-1178
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ jobs:
166166
`#--enable-werror`
167167
- run:
168168
name: make
169+
no_output_timeout: 30m
169170
command: make -j2 > /dev/null
170171
- run:
171172
name: make install

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
/ext/pdo_sqlite @SakiTakamachi
4646
/ext/pgsql @devnexen
4747
/ext/random @TimWolla @zeriyoshi
48+
/ext/reflection @DanielEScherzer
4849
/ext/session @Girgias
4950
/ext/simplexml @nielsdos
5051
/ext/soap @nielsdos
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: ./configure
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
skipSlow:
7+
default: false
8+
required: false
9+
runs:
10+
using: composite
11+
steps:
12+
- shell: bash
13+
run: |
14+
set -x
15+
./buildconf --force
16+
./configure \
17+
--enable-option-checking=fatal \
18+
--prefix=/usr \
19+
--with-libdir=lib64 \
20+
--enable-phpdbg \
21+
--enable-fpm \
22+
--with-pdo-mysql=mysqlnd \
23+
--with-mysqli=mysqlnd \
24+
${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \
25+
${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \
26+
${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \
27+
--enable-intl \
28+
--without-pear \
29+
--enable-gd \
30+
--with-jpeg \
31+
--with-webp \
32+
--with-freetype \
33+
--with-xpm \
34+
--enable-exif \
35+
--with-zip \
36+
--with-zlib \
37+
--enable-soap \
38+
--enable-xmlreader \
39+
--with-xsl \
40+
${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \
41+
--enable-sysvsem \
42+
--enable-sysvshm \
43+
--enable-shmop \
44+
--enable-pcntl \
45+
--with-readline \
46+
--enable-mbstring \
47+
--with-iconv \
48+
--with-curl \
49+
--with-gettext \
50+
--enable-sockets \
51+
--with-bz2 \
52+
--with-openssl \
53+
--with-gmp \
54+
--enable-bcmath \
55+
--enable-calendar \
56+
--enable-ftp \
57+
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
58+
--enable-sysvmsg \
59+
--with-ffi \
60+
--enable-zend-test \
61+
${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \
62+
${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \
63+
${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \
64+
--with-password-argon2 \
65+
--with-mhash \
66+
--with-sodium \
67+
--enable-dba \
68+
--with-cdb \
69+
--enable-flatfile \
70+
--enable-inifile \
71+
--with-tcadb \
72+
--with-lmdb \
73+
--with-qdbm \
74+
${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \
75+
${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \
76+
${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \
77+
--with-config-file-path=/etc \
78+
--with-config-file-scan-dir=/etc/php.d \
79+
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
80+
--enable-werror \
81+
${{ inputs.configurationParameters }} || cat config.log
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test
2+
inputs:
3+
runTestsParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
12+
# XXX: Set up other database tests?
13+
# XXX: These tests are not running containerized
14+
export MYSQL_TEST_USER=ci
15+
export MYSQL_TEST_PASSWD=ci
16+
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
17+
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
18+
fi
19+
export PDO_MYSQL_TEST_USER=ci
20+
export PDO_MYSQL_TEST_PASS=ci
21+
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=ci password=ci"
22+
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
23+
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=ci password=ci"
24+
fi
25+
# Slow tests criteron is doubled because this runner isn't as fast as others
26+
export SKIP_IO_CAPTURE_TESTS=1
27+
export STACK_LIMIT_DEFAULTS_CHECK=1
28+
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
29+
-j$(nproc) \
30+
-g FAIL,BORK,LEAK,XLEAK \
31+
--no-progress \
32+
--show-diff \
33+
--show-slow 2000 \
34+
--set-timeout 120

.github/workflows/nightly.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
run_alpine:
1818
required: true
1919
type: boolean
20+
run_linux_ppc64:
21+
required: true
22+
type: boolean
2023
run_macos_arm64:
2124
required: true
2225
type: boolean
@@ -35,6 +38,44 @@ on:
3538
permissions:
3639
contents: read
3740
jobs:
41+
LINUX_PPC64:
42+
if: inputs.run_linux_ppc64
43+
name: LINUX_PPC64_ASAN_UBSAN_DEBUG_ZTS
44+
# This runs on a self-hosted runner; see https://wiki.php.net/systems/ci
45+
runs-on: [self-hosted, gentoo, ppc64]
46+
steps:
47+
- name: git checkout
48+
uses: actions/checkout@v4
49+
with:
50+
ref: ${{ inputs.branch }}
51+
- name: System info
52+
run: |
53+
echo "::group::Show host CPU info"
54+
lscpu
55+
echo "::endgroup::"
56+
echo "::group::Show installed packages"
57+
cat /var/lib/portage/world
58+
echo "::endgroup::"
59+
- name: ./configure
60+
uses: ./.github/actions/configure-gentoo
61+
with:
62+
configurationParameters: >-
63+
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
64+
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
65+
CC=clang-17
66+
CXX=clang++-17
67+
--enable-debug
68+
--enable-zts
69+
skipSlow: false # FIXME: This should likely include slow extensions
70+
- name: make
71+
run: make -j$(/usr/bin/nproc) >/dev/null
72+
# Skip an install action for now
73+
- name: Tests
74+
uses: ./.github/actions/test-gentoo
75+
# There is no PPC JIT, so rip this out
76+
with:
77+
runTestsParameters: >-
78+
--asan -x
3879
ALPINE:
3980
if: inputs.run_alpine
4081
name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
name: LINUX_X32_DEBUG_ZTS
140140
runs-on: ubuntu-latest
141141
container:
142-
image: ubuntu:20.04
142+
image: ubuntu:22.04
143143
env:
144144
MYSQL_TEST_HOST: mysql
145145
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test

.github/workflows/root.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ jobs:
4848
with:
4949
asan_ubuntu_version: ${{
5050
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
51-
|| '20.04' }}
51+
|| '22.04' }}
5252
branch: ${{ matrix.branch.ref }}
5353
community_verify_type_inference: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5454
libmysqlclient_with_mysqli: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }}
5555
run_alpine: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
56+
run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5657
run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5758
ubuntu_version: ${{
5859
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
59-
|| ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04')
60-
|| '20.04' }}
60+
|| '22.04' }}
6161
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
6262
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6363
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
# Libtool library files generated during build process
3030
*.la
3131

32+
# Mac shared library files generated during build process
33+
*.dylib
34+
3235
# Directories created by Libtool for storing generated library files
3336
.libs/
3437

NEWS

Lines changed: 70 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,65 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
13 Mar 2025, PHP 8.3.18
3+
10 Apr 2025, PHP 8.3.20
4+
5+
- Core:
6+
. Fixed bug GH-17961 (use-after-free during dl()'ed module class destruction).
7+
(Arnaud)
8+
. Fixed bug GH-15367 (dl() of module with aliased class crashes in shutdown).
9+
(Arnaud)
10+
. Fixed bug GH-13193 again (Significant performance degradation in 'foreach').
11+
(nielsdos)
12+
13+
- DOM:
14+
. Fix weird unpack behaviour in DOM. (nielsdos)
15+
. Fix xinclude destruction of live attributes. (nielsdos)
16+
17+
- Embed:
18+
. Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas)
19+
20+
- Fuzzer:
21+
. Fixed bug GH-18081 (Memory leaks in error paths of fuzzer SAPI).
22+
(Lung-Alexandra)
23+
24+
- GD:
25+
. Fixed bug GH-17984 (calls with arguments as array with references).
26+
(David Carlier)
27+
28+
- Intl:
29+
. Fix locale_compose and locale_lookup to work with their array argument
30+
with values as references. (David Carlier)
31+
. Fix dateformat_format when the time is an array of references.
32+
(David Carlier)
33+
. Fix UConverter::transcode with substitutes as references. (David Carlier)
34+
35+
- Mbstring:
36+
. Fixed bug GH-17989 (mb_output_handler crash with unset
37+
http_output_conv_mimetypes). (nielsdos)
38+
39+
- Opcache:
40+
. Fixed bug GH-18112 (NULL access with preloading and INI option). (nielsdos)
41+
. Fixed bug GH-18107 (Opcache CFG jmp optimization with try-finally breaks
42+
the exception table). (nielsdos)
43+
44+
- PDO:
45+
. Fix memory leak when destroying PDORow. (nielsdos)
46+
47+
- SOAP:
48+
. Fixed bug #66049 (Typemap can break parsing in parse_packet_soap leading to
49+
a segfault) . (Remi)
50+
51+
- SPL:
52+
. Fixed bug GH-18018 (RC1 data returned from offsetGet causes UAF in
53+
ArrayObject). (nielsdos)
54+
55+
- Treewide:
56+
. Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos)
57+
58+
- Windows:
59+
. Fixed bug GH-17836 (zend_vm_gen.php shouldn't break on Windows line
60+
endings). (DanielEScherzer)
61+
62+
13 Mar 2025, PHP 8.3.19
463

564
- BCMath:
665
. Fixed bug GH-17398 (bcmul memory leak). (SakiTakamachi)
@@ -69,14 +128,18 @@ PHP NEWS
69128
. Fixed bug GH-15902 (Core dumped in ext/reflection/php_reflection.c).
70129
(DanielEScherzer)
71130

131+
- Sockets:
132+
. Fixed bug GH-17921 (socket_read/socket_recv overflow on buffer size).
133+
(David Carlier)
134+
72135
- Standard:
73136
. Fixed bug #72666 (stat cache clearing inconsistent between file:// paths
74137
and plain paths). (Jakub Zelenka)
75138

76139
- Streams:
77140
. Fixed bug GH-17650 (realloc with size 0 in user_filters.c). (nielsdos)
78141
. Fix memory leak on overflow in _php_stream_scandir(). (nielsdos)
79-
. Fixed GHSA-hgf54-96fm-v528 (Stream HTTP wrapper header check might omit
142+
. Fixed GHSA-hgf5-96fm-v528 (Stream HTTP wrapper header check might omit
80143
basic auth header). (CVE-2025-1736) (Jakub Zelenka)
81144
. Fixed GHSA-52jp-hrpf-2jff (Stream HTTP wrapper truncate redirect location
82145
to 1024 bytes). (CVE-2025-1861) (Jakub Zelenka)
@@ -172,7 +235,7 @@ PHP NEWS
172235
. Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry).
173236
(nielsdos)
174237

175-
02 Jan 2025, PHP 8.3.16
238+
16 Jan 2025, PHP 8.3.16
176239

177240
- Core:
178241
. Fixed bug GH-17106 (ZEND_MATCH_ERROR misoptimization). (ilutov)
@@ -371,7 +434,7 @@ PHP NEWS
371434
- Windows:
372435
. Fixed bug GH-16849 (Error dialog causes process to hang). (cmb)
373436

374-
07 Nov 2024, PHP 8.3.14
437+
21 Nov 2024, PHP 8.3.14
375438

376439
- CLI:
377440
. Fixed bug GH-16373 (Shebang is not skipped for router script in cli-server
@@ -892,7 +955,7 @@ PHP NEWS
892955
. Fixed bug GH-14834 (Error installing PHP when --with-pear is used).
893956
(nielsdos)
894957

895-
20 Jun 2024, PHP 8.3.9
958+
04 Jul 2024, PHP 8.3.9
896959

897960
- Core:
898961
. Fixed bug GH-14315 (Incompatible pointer type warnings). (Peter Kokot)
@@ -1124,7 +1187,7 @@ PHP NEWS
11241187
- Treewide:
11251188
. Fix gcc-14 Wcalloc-transposed-args warnings. (Cristian Rodríguez)
11261189

1127-
28 Mar 2024, PHP 8.3.5
1190+
11 Apr 2024, PHP 8.3.6
11281191

11291192
- Core:
11301193
. Fixed GH-13569 (GC buffer unnecessarily grows up to GC_MAX_BUF_SIZE when
@@ -1393,7 +1456,7 @@ PHP NEWS
13931456
. Fixed bug GH-12980 (tidynode.props.attribute is missing
13941457
"Boolean Attributes" and empty attributes). (nielsdos)
13951458

1396-
07 Dec 2023, PHP 8.3.1
1459+
21 Dec 2023, PHP 8.3.1
13971460

13981461
- Core:
13991462
. Fixed bug GH-12758 / GH-12768 (Invalid opline in OOM handlers within

Zend/Optimizer/zend_cfg.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ static void zend_mark_reachable_blocks(const zend_op_array *op_array, zend_cfg *
143143
end = blocks + block_map[op_array->try_catch_array[j].finally_op];
144144
while (b != end) {
145145
if (b->flags & ZEND_BB_REACHABLE) {
146-
op_array->try_catch_array[j].try_op = op_array->try_catch_array[j].catch_op;
146+
/* In case we get here, there is no live try block but there is a live finally block.
147+
* If we do have catch_op set, we need to set it to the first catch block to satisfy
148+
* the constraint try_op <= catch_op <= finally_op */
149+
op_array->try_catch_array[j].try_op =
150+
op_array->try_catch_array[j].catch_op ? op_array->try_catch_array[j].catch_op : b->start;
147151
changed = 1;
148152
zend_mark_reachable(op_array->opcodes, cfg, blocks + block_map[op_array->try_catch_array[j].try_op]);
149153
break;

0 commit comments

Comments
 (0)