summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerTraceState.cpp
diff options
context:
space:
mode:
authorMike Aizatsky <aizatsky@chromium.org>2016-06-23 20:44:48 +0000
committerMike Aizatsky <aizatsky@chromium.org>2016-06-23 20:44:48 +0000
commitf0b3e85f4e96f68c22307d10f37c12dec97a2e2a (patch)
tree6a25fdb42388eb23829901543d93a917ee6d5cbe /llvm/lib/Fuzzer/FuzzerTraceState.cpp
parentf2898d73a5600e52e5d51903ae612d4804bd174e (diff)
downloadbcm5719-llvm-f0b3e85f4e96f68c22307d10f37c12dec97a2e2a.tar.gz
bcm5719-llvm-f0b3e85f4e96f68c22307d10f37c12dec97a2e2a.zip
[libfuzzer] moving is_ascii handler inside mutation dispatcher.
Summary: It also fixes a bug, when first random might not be ascii. Differential Revision: http://reviews.llvm.org/D21573 llvm-svn: 273611
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTraceState.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerTraceState.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTraceState.cpp b/llvm/lib/Fuzzer/FuzzerTraceState.cpp
index 3ee69e43aba..cbfa87d2108 100644
--- a/llvm/lib/Fuzzer/FuzzerTraceState.cpp
+++ b/llvm/lib/Fuzzer/FuzzerTraceState.cpp
@@ -173,8 +173,8 @@ static bool RecordingTraces = false;
static bool RecordingMemcmp = false;
class TraceState {
- public:
- TraceState(MutationDispatcher &MD, const Fuzzer::FuzzingOptions &Options,
+public:
+ TraceState(MutationDispatcher &MD, const FuzzingOptions &Options,
const Fuzzer *F)
: MD(MD), Options(Options), F(F) {}
@@ -209,7 +209,8 @@ class TraceState {
}
void StopTraceRecording() {
- if (!RecordingTraces && !RecordingMemcmp) return;
+ if (!RecordingTraces && !RecordingMemcmp)
+ return;
RecordingTraces = false;
RecordingMemcmp = false;
for (size_t i = 0; i < NumMutations; i++) {
@@ -287,7 +288,7 @@ class TraceState {
LabelRange LabelRanges[1 << (sizeof(dfsan_label) * 8)];
size_t LastDfsanLabel = 0;
MutationDispatcher &MD;
- const Fuzzer::FuzzingOptions &Options;
+ const FuzzingOptions Options;
const Fuzzer *F;
std::map<Word, size_t> AutoDictUnitCounts;
size_t AutoDictAdds = 0;
OpenPOWER on IntegriCloud