mirror of
git://github.com/lxc/lxc
synced 2025-09-02 22:19:33 +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:
2
.github/workflows/cifuzz.yml
vendored
2
.github/workflows/cifuzz.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
oss-fuzz-project-name: 'lxc'
|
oss-fuzz-project-name: 'lxc'
|
||||||
fuzz-seconds: 180
|
fuzz-seconds: 180
|
||||||
dry-run: ${{ matrix.sanitizer != 'address' }}
|
dry-run: ${{ matrix.sanitizer == 'memory' }}
|
||||||
sanitizer: ${{ matrix.sanitizer }}
|
sanitizer: ${{ matrix.sanitizer }}
|
||||||
- name: Upload Crash
|
- name: Upload Crash
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
|
@@ -4,9 +4,15 @@ set -ex
|
|||||||
|
|
||||||
export SANITIZER=${SANITIZER:-address}
|
export SANITIZER=${SANITIZER:-address}
|
||||||
flags="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
|
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"
|
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 CC=${CC:-clang}
|
||||||
export CFLAGS=${CFLAGS:-$flags $sanitizer_flags $coverage_flags}
|
export CFLAGS=${CFLAGS:-$flags $sanitizer_flags $coverage_flags}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user