Skip to content

Commit 660452b

Browse files
committed
DEBUG/BENCH: Merge branch 'origin/master'
2 parents 5614414 + db2ac3a commit 660452b

File tree

3,896 files changed

+331766
-166651
lines changed

Some content is hidden

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

3,896 files changed

+331766
-166651
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: 186 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,190 @@
11
env:
22
CIRRUS_CLONE_DEPTH: 1
33

4+
asan_task:
5+
name: ASAN_DEBUG_NTS
6+
container:
7+
image: gcc:latest
8+
additional_containers:
9+
- name: mysql
10+
image: mysql:8
11+
port: 3306
12+
cpu: 1.0
13+
memory: 1G
14+
env:
15+
MYSQL_ROOT_PASSWORD: "root"
16+
MYSQL_DATABASE: "test"
17+
install_script:
18+
- apt-get update -y
19+
- >-
20+
apt-get install -y
21+
bison
22+
re2c
23+
locales
24+
locales-all
25+
`#ldap-utils`
26+
openssl
27+
`slapd`
28+
libgmp-dev
29+
libicu-dev
30+
`#libtidy-dev`
31+
`#libenchant-dev`
32+
libaspell-dev
33+
libpspell-dev
34+
libsasl2-dev
35+
libxpm-dev
36+
libzip-dev
37+
`#libsqlite3-dev`
38+
libwebp-dev
39+
libonig-dev
40+
libkrb5-dev
41+
libgssapi-krb5-2
42+
libcurl4-openssl-dev
43+
libxml2-dev
44+
libxslt1-dev
45+
libpq-dev
46+
libreadline-dev
47+
`#libldap2-dev`
48+
libsodium-dev
49+
libargon2-0-dev
50+
libmm-dev
51+
`#libsnmp-dev`
52+
`#postgresql`
53+
`#postgresql-contrib`
54+
`#snmpd`
55+
`#snmp-mibs-downloader`
56+
`#freetds-dev`
57+
`#unixodbc-dev`
58+
llvm
59+
clang
60+
libc-client-dev
61+
dovecot-core
62+
dovecot-pop3d
63+
dovecot-imapd
64+
`#sendmail`
65+
`#firebird-dev`
66+
liblmdb-dev
67+
libtokyocabinet-dev
68+
libdb-dev
69+
libqdbm-dev
70+
libjpeg-dev
71+
libpng-dev
72+
libfreetype6-dev
73+
build_script:
74+
- ./buildconf -f
75+
- >-
76+
./configure
77+
--enable-debug
78+
--enable-zts
79+
--enable-option-checking=fatal
80+
--prefix=/usr
81+
--enable-phpdbg
82+
--enable-fpm
83+
--enable-opcache
84+
--disable-opcache-jit
85+
--with-pdo-mysql=mysqlnd
86+
--with-mysqli=mysqlnd
87+
`#--with-pgsql`
88+
`#--with-pdo-pgsql`
89+
`#--with-pdo-sqlite`
90+
--enable-intl
91+
--without-pear
92+
--enable-gd
93+
--with-jpeg
94+
--with-webp
95+
--with-freetype
96+
--with-xpm
97+
--enable-exif
98+
--with-zip
99+
--with-zlib
100+
--with-zlib-dir=/usr
101+
--enable-soap
102+
--enable-xmlreader
103+
--with-xsl
104+
`#--with-tidy`
105+
--enable-sysvsem
106+
--enable-sysvshm
107+
--enable-shmop
108+
--enable-pcntl
109+
--with-readline
110+
--enable-mbstring
111+
--with-curl
112+
--with-gettext
113+
--enable-sockets
114+
--with-bz2
115+
--with-openssl
116+
--with-gmp
117+
--enable-bcmath
118+
--enable-calendar
119+
--enable-ftp
120+
--with-pspell=/usr
121+
`#--with-enchant=/usr`
122+
--with-kerberos
123+
--enable-sysvmsg
124+
--with-ffi
125+
--enable-zend-test
126+
`#--enable-dl-test=shared`
127+
`#--with-ldap`
128+
`#--with-ldap-sasl`
129+
--with-password-argon2
130+
--with-mhash
131+
--with-sodium
132+
--enable-dba
133+
--with-cdb
134+
--enable-flatfile
135+
--enable-inifile
136+
--with-tcadb
137+
--with-lmdb
138+
--with-qdbm
139+
`#--with-snmp`
140+
`#--with-unixODBC`
141+
`#--with-imap`
142+
--with-kerberos
143+
--with-imap-ssl
144+
`#--with-pdo-odbc=unixODBC,/usr`
145+
`#--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient`
146+
`#--with-oci8=shared,instantclient,/opt/oracle/instantclient`
147+
--with-config-file-path=/etc
148+
--with-config-file-scan-dir=/etc/php.d
149+
`#--with-pdo-firebird`
150+
`#--with-pdo-dblib`
151+
--enable-werror
152+
CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'
153+
CC=clang
154+
CXX=clang++
155+
- make -j2
156+
- make install
157+
- mkdir -p /etc/php.d
158+
- echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
159+
- echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
160+
# Specify opcache.preload_user as we're running as root.
161+
- echo opcache.preload_user=root >> /etc/php.d/opcache.ini
162+
tests_script:
163+
- export SKIP_IO_CAPTURE_TESTS=1
164+
- export CI_NO_IPV6=1
165+
- export MYSQL_TEST_HOST=127.0.0.1
166+
- export MYSQL_TEST_USER=root
167+
- export MYSQL_TEST_PASSWD=root
168+
- export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
169+
- export PDO_MYSQL_TEST_USER=root
170+
- export PDO_MYSQL_TEST_PASS=root
171+
- >-
172+
sapi/cli/php run-tests.php
173+
-P -q -x -j2
174+
-g FAIL,BORK,LEAK,XLEAK
175+
--no-progress
176+
--offline
177+
--show-diff
178+
--show-slow 1000
179+
--set-timeout 120
180+
-d zend_extension=opcache.so
181+
-d opcache.enable_cli=1
182+
--asan
183+
4184
freebsd_task:
5185
name: FREEBSD_DEBUG_NTS
6186
freebsd_instance:
7-
image_family: freebsd-13-0
187+
image_family: freebsd-13-2
8188
env:
9189
ARCH: amd64
10190
install_script:
@@ -25,12 +205,13 @@ freebsd_task:
25205
tests_script:
26206
- export SKIP_IO_CAPTURE_TESTS=1
27207
- export CI_NO_IPV6=1
28-
- sapi/cli/php run-tests.php -P -q -j2 -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so
208+
- export STACK_LIMIT_DEFAULTS_CHECK=1
209+
- 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
29210

30211
arm_task:
31212
name: ARM_DEBUG_NTS
32213
arm_container:
33-
image: debian:11
214+
image: debian:12
34215
additional_containers:
35216
- name: mysql
36217
image: mysql:8
@@ -208,6 +389,7 @@ arm_task:
208389
-d opcache.jit=function
209390
-P -q -x -j2
210391
-g FAIL,BORK,LEAK,XLEAK
392+
--no-progress
211393
--offline
212394
--show-diff
213395
--show-slow 1000
@@ -220,6 +402,7 @@ arm_task:
220402
-d opcache.jit=tracing
221403
-P -q -x -j2
222404
-g FAIL,BORK,LEAK,XLEAK
405+
--no-progress
223406
--offline
224407
--show-diff
225408
--show-slow 1000

.gdbinit

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ define ____print_ht
318318
set $n = $n - 1
319319
end
320320

321-
if $ht->u.v.flags & 4
321+
set $packed = $ht->u.v.flags & 4
322+
if $packed
322323
printf "Packed"
323324
else
324325
printf "Hash"
@@ -329,36 +330,45 @@ define ____print_ht
329330
set $i = 0
330331
set $ind = $ind + 1
331332
while $i < $num
332-
set $p = (Bucket*)($ht->arData + $i)
333+
if $packed
334+
set $val = (zval*)($ht->arPacked + $i)
335+
set $key = (zend_string*)0
336+
set $h = $i
337+
else
338+
set $bucket = (Bucket*)($ht->arData + $i)
339+
set $val = &$bucket->val
340+
set $key = $bucket->key
341+
set $h = $bucket->h
342+
end
333343
set $n = $ind
334-
if $p->val.u1.v.type > 0
344+
if $val->u1.v.type > 0
335345
while $n > 0
336346
printf " "
337347
set $n = $n - 1
338348
end
339349
printf "[%d] ", $i
340-
if $p->key
341-
____print_str $p->key->val $p->key->len
350+
if $key
351+
____print_str $key->val $key->len
342352
printf " => "
343353
else
344-
printf "%d => ", $p->h
354+
printf "%d => ", $h
345355
end
346356
if $arg1 == 0
347-
printf "%p\n", (zval *)&$p->val
357+
printf "%p\n", $val
348358
end
349359
if $arg1 == 1
350-
set $zval = (zval *)&$p->val
360+
set $zval = $val
351361
____printzv $zval 1
352362
end
353363
if $arg1 == 2
354-
printf "%s\n", (char*)$p->val.value.ptr
364+
printf "%s\n", (char*)$val->value.ptr
355365
end
356366
if $arg1 == 3
357-
set $func = (zend_function*)$p->val.value.ptr
367+
set $func = (zend_function*)$val->value.ptr
358368
printf "\"%s\"\n", $func->common.function_name->val
359369
end
360370
if $arg1 == 4
361-
set $const = (zend_constant *)$p->val.value.ptr
371+
set $const = (zend_constant *)$val->value.ptr
362372
____printzv $const 1
363373
end
364374
end
@@ -472,7 +482,7 @@ end
472482

473483
define print_pi
474484
set $pi = (zend_property_info *)$arg0
475-
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)]))
476486
set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset)
477487
printf "[%p] {\n", $pi
478488
printf " offset = %p\n", $pi->offset

.gitattributes

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@
1313
/UPGRADING merge=NEWS
1414
/UPGRADING.INTERNALS merge=NEWS
1515

16-
# Enable commit diffs for binary PHP test files. Some PHP test files include
17-
# special characters, such as ASCII control characters. Git recognizes these as
18-
# binary and wouldn't generate diffs.
19-
*.phpt diff
16+
# Configure proper diff drivers to improve the context lines in the output
17+
# of git diff and to improve token splitting for --word-diff.
18+
*.phpt diff=php
19+
*.php diff=php
20+
*.[ch] diff=cpp
21+
22+
# Collapse generated files within a pull request.
23+
**/*_arginfo.h linguist-generated
24+
/Zend/zend_vm_execute.h linguist-generated
25+
/Zend/zend_vm_opcodes.[ch] linguist-generated
26+
27+
# The OSS fuzz files are bunary
28+
/ext/date/tests/ossfuzz*.txt binary

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Bug report
2+
description: Create a bug report
3+
labels: ["Bug", "Status: Needs Triage"]
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Description
8+
description: "Please provide a minimal way to reproduce the problem and describe what the expected vs actual behavior is. Provide a [3v4l.org](https://3v4l.org/) link if possible."
9+
value: |
10+
The following code:
11+
12+
```php
13+
<?php
14+
```
15+
16+
Resulted in this output:
17+
```
18+
```
19+
20+
But I expected this output instead:
21+
```
22+
```
23+
validations:
24+
required: true
25+
- type: input
26+
attributes:
27+
label: PHP Version
28+
description: "The used PHP version. Make sure it is [supported](https://www.php.net/supported-versions.php)."
29+
placeholder: "PHP 8.0.12"
30+
validations:
31+
required: true
32+
- type: input
33+
attributes:
34+
label: Operating System
35+
description: "The used operating system, if relevant."
36+
placeholder: "Ubuntu 20.04"

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation issue
4+
url: https://github.com/php/doc-en/issues
5+
about: Please report documentation issues on the doc-en repository.
6+
- name: Security issue
7+
url: https://bugs.php.net/report.php?security_bug
8+
about: Please report security issues in this private bug tracker.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Feature request
2+
description: Create a feature request
3+
labels: ["Feature", "Status: Needs Triage"]
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Description
8+
description: "Please describe the requested feature and why it should be included in PHP."
9+
validations:
10+
required: true

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ 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

0 commit comments

Comments
 (0)