From e9158b254ca4602ca46ff4aeb97b04eaf0e9bbab Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 22 May 2020 11:34:01 +0200 Subject: [PATCH 1/2] travis: enable fuzzer regression tests under sanitizers --- travis-ci/managers/debian.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/travis-ci/managers/debian.sh b/travis-ci/managers/debian.sh index 2851d9229d..60f6237606 100755 --- a/travis-ci/managers/debian.sh +++ b/travis-ci/managers/debian.sh @@ -65,7 +65,10 @@ for phase in "${PHASES[@]}"; do RUN_ASAN|RUN_CLANG_ASAN) if [[ "$phase" = "RUN_CLANG_ASAN" ]]; then ENV_VARS="-e CC=clang -e CXX=clang++" - MESON_ARGS="-Db_lundef=false" # See https://github.com/mesonbuild/meson/issues/764 + # Build fuzzer regression tests only with clang (for now), + # see: https://github.com/systemd/systemd/pull/15886#issuecomment-632689604 + # -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764 + MESON_ARGS="-Db_lundef=false -Dfuzz-tests=true --optimization=1" fi docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Db_sanitize=address,undefined -Dsplit-usr=true $MESON_ARGS build $DOCKER_EXEC ninja -v -C build From 87666b31f9b8546599f0426cfebc4beb4cd9a0ba Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 22 May 2020 14:28:17 +0200 Subject: [PATCH 2/2] meson: pass the optimization level to the fuzzer build --- test/fuzz/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build index 7d61e270fd..b0305bdd0e 100644 --- a/test/fuzz/meson.build +++ b/test/fuzz/meson.build @@ -7,7 +7,8 @@ sanitize_address_undefined = custom_target( project_source_root, '@OUTPUT@', 'fuzzers', - '-Db_lundef=false -Db_sanitize=address,undefined', + '-Db_lundef=false -Db_sanitize=address,undefined ' + + '--optimization=@0@'.format(get_option('optimization')), ' '.join(cc.cmd_array()), cxx_cmd])