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