2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 06:45:14 +00:00

Merge pull request #3745 from evverx/ubsan-msan-support

oss-fuzz/cifuzz: a couple of follow-up commits
This commit is contained in:
Christian Brauner
2021-03-28 23:16:45 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ jobs:
with:
oss-fuzz-project-name: 'lxc'
fuzz-seconds: 180
dry-run: ${{ matrix.sanitizer != 'address' }}
dry-run: ${{ matrix.sanitizer == 'memory' }}
sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash
uses: actions/upload-artifact@v1

View File

@@ -4,9 +4,15 @@ set -ex
export SANITIZER=${SANITIZER:-address}
flags="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
sanitizer_flags="-fsanitize=address -fsanitize-address-use-after-scope"
coverage_flags="-fsanitize=fuzzer-no-link"
sanitizer_flags="-fsanitize=address -fsanitize-address-use-after-scope"
if [[ "$SANITIZER" == "undefined" ]]; then
sanitizer_flags="-fsanitize=undefined"
elif [[ "$SANITIZER" == "memory" ]]; then
sanitizer_flags="-fsanitize=memory -fsanitize-memory-track-origins"
fi
export CC=${CC:-clang}
export CFLAGS=${CFLAGS:-$flags $sanitizer_flags $coverage_flags}