diff options
Diffstat (limited to 'compiler-rt/test/fuzzer/BogusInitializeTest.cpp')
-rw-r--r-- | compiler-rt/test/fuzzer/BogusInitializeTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler-rt/test/fuzzer/BogusInitializeTest.cpp b/compiler-rt/test/fuzzer/BogusInitializeTest.cpp new file mode 100644 index 00000000000..c7e81a5478b --- /dev/null +++ b/compiler-rt/test/fuzzer/BogusInitializeTest.cpp @@ -0,0 +1,15 @@ +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. + +// Make sure LLVMFuzzerInitialize does not change argv[0]. +#include <stddef.h> +#include <stdint.h> + +extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { + ***argv = 'X'; + return 0; +} + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + return 0; +} |