mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Initial ClusterFuzzLite support.
This commit is contained in:
5
.clusterfuzzlite/Dockerfile
Normal file
5
.clusterfuzzlite/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM gcr.io/oss-fuzz-base/base-builder:v1
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool meson ninja-build
|
||||
COPY . $SRC/tinyusdz
|
||||
WORKDIR $SRC/tinyusdz
|
||||
COPY .clusterfuzzlite/build.sh $SRC/
|
||||
21
.clusterfuzzlite/build.sh
Executable file
21
.clusterfuzzlite/build.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
# build project
|
||||
# e.g.
|
||||
# ./autogen.sh
|
||||
# ./configure
|
||||
# make -j$(nproc) all
|
||||
|
||||
# build fuzzers
|
||||
# e.g.
|
||||
# $CXX $CXXFLAGS -std=c++11 -Iinclude \
|
||||
# /path/to/name_of_fuzzer.cc -o $OUT/name_of_fuzzer \
|
||||
# $LIB_FUZZING_ENGINE /path/to/library.a
|
||||
|
||||
|
||||
cd tests/fuzzer
|
||||
|
||||
rm -rf build
|
||||
CXX=clang++ CC=clang meson -Dprefix=$OUT build
|
||||
cd build
|
||||
ninja && cp fuzz_intcoding fuzz_tinyusdz fuzz_usdaparser $OUT/
|
||||
1
.clusterfuzzlite/project.yaml
Normal file
1
.clusterfuzzlite/project.yaml
Normal file
@@ -0,0 +1 @@
|
||||
language: c++
|
||||
48
.github/workflows/cflite_pr.yml
vendored
Normal file
48
.github/workflows/cflite_pr.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: ClusterFuzzLite PR fuzzing
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
permissions: read-all
|
||||
jobs:
|
||||
PR:
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer:
|
||||
- address
|
||||
# Override this with the sanitizers you want.
|
||||
# - undefined
|
||||
# - memory
|
||||
steps:
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
# Optional but recommended: used to only run fuzzers that are affected
|
||||
# by the PR.
|
||||
# See later section on "Git repo for storage".
|
||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
id: run
|
||||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fuzz-seconds: 600
|
||||
mode: 'code-change'
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
# Optional but recommended: used to download the corpus produced by
|
||||
# batch fuzzing.
|
||||
# See later section on "Git repo for storage".
|
||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
||||
|
||||
@@ -9,7 +9,13 @@ tinyusdz_sources=[
|
||||
'../../src/pprinter.cc',
|
||||
'../../src/prim-types.cc',
|
||||
'../../src/usdObj.cc',
|
||||
'../../src/primvar.cc',
|
||||
'../../src/usda-parser.cc',
|
||||
'../../src/usda-writer.cc',
|
||||
# deps
|
||||
'../../src/external/fpng.cpp',
|
||||
'../../src/external/staticstruct.cc',
|
||||
'../../src/external/tinyxml2/tinyxml2.cpp',
|
||||
'../../src/external/ryu/ryu/d2s.c',
|
||||
'../../src/external/ryu/ryu/f2s.c',
|
||||
'../../src/external/ryu/ryu/s2f.c',
|
||||
|
||||
Reference in New Issue
Block a user