Skip to content
forked from php/php-src

Commit f8c032e

Browse files
authored
Merge pull request #19 from php/master
sync
2 parents 02d022a + 77ee92a commit f8c032e

File tree

2,284 files changed

+293568
-148054
lines changed

Some content is hidden

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

2,284 files changed

+293568
-148054
lines changed

.appveyor.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ version: "{branch}.build.{build}"
22

33
image: Visual Studio 2019
44

5-
branches:
6-
except:
7-
- PHP-5.6
8-
- PHP-7.0
9-
10-
clone_depth: 64
5+
clone_depth: 1
116

127
skip_commits:
138
files:
@@ -41,7 +36,7 @@ environment:
4136
- THREAD_SAFE: 1
4237
OPCACHE: 1
4338
PARALLEL: -j2
44-
INTRINSICS: AVX
39+
INTRINSICS: AVX2
4540

4641
services:
4742
# the setup scripts have to be touched, once some other db version is used
@@ -51,10 +46,10 @@ services:
5146

5247
platform:
5348
- x64
54-
# - x86
49+
#- x86
5550

5651
build_script:
57-
- appveyor\build.bat
52+
- .github\scripts\windows\build.bat
5853

5954
test_script:
60-
- appveyor\test.bat
55+
- .github\scripts\windows\test.bat

.cirrus.yml

Lines changed: 181 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,188 @@
11
env:
22
CIRRUS_CLONE_DEPTH: 1
3-
ARCH: amd64
43

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

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end_of_line = lf
99
charset = utf-8
1010
tab_width = 4
1111

12-
[{*.{awk,bat,c,cpp,d,h,l,re,skl,w32,y},Makefile*}]
12+
[{*.{awk,bat,c,cpp,d,dasc,h,l,re,skl,w32,y},Makefile*}]
1313
indent_size = 4
1414
indent_style = tab
1515

.gdbinit

Lines changed: 21 additions & 11 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

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@
1818
*.phpt diff=php
1919
*.php diff=php
2020
*.[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.{h,c} linguist-generated

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: apt
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
9+
export DEBIAN_FRONTEND=noninteractive
10+
dpkg --add-architecture i386
11+
apt-get update -y | true
12+
# TODO: Reenable postgresql + postgresql-contrib packages once they work again.
13+
apt-get install -y \
14+
autoconf \
15+
bison \
16+
g++-multilib \
17+
gcc-multilib \
18+
language-pack-de \
19+
libaspell-dev:i386 \
20+
libbz2-dev:i386 \
21+
libc6:i386 \
22+
libcurl4-openssl-dev:i386 \
23+
libffi-dev:i386 \
24+
libfreetype6-dev:i386 \
25+
libgmp-dev:i386 \
26+
libgssapi-krb5-2:i386 \
27+
libicu-dev:i386 \
28+
libjpeg-dev:i386 \
29+
libkrb5-dev:i386 \
30+
libonig-dev:i386 \
31+
libpng-dev:i386 \
32+
libpq-dev:i386 \
33+
libpspell-dev:i386 \
34+
libreadline-dev:i386 \
35+
libsasl2-dev:i386 \
36+
libsodium-dev:i386 \
37+
libsqlite3-dev:i386 \
38+
libssl-dev:i386 \
39+
libtidy-dev:i386 \
40+
libwebp-dev:i386 \
41+
libxml2-dev:i386 \
42+
libxml2-dev:i386 \
43+
libxpm-dev:i386 \
44+
libxslt1-dev:i386 \
45+
libzip-dev:i386 \
46+
locales \
47+
make \
48+
pkg-config:i386 \
49+
re2c \
50+
unzip \
51+
wget \
52+
zlib1g-dev:i386

0 commit comments

Comments
 (0)