Add basic structure for fuzzing targets

General changes:

* Add -D/--deterministic command line option as
  convenience/alternative to -G/--load-seeds (i.e. no file needed, it just
  uses zero-initialized random seeds).  It also changes Broker data
  stores over to using deterministic timing rather than real time.

* Add option to make Reporter abort on runtime scripting errors
This commit is contained in:
Jon Siwek 2020-04-21 20:16:00 -07:00
parent f849571910
commit 8f1b34b915
20 changed files with 1290 additions and 928 deletions

View file

@ -1094,7 +1094,8 @@ void bro_srandom(unsigned int seed)
srandom(seed);
}
void init_random_seed(const char* read_file, const char* write_file)
void init_random_seed(const char* read_file, const char* write_file,
bool use_empty_seeds)
{
static const int bufsiz = 20;
uint32_t buf[bufsiz];
@ -1111,6 +1112,8 @@ void init_random_seed(const char* read_file, const char* write_file)
else
seeds_done = true;
}
else if ( use_empty_seeds )
seeds_done = true;
#ifdef HAVE_GETRANDOM
if ( ! seeds_done )