Skip to content

Commit 9377c30

Browse files
committed
Migrate MSAN build to GitHub actions
1 parent 1bef2e5 commit 9377c30

File tree

5 files changed

+96
-90
lines changed

5 files changed

+96
-90
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
libgmp-dev \
1919
libicu-dev \
2020
libtidy-dev \
21-
libenchant-dev \
21+
libenchant-2-dev \
2222
libaspell-dev \
2323
libpspell-dev \
2424
libsasl2-dev \

.github/workflows/nightly.yml

+92
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,95 @@ jobs:
260260
-d opcache.file_cache_only=1
261261
- name: Verify generated files are up to date
262262
uses: ./.github/actions/verify-generated-files
263+
MSAN:
264+
needs: GENERATE_MATRIX
265+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
266+
strategy:
267+
fail-fast: false
268+
matrix:
269+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
270+
name: "${{ matrix.branch.name }}_MSAN"
271+
runs-on: ubuntu-22.04
272+
steps:
273+
- name: git checkout
274+
uses: actions/checkout@v2
275+
with:
276+
ref: ${{ matrix.branch.ref }}
277+
- name: apt
278+
uses: ./.github/actions/apt-x64
279+
- name: ./configure
280+
run: |
281+
export CC=clang
282+
export CXX=clang++
283+
export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
284+
./buildconf --force
285+
# msan requires all used libraries to be instrumented,
286+
# so we should avoiding linking against anything but libc here
287+
./configure \
288+
--enable-debug \
289+
--enable-zts \
290+
--enable-option-checking=fatal \
291+
--prefix=/usr \
292+
--without-sqlite3 \
293+
--without-pdo-sqlite \
294+
--without-libxml \
295+
--disable-dom \
296+
--disable-simplexml \
297+
--disable-xml \
298+
--disable-xmlreader \
299+
--disable-xmlwriter \
300+
--without-pcre-jit \
301+
--disable-opcache-jit \
302+
--enable-phpdbg \
303+
--enable-fpm \
304+
--with-pdo-mysql=mysqlnd \
305+
--with-mysqli=mysqlnd \
306+
--disable-mysqlnd-compression-support \
307+
--without-pear \
308+
--enable-exif \
309+
--enable-sysvsem \
310+
--enable-sysvshm \
311+
--enable-shmop \
312+
--enable-pcntl \
313+
--enable-mbstring \
314+
--disable-mbregex \
315+
--enable-sockets \
316+
--enable-bcmath \
317+
--enable-calendar \
318+
--enable-ftp \
319+
--enable-zend-test \
320+
--enable-werror \
321+
--enable-memory-sanitizer \
322+
--with-config-file-path=/etc \
323+
--with-config-file-scan-dir=/etc/php.d
324+
- name: make
325+
run: make -j$(/usr/bin/nproc) >/dev/null
326+
- name: make install
327+
run: |
328+
sudo make install
329+
sudo mkdir /etc/php.d
330+
sudo chmod 777 /etc/php.d
331+
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
332+
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
333+
- name: Setup
334+
run: |
335+
set -x
336+
sudo service mysql start
337+
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
338+
# Ensure local_infile tests can run.
339+
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
340+
sudo locale-gen de_DE
341+
- name: Test
342+
uses: ./.github/actions/test-linux
343+
with:
344+
runTestsParameters: >-
345+
--msan
346+
- name: Test Opcache
347+
uses: ./.github/actions/test-linux
348+
with:
349+
runTestsParameters: >-
350+
--msan
351+
-d zend_extension=opcache.so
352+
-d opcache.enable_cli=1
353+
- name: Verify generated files are up to date
354+
uses: ./.github/actions/verify-generated-files

azure-pipelines.yml

-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ jobs:
4141
parameters:
4242
configurationName: I386_RELEASE_ZTS
4343
configurationParameters: '--disable-debug --enable-zts'
44-
- template: azure/msan_job.yml
45-
parameters:
46-
configurationName: DEBUG_ZTS_MSAN
47-
configurationParameters: '--enable-debug --enable-zts'
48-
runTestsParameters: --msan
49-
timeoutInMinutes: 90
5044
- template: azure/community_job.yml
5145
parameters:
5246
configurationName: COMMUNITY

azure/msan_job.yml

-80
This file was deleted.

ext/pdo_oci/oci_statement.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ static sb4 oci_bind_output_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, d
236236
ZEND_ASSERT(param);
237237

238238
if (Z_ISREF(param->parameter))
239-
parameter = Z_REFVAL(param->parameter);
240-
else
241-
parameter = &param->parameter;
239+
parameter = Z_REFVAL(param->parameter);
240+
else
241+
parameter = &param->parameter;
242242

243243
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) {
244244
P->actual_len = sizeof(OCILobLocator*);

0 commit comments

Comments
 (0)