Documentation
¶
Overview ¶
Package defs provides constants required by go-fuzz-build, go-fuzz, and instrumented code.
Package pcg implements a 32 bit PRNG with a 64 bit period: pcg xsh rr 64 32. See https://www.pcg-random.org/ for more information. This implementation is geared specifically towards go-fuzz's needs: Simple creation and use, no reproducibility, no concurrency safety, just the methods go-fuzz needs, optimized for speed.
Index ¶
Constants ¶
const ( CoverSize = 64 << 10 MaxInputSize = 1 << 20 SonarRegionSize = 1 << 20 )
const ( SonarEQL = iota SonarNEQ SonarLSS SonarGTR SonarLEQ SonarGEQ SonarOpMask = 7 SonarLength = 1 << 3 SonarSigned = 1 << 4 SonarString = 1 << 5 SonarConst1 = 1 << 6 SonarConst2 = 1 << 7 SonarHdrLen = 6 SonarMaxLen = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutator ¶
type Mutator struct {
// contains filtered or unexported fields
}
func NewMutator ¶
func NewMutator() *Mutator
type PersistentSet ¶
PersistentSet is a set of binary blobs with a persistent mirror on disk.
func NewPersistentSet ¶
func NewPersistentSet(dir string) *PersistentSet
func (*PersistentSet) Add ¶
func (ps *PersistentSet) Add(a Artifact) bool
func (*PersistentSet) AddDescription ¶
func (ps *PersistentSet) AddDescription(data []byte, desc []byte, typ string)
addDescription creates a complementary to data file on disk.
type Rand ¶
type Rand struct {
// contains filtered or unexported fields
}
Rand is a PRNG. It should not be copied or shared. No Rand methods are concurrency safe. They are small, and cheap to create. If in doubt: Just make another one.
func (*Rand) Uint32n ¶
Uint32n returns a pseudo-random number in [0, n).
For implementation details, see: https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction https://lemire.me/blog/2016/06/30/fast-random-shuffling