LLVM  6.0.0svn
Public Member Functions | List of all members
fuzzer::InputCorpus Class Reference

#include "Fuzzer/FuzzerCorpus.h"

Public Member Functions

 InputCorpus (const std::string &OutputCorpus)
 
 ~InputCorpus ()
 
size_t size () const
 
size_t SizeInBytes () const
 
size_t NumActiveUnits () const
 
size_t MaxInputSize () const
 
bool empty () const
 
const Unitoperator[] (size_t Idx) const
 
void AddToCorpus (const Unit &U, size_t NumFeatures, bool MayDeleteFile, const std::vector< uint32_t > &FeatureSet)
 
void PrintUnit (const Unit &U)
 
void PrintFeatureSet (const std::vector< uint32_t > &FeatureSet)
 
void PrintCorpus ()
 
void Replace (InputInfo *II, const Unit &U)
 
bool HasUnit (const Unit &U)
 
bool HasUnit (const std::string &H)
 
InputInfoChooseUnitToMutate (Random &Rand)
 
size_t ChooseUnitIdxToMutate (Random &Rand)
 
void PrintStats ()
 
void PrintFeatureSet ()
 
void DeleteFile (const InputInfo &II)
 
void DeleteInput (size_t Idx)
 
bool AddFeature (size_t Idx, uint32_t NewSize, bool Shrink)
 
size_t NumFeatures () const
 
size_t NumFeatureUpdates () const
 
void ResetFeatureSet ()
 

Detailed Description

Definition at line 41 of file FuzzerCorpus.h.

Constructor & Destructor Documentation

◆ InputCorpus()

fuzzer::InputCorpus::InputCorpus ( const std::string &  OutputCorpus)
inline

Definition at line 44 of file FuzzerCorpus.h.

◆ ~InputCorpus()

fuzzer::InputCorpus::~InputCorpus ( )
inline

Definition at line 48 of file FuzzerCorpus.h.

References fuzzer::Inputs.

Member Function Documentation

◆ AddFeature()

bool fuzzer::InputCorpus::AddFeature ( size_t  Idx,
uint32_t  NewSize,
bool  Shrink 
)
inline

◆ AddToCorpus()

void fuzzer::InputCorpus::AddToCorpus ( const Unit U,
size_t  NumFeatures,
bool  MayDeleteFile,
const std::vector< uint32_t > &  FeatureSet 
)
inline

◆ ChooseUnitIdxToMutate()

size_t fuzzer::InputCorpus::ChooseUnitIdxToMutate ( Random Rand)
inline

Definition at line 150 of file FuzzerCorpus.h.

References assert(), and fuzzer::Inputs.

◆ ChooseUnitToMutate()

InputInfo& fuzzer::InputCorpus::ChooseUnitToMutate ( Random Rand)
inline

Definition at line 141 of file FuzzerCorpus.h.

References assert(), fuzzer::Inputs, and fuzzer::InputInfo::U.

Referenced by fuzzer::Fuzzer::TryDetectingAMemoryLeak().

◆ DeleteFile()

void fuzzer::InputCorpus::DeleteFile ( const InputInfo II)
inline

◆ DeleteInput()

void fuzzer::InputCorpus::DeleteInput ( size_t  Idx)
inline

Definition at line 182 of file FuzzerCorpus.h.

References fuzzer::Inputs, fuzzer::Printf(), and fuzzer::InputInfo::U.

◆ empty()

bool fuzzer::InputCorpus::empty ( ) const
inline

◆ HasUnit() [1/2]

bool fuzzer::InputCorpus::HasUnit ( const Unit U)
inline

◆ HasUnit() [2/2]

bool fuzzer::InputCorpus::HasUnit ( const std::string &  H)
inline

Definition at line 140 of file FuzzerCorpus.h.

◆ MaxInputSize()

size_t fuzzer::InputCorpus::MaxInputSize ( ) const
inline

Definition at line 65 of file FuzzerCorpus.h.

References fuzzer::Inputs, and llvm::max().

Referenced by fuzzer::Fuzzer::ExecuteCallback(), and fuzzer::Fuzzer::Fuzzer().

◆ NumActiveUnits()

size_t fuzzer::InputCorpus::NumActiveUnits ( ) const
inline

Definition at line 59 of file FuzzerCorpus.h.

References fuzzer::Inputs.

Referenced by fuzzer::Fuzzer::RssLimitCallback().

◆ NumFeatures()

size_t fuzzer::InputCorpus::NumFeatures ( ) const
inline

Definition at line 215 of file FuzzerCorpus.h.

Referenced by fuzzer::Fuzzer::RssLimitCallback().

◆ NumFeatureUpdates()

size_t fuzzer::InputCorpus::NumFeatureUpdates ( ) const
inline

Definition at line 216 of file FuzzerCorpus.h.

Referenced by fuzzer::Fuzzer::RunOne().

◆ operator[]()

const Unit& fuzzer::InputCorpus::operator[] ( size_t  Idx) const
inline

Definition at line 72 of file FuzzerCorpus.h.

References fuzzer::Inputs.

◆ PrintCorpus()

void fuzzer::InputCorpus::PrintCorpus ( )
inline

Definition at line 112 of file FuzzerCorpus.h.

References llvm::find(), fuzzer::Inputs, fuzzer::Printf(), and fuzzer::Sha1ToString().

◆ PrintFeatureSet() [1/2]

void fuzzer::InputCorpus::PrintFeatureSet ( const std::vector< uint32_t > &  FeatureSet)
inline

Definition at line 103 of file FuzzerCorpus.h.

References fuzzer::Printf().

◆ PrintFeatureSet() [2/2]

void fuzzer::InputCorpus::PrintFeatureSet ( )
inline

Definition at line 165 of file FuzzerCorpus.h.

References fuzzer::Inputs, N, fuzzer::InputInfo::NumFeatures, and fuzzer::Printf().

◆ PrintStats()

void fuzzer::InputCorpus::PrintStats ( )
inline

Definition at line 156 of file FuzzerCorpus.h.

References fuzzer::Inputs, fuzzer::Printf(), and fuzzer::Sha1ToString().

Referenced by fuzzer::Fuzzer::PrintFinalStats().

◆ PrintUnit()

void fuzzer::InputCorpus::PrintUnit ( const Unit U)
inline

Definition at line 93 of file FuzzerCorpus.h.

References C, and fuzzer::Printf().

◆ Replace()

void fuzzer::InputCorpus::Replace ( InputInfo II,
const Unit U 
)
inline

◆ ResetFeatureSet()

void fuzzer::InputCorpus::ResetFeatureSet ( )
inline

◆ size()

size_t fuzzer::InputCorpus::size ( ) const
inline

◆ SizeInBytes()

size_t fuzzer::InputCorpus::SizeInBytes ( ) const
inline

Definition at line 53 of file FuzzerCorpus.h.

References fuzzer::Inputs.

Referenced by fuzzer::Fuzzer::RssLimitCallback().


The documentation for this class was generated from the following file: