Add stricter ASAN checks
authorKevin Boyd <kevin44boyd@gmail.com>
Sun, 5 Jul 2020 20:55:53 +0000 (13:55 -0700)
committerArtem Zhmurov <zhmurov@gmail.com>
Tue, 7 Jul 2020 12:10:33 +0000 (12:10 +0000)
ASAN supports some checks that are turned off by default. Enabling
these adds ~30-40% overhead.

admin/gitlab-ci/gromacs.gitlab-ci.yml

index bcd736081b68bd14e3050195a92ae55d0244e1d4..b90480fbd56576da11b786ddf41edf01b7a663fd 100644 (file)
@@ -539,6 +539,7 @@ gromacs:clang-9-nocuda-10.1:release:build:
     # Needed to run MPI enabled code in the docker images, until we set up different users
     - export OMPI_ALLOW_RUN_AS_ROOT=1
     - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
+    - export ASAN_OPTIONS="check_initialization_order=1:detect_invalid_pointer_pairs=1:strict_init_order=true:strict_string_checks=true:detect_stack_use_after_return=true"
     - ctest -D $CTEST_RUN_MODE --output-on-failure | tee ctestLog.log || true
     - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
       ctestLog.log | tee ctestErrors.log
@@ -576,6 +577,7 @@ gromacs:clang-9-nocuda-10.1:release:build:
     max: 1
   script:
     - export LSAN_OPTIONS="suppressions=$CI_PROJECT_DIR/admin/lsan-suppressions.txt:print_suppressions=0"
+    - export ASAN_OPTIONS="check_initialization_order=1:detect_invalid_pointer_pairs=1:strict_init_order=true:strict_string_checks=true:detect_stack_use_after_return=true"
     # Needed to run MPI enabled code in the docker images, until we set up different users
     - export OMPI_ALLOW_RUN_AS_ROOT=1
     - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1