Skip to content

Commit 7d88105

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

File tree

4 files changed

+204
-8
lines changed

4 files changed

+204
-8
lines changed

.cirrus.yml

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