cbor

package module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cbor-fuzz

cbor-fuzz performs coverage-guided fuzzing for a CBOR library (fxamacker/cbor).

Input data for fuzzing is inside the corpus folder:

During fuzzing, new files are created in these folders:

  • corpus -- input data
  • crashers -- crash reports
  • suppressions -- stacktraces to ignore

Installation

cbor-fuzz uses dvyukov/go-fuzz.

go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
go get -u github.com/fxamacker/cbor github.com/fxamacker/cbor-fuzz

Usage

Reusing the same corpus folder is recommended, to benefit from corpus generated during prior fuzzing.

cd cbor-fuzz
go-fuzz-build .
go-fuzz

Example output

Output from cbor-fuzz fuzzing fxamacker/cbor.

2019/11/03 09:05:24 workers: 2, corpus: 409 (1h55m ago), crashers: 0, restarts: 1/10000, execs: 976487338 (7135/sec), cover: 1464, uptime: 38h1m
2019/11/03 09:05:27 workers: 2, corpus: 410 (2s ago), crashers: 0, restarts: 1/10000, execs: 976498523 (7135/sec), cover: 1464, uptime: 38h1m
2019/11/03 09:05:30 workers: 2, corpus: 410 (5s ago), crashers: 0, restarts: 1/10000, execs: 976507522 (7135/sec), cover: 1481, uptime: 38h1m

System requirements

  • Go 1.12 (or newer) is required for cbor v1 and cbor-fuzz.

License

Copyright (c) 2019 Faye Amacker

Licensed under MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepEqual

func DeepEqual(a1, a2 interface{}) bool

DeepEqual is reflect.DeepEqual except that: 1. nil and empty slice/string are considered equal 2. NaNs compare equal.

func Fuzz

func Fuzz(data []byte) int

Fuzz decodes->encodes->decodes CBOR data into different Go types and compares the results.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址