@@ -360,3 +360,95 @@ jobs:
360
360
-d opcache.file_cache_only=1
361
361
- name : Verify generated files are up to date
362
362
uses : ./.github/actions/verify-generated-files
363
+ MSAN :
364
+ needs : GENERATE_MATRIX
365
+ if : ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
366
+ strategy :
367
+ fail-fast : false
368
+ matrix :
369
+ branch : ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
370
+ name : " ${{ matrix.branch.name }}_MSAN"
371
+ runs-on : ubuntu-22.04
372
+ steps :
373
+ - name : git checkout
374
+ uses : actions/checkout@v2
375
+ with :
376
+ ref : ${{ matrix.branch.ref }}
377
+ - name : apt
378
+ uses : ./.github/actions/apt-x64
379
+ - name : ./configure
380
+ run : |
381
+ export CC=clang
382
+ export CXX=clang++
383
+ export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
384
+ ./buildconf --force
385
+ # msan requires all used libraries to be instrumented,
386
+ # so we should avoiding linking against anything but libc here
387
+ ./configure \
388
+ --enable-debug \
389
+ --enable-zts \
390
+ --enable-option-checking=fatal \
391
+ --prefix=/usr \
392
+ --without-sqlite3 \
393
+ --without-pdo-sqlite \
394
+ --without-libxml \
395
+ --disable-dom \
396
+ --disable-simplexml \
397
+ --disable-xml \
398
+ --disable-xmlreader \
399
+ --disable-xmlwriter \
400
+ --without-pcre-jit \
401
+ --disable-opcache-jit \
402
+ --enable-phpdbg \
403
+ --enable-fpm \
404
+ --with-pdo-mysql=mysqlnd \
405
+ --with-mysqli=mysqlnd \
406
+ --disable-mysqlnd-compression-support \
407
+ --without-pear \
408
+ --enable-exif \
409
+ --enable-sysvsem \
410
+ --enable-sysvshm \
411
+ --enable-shmop \
412
+ --enable-pcntl \
413
+ --enable-mbstring \
414
+ --disable-mbregex \
415
+ --enable-sockets \
416
+ --enable-bcmath \
417
+ --enable-calendar \
418
+ --enable-ftp \
419
+ --enable-zend-test \
420
+ --enable-werror \
421
+ --enable-memory-sanitizer \
422
+ --with-config-file-path=/etc \
423
+ --with-config-file-scan-dir=/etc/php.d
424
+ - name : make
425
+ run : make -j$(/usr/bin/nproc) >/dev/null
426
+ - name : make install
427
+ run : |
428
+ sudo make install
429
+ sudo mkdir /etc/php.d
430
+ sudo chmod 777 /etc/php.d
431
+ echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
432
+ echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
433
+ - name : Setup
434
+ run : |
435
+ set -x
436
+ sudo service mysql start
437
+ mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
438
+ # Ensure local_infile tests can run.
439
+ mysql -uroot -proot -e "SET GLOBAL local_infile = true"
440
+ sudo locale-gen de_DE
441
+ - name : Test
442
+ uses : ./.github/actions/test-linux
443
+ with :
444
+ runTestsParameters : >-
445
+ --msan
446
+ - name : Test Opcache
447
+ uses : ./.github/actions/test-linux
448
+ with :
449
+ runTestsParameters : >-
450
+ --msan
451
+ -d zend_extension=opcache.so
452
+ -d opcache.enable_cli=1
453
+ - name : Verify generated files are up to date
454
+ uses : ./.github/actions/verify-generated-files
0 commit comments