Skip to content

Commit f497d3b

Browse files
committed
Merge tag 'php-8.3.11' into was-8.3.x
Tag for php-8.3.11
2 parents 14650f1 + acd31df commit f497d3b

File tree

101 files changed

+1681
-313
lines changed

Some content is hidden

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

101 files changed

+1681
-313
lines changed

.github/CODEOWNERS

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,53 @@
55
# the problem area and could aid in deciding whether a pull request is ready
66
# for merging.
77
#
8+
# When changing this file, please make sure to commit the changes to the
9+
# earliest supported PHP branch (PHP-X.Y) and not only to the master branch.
10+
# GitHub reads the CODEOWNERS file from the pull request's targeted branch.
11+
# Commit changes here similar to bug fixes:
12+
# https://github.com/php/php-src/blob/master/CONTRIBUTING.md#pull-requests
13+
#
814
# For more information, see the GitHub CODEOWNERS documentation:
915
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
1016

1117
/.github @iluuu1994 @TimWolla
1218
/build/gen_stub.php @kocsismate
13-
/ext/bcmath @Girgias
19+
/ext/bcmath @Girgias @nielsdos @SakiTakamachi
1420
/ext/curl @adoy
1521
/ext/date @derickr
1622
/ext/dba @Girgias
1723
/ext/dom @nielsdos
1824
/ext/ffi @dstogov
25+
/ext/gd @devnexen
1926
/ext/gettext @devnexen
2027
/ext/gmp @Girgias
2128
/ext/imap @Girgias
2229
/ext/intl @devnexen
2330
/ext/json @bukka
2431
/ext/libxml @nielsdos
25-
/ext/mbstring @alexdowad
32+
/ext/mbstring @alexdowad @youkidearitai
33+
/ext/mysqlnd @SakiTakamachi
2634
/ext/odbc @NattyNarwhal
2735
/ext/opcache @dstogov @iluuu1994
2836
/ext/openssl @bukka
29-
/ext/pdo_odbc @NattyNarwhal
30-
/ext/pdo_pgsql @devnexen
37+
/ext/pcntl @devnexen
38+
/ext/pdo @SakiTakamachi
39+
/ext/pdo_dblib @SakiTakamachi
40+
/ext/pdo_firebird @SakiTakamachi
41+
/ext/pdo_mysql @SakiTakamachi
42+
/ext/pdo_odbc @NattyNarwhal @SakiTakamachi
43+
/ext/pdo_pgsql @devnexen @SakiTakamachi
44+
/ext/pdo_sqlite @SakiTakamachi
3145
/ext/pgsql @devnexen
3246
/ext/random @TimWolla @zeriyoshi
3347
/ext/session @Girgias
48+
/ext/simplexml @nielsdos
3449
/ext/sockets @devnexen
3550
/ext/spl @Girgias
3651
/ext/standard @bukka
52+
/ext/xml @nielsdos
3753
/ext/xmlreader @nielsdos
54+
/ext/xmlwriter @nielsdos
3855
/ext/xsl @nielsdos
3956
/main @bukka
4057
/sapi/fpm @bukka
@@ -44,6 +61,8 @@
4461
/Zend/zend_API.* @dstogov @iluuu1994
4562
/Zend/zend_call_stack.* @arnaud-lb
4663
/Zend/zend_closures.* @dstogov
64+
/Zend/zend_compile.* @iluuu1994
65+
/Zend/zend_enum.* @iluuu1994
4766
/Zend/zend_execute.* @dstogov @iluuu1994
4867
/Zend/zend_execute_API.c @dstogov @iluuu1994
4968
/Zend/zend_gc.* @dstogov @arnaud-lb

.github/actions/verify-generated-files/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ runs:
1212
ext/tokenizer/tokenizer_data_gen.php
1313
build/gen_stub.php -f
1414
build/gen_stub.php --generate-optimizer-info
15-
git add . -N && git diff --exit-code
15+
# Use the -a flag for a bug in git 2.46.0, which doesn't consider changed -diff files.
16+
git add . -N && git diff -a --exit-code

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ jobs:
860860
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
861861
PHP_BUILD_OBJ_DIR: C:\obj
862862
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
863-
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
863+
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
864864
PHP_BUILD_CRT: vs16
865865
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
866866
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
MYSQL_ROOT_PASSWORD: root
156156
steps:
157157
- name: git checkout
158-
uses: actions/checkout@v3
158+
uses: actions/checkout@v4
159159
- name: apt
160160
uses: ./.github/actions/apt-x32
161161
- name: ccache
@@ -222,7 +222,7 @@ jobs:
222222
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
223223
PHP_BUILD_OBJ_DIR: C:\obj
224224
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
225-
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
225+
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
226226
PHP_BUILD_CRT: vs16
227227
PLATFORM: x64
228228
THREAD_SAFE: "1"

NEWS

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,76 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
29 Aug 2024, PHP 8.3.11
4+
5+
- Core:
6+
. Fixed bug GH-15020 (Memory leak in Zend/Optimizer/escape_analysis.c).
7+
(nielsdos)
8+
. Fixed bug GH-15023 (Memory leak in Zend/zend_ini.c). (nielsdos)
9+
. Fixed bug GH-13330 (Append -Wno-implicit-fallthrough flag conditionally).
10+
(Peter Kokot)
11+
. Fix uninitialized memory in network.c. (nielsdos)
12+
. Fixed bug GH-15108 (Segfault when destroying generator during shutdown).
13+
(Arnaud)
14+
. Fixed bug GH-15275 (Crash during GC of suspended generator delegate).
15+
(Arnaud)
16+
17+
- Curl:
18+
. Fixed case when curl_error returns an empty string.
19+
(David Carlier)
20+
21+
- DOM:
22+
. Fix UAF when removing doctype and using foreach iteration. (nielsdos)
23+
24+
- FFI:
25+
. Fixed bug GH-14286 (ffi enum type (when enum has no name) make memory
26+
leak). (nielsdos, dstogov)
27+
28+
- Hash:
29+
. Fix crash when converting array data for array in shm in xxh3. (nielsdos)
30+
31+
- Intl:
32+
. Fixed bug GH-15087 (IntlChar::foldCase()'s $option is not optional). (cmb)
33+
34+
- Opcache:
35+
. Fixed bug GH-13817 (Segmentation fault for enabled observers after pass 4).
36+
(Bob)
37+
. Fixed bug GH-13775 (Memory leak possibly related to opcache SHM placement).
38+
(Arnaud, nielsdos)
39+
40+
- Output:
41+
. Fixed bug GH-15179 (Segmentation fault (null pointer dereference) in
42+
ext/standard/url_scanner_ex.re). (nielsdos)
43+
44+
- PDO_Firebird:
45+
. Fix bogus fallthrough path in firebird_handle_get_attribute(). (nielsdos)
46+
47+
- PHPDBG:
48+
. Fixed bug GH-13199 (EOF emits redundant prompt in phpdbg local console mode
49+
with libedit/readline). (Peter Kokot)
50+
. Fixed bug GH-15268 (heap buffer overflow in phpdbg
51+
(zend_hash_num_elements() Zend/zend_hash.h)). (nielsdos)
52+
. Fixed bug GH-15210 use-after-free on watchpoint allocations. (nielsdos)
53+
54+
- Soap:
55+
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
56+
. Fix SoapFault property destruction. (nielsdos)
57+
. Fixed bug GH-15252 (SOAP XML broken since PHP 8.3.9 when using classmap
58+
constructor option). (nielsdos)
59+
60+
- Standard:
61+
. Fix passing non-finite timeout values in stream functions. (nielsdos)
62+
. Fixed GH-14780 p(f)sockopen timeout overflow. (David Carlier)
63+
64+
- Streams:
65+
. Fixed bug GH-15028 (Memory leak in ext/phar/stream.c). (nielsdos)
66+
. Fixed bug GH-15034 (Integer overflow on stream_notification_callback
67+
byte_max parameter with files bigger than 2GB). (nielsdos)
68+
. Reverted fix for GH-14930 (Custom stream wrapper dir_readdir output
69+
truncated to 255 characters). (Jakub Zelenka)
70+
71+
- Tidy:
72+
. Fix memory leaks in ext/tidy basedir restriction code. (nielsdos)
73+
374
01 Aug 2024, PHP 8.3.10
475

576
- Core:
@@ -12,6 +83,8 @@ PHP NEWS
1283
. Fixed bug GH-14741 (Segmentation fault in Zend/zend_types.h). (nielsdos)
1384
. Fixed bug GH-14969 (Use-after-free in property coercion with __toString()).
1485
(ilutov)
86+
. Fixed bug GH-14961 (Comment between -> and keyword results in parse error).
87+
(ilutov)
1588

1689
- Dom:
1790
. Fixed bug GH-14702 (DOMDocument::xinclude() crash). (nielsdos)

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ PHP 8.3 UPGRADE NOTES
4545
be removed during cycle collection if the key is not reachable except by
4646
iterating over the WeakMap (reachability via iteration is considered weak).
4747
Previously, such entries would never be automatically removed.
48+
. In addition to whitespace characters, now comments are allowed between
49+
`yield` and `from`. The whole "construct" (e.g. `yield /* comment */ from`)
50+
is reported as a single `T_YIELD_FROM` token by the tokenizer.
4851

4952
- DOM:
5053
. DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith()

Zend/Optimizer/compact_vars.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "Optimizer/zend_optimizer_internal.h"
2020
#include "zend_bitset.h"
21+
#include "zend_observer.h"
2122

2223
/* This pass removes all CVs and temporaries that are completely unused. It does *not* merge any CVs or TMPs.
2324
* This pass does not operate on SSA form anymore. */
@@ -117,7 +118,7 @@ void zend_optimizer_compact_vars(zend_op_array *op_array) {
117118
op_array->last_var = num_cvs;
118119
}
119120

120-
op_array->T = num_tmps;
121+
op_array->T = num_tmps + ZEND_OBSERVER_ENABLED; // reserve last temporary for observers if enabled
121122

122123
free_alloca(vars_map, use_heap2);
123124
}

Zend/Optimizer/escape_analysis.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ zend_result zend_ssa_escape_analysis(const zend_script *script, zend_op_array *o
415415
}
416416

417417
if (zend_build_equi_escape_sets(ees, op_array, ssa) == FAILURE) {
418+
free_alloca(ees, use_heap);
418419
return FAILURE;
419420
}
420421

Zend/Optimizer/optimize_temp_vars_5.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "zend_execute.h"
2828
#include "zend_vm.h"
2929
#include "zend_bitset.h"
30+
#include "zend_observer.h"
3031

3132
#define INVALID_VAR ((uint32_t)-1)
3233
#define GET_AVAILABLE_T() \
@@ -174,5 +175,5 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c
174175
}
175176

176177
zend_arena_release(&ctx->arena, checkpoint);
177-
op_array->T = max + 1;
178+
op_array->T = max + 1 + ZEND_OBSERVER_ENABLED; // reserve last temporary for observers if enabled
178179
}

Zend/Optimizer/zend_optimizer.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "zend_dump.h" // for zend_dump_op_array()
2929
#include "zend_inference.h" // for OP1_INFO(), ...
3030
#include "zend_ini.h"
31-
#include "zend_observer.h"
3231
#include "zend_virtual_cwd.h" //for IS_ABSOLUTE_PATH()
3332
#include "zend_vm.h"
3433

@@ -1101,8 +1100,6 @@ static void zend_revert_pass_two(zend_op_array *op_array)
11011100
}
11021101
#endif
11031102

1104-
op_array->T -= ZEND_OBSERVER_ENABLED;
1105-
11061103
op_array->fn_flags &= ~ZEND_ACC_DONE_PASS_TWO;
11071104
}
11081105

@@ -1132,8 +1129,6 @@ static void zend_redo_pass_two(zend_op_array *op_array)
11321129
}
11331130
#endif
11341131

1135-
op_array->T += ZEND_OBSERVER_ENABLED; // reserve last temporary for observers if enabled
1136-
11371132
opline = op_array->opcodes;
11381133
end = opline + op_array->last;
11391134
while (opline < end) {
@@ -1562,12 +1557,6 @@ ZEND_API void zend_optimize_script(zend_script *script, zend_long optimization_l
15621557
}
15631558
}
15641559

1565-
if (ZEND_OBSERVER_ENABLED) {
1566-
for (i = 0; i < call_graph.op_arrays_count; i++) {
1567-
++call_graph.op_arrays[i]->T; // ensure accurate temporary count for stack size precalculation
1568-
}
1569-
}
1570-
15711560
if (ZEND_OPTIMIZER_PASS_12 & optimization_level) {
15721561
for (i = 0; i < call_graph.op_arrays_count; i++) {
15731562
zend_adjust_fcall_stack_size_graph(call_graph.op_arrays[i]);
@@ -1583,8 +1572,6 @@ ZEND_API void zend_optimize_script(zend_script *script, zend_long optimization_l
15831572
zend_recalc_live_ranges(op_array, needs_live_range);
15841573
}
15851574
} else {
1586-
op_array->T -= ZEND_OBSERVER_ENABLED; // redo_pass_two will re-increment it
1587-
15881575
zend_redo_pass_two(op_array);
15891576
if (op_array->live_range) {
15901577
zend_recalc_live_ranges(op_array, NULL);

0 commit comments

Comments
 (0)