about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Ebert <iuq@web.de>2021-10-06 14:19:22 -0700
committerDaniel Ebert <iuq@web.de>2021-10-06 14:19:22 -0700
commitf0e6a7a4f8a387cd295a132ef0723f3257bed658 (patch)
tree1d70a310e59392d7e75eb565d0c868004755ef6e
parent65e63b9cf107ae914630a4fff7381cee150df5fe (diff)
downloadafl++-f0e6a7a4f8a387cd295a132ef0723f3257bed658.tar.gz
fix memory leak in libfuzzer custom mutator
-rw-r--r--custom_mutators/libfuzzer/FuzzerLoop.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/custom_mutators/libfuzzer/FuzzerLoop.cpp b/custom_mutators/libfuzzer/FuzzerLoop.cpp
index 08fda520..6716dbf5 100644
--- a/custom_mutators/libfuzzer/FuzzerLoop.cpp
+++ b/custom_mutators/libfuzzer/FuzzerLoop.cpp
@@ -1086,6 +1086,7 @@ ATTRIBUTE_INTERFACE size_t LLVMFuzzerMutate(uint8_t *Data, size_t Size,
                                             size_t MaxSize) {
 
   assert(fuzzer::F);
+  fuzzer::F->GetMD().StartMutationSequence();
   size_t r = fuzzer::F->GetMD().DefaultMutate(Data, Size, MaxSize);
 #ifdef  INTROSPECTION
   introspection_ptr = fuzzer::F->GetMD().WriteMutationSequence();