• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mapbox / protozero / 195
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: shadow
DEFAULT BRANCH: master
Ran 12 Apr 2016 03:50PM UTC
Jobs 1
Files 10
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
195

push

travis-ci

daniel-j-h
First try at integrating Fuzz Testing.

This is a first try at Coverage Based Fuzz Testing (plus
Data-flow-guided fuzzing) using LLVM's libFuzzer.

It's building a driver for (at the moment only) the varint zigzag
functions, then compiles it instrumenting thhe binary with coverage
information. It then spins up the test driver (that gets a main from
libFuzzer), dumping the corpus that changes control-flow into the
fuzz/corpus directory. (This can be kept across runs to speed up fuzzing)

It's best to compile the driver with multiple sanitizers (ubsan, asan,
msan, ..), and fuzz the library with those. Set env var

    FUZZ_SANITIZER

for this to e.g. undefined or address or memory, respectively.

Note: -jobs=N can be passed to the driver, letting it fork and run N
jobs in parallel; not doing this at the moment.

I tried this with LLVM 3.8 / libc++ on Linux as it needs a fairly recent
LLVM release; 3.7 should work, too, but I haven't teested this.

Disclaimer: I'm already doing a pull request although it's only fuzzing
the varint zigzag functions to get more traction for fuzzing across
projects.

References:
- http://llvm.org/docs/LibFuzzer.html
- http://llvm.org/releases/3.8.0/docs/LibFuzzer.html
- https://www.youtube.com/watch?v=qTkYDA0En6U
- https://github.com/Project-OSRM/osrm-backend/pull/2251

    env FUZZ_SANITIZER='undefined,integer' CC='clang' CXX='clang++' CXXFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++" make fuzz

    ./fuzz/varint -use_traces=1 fuzz/corpus
    Seed: 1864466908
    PreferSmall: 1
    #0      READ   units: 1 exec/s: 0
    #1      INITED cov: 32 bits: 32 units: 1 exec/s: 0
    #2      NEW    cov: 39 bits: 39 indir: 1 units: 2 exec/s: 0 L: 64 MS: 0
    #112    NEW    cov: 40 bits: 46 indir: 1 units: 3 exec/s: 0 L: 64 MS: 0
    #559    NEW    cov: 66 bits: 72 indir: 1 units: 4 exec/s: 0 L: 1 MS: 3 EraseByte-CrossOver-EraseByte-
    #637    NEW    cov: 66 bits: 74 indir: 1 units: 5 exec/s: 0 L: 2 MS: 1 InsertByte-
    #639    NEW... (continued)

562 of 563 relevant lines covered (99.82%)

2647.54 hits per line

Jobs
ID Job ID Ran Files Coverage
9 195.9 (CXX=g++-4.9 COVERAGE=gcov-4.9) 12 Apr 2016 03:50PM UTC 0
99.82
Travis Job 195.9
Source Files on build 195
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #195
  • 2d779049 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc