Add fuzz testing of input programs.

When the --fuzz-test command-line option is given, the input program
will be randomly perturbed by the lexer in an effort to trigger
assertions or crashes in the compiler (neither of which should ever
happen, even for malformed programs.)
This commit is contained in:
Matt Pharr
2012-02-06 13:59:14 -08:00
parent b7c5af7e64
commit 3efbc71a01
6 changed files with 366 additions and 105 deletions

View File

@@ -515,8 +515,10 @@ Globals::Globals() {
emitPerfWarnings = true;
emitInstrumentation = false;
generateDebuggingSymbols = false;
enableFuzzTest = false;
fuzzTestSeed = -1;
mangleFunctionsWithTarget = false;
ctx = new llvm::LLVMContext;
#ifdef ISPC_IS_WINDOWS