Skip to content
forked from php/php-src

Commit 86402dc

Browse files
authored
Merge pull request #21 from php/master
sync
2 parents 2c54b72 + c02348c commit 86402dc

File tree

1,415 files changed

+39049
-13194
lines changed

Some content is hidden

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

1,415 files changed

+39049
-13194
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ environment:
2828
#PDO_MYSQL_TEST_PASS: Password12!
2929
#PGSQL_TEST_CONNSTR: "host=127.0.0.1 dbname=test port=5432 user=postgres password=Password12!"
3030
#PDO_PGSQL_TEST_DSN: "pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=Password12!"
31+
STACK_LIMIT_DEFAULTS_CHECK: 1
3132
#build permutations
3233
matrix:
3334
- THREAD_SAFE: 0

.cirrus.yml

Lines changed: 204 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ asan_task:
77
image: gcc:latest
88
additional_containers:
99
- name: mysql
10-
image: mysql:latest
10+
image: mysql:8
1111
port: 3306
12+
cpu: 1.0
13+
memory: 1G
1214
env:
1315
MYSQL_ROOT_PASSWORD: "root"
1416
MYSQL_DATABASE: "test"
@@ -160,10 +162,10 @@ asan_task:
160162
tests_script:
161163
- export SKIP_IO_CAPTURE_TESTS=1
162164
- export CI_NO_IPV6=1
163-
- export MYSQL_TEST_HOST=mysql
165+
- export MYSQL_TEST_HOST=127.0.0.1
164166
- export MYSQL_TEST_USER=root
165167
- export MYSQL_TEST_PASSWD=root
166-
- export PDO_MYSQL_TEST_DSN="mysql:host=mysql;dbname=test"
168+
- export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
167169
- export PDO_MYSQL_TEST_USER=root
168170
- export PDO_MYSQL_TEST_PASS=root
169171
- >-
@@ -182,7 +184,9 @@ asan_task:
182184
freebsd_task:
183185
name: FREEBSD_DEBUG_NTS
184186
freebsd_instance:
185-
image_family: freebsd-13-0
187+
image_family: freebsd-13-2
188+
env:
189+
ARCH: amd64
186190
install_script:
187191
#- sed -i -e 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
188192
#- pkg upgrade -y
@@ -201,4 +205,200 @@ freebsd_task:
201205
tests_script:
202206
- export SKIP_IO_CAPTURE_TESTS=1
203207
- export CI_NO_IPV6=1
208+
- export STACK_LIMIT_DEFAULTS_CHECK=1
204209
- sapi/cli/php run-tests.php -P -q -j2 -g FAIL,BORK,LEAK,XLEAK --no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so
210+
211+
arm_task:
212+
name: ARM_DEBUG_NTS
213+
arm_container:
214+
image: gcc:12
215+
additional_containers:
216+
- name: mysql
217+
image: mysql:8
218+
port: 3306
219+
cpu: 1.0
220+
memory: 1G
221+
env:
222+
MYSQL_ALLOW_EMPTY_PASSWORD: true
223+
MYSQL_ROOT_PASSWORD: ""
224+
MYSQL_DATABASE: "test"
225+
- name: postgres
226+
image: postgres:latest
227+
port: 5432
228+
env:
229+
POSTGRES_PASSWORD: "postgres"
230+
POSTGRES_DB: "test"
231+
install_script:
232+
- export DEBIAN_FRONTEND=noninteractive
233+
- apt-get update -y
234+
- >-
235+
apt-get install -y
236+
bison
237+
re2c
238+
locales
239+
locales-all
240+
ldap-utils
241+
openssl
242+
slapd
243+
libgmp-dev
244+
libicu-dev
245+
libtidy-dev
246+
libenchant-2-dev
247+
libaspell-dev
248+
libpspell-dev
249+
libsasl2-dev
250+
libxpm-dev
251+
libzip-dev
252+
libsqlite3-dev
253+
libwebp-dev
254+
libonig-dev
255+
libkrb5-dev
256+
libgssapi-krb5-2
257+
libcurl4-openssl-dev
258+
libxml2-dev
259+
libxslt1-dev
260+
libpq-dev
261+
libreadline-dev
262+
libldap2-dev
263+
libsodium-dev
264+
libargon2-0-dev
265+
libmm-dev
266+
libsnmp-dev
267+
snmpd
268+
`#snmp-mibs-downloader`
269+
freetds-dev
270+
`#unixodbc-dev`
271+
libc-client-dev
272+
dovecot-core
273+
dovecot-pop3d
274+
dovecot-imapd
275+
sendmail
276+
firebird-dev
277+
liblmdb-dev
278+
libtokyocabinet-dev
279+
libdb-dev
280+
libqdbm-dev
281+
libjpeg-dev
282+
libpng-dev
283+
libfreetype6-dev
284+
build_script:
285+
- ./buildconf -f
286+
- >-
287+
./configure
288+
--enable-debug
289+
--enable-zts
290+
--enable-option-checking=fatal
291+
--prefix=/usr
292+
--enable-phpdbg
293+
--enable-fpm
294+
--enable-opcache
295+
--with-pdo-mysql=mysqlnd
296+
--with-mysqli=mysqlnd
297+
--with-pgsql
298+
--with-pdo-pgsql
299+
--with-pdo-sqlite
300+
--enable-intl
301+
--without-pear
302+
--enable-gd
303+
--with-jpeg
304+
--with-webp
305+
--with-freetype
306+
--with-xpm
307+
--enable-exif
308+
--with-zip
309+
--with-zlib
310+
--with-zlib-dir=/usr
311+
--enable-soap
312+
--enable-xmlreader
313+
--with-xsl
314+
--with-tidy
315+
--enable-sysvsem
316+
--enable-sysvshm
317+
--enable-shmop
318+
--enable-pcntl
319+
--with-readline
320+
--enable-mbstring
321+
--with-curl
322+
--with-gettext
323+
--enable-sockets
324+
--with-bz2
325+
--with-openssl
326+
--with-gmp
327+
--enable-bcmath
328+
--enable-calendar
329+
--enable-ftp
330+
--with-pspell=/usr
331+
--with-enchant=/usr
332+
--with-kerberos
333+
--enable-sysvmsg
334+
--with-ffi
335+
--enable-zend-test
336+
--enable-dl-test=shared
337+
--with-ldap
338+
--with-ldap-sasl
339+
--with-password-argon2
340+
--with-mhash
341+
--with-sodium
342+
--enable-dba
343+
--with-cdb
344+
--enable-flatfile
345+
--enable-inifile
346+
--with-tcadb
347+
--with-lmdb
348+
--with-qdbm
349+
--with-snmp
350+
`#--with-unixODBC`
351+
--with-imap
352+
--with-kerberos
353+
--with-imap-ssl
354+
`#--with-pdo-odbc=unixODBC,/usr`
355+
`#--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient`
356+
`#--with-oci8=shared,instantclient,/opt/oracle/instantclient`
357+
--with-config-file-path=/etc
358+
--with-config-file-scan-dir=/etc/php.d
359+
--with-pdo-firebird
360+
`#--with-pdo-dblib`
361+
--disable-phpdbg
362+
`#--enable-werror`
363+
- make -j2 > /dev/null
364+
- make install
365+
- mkdir -p /etc/php.d
366+
- echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
367+
- echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
368+
# Specify opcache.preload_user as we're running as root.
369+
- echo opcache.preload_user=root >> /etc/php.d/opcache.ini
370+
tests_script:
371+
- export SKIP_IO_CAPTURE_TESTS=1
372+
- export CI_NO_IPV6=1
373+
- export MYSQL_TEST_HOST=127.0.0.1
374+
- export MYSQL_TEST_USER=root
375+
- export MYSQL_TEST_PASSWD=
376+
- export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
377+
- export PDO_MYSQL_TEST_USER=root
378+
- export PDO_MYSQL_TEST_PASS=
379+
- export PDO_PGSQL_TEST_DSN="pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=postgres"
380+
- >-
381+
sapi/cli/php run-tests.php
382+
-d zend_extension=opcache.so
383+
-d opcache.enable_cli=1
384+
-d opcache.jit_buffer_size=16M
385+
-d opcache.jit=function
386+
-P -q -x -j2
387+
-g FAIL,BORK,LEAK,XLEAK
388+
--offline
389+
--show-diff
390+
--show-slow 1000
391+
--set-timeout 120
392+
- >-
393+
sapi/cli/php run-tests.php
394+
-d zend_extension=opcache.so
395+
-d opcache.enable_cli=1
396+
-d opcache.jit_buffer_size=16M
397+
-d opcache.jit=tracing
398+
-P -q -x -j2
399+
-g FAIL,BORK,LEAK,XLEAK
400+
--offline
401+
--show-diff
402+
--show-slow 1000
403+
--set-timeout 120
404+
--repeat 2

.gdbinit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ end
482482

483483
define print_pi
484484
set $pi = (zend_property_info *)$arg0
485-
set $initial_offset = ((uint32_t)(zend_uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
485+
set $initial_offset = ((uint32_t)(uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
486486
set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset)
487487
printf "[%p] {\n", $pi
488488
printf " offset = %p\n", $pi->offset

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@
2323
**/*_arginfo.h linguist-generated
2424
/Zend/zend_vm_execute.h linguist-generated
2525
/Zend/zend_vm_opcodes.{h,c} linguist-generated
26+
27+
# The OSS fuzz files are bunary
28+
/ext/date/tests/ossfuzz*.txt binary

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ runs:
1313
apt-get install -y \
1414
autoconf \
1515
bison \
16+
curl \
1617
g++-multilib \
1718
gcc-multilib \
1819
language-pack-de \

.github/actions/brew/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ runs:
1212
re2c
1313
brew install \
1414
15+
curl \
1516
krb5 \
1617
bzip2 \
1718
enchant \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ runs:
1111
set -x
1212
export PATH="/usr/local/opt/bison/bin:$PATH"
1313
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/[email protected]/lib/pkgconfig"
14+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig"
1415
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig"
1516
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
1617
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Notify Slack
2+
inputs:
3+
token:
4+
required: true
5+
runs:
6+
using: composite
7+
steps:
8+
- shell: bash
9+
run: >-
10+
curl -X POST -H 'Content-type: application/json' --data '{"attachments": [{"text": "Job in *nightly* failed", "footer": "<https://github.com/php/php-src/actions/runs/${{ github.run_id }}|View Run>", "color": "danger", "mrkdwn_in": ["text"]}]}' ${{ inputs.token }}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ runs:
77
set -x
88
99
sudo service mysql start
10-
sudo service postgresql start
1110
sudo service slapd start
1211
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
1312
# Ensure local_infile tests can run.
1413
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
15-
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
16-
sudo -u postgres psql -c "CREATE DATABASE test;"
1714
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
1815
sudo locale-gen de_DE
1916
20-
./.github/scripts/setup-slapd.sh &>/dev/null
17+
./.github/scripts/setup-slapd.sh
2118
2219
sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
2320
sudo cp ext/snmp/tests/bigtest /etc/snmp

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ runs:
2828
export PDO_OCI_TEST_USER="system"
2929
export PDO_OCI_TEST_PASS="pass"
3030
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
31+
export PGSQL_TEST_CONNSTR="host=postgres dbname=test port=5432 user=postgres password=postgres"
32+
export PDO_PGSQL_TEST_DSN="host=postgres dbname=test port=5432 user=postgres password=postgres"
3133
export SKIP_IO_CAPTURE_TESTS=1
3234
export TEST_PHP_JUNIT=junit.out.xml
35+
export STACK_LIMIT_DEFAULTS_CHECK=1
3336
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
3437
-j$(/usr/bin/nproc) \
3538
-g FAIL,BORK,LEAK,XLEAK \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ runs:
1515
export SKIP_IO_CAPTURE_TESTS=1
1616
export CI_NO_IPV6=1
1717
export TEST_PHP_JUNIT=junit.out.xml
18+
export STACK_LIMIT_DEFAULTS_CHECK=1
1819
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
1920
-j$(sysctl -n hw.ncpu) \
2021
-g FAIL,BORK,LEAK,XLEAK \

.github/lsan-suppressions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
leak:acommon::DictInfoList::elements
2+
leak:timer_create
3+
leak:netsnmp_init_mib_internals

.github/nightly_matrix.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function get_matrix_include(array $branches) {
5353
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'",
5454
'run_tests_parameters' => '--asan',
5555
'test_function_jit' => false,
56+
'asan' => true,
5657
];
5758
if ($branch['ref'] !== 'PHP-8.0') {
5859
$jobs[] = [
@@ -63,6 +64,7 @@ function get_matrix_include(array $branches) {
6364
'run_tests_parameters' => '--repeat 2',
6465
'timeout_minutes' => 360,
6566
'test_function_jit' => true,
67+
'asan' => false,
6668
];
6769
$jobs[] = [
6870
'name' => '_VARIATION',
@@ -72,6 +74,7 @@ function get_matrix_include(array $branches) {
7274
'configuration_parameters' => "CFLAGS='-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1'",
7375
'timeout_minutes' => 360,
7476
'test_function_jit' => true,
77+
'asan' => false,
7578
];
7679
}
7780
}
@@ -88,5 +91,7 @@ function get_matrix_include(array $branches) {
8891
$branches = get_branches();
8992
$matrix_include = get_matrix_include($branches);
9093

91-
echo '::set-output name=branches::' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n";
92-
echo '::set-output name=matrix-include::' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n";
94+
$f = fopen(getenv('GITHUB_OUTPUT'), 'a');
95+
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
96+
fwrite($f, 'matrix-include=' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
97+
fclose($f);

.github/scripts/setup-slapd.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
set -ex
2+
set -e
33

44
# Create TLS certificate
55
sudo mkdir -p /etc/ldap/ssl
@@ -42,7 +42,9 @@ sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldap
4242
# Configure LDAP database.
4343
DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`;
4444

45-
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
45+
if test -f "/etc/ldap/schema/ppolicy.ldif"; then
46+
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
47+
fi
4648

4749
sudo service slapd restart
4850

0 commit comments

Comments
 (0)