2015-01-30 00:58:29 +08:00
|
|
|
//===- FuzzerMain.cpp - main() function and flags -------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// main() and flags.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-09-21 09:50:50 +08:00
|
|
|
#include "FuzzerDefs.h"
|
2015-01-30 00:58:29 +08:00
|
|
|
|
2016-01-16 09:23:12 +08:00
|
|
|
extern "C" {
|
2015-02-20 02:45:37 +08:00
|
|
|
// This function should be defined by the user.
|
2016-01-16 09:23:12 +08:00
|
|
|
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
|
|
|
|
} // extern "C"
|
2015-01-31 09:14:40 +08:00
|
|
|
|
2015-01-30 00:58:29 +08:00
|
|
|
int main(int argc, char **argv) {
|
2016-06-02 13:48:02 +08:00
|
|
|
return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
|
2015-01-30 00:58:29 +08:00
|
|
|
}
|