Lines Matching refs:size_t
45 typedef int (*UserCallback)(const uint8_t *Data, size_t Size);
53 template <size_t kMaxSize> class FixedWord {
74 static size_t GetMaxSize() { return kMaxSize; } in GetMaxSize()
87 Unit FileToVector(const std::string &Path, size_t MaxSize = 0);
89 long *Epoch, size_t MaxSize);
100 void PrintHexArray(const uint8_t *Data, size_t Size,
102 void PrintASCII(const uint8_t *Data, size_t Size, const char *PrintAfter = "");
116 size_t GetPeakRSSMb();
121 void ComputeSHA1(const uint8_t *Data, size_t Len, uint8_t *Out);
125 bool ToASCII(uint8_t *Data, size_t Size);
127 bool IsASCII(const uint8_t *Data, size_t Size);
136 size_t Rand() { return R(); } in Rand()
137 size_t RandBool() { return Rand() % 2; } in RandBool()
138 size_t operator()(size_t n) { return n ? Rand() % n : 0; } in operator()
158 DictionaryEntry(Word W, size_t PositionHint) : W(W), PositionHint(PositionHint) {} in DictionaryEntry()
161 bool HasPositionHint() const { return PositionHint != std::numeric_limits<size_t>::max(); } in HasPositionHint()
162 size_t GetPositionHint() const { in GetPositionHint()
168 size_t GetUseCount() const { return UseCount; } in GetUseCount()
169 size_t GetSuccessCount() const {return SuccessCount; } in GetSuccessCount()
173 size_t PositionHint = std::numeric_limits<size_t>::max();
174 size_t UseCount = 0;
175 size_t SuccessCount = 0;
180 static const size_t kMaxDictSize = 1 << 14;
189 DictionaryEntry & operator[] (size_t Idx) {
199 size_t size() const { return Size; } in size()
203 size_t Size = 0;
208 size_t MaxLen = 0;
224 size_t MaxNumberOfRuns = ULONG_MAX;
251 size_t Mutate_Custom(uint8_t *Data, size_t Size, size_t MaxSize);
253 size_t Mutate_CustomCrossOver(uint8_t *Data, size_t Size, size_t MaxSize);
255 size_t Mutate_ShuffleBytes(uint8_t *Data, size_t Size, size_t MaxSize);
257 size_t Mutate_EraseByte(uint8_t *Data, size_t Size, size_t MaxSize);
259 size_t Mutate_InsertByte(uint8_t *Data, size_t Size, size_t MaxSize);
261 size_t Mutate_ChangeByte(uint8_t *Data, size_t Size, size_t MaxSize);
263 size_t Mutate_ChangeBit(uint8_t *Data, size_t Size, size_t MaxSize);
266 size_t Mutate_AddWordFromManualDictionary(uint8_t *Data, size_t Size,
267 size_t MaxSize);
270 size_t Mutate_AddWordFromTemporaryAutoDictionary(uint8_t *Data, size_t Size,
271 size_t MaxSize);
274 size_t Mutate_AddWordFromPersistentAutoDictionary(uint8_t *Data, size_t Size,
275 size_t MaxSize);
278 size_t Mutate_ChangeASCIIInteger(uint8_t *Data, size_t Size, size_t MaxSize);
281 size_t Mutate_CrossOver(uint8_t *Data, size_t Size, size_t MaxSize);
285 size_t Mutate(uint8_t *Data, size_t Size, size_t MaxSize);
288 size_t DefaultMutate(uint8_t *Data, size_t Size, size_t MaxSize);
291 size_t CrossOver(const uint8_t *Data1, size_t Size1, const uint8_t *Data2,
292 size_t Size2, uint8_t *Out, size_t MaxOutSize);
296 void AddWordToAutoDictionary(const Word &W, size_t PositionHint);
307 size_t (MutationDispatcher::*Fn)(uint8_t *Data, size_t Size, size_t Max);
311 size_t AddWordFromDictionary(Dictionary &D, uint8_t *Data, size_t Size,
312 size_t MaxSize);
313 size_t MutateImpl(uint8_t *Data, size_t Size, size_t MaxSize,
355 size_t BlockCoverage;
356 size_t CallerCalleeCoverage;
358 size_t PcBufferLen;
360 size_t CounterBitmapBits;
363 size_t PcMapBits;
372 size_t ChooseUnitIdxToMutate();
379 void AssignTaintLabels(uint8_t *Data, size_t Size);
380 size_t CorpusSize() const { return Corpus.size(); } in CorpusSize()
381 size_t MaxUnitSizeInCorpus() const;
382 void ReadDir(const std::string &Path, long *Epoch, size_t MaxSize) { in ReadDir()
386 void RereadOutputCorpus(size_t MaxSize);
390 size_t secondsSinceProcessStartUp() { in secondsSinceProcessStartUp()
394 size_t execPerSec() { in execPerSec()
395 size_t Seconds = secondsSinceProcessStartUp(); in execPerSec()
399 size_t getTotalNumberOfRuns() { return TotalNumberOfRuns; } in getTotalNumberOfRuns()
405 void ExecuteCallback(const uint8_t *Data, size_t Size);
406 bool RunOne(const uint8_t *Data, size_t Size);
414 void SetMaxLen(size_t MaxLen);
421 size_t GetCurrentUnitInFuzzingThead(const uint8_t **Data) const;
430 void RunOneAndUpdateCorpus(const uint8_t *Data, size_t Size);
436 void TryDetectingAMemoryLeak(const uint8_t *Data, size_t Size,
461 std::atomic<size_t> CurrentUnitSize;
463 size_t TotalNumberOfRuns = 0;
464 size_t NumberOfNewUnitsAdded = 0;
467 size_t NumberOfLeakDetectionAttempts = 0;