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:
8
ispc.h
8
ispc.h
@@ -405,6 +405,14 @@ struct Globals {
|
||||
vector width to them. */
|
||||
bool mangleFunctionsWithTarget;
|
||||
|
||||
/** If enabled, the lexer will randomly replace some tokens returned
|
||||
with other tokens, in order to test error condition handling in the
|
||||
compiler. */
|
||||
bool enableFuzzTest;
|
||||
|
||||
/** Seed for random number generator used for fuzz testing. */
|
||||
int fuzzTestSeed;
|
||||
|
||||
/** Global LLVMContext object */
|
||||
llvm::LLVMContext *ctx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user