mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-03 02:17:41 +00:00
[libFuzzer] don't do expensive memmem if the result will not be used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258462 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
23d189b204
commit
75da488104
@ -362,6 +362,7 @@ void TraceState::DFSanSwitchCallback(uint64_t PC, size_t ValSizeInBits,
|
||||
|
||||
int TraceState::TryToAddDesiredData(uint64_t PresentData, uint64_t DesiredData,
|
||||
size_t DataSize) {
|
||||
if (NumMutations >= kMaxMutations) return 0;
|
||||
int Res = 0;
|
||||
const uint8_t *Beg = *CurrentUnitData;
|
||||
const uint8_t *End = Beg + *CurrentUnitSize;
|
||||
@ -382,6 +383,7 @@ int TraceState::TryToAddDesiredData(uint64_t PresentData, uint64_t DesiredData,
|
||||
int TraceState::TryToAddDesiredData(const uint8_t *PresentData,
|
||||
const uint8_t *DesiredData,
|
||||
size_t DataSize) {
|
||||
if (NumMutations >= kMaxMutations) return 0;
|
||||
int Res = 0;
|
||||
const uint8_t *Beg = *CurrentUnitData;
|
||||
const uint8_t *End = Beg + *CurrentUnitSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user