CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/libfuzzer-cpp

Author and run LLVM libFuzzer for C/C++ - in-process coverage-guided fuzzing. Covers harness authoring (LLVMFuzzerTestOneInput entry point), build with -fsanitize=fuzzer,address,undefined, runtime flags (-max_total_time, -runs, -dict, -fork, -workers), corpus + crash-artefact handling, and CI integration. Use for libraries / parsers / decoders in C/C++ where in-process fuzzing of a function is the right scope. Compose with ASan + UBSan from sanitiser-integration-reference and corpus discipline from corpus-management-reference.

74

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

flags-and-ci.mdreferences/

libFuzzer: runtime flags and CI

Deep reference for libfuzzer-cpp. The core harness / build / run / reproduce workflow lives in the skill spine; this file holds the full runtime-flag table and the CI job.

Common flags

Per llvm.org/docs/LibFuzzer.html:

FlagEffect
-max_total_time=NStop after N seconds
-runs=NStop after N executions (-1 = infinite)
-dict=pathUse dictionary file
-seed=NRandom seed
-fork=NRun N parallel fork-mode workers
-workers=NNumber of parallel worker processes
-jobs=NTotal number of jobs to run across workers
-merge=1Corpus minimisation mode
-print_final_stats=1Print stats summary on exit
-rss_limit_mb=NRSS memory limit (default 2048)
-timeout=NPer-input timeout in seconds (default 1200)
-only_ascii=1Restrict to ASCII bytes

CI integration

Short smoke fuzz on every PR:

jobs:
  fuzz:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Install clang
        run: sudo apt-get install -y clang lld
      - name: Build fuzz target
        run: |
          clang++ -g -O1 \
            -fsanitize=fuzzer,address,undefined \
            -fno-sanitize-recover=all \
            -fno-omit-frame-pointer \
            fuzz/fuzz_target.cc lib/parser.cc -o fuzz_target
      - uses: actions/cache@v4
        with:
          path: fuzz/corpus
          key: fuzz-corpus-${{ github.sha }}
          restore-keys: fuzz-corpus-
      - name: Smoke fuzz (5 min)
        run: ./fuzz_target -max_total_time=300 fuzz/corpus fuzz/seeds
      - name: Upload crashes
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: crashes
          path: |
            crash-*
            leak-*
            timeout-*
            oom-*

references

SKILL.md

tile.json