From 138ed2b0686ebca6514885b02f0fa544a9343b3e Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 17 Jan 2017 23:05:07 +0000 Subject: [PATCH] [libFuzzer] copy the options inside MutationDispatcher to avoid use-after-scope in mutator tests llvm-svn: 292286 --- llvm/lib/Fuzzer/FuzzerMutate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Fuzzer/FuzzerMutate.h b/llvm/lib/Fuzzer/FuzzerMutate.h index d3c0b0012468..26e23aff955d 100644 --- a/llvm/lib/Fuzzer/FuzzerMutate.h +++ b/llvm/lib/Fuzzer/FuzzerMutate.h @@ -14,6 +14,7 @@ #include "FuzzerDefs.h" #include "FuzzerDictionary.h" +#include "FuzzerOptions.h" #include "FuzzerRandom.h" namespace fuzzer { @@ -115,7 +116,7 @@ private: const uint8_t *Data, size_t Size); Random &Rand; - const FuzzingOptions &Options; + const FuzzingOptions Options; // Dictionary provided by the user via -dict=DICT_FILE. Dictionary ManualDictionary;