Skip to content

Commit 8fd87b1

Browse files
committed
Merge remote-tracking branch 'up/PHP-8.6' into fix/gh-25007
* up/PHP-8.6: Fix json_encode() reporting false "Recursion detected" after OOM for hooked-property objects (#24992) Fix GH-25023: ZEND_CONTAINER_OF() fails to compile with -std=c11 (#25027) Fix flaky FPM test for bug #77023 (#24999) Update GitHub Action workflows to `actions/checkout@v7` (8.6) Update GitHub Action workflows to `actions/checkout@v7` (8.5) Update GitHub Action workflows to `actions/checkout@v7` (8.4) Update GitHub Action workflows to `actions/checkout@v7` Fix GH-23626: OPcache: orphaned temporaries cause leaks and assertions [ci skip] Fix comment Fix block pass dropping ZEND_FAST_CALL OP2 definition Fix GH-23572: JIT calls wrong static method from trait clones Fix GH-24784: Preserve certificates when reading PKCS7/CMS CRLs (#24785)
2 parents cec3763 + a8a3635 commit 8fd87b1

26 files changed

Lines changed: 500 additions & 45 deletions

‎.github/workflows/docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.repository == 'php/php-src'
1818
steps:
1919
- name: git checkout
20-
uses: actions/checkout@v6
20+
uses: actions/checkout@v7
2121
- name: Install dependencies
2222
run: pip install -r docs/requirements.txt
2323
- name: Check formatting

‎.github/workflows/real-time-benchmark.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
sudo apt-get update -y
120120
sudo apt-get install -y terraform=1.5.7-*
121121
- name: Checkout benchmark suite
122-
uses: actions/checkout@v6
122+
uses: actions/checkout@v7
123123
with:
124124
repository: 'kocsismate/php-version-benchmarks'
125125
ref: 'main'
@@ -133,7 +133,7 @@ jobs:
133133
rm -rf ./php-version-benchmarks/docs/results
134134
- name: Checkout benchmark data
135135
if: github.event_name != 'workflow_dispatch'
136-
uses: actions/checkout@v6
136+
uses: actions/checkout@v7
137137
with:
138138
repository: php/real-time-benchmark-data
139139
ssh-key: ${{ secrets.PHP_VERSION_BENCHMARK_RESULTS_DEPLOY_KEY }}

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
timeout-minutes: 180
2020
steps:
2121
- name: git checkout
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@v7
2323
with:
2424
ref: ${{ fromJson(inputs.branch).ref }}
2525
- name: System info
@@ -61,7 +61,7 @@ jobs:
6161
image: 'alpine:3.22'
6262
steps:
6363
- name: git checkout
64-
uses: actions/checkout@v6
64+
uses: actions/checkout@v7
6565
with:
6666
ref: ${{ fromJson(inputs.branch).ref }}
6767
- name: apk
@@ -135,7 +135,7 @@ jobs:
135135
timeout-minutes: 180
136136
steps:
137137
- name: git checkout
138-
uses: actions/checkout@v6
138+
uses: actions/checkout@v7
139139
with:
140140
ref: ${{ fromJson(inputs.branch).ref }}
141141
- name: Create MSSQL container
@@ -258,7 +258,7 @@ jobs:
258258
FIREBIRD_PASSWORD: test
259259
steps:
260260
- name: git checkout
261-
uses: actions/checkout@v6
261+
uses: actions/checkout@v7
262262
with:
263263
ref: ${{ fromJson(inputs.branch).ref }}
264264
- name: apt
@@ -316,7 +316,7 @@ jobs:
316316
timeout-minutes: 180
317317
steps:
318318
- name: git checkout
319-
uses: actions/checkout@v6
319+
uses: actions/checkout@v7
320320
with:
321321
ref: ${{ fromJson(inputs.branch).ref }}
322322
- name: Update clang
@@ -394,7 +394,7 @@ jobs:
394394
timeout-minutes: 180
395395
steps:
396396
- name: git checkout
397-
uses: actions/checkout@v6
397+
uses: actions/checkout@v7
398398
with:
399399
ref: ${{ fromJson(inputs.branch).ref }}
400400
- name: Create MSSQL container
@@ -444,7 +444,7 @@ jobs:
444444
USE_TRACKED_ALLOC: 1
445445
steps:
446446
- name: git checkout
447-
uses: actions/checkout@v6
447+
uses: actions/checkout@v7
448448
with:
449449
ref: ${{ fromJson(inputs.branch).ref }}
450450
- name: apt
@@ -656,7 +656,7 @@ jobs:
656656
timeout-minutes: 180
657657
steps:
658658
- name: git checkout
659-
uses: actions/checkout@v6
659+
uses: actions/checkout@v7
660660
with:
661661
ref: ${{ fromJson(inputs.branch).ref }}
662662
- name: Create MSSQL container
@@ -720,7 +720,7 @@ jobs:
720720
timeout-minutes: 180
721721
steps:
722722
- name: git checkout
723-
uses: actions/checkout@v6
723+
uses: actions/checkout@v7
724724
with:
725725
ref: ${{ fromJson(inputs.branch).ref }}
726726
- name: apt
@@ -812,7 +812,7 @@ jobs:
812812
timeout-minutes: 180
813813
steps:
814814
- name: git checkout
815-
uses: actions/checkout@v6
815+
uses: actions/checkout@v7
816816
with:
817817
ref: ${{ fromJson(inputs.branch).ref }}
818818
- name: apt
@@ -866,7 +866,7 @@ jobs:
866866
- name: git config
867867
run: git config --global core.autocrlf false && git config --global core.eol lf
868868
- name: git checkout
869-
uses: actions/checkout@v6
869+
uses: actions/checkout@v7
870870
with:
871871
ref: ${{ fromJson(inputs.branch).ref }}
872872
- name: Setup
@@ -885,7 +885,7 @@ jobs:
885885
timeout-minutes: 50
886886
steps:
887887
- name: git checkout
888-
uses: actions/checkout@v6
888+
uses: actions/checkout@v7
889889
with:
890890
ref: ${{ fromJson(inputs.branch).ref }}
891891
- name: FreeBSD
@@ -916,7 +916,7 @@ jobs:
916916
timeout-minutes: 50
917917
steps:
918918
- name: git checkout
919-
uses: actions/checkout@v6
919+
uses: actions/checkout@v7
920920
with:
921921
ref: ${{ fromJson(inputs.branch).ref }}
922922
fetch-depth: 0
@@ -979,7 +979,7 @@ jobs:
979979
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
980980
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
981981
- name: git checkout benchmarking-data
982-
uses: actions/checkout@v6
982+
uses: actions/checkout@v7
983983
with:
984984
repository: php/benchmarking-data
985985
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
all_variations: ${{ steps.set-matrix.outputs.all_variations }}
4242
branches: ${{ steps.set-matrix.outputs.branches }}
4343
steps:
44-
- uses: actions/checkout@v6
44+
- uses: actions/checkout@v7
4545
with:
4646
# When running nightly, set fetch-depth to 0 to clone the full
4747
# repository including all branches. This is required to find the

‎.github/workflows/unit-tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
timeout-minutes: 20
4040
steps:
4141
- name: git checkout
42-
uses: actions/checkout@v6
42+
uses: actions/checkout@v7
4343

4444
- name: Install dependencies
4545
run: |

‎.github/workflows/verify-bundled-files.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-24.04
2525
steps:
2626
- name: git checkout
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@v7
2828

2929
- name: Detect changed files
3030
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}

‎NEWS‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ PHP NEWS
99
(Marti2203).
1010
. Fixed bug GH-25007 (Partial function application: named args in a constant
1111
expression cause out-of-bounds write in zp_compile()). (lazerg)
12+
. Fixed bug GH-25023 (ZEND_CONTAINER_OF() fails to compile with -std=c11).
13+
(lazerg)
1214

1315
- CLI:
1416
. Fixed bug GH-24697 (PHP_HTTP_PARSER_STRICT build option doesn't work).
@@ -51,6 +53,11 @@ PHP NEWS
5153
. Fixed IntlDateFormatter parse functions truncating an $offset below
5254
INT_MIN. (Marc Bennewitz)
5355

56+
- JSON:
57+
. Fixed json_encode() leaving the recursion guard set on objects with hooked
58+
properties after running out of memory while escaping a property name.
59+
(adapik)
60+
5461
- Opcache:
5562
. Fixed tracing JIT returning a wrapped integer instead of a float on
5663
integer overflow after an integer was compared with a float or
@@ -84,9 +91,17 @@ PHP NEWS
8491
. Fixed function JIT misinterpreting VM-enter results after an interrupt
8592
callback in the CALL and TAILCALL VMs. (Levi Morrison)
8693
. Fixed unsound shift_left_overflows range when shift wraps. (mkrishna793)
94+
. Fixed bug GH-23572 (Tracing JIT calls the wrong method for self::/parent::
95+
static calls in trait methods shared by several classes). (jorgsowa,
96+
mgoulart)
97+
. Fix block pass dropping ZEND_FAST_CALL OP2 definition. (Mrmaxmeier)
98+
. Fixed bug GH-23626 (orphaned temporaries cause leaks and assertions).
99+
(ndossche, khaledalam)
87100

88101
- OpenSSL:
89102
. Fixed build with OpenSSL 4.1. (Weilin Du)
103+
. Fixed bug GH-24784 (openssl_pkcs7_read() and openssl_cms_read() overwrite
104+
certificates with CRLs). (Alexander Danilov)
90105

91106
- PDO_PGSQL:
92107
. Fixed bug GH-24461 (DISCARD ALL on persistent connection cleanup drops

‎Zend/Optimizer/block_pass.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,18 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
352352
}
353353
break;
354354

355+
case ZEND_FAST_CALL:
356+
if (opline->op2_type & (IS_TMP_VAR|IS_VAR)) {
357+
/* OP2 holds the pending return value. A TMP normally has a single
358+
* consumer, but FAST_CALL does not consume it:
359+
* the RETURN behind it is the consumer, and
360+
* zend_dispatch_try_catch_finally_helper() destroys the value
361+
* through OP2 if the finally block throws. Propagating the source
362+
* into the RETURN therefore must not remove it. */
363+
Tsource[VAR_NUM(opline->op2.var)] = NULL;
364+
}
365+
break;
366+
355367
case ZEND_SWITCH_LONG:
356368
case ZEND_SWITCH_STRING:
357369
case ZEND_MATCH:

‎Zend/Optimizer/zend_inference.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ static const zend_property_info *zend_fetch_static_prop_info(const zend_script *
24642464
const zend_property_info *prop_info = NULL;
24652465
if (opline->op1_type == IS_CONST) {
24662466
const zend_class_entry *ce = NULL;
2467-
if (opline->op2_type == IS_UNUSED) {
2467+
if (opline->op2_type == IS_UNUSED && !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
24682468
uint32_t fetch_type = opline->op2.num & ZEND_FETCH_CLASS_MASK;
24692469
switch (fetch_type) {
24702470
case ZEND_FETCH_CLASS_SELF:

‎Zend/Optimizer/zend_optimizer.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,7 @@ zend_class_entry *zend_optimizer_get_class_entry_from_op1(
846846
return zend_optimizer_get_class_entry(script, op_array, Z_STR_P(op1 + 1));
847847
}
848848
} else if (opline->op1_type == IS_UNUSED && op_array->scope
849+
&& !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)
849850
&& !(op_array->scope->ce_flags & ZEND_ACC_TRAIT)
850851
&& ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF
851852
|| ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_STATIC

0 commit comments

Comments
 (0)