diff options
| author | Kostya Serebryany <kcc@google.com> | 2017-01-21 00:13:50 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2017-01-21 00:13:50 +0000 |
| commit | d9667914b2785d0f77e879333ceb57a921107fd8 (patch) | |
| tree | 2c57500e6dfe3dcd458eb9bfbecb92b999fe320c /llvm/lib/Fuzzer/FuzzerDriver.cpp | |
| parent | f9127593a9fd0ef585fed52f838d89c825b8cd72 (diff) | |
| download | bcm5719-llvm-d9667914b2785d0f77e879333ceb57a921107fd8.tar.gz bcm5719-llvm-d9667914b2785d0f77e879333ceb57a921107fd8.zip | |
[libFuzzer] use print+exit(1) instead of assert to report an error
llvm-svn: 292685
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDriver.cpp')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerDriver.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDriver.cpp b/llvm/lib/Fuzzer/FuzzerDriver.cpp index b11b3a3a8a2..5620cdea3fa 100644 --- a/llvm/lib/Fuzzer/FuzzerDriver.cpp +++ b/llvm/lib/Fuzzer/FuzzerDriver.cpp @@ -365,8 +365,10 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { const std::vector<std::string> Args(*argv, *argv + *argc); assert(!Args.empty()); ProgName = new std::string(Args[0]); - assert(Argv0 == *ProgName && - "argv[0] has been modified in LLVMFuzzerInitialize"); + if (Argv0 != *ProgName) { + Printf("ERROR: argv[0] has been modified in LLVMFuzzerInitialize\n"); + exit(1); + } ParseFlags(Args); if (Flags.help) { PrintHelp(); |

