Skip to content

Commit 1d0af1d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into random_class
2 parents 0fcefe3 + 7bc0dd2 commit 1d0af1d

File tree

293 files changed

+77206
-2072
lines changed

Some content is hidden

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

293 files changed

+77206
-2072
lines changed

NEWS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.1.0alpha3
44

5+
- Core:
6+
. Fixed bug #81202 (powerpc64 build fails on fibers). (krakjoe)
7+
. Fixed bug #80072 (Cyclic unserialize in TMPVAR operand may leak). (Nikita)
8+
9+
- Curl:
10+
. Fixed bug #81085 (Support CURLOPT_SSLCERT_BLOB for cert strings).
11+
(camporter)
512

13+
- Reflection:
14+
. Fixed bug #81200 (no way to determine if Closure is static). (krakjoe)
615

716
24 Jun 2021, PHP 8.1.0alpha2
817

TSRM/TSRM.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ TSRM_API void tsrm_shutdown(void)
229229
/* {{{ */
230230
/* environ lock api */
231231
TSRM_API void tsrm_env_lock(void) {
232-
tsrm_mutex_lock(tsrm_env_mutex);
232+
tsrm_mutex_lock(tsrm_env_mutex);
233233
}
234234

235235
TSRM_API void tsrm_env_unlock(void) {
236-
tsrm_mutex_unlock(tsrm_env_mutex);
236+
tsrm_mutex_unlock(tsrm_env_mutex);
237237
} /* }}} */
238238

239239
/* enlarge the arrays for the already active threads */
@@ -768,7 +768,7 @@ TSRM_API uint8_t tsrm_is_main_thread(void)
768768

769769
TSRM_API uint8_t tsrm_is_shutdown(void)
770770
{/*{{{*/
771-
return is_thread_shutdown;
771+
return is_thread_shutdown;
772772
}/*}}}*/
773773

774774
TSRM_API const char *tsrm_api_name(void)

UPGRADING

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,16 @@ PHP 8.1 UPGRADE NOTES
193193

194194
- Curl:
195195
. Added CURLOPT_DOH_URL option.
196+
. Added certificate blob options when for libcurl >= 7.71.0:
197+
198+
CURLOPT_ISSUERCERT_BLOB
199+
CURLOPT_PROXY_ISSUERCERT
200+
CURLOPT_PROXY_ISSUERCERT_BLOB
201+
CURLOPT_PROXY_SSLCERT_BLOB
202+
CURLOPT_PROXY_SSLKEY_BLOB
203+
CURLOPT_SSLCERT_BLOB
204+
CURLOPT_SSLKEY_BLOB
205+
196206
. Added CURLStringFile, which can be used to post a file from a string rather
197207
than a file:
198208

Zend/Optimizer/escape_analysis.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static int is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, in
188188
}
189189
break;
190190
}
191-
} else if (ssa_op->op1_def == var) {
191+
} else if (ssa_op->op1_def == var) {
192192
switch (opline->opcode) {
193193
case ZEND_ASSIGN:
194194
if (opline->op2_type == IS_CONST
@@ -208,7 +208,7 @@ static int is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, in
208208
}
209209
}
210210

211-
return 0;
211+
return 0;
212212
}
213213
/* }}} */
214214

Zend/Optimizer/optimize_temp_vars_5.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c
5959
valid_T = (zend_bitset) zend_arena_alloc(&ctx->arena, bitset_len * ZEND_BITSET_ELM_SIZE);
6060
map_T = (int *) zend_arena_alloc(&ctx->arena, T * sizeof(int));
6161

62-
end = op_array->opcodes;
63-
opline = &op_array->opcodes[op_array->last - 1];
62+
end = op_array->opcodes;
63+
opline = &op_array->opcodes[op_array->last - 1];
6464

65-
/* Find T definition points */
66-
while (opline >= end) {
67-
if (opline->result_type & (IS_VAR | IS_TMP_VAR)) {
65+
/* Find T definition points */
66+
while (opline >= end) {
67+
if (opline->result_type & (IS_VAR | IS_TMP_VAR)) {
6868
start_of_T[VAR_NUM(opline->result.var) - offset] = opline;
6969
}
7070
opline--;
@@ -73,10 +73,10 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c
7373
zend_bitset_clear(valid_T, bitset_len);
7474
zend_bitset_clear(taken_T, bitset_len);
7575

76-
end = op_array->opcodes;
77-
opline = &op_array->opcodes[op_array->last - 1];
76+
end = op_array->opcodes;
77+
opline = &op_array->opcodes[op_array->last - 1];
7878

79-
while (opline >= end) {
79+
while (opline >= end) {
8080
if ((opline->op1_type & (IS_VAR | IS_TMP_VAR))) {
8181
currT = VAR_NUM(opline->op1.var) - offset;
8282
if (opline->opcode == ZEND_ROPE_END) {

Zend/Optimizer/zend_call_graph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void zend_op_array_calc(zend_op_array *op_array, void *context)
3535
static void zend_op_array_collect(zend_op_array *op_array, void *context)
3636
{
3737
zend_call_graph *call_graph = context;
38-
zend_func_info *func_info = call_graph->func_infos + call_graph->op_arrays_count;
38+
zend_func_info *func_info = call_graph->func_infos + call_graph->op_arrays_count;
3939

4040
ZEND_SET_FUNC_INFO(op_array, func_info);
4141
call_graph->op_arrays[call_graph->op_arrays_count] = op_array;

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3285,7 +3285,7 @@ static zend_always_inline int _zend_update_type_info(
32853285
if (opline->opcode == ZEND_FETCH_DIM_W ||
32863286
opline->opcode == ZEND_FETCH_DIM_RW ||
32873287
opline->opcode == ZEND_FETCH_DIM_FUNC_ARG ||
3288-
opline->opcode == ZEND_FETCH_LIST_W) {
3288+
opline->opcode == ZEND_FETCH_LIST_W) {
32893289
if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) {
32903290
if (opline->opcode != ZEND_FETCH_DIM_FUNC_ARG) {
32913291
tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE);

Zend/Optimizer/zend_optimizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
645645
ZEND_ASSERT(opline->op1.var == var);
646646

647647
break;
648-
}
648+
}
649649
default:
650650
break;
651651
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
Return value of assigning by-val function result by-reference
3+
--FILE--
4+
<?php
5+
$a = [&$a];
6+
var_dump($a[0] =& returnsVal());
7+
function returnsVal() {}
8+
?>
9+
--EXPECTF--
10+
Notice: Only variables should be assigned by reference in %s on line %d
11+
NULL
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Promoting float precision warning to exception in bitwise_not
3+
--FILE--
4+
<?php
5+
set_error_handler(function($_, $msg) {
6+
throw new Exception($msg);
7+
});
8+
try {
9+
var_dump(~INF);
10+
} catch (Exception $e) {
11+
echo $e->getMessage(), "\n";
12+
}
13+
?>
14+
--EXPECT--
15+
Implicit conversion from float INF to int loses precision

0 commit comments

Comments
 (0)