Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ git config --global --add safe.directory '*'
cmake "${cmake_args[@]}" -S . -B build -G Ninja
cmake --build build --parallel

cp corpus/*.dict corpus/*.options $OUT/
cp corpus/corpus/*.dict corpus/corpus/*.options $OUT/

# Copy the fuzzer executables, zip-ed corpora, option and
# dictionary files to $OUT.
Expand All @@ -70,7 +70,7 @@ for f in $(find build/tests/ -name '*_test' -type f);
do
name=$(basename $f);
module=$(echo $name | sed 's/_test//')
corpus_dir="corpus/$module"
corpus_dir="corpus/corpus/$name"
echo "Copying for $module";
cp $f $OUT/
if [ -e "$corpus_dir" ]; then
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/cflite_batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ jobs:
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@main
with:
language: c
sanitizer: ${{ matrix.sanitizer }}
- name: Run fuzzing tests (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@main
with:
fuzz-seconds: 7200
language: c
fuzz-seconds: 3600
github-token: ${{ secrets.GITHUB_TOKEN }}
minimize-crashes: true
report-ooms: false
mode: 'batch'
output-sarif: true
parallel-fuzzing: true
report-unreproducible-crashes: true
sanitizer: ${{ matrix.sanitizer }}
storage-repo-branch-coverage: gh-pages
storage-repo-branch: cfl
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cflite_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ jobs:
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@main
with:
language: c
sanitizer: coverage
- name: Run fuzzing tests
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@main
with:
fuzz-seconds: 600
github-token: ${{ secrets.GITHUB_TOKEN }}
minimize-crashes: true
mode: 'coverage'
sanitizer: 'coverage'
parallel-fuzzing: true
report-unreproducible-crashes: true
storage-repo-branch-coverage: gh-pages
storage-repo-branch: cfl
storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/ligurio/lua-c-api-corpus
Expand All @@ -53,17 +53,17 @@ jobs:
- name: Build Fuzzers
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@main
with:
language: c
- name: Run Fuzzers
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@main
with:
fuzz-seconds: 1800
fuzz-seconds: 600
github-token: ${{ secrets.GITHUB_TOKEN }}
minimize-crashes: true
mode: 'prune'
output-sarif: true
parallel-fuzzing: true
report-unreproducible-crashes: true
storage-repo-branch-coverage: gh-pages
storage-repo-branch: cfl
storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/ligurio/lua-c-api-corpus
4 changes: 2 additions & 2 deletions .github/workflows/cflite_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ jobs:
sanitizer: ${{ matrix.sanitizer }}
github-token: ${{ secrets.GITHUB_TOKEN }}
storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/ligurio/lua-c-api-corpus
storage-repo-branch: cfl
storage-repo-branch-coverage: gh-pages
- name: Run fuzzing tests (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@main
with:
fuzz-seconds: 120
github-token: ${{ secrets.GITHUB_TOKEN }}
minimize-crashes: true
mode: 'code-change'
output-sarif: true
report-unreproducible-crashes: true
parallel-fuzzing: true
sanitizer: ${{ matrix.sanitizer }}
storage-repo-branch-coverage: gh-pages
storage-repo-branch: cfl
Expand Down
12 changes: 10 additions & 2 deletions tests/capi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ string(JOIN " " LIBFUZZER_OPTS
-use_value_profile=1
)

set(CORPUS_BASE_PATH ${PROJECT_SOURCE_DIR}/corpus)
if(USE_LUAJIT)
set(CORPUS_BASE_PATH ${CORPUS_BASE_PATH}/corpus)
endif()

function(create_test)
cmake_parse_arguments(
FUZZ
Expand All @@ -89,8 +94,11 @@ function(create_test)
if (IS_LUAJIT AND (${test_name} STREQUAL "lua_load_test"))
set(LIBFUZZER_OPTS "${LIBFUZZER_OPTS} -only_ascii=1")
endif ()
set(dict_path ${PROJECT_SOURCE_DIR}/corpus/${test_name}.dict)
set(corpus_path ${PROJECT_SOURCE_DIR}/corpus/${test_prefix})
set(dict_path ${CORPUS_BASE_PATH}/${test_name}.dict)
set(corpus_path ${CORPUS_BASE_PATH}/${test_prefix})
if(USE_LUAJIT)
set(corpus_path ${CORPUS_BASE_PATH}/${test_name})
endif()
if (EXISTS ${dict_path})
set(LIBFUZZER_OPTS "${LIBFUZZER_OPTS} -dict=${dict_path}")
endif ()
Expand Down