Commit eae4cef0 authored by Max Moroz's avatar Max Moroz Committed by Commit Bot

[libFuzzer] Update the documentation regarding environment initialization.

TBR=inferno@chromium.org,metzman@chromium.org

Bug: 539572
Change-Id: Ia8904c035a4a5342bed95763be2fb3d64e168c0f
Reviewed-on: https://chromium-review.googlesource.com/c/1318653
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: default avatarJonathan Metzman <metzman@chromium.org>
Reviewed-by: default avatarMax Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605535}
parent b2165ad2
......@@ -50,7 +50,7 @@ function:
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// put your fuzzing code here and use data+size as input.
// Put your fuzzing code here and use data+size as input.
return 0;
}
```
......@@ -163,7 +163,12 @@ struct Environment {
}
};
Environment* env = new Environment();
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
static Environment env;
// Put your fuzzing code here and use data+size as input.
return 0;
}
```
## Mutating Multiple Inputs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment