summaryrefslogtreecommitdiff
path: root/azure/msan_job.yml
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-01 10:26:29 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-01 17:27:42 +0200
commit0dfca74be21125ae5a6e5735b8b52adc8825d6e7 (patch)
tree030f9f8f26425b38a34e8642d8ad646ea828d199 /azure/msan_job.yml
parent59522c5a85d0f87679dce05f5a0247deb59e1ba3 (diff)
downloadphp-git-0dfca74be21125ae5a6e5735b8b52adc8825d6e7.tar.gz
Setup msan on azure
This uses a separate job template, because msan requires all used libraries (apart from glibc) to be instrumented, so we can't link any external libraries unless we recompile them. As such, we need a much more minimal configure.
Diffstat (limited to 'azure/msan_job.yml')
-rw-r--r--azure/msan_job.yml76
1 files changed, 76 insertions, 0 deletions
diff --git a/azure/msan_job.yml b/azure/msan_job.yml
new file mode 100644
index 0000000000..bae65e018e
--- /dev/null
+++ b/azure/msan_job.yml
@@ -0,0 +1,76 @@
+parameters:
+ configurationName: ''
+ configurationParameters: ''
+ runTestsParameters: ''
+ timeoutInMinutes: 60
+
+jobs:
+ - job: ${{ parameters.configurationName }}
+ timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
+ pool:
+ vmImage: 'ubuntu-latest'
+ steps:
+ - template: apt.yml
+ - script: |
+ export CC=clang
+ export CXX=clang++
+ export CFLAGS="-fsanitize=memory -DZEND_TRACK_ARENA_ALLOC"
+ export LDFLAGS="-fsanitize=memory"
+ ./buildconf --force
+ # msan requires all used libraries to be instrumented,
+ # so we should avoiding linking against anything but libc here
+ ./configure ${{ parameters.configurationParameters }} \
+ --prefix=/usr \
+ --without-sqlite3 \
+ --without-pdo-sqlite \
+ --without-libxml \
+ --disable-dom \
+ --disable-simplexml \
+ --disable-xml \
+ --disable-xmlreader \
+ --disable-xmlwriter \
+ --without-pcre-jit \
+ --enable-phpdbg \
+ --enable-fpm \
+ --with-pdo-mysql=mysqlnd \
+ --with-mysqli=mysqlnd \
+ --without-pear \
+ --enable-exif \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-shmop \
+ --enable-pcntl \
+ --enable-mbstring \
+ --disable-mbregex \
+ --enable-sockets \
+ --enable-bcmath \
+ --enable-calendar \
+ --enable-ftp \
+ --enable-zend-test \
+ --enable-werror \
+ --with-config-file-path=/etc \
+ --with-config-file-scan-dir=/etc/php.d
+ displayName: 'Configure Build'
+ - script: make -j$(/usr/bin/nproc) >/dev/null
+ displayName: 'Make Build'
+ - script: |
+ sudo make install
+ sudo mkdir /etc/php.d
+ sudo chmod 777 /etc/php.d
+ echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
+ echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
+ displayName: 'Install Build'
+ - script: |
+ mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
+ displayName: 'Setup'
+ - template: test.yml
+ parameters:
+ configurationName: ${{ parameters.configurationName }}
+ runTestsParameters: ${{ parameters.runTestsParameters }}
+ - template: test.yml
+ parameters:
+ configurationName: ${{ parameters.configurationName }}
+ runTestsName: 'OpCache'
+ runTestsParameters: >-
+ ${{ parameters.runTestsParameters }}
+ -d zend_extension=opcache.so -d opcache.enable_cli=1