Skip to content

Commit 508d097

Browse files
committed
Merge tag 'php-8.1.24' into was-8.1.x
Tag for php-8.1.24
2 parents 3fc0d7d + e82057a commit 508d097

Some content is hidden

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

76 files changed

+1197
-108
lines changed

.github/actions/apt-x64/action.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,3 @@ runs:
5959
libjpeg-dev \
6060
libpng-dev \
6161
libfreetype6-dev
62-
63-
mkdir /opt/oracle
64-
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
65-
unzip instantclient-basiclite-linuxx64.zip && rm instantclient-basiclite-linuxx64.zip
66-
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
67-
unzip instantclient-sdk-linuxx64.zip && rm instantclient-sdk-linuxx64.zip
68-
mv instantclient_*_* /opt/oracle/instantclient
69-
# interferes with libldap2 headers
70-
rm /opt/oracle/instantclient/sdk/include/ldap.h
71-
# fix debug build warning: zend_signal: handler was replaced for signal (2) after startup
72-
echo DISABLE_INTERRUPT=on > /opt/oracle/instantclient/network/admin/sqlnet.ora
73-
sudo sh -c 'echo /opt/oracle/instantclient >/etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig'

.github/actions/configure-x64/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ runs:
7474
--with-imap \
7575
--with-imap-ssl \
7676
--with-pdo-odbc=unixODBC,/usr \
77-
--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \
78-
--with-oci8=shared,instantclient,/opt/oracle/instantclient \
77+
$([ -d "/opt/oracle/instantclient" ] && echo '--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient') \
78+
$([ -d "/opt/oracle/instantclient" ] && echo '--with-oci8=shared,instantclient,/opt/oracle/instantclient') \
7979
--with-config-file-path=/etc \
8080
--with-config-file-scan-dir=/etc/php.d \
8181
--with-pdo-firebird \

.github/actions/install-linux-x32/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
run: |
77
set -x
88
make install
9-
mkdir /etc/php.d
9+
mkdir -p /etc/php.d
1010
chmod 777 /etc/php.d
1111
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
1212
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ runs:
66
run: |
77
set -x
88
sudo make install
9-
sudo mkdir /etc/php.d
9+
sudo mkdir -p /etc/php.d
1010
sudo chmod 777 /etc/php.d
1111
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
1212
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
13-
echo extension=oci8.so > /etc/php.d/oci8.ini
14-
echo extension=pdo_oci.so > /etc/php.d/pdo_oci.ini

.github/actions/setup-oracle/action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,20 @@ runs:
1111
--name oracle \
1212
-h oracle \
1313
-d gvenzl/oracle-xe:slim
14+
15+
mkdir /opt/oracle
16+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
17+
unzip instantclient-basiclite-linuxx64.zip && rm instantclient-basiclite-linuxx64.zip
18+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
19+
unzip instantclient-sdk-linuxx64.zip && rm instantclient-sdk-linuxx64.zip
20+
mv instantclient_*_* /opt/oracle/instantclient
21+
# interferes with libldap2 headers
22+
rm /opt/oracle/instantclient/sdk/include/ldap.h
23+
# fix debug build warning: zend_signal: handler was replaced for signal (2) after startup
24+
echo DISABLE_INTERRUPT=on > /opt/oracle/instantclient/network/admin/sqlnet.ora
25+
sudo sh -c 'echo /opt/oracle/instantclient >/etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig'
26+
27+
sudo mkdir -p /etc/php.d
28+
sudo chmod 777 /etc/php.d
29+
echo extension=oci8.so > /etc/php.d/oci8.ini
30+
echo extension=pdo_oci.so > /etc/php.d/pdo_oci.ini

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ jobs:
555555
- name: make install
556556
run: |
557557
sudo make install
558-
sudo mkdir /etc/php.d
558+
sudo mkdir -p /etc/php.d
559559
sudo chmod 777 /etc/php.d
560560
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
561561
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini

.github/workflows/push.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,29 @@ on:
66
- NEWS
77
- UPGRADING
88
- UPGRADING.INTERNALS
9-
- README.md
9+
- '**/README.*'
1010
- CONTRIBUTING.md
1111
- CODING_STANDARDS.md
12+
- .cirrus.yml
13+
- .travis.yml
14+
- travis/*
1215
branches:
1316
- PHP-7.4
1417
- PHP-8.0
1518
- PHP-8.1
1619
- master
1720
pull_request:
21+
paths-ignore:
22+
- docs/*
23+
- NEWS
24+
- UPGRADING
25+
- UPGRADING.INTERNALS
26+
- '**/README.*'
27+
- CONTRIBUTING.md
28+
- CODING_STANDARDS.md
29+
- .cirrus.yml
30+
- .travis.yml
31+
- travis/*
1832
branches:
1933
- '**'
2034
concurrency:

NEWS

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
28 Sep 2023, PHP 8.1.24
4+
5+
- Core:
6+
. Fixed bug GH-11937 (Constant ASTs containing objects). (ilutov)
7+
. Fixed bug GH-11790 (On riscv64 require libatomic if actually needed).
8+
(Jeremie Courreges-Anglas)
9+
. Fixed bug GH-12073 (Segfault when freeing incompletely initialized
10+
closures). (ilutov)
11+
. Fixed bug GH-12060 (Internal iterator rewind handler is called twice).
12+
(ju1ius)
13+
. Fixed bug GH-12102 (Incorrect compile error when using array access on TMP
14+
value in function call). (ilutov)
15+
16+
- DOM:
17+
. Fix memory leak when setting an invalid DOMDocument encoding. (nielsdos)
18+
19+
- Iconv:
20+
. Fixed build for NetBSD which still uses the old iconv signature.
21+
(David Carlier)
22+
23+
- Intl:
24+
. Fixed bug GH-12020 (intl_get_error_message() broken after
25+
MessageFormatter::formatMessage() fails). (Girgias)
26+
27+
- MySQLnd:
28+
. Fixed bug GH-10270 (Invalid error message when connection via SSL fails:
29+
"trying to connect via (null)"). (Kamil Tekiela)
30+
31+
- ODBC:
32+
. Fixed memory leak with failed SQLPrepare. (NattyNarwhal)
33+
. Fixed persistent procedural ODBC connections not getting closed.
34+
(NattyNarwhal)
35+
36+
- SimpleXML:
37+
. Fixed bug #52751 (XPath processing-instruction() function is not
38+
supported). (nielsdos)
39+
40+
- SPL:
41+
. Fixed bug GH-11972 (RecursiveCallbackFilterIterator regression in 8.1.18).
42+
(nielsdos)
43+
44+
- SQLite3:
45+
. Fixed bug GH-11878 (SQLite3 callback functions cause a memory leak with
46+
a callable array). (nielsdos, arnaud-lb)
47+
348
31 Aug 2023, PHP 8.1.23
449

550
- CLI:

Zend/Optimizer/optimize_func_calls.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
typedef struct _optimizer_call_info {
3939
zend_function *func;
4040
zend_op *opline;
41+
zend_op *last_check_func_arg_opline;
4142
bool is_prototype;
4243
bool try_inline;
4344
uint32_t func_arg_num;
@@ -252,6 +253,14 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
252253
if (call_stack[call - 1].func_arg_num != (uint32_t)-1
253254
&& has_known_send_mode(&call_stack[call - 1], call_stack[call - 1].func_arg_num)) {
254255
if (ARG_SHOULD_BE_SENT_BY_REF(call_stack[call - 1].func, call_stack[call - 1].func_arg_num)) {
256+
/* There's no TMP specialization for FETCH_OBJ_W/FETCH_DIM_W. Avoid
257+
* converting it and error at runtime in the FUNC_ARG variant. */
258+
if ((opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG)
259+
&& (opline->op1_type == IS_TMP_VAR || call_stack[call - 1].last_check_func_arg_opline == NULL)) {
260+
/* Don't remove the associated CHECK_FUNC_ARG opcode. */
261+
call_stack[call - 1].last_check_func_arg_opline = NULL;
262+
break;
263+
}
255264
if (opline->opcode != ZEND_FETCH_STATIC_PROP_FUNC_ARG) {
256265
opline->opcode -= 9;
257266
} else {
@@ -298,11 +307,21 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
298307

299308
if (has_known_send_mode(&call_stack[call - 1], opline->op2.num)) {
300309
call_stack[call - 1].func_arg_num = opline->op2.num;
301-
MAKE_NOP(opline);
310+
call_stack[call - 1].last_check_func_arg_opline = opline;
302311
}
303312
break;
304-
case ZEND_SEND_VAR_EX:
305313
case ZEND_SEND_FUNC_ARG:
314+
/* Don't transform SEND_FUNC_ARG if any FETCH opcodes weren't transformed. */
315+
if (call_stack[call - 1].last_check_func_arg_opline == NULL) {
316+
if (opline->op2_type == IS_CONST) {
317+
call_stack[call - 1].try_inline = 0;
318+
}
319+
break;
320+
}
321+
MAKE_NOP(call_stack[call - 1].last_check_func_arg_opline);
322+
call_stack[call - 1].last_check_func_arg_opline = NULL;
323+
ZEND_FALLTHROUGH;
324+
case ZEND_SEND_VAR_EX:
306325
if (opline->op2_type == IS_CONST) {
307326
call_stack[call - 1].try_inline = 0;
308327
break;

Zend/tests/arginfo_zpp_mismatch.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test that there is no arginfo/zpp mismatch
33
--SKIPIF--
44
<?php
5+
if (getenv('SKIP_ASAN')) die("skip Intermittently crashes lsan");
56
if (getenv('SKIP_MSAN')) die("skip msan misses interceptors for some functions");
67
?>
78
--FILE--

0 commit comments

Comments
 (0)