Skip to content

Commit b4150dd

Browse files
committed
Merge tag 'php-8.1.25' into was-8.1.x
Tag for php 8.1.25
2 parents 508d097 + 298cf65 commit b4150dd

File tree

78 files changed

+1461
-318
lines changed

Some content is hidden

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

78 files changed

+1461
-318
lines changed

.cirrus.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ env:
33

44
freebsd_task:
55
name: FREEBSD_DEBUG_NTS
6+
only_if: $CIRRUS_CRON == 'nightly' || $CIRRUS_CHANGE_TITLE =~ '.*\[ci freebsd\].*'
67
freebsd_instance:
78
image_family: freebsd-13-2
89
env:
@@ -29,6 +30,7 @@ freebsd_task:
2930

3031
arm_task:
3132
name: ARM_DEBUG_NTS
33+
only_if: $CIRRUS_CRON == 'nightly' || $CIRRUS_CHANGE_TITLE =~ '.*\[ci arm\].*'
3234
arm_container:
3335
image: debian:11
3436
additional_containers:

.github/actions/test-linux/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ inputs:
33
runTestsParameters:
44
default: ''
55
required: false
6+
jitType:
7+
default: 'disable'
8+
required: false
69
runs:
710
using: composite
811
steps:
@@ -27,6 +30,7 @@ runs:
2730
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
2831
export SKIP_IO_CAPTURE_TESTS=1
2932
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
33+
-d opcache.jit=${{ inputs.jitType }} \
3034
-j$(/usr/bin/nproc) \
3135
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
3236
--offline \

.github/actions/test-macos/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ inputs:
33
runTestsParameters:
44
default: ''
55
required: false
6+
jitType:
7+
default: 'disable'
8+
required: false
69
runs:
710
using: composite
811
steps:
@@ -12,6 +15,7 @@ runs:
1215
export SKIP_IO_CAPTURE_TESTS=1
1316
export CI_NO_IPV6=1
1417
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
18+
-d opcache.jit=${{ inputs.jitType }} \
1519
-j$(sysctl -n hw.ncpu) \
1620
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
1721
--offline \

.github/scripts/windows/test_task.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ set PDO_MYSQL_TEST_PASS=%MYSQL_PWD%
3232
set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
3333
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
3434
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST%;port=%PDO_MYSQL_TEST_PORT%;dbname=test
35-
set TMP_MYSQL_BIN=C:\mysql\bin
36-
"%TMP_MYSQL_BIN%\mysql.exe" --host=%PDO_MYSQL_TEST_HOST% --port=%MYSQL_TEST_PORT% --user=%MYSQL_TEST_USER% --password=%MYSQL_TEST_PASSWD% -e "CREATE DATABASE IF NOT EXISTS test"
35+
mysql --host=%PDO_MYSQL_TEST_HOST% --port=%MYSQL_TEST_PORT% --user=%MYSQL_TEST_USER% --password=%MYSQL_TEST_PASSWD% -e "CREATE DATABASE IF NOT EXISTS test"
3736
if %errorlevel% neq 0 exit /b 3
3837

3938
rem setup PostgreSQL related exts

.github/workflows/nightly.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
1414
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
# Set fetch-depth to 0 to clone the full repository
1919
# including all branches. This is required to find
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ubuntu-20.04
5555
steps:
5656
- name: git checkout
57-
uses: actions/checkout@v3
57+
uses: actions/checkout@v4
5858
with:
5959
ref: ${{ matrix.branch.ref }}
6060
- name: Create MSSQL container
@@ -84,6 +84,7 @@ jobs:
8484
- name: Test Tracing JIT
8585
uses: ./.github/actions/test-linux
8686
with:
87+
jitType: tracing
8788
runTestsParameters: >-
8889
${{ matrix.run_tests_parameters }}
8990
-d zend_extension=opcache.so
@@ -102,12 +103,12 @@ jobs:
102103
if: matrix.test_function_jit
103104
uses: ./.github/actions/test-linux
104105
with:
106+
jitType: function
105107
runTestsParameters: >-
106108
${{ matrix.run_tests_parameters }}
107109
-d zend_extension=opcache.so
108110
-d opcache.enable_cli=1
109111
-d opcache.jit_buffer_size=16M
110-
-d opcache.jit=1205
111112
- name: Verify generated files are up to date
112113
uses: ./.github/actions/verify-generated-files
113114
- name: Notify Slack
@@ -142,7 +143,7 @@ jobs:
142143
MYSQL_ROOT_PASSWORD: root
143144
steps:
144145
- name: git checkout
145-
uses: actions/checkout@v3
146+
uses: actions/checkout@v4
146147
with:
147148
ref: ${{ matrix.branch.ref }}
148149
- name: apt
@@ -165,6 +166,7 @@ jobs:
165166
- name: Test Tracing JIT
166167
uses: ./.github/actions/test-linux
167168
with:
169+
jitType: tracing
168170
runTestsParameters: >-
169171
${{ matrix.run_tests_parameters }}
170172
-d zend_extension=opcache.so
@@ -180,12 +182,12 @@ jobs:
180182
- name: Test Function JIT
181183
uses: ./.github/actions/test-linux
182184
with:
185+
jitType: function
183186
runTestsParameters: >-
184187
${{ matrix.run_tests_parameters }}
185188
-d zend_extension=opcache.so
186189
-d opcache.enable_cli=1
187190
-d opcache.jit_buffer_size=16M
188-
-d opcache.jit=1205
189191
- name: Notify Slack
190192
if: failure()
191193
uses: ./.github/actions/notify-slack
@@ -201,10 +203,10 @@ jobs:
201203
debug: [true, false]
202204
zts: [true, false]
203205
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
204-
runs-on: macos-11
206+
runs-on: macos-12
205207
steps:
206208
- name: git checkout
207-
uses: actions/checkout@v3
209+
uses: actions/checkout@v4
208210
with:
209211
ref: ${{ matrix.branch.ref }}
210212
- name: brew
@@ -226,6 +228,7 @@ jobs:
226228
- name: Test Tracing JIT
227229
uses: ./.github/actions/test-macos
228230
with:
231+
jitType: tracing
229232
runTestsParameters: >-
230233
-d zend_extension=opcache.so
231234
-d opcache.enable_cli=1
@@ -241,12 +244,12 @@ jobs:
241244
- name: Test Function JIT
242245
uses: ./.github/actions/test-macos
243246
with:
247+
jitType: function
244248
runTestsParameters: >-
245249
-d zend_extension=opcache.so
246250
-d opcache.enable_cli=1
247251
-d opcache.protect_memory=1
248252
-d opcache.jit_buffer_size=16M
249-
-d opcache.jit=1205
250253
- name: Verify generated files are up to date
251254
uses: ./.github/actions/verify-generated-files
252255
- name: Notify Slack
@@ -259,7 +262,7 @@ jobs:
259262
runs-on: ubuntu-20.04
260263
steps:
261264
- name: git checkout
262-
uses: actions/checkout@v3
265+
uses: actions/checkout@v4
263266
- name: Create MSSQL container
264267
uses: ./.github/actions/setup-mssql
265268
- name: Create Oracle container
@@ -308,7 +311,7 @@ jobs:
308311
USE_TRACKED_ALLOC: 1
309312
steps:
310313
- name: git checkout
311-
uses: actions/checkout@v3
314+
uses: actions/checkout@v4
312315
with:
313316
ref: ${{ matrix.branch.ref }}
314317
- name: apt
@@ -424,7 +427,7 @@ jobs:
424427
runs-on: ubuntu-20.04
425428
steps:
426429
- name: git checkout
427-
uses: actions/checkout@v3
430+
uses: actions/checkout@v4
428431
with:
429432
ref: ${{ matrix.branch.ref }}
430433
- name: Create MSSQL container
@@ -500,7 +503,7 @@ jobs:
500503
runs-on: ubuntu-22.04
501504
steps:
502505
- name: git checkout
503-
uses: actions/checkout@v3
506+
uses: actions/checkout@v4
504507
with:
505508
ref: ${{ matrix.branch.ref }}
506509
- name: apt
@@ -599,7 +602,7 @@ jobs:
599602
runs-on: ubuntu-20.04
600603
steps:
601604
- name: git checkout
602-
uses: actions/checkout@v3
605+
uses: actions/checkout@v4
603606
with:
604607
ref: ${{ matrix.branch.ref }}
605608
- name: apt
@@ -670,7 +673,7 @@ jobs:
670673
- name: git config
671674
run: git config --global core.autocrlf false && git config --global core.eol lf
672675
- name: git checkout
673-
uses: actions/checkout@v3
676+
uses: actions/checkout@v4
674677
with:
675678
ref: ${{ matrix.branch.ref }}
676679
- name: Setup

.github/workflows/push.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-20.04
5252
steps:
5353
- name: git checkout
54-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
5555
- name: Create MSSQL container
5656
uses: ./.github/actions/setup-mssql
5757
- name: Create Oracle container
@@ -85,17 +85,18 @@ jobs:
8585
- name: Test Tracing JIT
8686
uses: ./.github/actions/test-linux
8787
with:
88+
jitType: tracing
8889
runTestsParameters: >-
8990
-d zend_extension=opcache.so
9091
-d opcache.enable_cli=1
9192
-d opcache.jit_buffer_size=16M
9293
- name: Verify generated files are up to date
9394
uses: ./.github/actions/verify-generated-files
9495
MACOS_DEBUG_NTS:
95-
runs-on: macos-11
96+
runs-on: macos-12
9697
steps:
9798
- name: git checkout
98-
uses: actions/checkout@v3
99+
uses: actions/checkout@v4
99100
- name: brew
100101
uses: ./.github/actions/brew
101102
- name: ccache
@@ -116,6 +117,7 @@ jobs:
116117
- name: Test Tracing JIT
117118
uses: ./.github/actions/test-macos
118119
with:
120+
jitType: tracing
119121
runTestsParameters: >-
120122
-d zend_extension=opcache.so
121123
-d opcache.enable_cli=1
@@ -141,7 +143,7 @@ jobs:
141143
- name: git config
142144
run: git config --global core.autocrlf false && git config --global core.eol lf
143145
- name: git checkout
144-
uses: actions/checkout@v3
146+
uses: actions/checkout@v4
145147
- name: Setup
146148
uses: ./.github/actions/setup-windows
147149
- name: Build

NEWS

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
26 Oct 2023, PHP 8.1.25
4+
5+
- Core:
6+
. Fixed bug GH-12207 (memory leak when class using trait with doc block).
7+
(rioderelfte)
8+
. Fixed bug GH-12215 (Module entry being overwritten causes type errors in
9+
ext/dom). (nielsdos)
10+
. Fixed bug GH-12273 (__builtin_cpu_init check). (Freaky)
11+
. Fixed bug #80092 (ZTS + preload = segfault on shutdown). (nielsdos)
12+
13+
- CLI:
14+
. Ensure a single Date header is present. (coppolafab)
15+
16+
- CType:
17+
. Fixed bug GH-11997 (ctype_alnum 5 times slower in PHP 8.1 or greater).
18+
(nielsdos)
19+
20+
- DOM:
21+
. Restore old namespace reconciliation behaviour. (nielsdos)
22+
. Fixed bug GH-8996 (DOMNode serialization on PHP ^8.1). (nielsdos)
23+
24+
- Fileinfo:
25+
. Fixed bug GH-11891 (fileinfo returns text/xml for some svg files). (usarise)
26+
27+
- Filter:
28+
. Fix explicit FILTER_REQUIRE_SCALAR with FILTER_CALLBACK (ilutov)
29+
30+
- Hash:
31+
. Fixed bug GH-12186 (segfault copying/cloning a finalized HashContext).
32+
(MaxSem)
33+
34+
- Intl:
35+
. Fixed bug GH-12243 (segfault on IntlDateFormatter::construct).
36+
(David Carlier)
37+
. Fixed bug GH-12282 (IntlDateFormatter::construct should throw an exception
38+
on an invalid locale). (David Carlier)
39+
40+
- MySQLnd:
41+
. Fixed bug GH-12297 (PHP Startup: Invalid library (maybe not a PHP library)
42+
'mysqlnd.so' in Unknown on line). (nielsdos)
43+
44+
- Opcache:
45+
. Fixed opcache_invalidate() on deleted file. (mikhainin)
46+
. Fixed bug GH-12380 (JIT+private array property access inside closure
47+
accesses private property in child class). (nielsdos)
48+
49+
- PCRE:
50+
. Fixed bug GH-11956 (Backport upstream fix, PCRE regular expressions with
51+
JIT enabled gives different result). (nielsdos)
52+
53+
- SimpleXML:
54+
. Fixed bug GH-12170 (Can't use xpath with comments in SimpleXML). (nielsdos)
55+
. Fixed bug GH-12223 (Entity reference produces infinite loop in
56+
var_dump/print_r). (nielsdos)
57+
. Fixed bug GH-12167 (Unable to get processing instruction contents in
58+
SimpleXML). (nielsdos)
59+
. Fixed bug GH-12169 (Unable to get comment contents in SimpleXML).
60+
(nielsdos)
61+
62+
- Streams:
63+
. Fixed bug GH-12190 (binding ipv4 address with both address and port at 0).
64+
(David Carlier)
65+
66+
- XML:
67+
. Fix return type of stub of xml_parse_into_struct(). (nielsdos)
68+
. Fix memory leak when calling xml_parse_into_struct() twice. (nielsdos)
69+
70+
- XSL:
71+
. Fix type error on XSLTProcessor::transformToDoc return value with
72+
SimpleXML. (nielsdos)
73+
74+
- Sockets:
75+
. Fix socket_export_stream() with wrong protocol (twosee)
76+
377
28 Sep 2023, PHP 8.1.24
478

579
- Core:

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@ static zend_property_info *zend_fetch_prop_info(const zend_op_array *op_array, z
21772177
if (opline->op2_type == IS_CONST) {
21782178
zend_class_entry *ce = NULL;
21792179

2180-
if (opline->op1_type == IS_UNUSED) {
2180+
if (opline->op1_type == IS_UNUSED && !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
21812181
ce = op_array->scope;
21822182
} else if (ssa_op->op1_use >= 0) {
21832183
ce = ssa->var_info[ssa_op->op1_use].ce;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
Overriding a static property where both declarations have a doc block does not leak memory
3+
--FILE--
4+
<?php
5+
trait MyTrait {
6+
/**
7+
* trait comment
8+
*/
9+
static $property;
10+
}
11+
12+
class MyClass {
13+
use MyTrait;
14+
15+
/**
16+
* class comment
17+
*/
18+
static $property;
19+
}
20+
?>
21+
--EXPECT--

Zend/zend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#ifndef ZEND_H
2121
#define ZEND_H
2222

23-
#define ZEND_VERSION "4.1.24"
23+
#define ZEND_VERSION "4.1.25"
2424

2525
#define ZEND_ENGINE_3
2626

0 commit comments

Comments
 (0)