projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a45f08
)
[libFuzzer] record traces from the switch statements only when told to do so
author
Kostya Serebryany
<kcc@google.com>
Fri, 31 Jul 2015 18:09:08 +0000
(18:09 +0000)
committer
Kostya Serebryany
<kcc@google.com>
Fri, 31 Jul 2015 18:09:08 +0000
(18:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243768
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Fuzzer/FuzzerTraceState.cpp
patch
|
blob
|
history
diff --git
a/lib/Fuzzer/FuzzerTraceState.cpp
b/lib/Fuzzer/FuzzerTraceState.cpp
index 7af5f74d2a91b9c43c12bc7cdf52b4bfec37c914..5eae2ec8882d41aebc4c6dbe7fec087a6f4bc365 100644
(file)
--- a/
lib/Fuzzer/FuzzerTraceState.cpp
+++ b/
lib/Fuzzer/FuzzerTraceState.cpp
@@
-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);
}