# HG changeset patch # User Augie Fackler # Date 2019-12-06 20:07:06 # Node ID 01ec70a80a7bb399d312d273f077809ba15c3f49 # Parent 28a91a581fd9a98084a47bdcb66ecaa49f647254 fuzz: make standalone_fuzz_target_runner call LLVMFuzzerInitialize Otherwise some of our fuzzers crash when they try and use Python. Differential Revision: https://phab.mercurial-scm.org/D7565 diff --git a/contrib/fuzz/standalone_fuzz_target_runner.cc b/contrib/fuzz/standalone_fuzz_target_runner.cc --- a/contrib/fuzz/standalone_fuzz_target_runner.cc +++ b/contrib/fuzz/standalone_fuzz_target_runner.cc @@ -17,8 +17,12 @@ // We deliberately keep this inteface simple and header-free. extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); +extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv); + int main(int argc, char **argv) { + LLVMFuzzerInitialize(&argc, &argv); + for (int i = 1; i < argc; i++) { std::ifstream in(argv[i]); in.seekg(0, in.end);