Skip to content

Commit 81ea894

Browse files
committed
Merge tag 'php-8.3.1' into was-8.3.x
Tag for php-8.3.1
2 parents 6660a92 + 6d39b64 commit 81ea894

File tree

80 files changed

+1116
-359
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

+1116
-359
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ inputs:
99
jitType:
1010
default: 'disable'
1111
required: false
12+
idleCpu:
13+
default: 'false'
14+
required: false
1215
runs:
1316
using: composite
1417
steps:
@@ -45,7 +48,7 @@ runs:
4548
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
4649
-d opcache.jit=${{ inputs.jitType }} \
4750
-d opcache.jit_buffer_size=16M \
48-
-j$(/usr/bin/nproc) \
51+
${{ inputs.idleCpu == 'true' && '-j$(($(/usr/bin/nproc) - 1))' || '-j$(/usr/bin/nproc)' }} \
4952
-g FAIL,BORK,LEAK,XLEAK \
5053
--no-progress \
5154
--offline \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ runs:
2222
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2323
-d opcache.jit=${{ inputs.jitType }} \
2424
-d opcache.jit_buffer_size=16M \
25-
-j$(sysctl -n hw.ncpu) \
25+
-j$(($(sysctl -n hw.ncpu) - 1)) \
2626
-g FAIL,BORK,LEAK,XLEAK \
2727
--no-progress \
2828
--offline \

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
110110
runTestsParameters: >-
111111
${{ matrix.run_tests_parameters }}
112+
idleCpu: ${{ matrix.asan && 'true' || 'false' }}
112113
- name: Test Tracing JIT
113114
uses: ./.github/actions/test-linux
114115
with:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ before_script:
8585

8686
# Run PHPs run-tests.php
8787
script:
88-
- travis_wait 60 ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing
88+
- ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing
8989
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
9090

9191
after_success:

NEWS

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
21 Dec 2023, PHP 8.3.1
4+
5+
- Core:
6+
. Fixed bug GH-12758 / GH-12768 (Invalid opline in OOM handlers within
7+
ZEND_FUNC_GET_ARGS and ZEND_BIND_STATIC). (Florian Engelhardt)
8+
. Fix various missing NULL checks. (nielsdos, dstogov)
9+
. Fixed bug GH-12835 (Leak of call->extra_named_params on internal __call).
10+
(ilutov)
11+
. Fixed bug GH-12826 (Weird pointers issue in nested loops). (nielsdos)
12+
13+
- FPM:
14+
. Fixed bug GH-12705 (Segmentation fault in fpm_status_export_to_zval).
15+
(Patrick Prasse)
16+
17+
- FTP:
18+
. Fixed bug GH-9348 (FTP & SSL session reuse). (nielsdos)
19+
20+
- LibXML:
21+
. Fixed test failures for libxml2 2.12.0. (nielsdos)
22+
23+
- MySQLnd:
24+
. Avoid using uninitialised struct. (mikhainin)
25+
. Fixed bug GH-12791 (Possible dereference of NULL in MySQLnd debug code).
26+
(nielsdos)
27+
28+
- Opcache:
29+
. Fixed JIT bug (Function JIT emits "Uninitialized string offset" warning
30+
at the same time as invalid offset Error). (Girgias)
31+
. Fixed JIT bug (JIT emits "Attempt to assign property of non-object"
32+
warning at the same time as Error is being thrown). (Girgias)
33+
34+
- PDO PGSQL:
35+
. Fixed the default value of $fetchMode in PDO::pgsqlGetNotify() (kocsismate)
36+
37+
- SOAP:
38+
. Fixed bug GH-12838 ([SOAP] Temporary WSDL cache files not being deleted).
39+
(nielsdos)
40+
41+
- Standard
42+
. Fixed GH-12745 (http_build_query() default null argument for $arg_separator
43+
is implicitly coerced to string). (Girgias)
44+
345
23 Nov 2023, PHP 8.3.0
446

547
- Bcmath

Zend/Optimizer/zend_func_infos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static const func_info_t func_infos[] = {
235235
F1("mb_convert_variables", MAY_BE_STRING|MAY_BE_FALSE),
236236
F1("mb_encode_numericentity", MAY_BE_STRING),
237237
F1("mb_decode_numericentity", MAY_BE_STRING),
238-
F1("mb_get_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE),
238+
F1("mb_get_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL),
239239
#if defined(HAVE_MBREGEX)
240240
F1("mb_regex_encoding", MAY_BE_STRING|MAY_BE_BOOL),
241241
#endif

Zend/Optimizer/zend_inference.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3682,7 +3682,8 @@ static zend_always_inline zend_result _zend_update_type_info(
36823682
tmp &= ~MAY_BE_ARRAY_EMPTY;
36833683
}
36843684
}
3685-
if (((tmp & MAY_BE_ARRAY) && (tmp & MAY_BE_ARRAY_KEY_ANY))
3685+
if (!(tmp & MAY_BE_ARRAY)
3686+
|| (tmp & MAY_BE_ARRAY_KEY_ANY)
36863687
|| opline->opcode == ZEND_FETCH_DIM_FUNC_ARG
36873688
|| opline->opcode == ZEND_FETCH_DIM_R
36883689
|| opline->opcode == ZEND_FETCH_DIM_IS
@@ -3691,9 +3692,7 @@ static zend_always_inline zend_result _zend_update_type_info(
36913692
UPDATE_SSA_TYPE(tmp, ssa_op->op1_def);
36923693
} else {
36933694
/* invalid key type */
3694-
tmp = (tmp & (MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ARRAY)) |
3695-
(t1 & ~(MAY_BE_RC1|MAY_BE_RCN|MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE));
3696-
UPDATE_SSA_TYPE(tmp, ssa_op->op1_def);
3695+
return SUCCESS;
36973696
}
36983697
COPY_SSA_OBJ_TYPE(ssa_op->op1_use, ssa_op->op1_def);
36993698
}

Zend/tests/gh12826.phpt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--TEST--
2+
GH-12826 (Weird pointers issue in nested loops)
3+
--FILE--
4+
<?php
5+
$test = array(
6+
'a' => 1,
7+
'b' => 2,
8+
'c' => 3,
9+
'd' => 4,
10+
);
11+
12+
unset($test['a']);
13+
unset($test['b']);
14+
15+
foreach($test as $k => &$v) { // Mind the reference!
16+
echo "Pass $k : ";
17+
18+
foreach($test as $kk => $vv) {
19+
echo $test[$kk];
20+
if ($kk == $k) $test[$kk] = 0;
21+
}
22+
23+
echo "\n";
24+
}
25+
26+
unset($v);
27+
?>
28+
--EXPECT--
29+
Pass c : 34
30+
Pass d : 04

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.3.0"
23+
#define ZEND_VERSION "4.3.1"
2424

2525
#define ZEND_ENGINE_3
2626

Zend/zend_builtin_functions.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ ZEND_FUNCTION(func_num_args)
161161

162162
ZEND_PARSE_PARAMETERS_NONE();
163163

164-
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
164+
if (ex && (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE)) {
165165
zend_throw_error(NULL, "func_num_args() must be called from a function context");
166166
RETURN_THROWS();
167167
}
@@ -192,7 +192,7 @@ ZEND_FUNCTION(func_get_arg)
192192
}
193193

194194
ex = EX(prev_execute_data);
195-
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
195+
if (ex && (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE)) {
196196
zend_throw_error(NULL, "func_get_arg() cannot be called from the global scope");
197197
RETURN_THROWS();
198198
}
@@ -230,7 +230,7 @@ ZEND_FUNCTION(func_get_args)
230230

231231
ZEND_PARSE_PARAMETERS_NONE();
232232

233-
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
233+
if (ex && (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE)) {
234234
zend_throw_error(NULL, "func_get_args() cannot be called from the global scope");
235235
RETURN_THROWS();
236236
}

0 commit comments

Comments
 (0)