@@ -260,3 +260,95 @@ jobs:
260
260
-d opcache.file_cache_only=1
261
261
- name : Verify generated files are up to date
262
262
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
0 commit comments