Skip to content

Commit d5df000

Browse files
committed
Move ARM64 build to Cirrus
Travis is very unreliable lately
1 parent 7202fe1 commit d5df000

File tree

4 files changed

+218
-10
lines changed

4 files changed

+218
-10
lines changed

.cirrus.yml

Lines changed: 207 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ env:
55
freebsd_instance:
66
image_family: freebsd-13-0
77

8-
task:
8+
freebsd_task:
99
name: FREEBSD_DEBUG_NTS
10+
freebsd_instance:
11+
image_family: freebsd-13-0
1012
install_script:
1113
#- sed -i -e 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
1214
#- pkg upgrade -y
@@ -25,4 +27,207 @@ task:
2527
tests_script:
2628
- export SKIP_IO_CAPTURE_TESTS=1
2729
- 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
30+
- export STACK_LIMIT_DEFAULTS_CHECK=1
31+
- sapi/cli/php run-tests.php -P -q -j2 -g FAIL,BORK,LEAK,XLEAK --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so
32+
33+
arm_task:
34+
name: ARM_DEBUG_NTS
35+
arm_container:
36+
image: gcc:10
37+
additional_containers:
38+
- name: mysql
39+
image: mysql:latest
40+
port: 3306
41+
env:
42+
MYSQL_ALLOW_EMPTY_PASSWORD: true
43+
MYSQL_ROOT_PASSWORD: ""
44+
MYSQL_DATABASE: "test"
45+
- name: postgres
46+
image: postgres:latest
47+
port: 5432
48+
env:
49+
POSTGRES_PASSWORD: "postgres"
50+
POSTGRES_DB: "test"
51+
- name: mssql
52+
image: mcr.microsoft.com/mssql/server:2019-latest
53+
port: 1433
54+
env:
55+
SA_PASSWORD: mssql
56+
ACCEPT_EULA: 'Y'
57+
install_script:
58+
- export DEBIAN_FRONTEND=noninteractive
59+
- apt-get update -y
60+
- >-
61+
apt-get install -y
62+
bison
63+
re2c
64+
locales
65+
locales-all
66+
ldap-utils
67+
openssl
68+
slapd
69+
libgmp-dev
70+
libicu-dev
71+
libtidy-dev
72+
libenchant-dev
73+
libaspell-dev
74+
libpspell-dev
75+
libsasl2-dev
76+
libxpm-dev
77+
libzip-dev
78+
libsqlite3-dev
79+
libwebp-dev
80+
libonig-dev
81+
libkrb5-dev
82+
libgssapi-krb5-2
83+
libcurl4-openssl-dev
84+
libxml2-dev
85+
libxslt1-dev
86+
libpq-dev
87+
libreadline-dev
88+
libldap2-dev
89+
libsodium-dev
90+
libargon2-0-dev
91+
libmm-dev
92+
libsnmp-dev
93+
snmpd
94+
`#snmp-mibs-downloader`
95+
freetds-dev
96+
`#unixodbc-dev`
97+
libc-client-dev
98+
dovecot-core
99+
dovecot-pop3d
100+
dovecot-imapd
101+
sendmail
102+
firebird-dev
103+
liblmdb-dev
104+
libtokyocabinet-dev
105+
libdb-dev
106+
libqdbm-dev
107+
libjpeg-dev
108+
libpng-dev
109+
libfreetype6-dev
110+
build_script:
111+
- ./buildconf -f
112+
- >-
113+
./configure
114+
--enable-debug
115+
--enable-zts
116+
--enable-option-checking=fatal
117+
--prefix=/usr
118+
--enable-phpdbg
119+
--enable-fpm
120+
--enable-opcache
121+
--with-pdo-mysql=mysqlnd
122+
--with-mysqli=mysqlnd
123+
--with-pgsql
124+
--with-pdo-pgsql
125+
--with-pdo-sqlite
126+
--enable-intl
127+
--without-pear
128+
--enable-gd
129+
--with-jpeg
130+
--with-webp
131+
--with-freetype
132+
--with-xpm
133+
--enable-exif
134+
--with-zip
135+
--with-zlib
136+
--with-zlib-dir=/usr
137+
--enable-soap
138+
--enable-xmlreader
139+
--with-xsl
140+
--with-tidy
141+
--enable-sysvsem
142+
--enable-sysvshm
143+
--enable-shmop
144+
--enable-pcntl
145+
--with-readline
146+
--enable-mbstring
147+
--with-curl
148+
--with-gettext
149+
--enable-sockets
150+
--with-bz2
151+
--with-openssl
152+
--with-gmp
153+
--enable-bcmath
154+
--enable-calendar
155+
--enable-ftp
156+
--with-pspell=/usr
157+
--with-enchant=/usr
158+
--with-kerberos
159+
--enable-sysvmsg
160+
--with-ffi
161+
--enable-zend-test
162+
--enable-dl-test=shared
163+
--with-ldap
164+
--with-ldap-sasl
165+
--with-password-argon2
166+
--with-mhash
167+
--with-sodium
168+
--enable-dba
169+
--with-cdb
170+
--enable-flatfile
171+
--enable-inifile
172+
--with-tcadb
173+
--with-lmdb
174+
--with-qdbm
175+
--with-snmp
176+
`#--with-unixODBC`
177+
--with-imap
178+
--with-kerberos
179+
--with-imap-ssl
180+
`#--with-pdo-odbc=unixODBC,/usr`
181+
`#--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient`
182+
`#--with-oci8=shared,instantclient,/opt/oracle/instantclient`
183+
--with-config-file-path=/etc
184+
--with-config-file-scan-dir=/etc/php.d
185+
--with-pdo-firebird
186+
--with-pdo-dblib
187+
--disable-phpdbg
188+
`#--enable-werror`
189+
- make -j$(/usr/bin/nproc) > /dev/null
190+
- make install
191+
- mkdir -p /etc/php.d
192+
- echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
193+
- echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
194+
# Specify opcache.preload_user as we're running as root.
195+
- echo opcache.preload_user=root >> /etc/php.d/opcache.ini
196+
tests_script:
197+
- export SKIP_IO_CAPTURE_TESTS=1
198+
- export CI_NO_IPV6=1
199+
- export MYSQL_TEST_HOST=127.0.0.1
200+
- export MYSQL_TEST_USER=root
201+
- export MYSQL_TEST_PASSWD=
202+
- export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
203+
- export PDO_MYSQL_TEST_USER=root
204+
- export PDO_MYSQL_TEST_PASS=
205+
- export PDO_PGSQL_TEST_DSN="pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=postgres"
206+
- export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
207+
- export PDO_DBLIB_TEST_USER="sa"
208+
- export PDO_DBLIB_TEST_PASS="mssql"
209+
- >-
210+
sapi/cli/php run-tests.php
211+
-d zend_extension=opcache.so
212+
-d opcache.enable_cli=1
213+
-d opcache.jit_buffer_size=16M
214+
-d opcache.jit=function
215+
-P -q -x -j$(/usr/bin/nproc)
216+
-g FAIL,BORK,LEAK,XLEAK,SKIP
217+
--offline
218+
--show-diff
219+
--show-slow 1000
220+
--set-timeout 120
221+
# - >-
222+
# sapi/cli/php run-tests.php
223+
# -d zend_extension=opcache.so
224+
# -d opcache.enable_cli=1
225+
# -d opcache.jit_buffer_size=16M
226+
# -d opcache.jit=tracing
227+
# -P -q -x -j2
228+
# -g FAIL,BORK,LEAK,XLEAK
229+
# --offline
230+
# --show-diff
231+
# --show-slow 1000
232+
# --set-timeout 120
233+
# --repeat 2

.github/workflows/push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
CXX: ccache g++
2323
jobs:
2424
LINUX_X64:
25+
if: false
2526
strategy:
2627
fail-fast: false
2728
matrix:
@@ -73,6 +74,7 @@ jobs:
7374
- name: Verify generated files are up to date
7475
uses: ./.github/actions/verify-generated-files
7576
LINUX_X32:
77+
if: false
7678
name: LINUX_X32_DEBUG_ZTS
7779
runs-on: ubuntu-latest
7880
container:
@@ -119,6 +121,7 @@ jobs:
119121
-d opcache.enable_cli=1
120122
-d opcache.jit_buffer_size=16M
121123
MACOS_DEBUG_NTS:
124+
if: false
122125
runs-on: macos-11
123126
steps:
124127
- name: git checkout
@@ -153,6 +156,7 @@ jobs:
153156
- name: Verify generated files are up to date
154157
uses: ./.github/actions/verify-generated-files
155158
WINDOWS:
159+
if: false
156160
strategy:
157161
fail-fast: false
158162
matrix:

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ env:
6868

6969
jobs:
7070
include:
71-
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 ARM64=1
72-
arch: arm64
7371
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 S390X=1
7472
arch: s390x
7573

@@ -88,8 +86,6 @@ before_script:
8886
# Run PHPs run-tests.php
8987
script:
9088
- ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing
91-
- if [[ "$ARM64" == 1 ]]; then ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=function; fi
92-
- if [[ "$ARM64" == 1 ]]; then ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing --repeat 2; fi
9389
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
9490

9591
after_success:

ext/opcache/jit/dynasm/dasm_arm64.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ struct dasm_State {
8383
/* The size of the core structure depends on the max. number of sections. */
8484
#define DASM_PSZ(ms) (sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section))
8585

86+
/* Perform potentially overflowing pointer operations in a way that avoids UB. */
87+
#define DASM_PTR_SUB(p1, off) ((void *) ((uintptr_t) (p1) - sizeof(*p1) * (uintptr_t) (off)))
88+
#define DASM_PTR_ADD(p1, off) ((void *) ((uintptr_t) (p1) + sizeof(*p1) * (uintptr_t) (off)))
8689

8790
/* Initialize DynASM state. */
8891
void dasm_init(Dst_DECL, int maxsection)
@@ -102,7 +105,7 @@ void dasm_init(Dst_DECL, int maxsection)
102105
D->maxsection = maxsection;
103106
for (i = 0; i < maxsection; i++) {
104107
D->sections[i].buf = NULL; /* Need this for pass3. */
105-
D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i);
108+
D->sections[i].rbuf = DASM_PTR_SUB(D->sections[i].buf, DASM_SEC2POS(i));
106109
D->sections[i].bsize = 0;
107110
D->sections[i].epos = 0; /* Wrong, but is recalculated after resize. */
108111
}
@@ -432,7 +435,7 @@ int dasm_encode(Dst_DECL, void *buffer)
432435
for (secnum = 0; secnum < D->maxsection; secnum++) {
433436
dasm_Section *sec = D->sections + secnum;
434437
int *b = sec->buf;
435-
int *endb = sec->rbuf + sec->pos;
438+
int *endb = DASM_PTR_ADD(sec->rbuf, sec->pos);
436439

437440
while (b != endb) {
438441
dasm_ActList p = D->actionlist + *b++;
@@ -466,10 +469,10 @@ int dasm_encode(Dst_DECL, void *buffer)
466469
cp[-1] |= ((n >> 2) & 0x03ffffff);
467470
} else if ((ins & 0x800)) { /* B.cond, CBZ, CBNZ, LDR* literal */
468471
CK_REL((n & 3) == 0 && ((n+0x00100000) >> 21) == 0, n);
469-
cp[-1] |= ((n << 3) & 0x00ffffe0);
472+
cp[-1] |= ((int)((unsigned int)n << 3) & 0x00ffffe0);
470473
} else if ((ins & 0x3000) == 0x2000) { /* ADR */
471474
CK_REL(((n+0x00100000) >> 21) == 0, n);
472-
cp[-1] |= ((n << 3) & 0x00ffffe0) | ((n & 3) << 29);
475+
cp[-1] |= ((int)((unsigned int)n << 3) & 0x00ffffe0) | ((n & 3) << 29);
473476
} else if ((ins & 0x3000) == 0x3000) { /* ADRP */
474477
cp[-1] |= ((n >> 9) & 0x00ffffe0) | (((n >> 12) & 3) << 29);
475478
} else if ((ins & 0x1000)) { /* TBZ, TBNZ */

0 commit comments

Comments
 (0)