Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
[libFuzzer] record traces from the switch statements only when told t…
Browse files Browse the repository at this point in the history
…o do so

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243768 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
kcc committed Jul 31, 2015
1 parent 4a45f08 commit 207cfe1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Fuzzer/FuzzerTraceState.cpp
Expand Up @@ -364,6 +364,7 @@ void TraceState::TraceCmpCallback(uintptr_t PC, size_t CmpSize, size_t CmpType,
void TraceState::TraceSwitchCallback(uintptr_t PC, size_t ValSizeInBits,
uint64_t Val, size_t NumCases,
uint64_t *Cases) {
if (!RecordingTraces) return;
for (size_t i = 0; i < NumCases; i++)
TryToAddDesiredData(Val, Cases[i], ValSizeInBits / 8);
}
Expand Down

0 comments on commit 207cfe1

Please sign in to comment.