Merge remote-tracking branch 'origin/master' into topic/johanna/hash-unification

* origin/master:
  Use zeek::detail namespace for fuzzer utils
  Set terminating flag during fuzzer cleanup
  Add missing include to standalone fuzzer driver
  Improve standalone fuzzer driver error messages
  Test fuzzers against seed corpus under CI ASan build
  Update fuzzing README with OSS-Fuzz integration notes
  Link fuzzers against shared library to reduce executable sizes
  Improve FuzzBuffer chunking
  Fix compiler warning in standalone fuzzer driver
  Adjust minor fuzzing documentation
  Exit immediately after running unit tests
  Add OSS-Fuzz Zeek script search path to fuzzers
  Assume libFuzzer when LIB_FUZZING_ENGINE file doesn't exist
  Change handling of LIB_FUZZING_ENGINE
  Change --enable-fuzzing to --enable-fuzzers
  Add standalone driver for fuzz targets
  Add basic structure for fuzzing targets
This commit is contained in:
Johanna Amann 2020-05-13 14:19:44 +00:00
commit 892023ed9a
30 changed files with 1703 additions and 932 deletions

View file

@ -202,13 +202,13 @@ extern std::string strstrip(std::string s);
extern void hmac_md5(size_t size, const unsigned char* bytes,
unsigned char digest[16]);
// Initializes RNGs for bro_random() and MD5 usage. If seed is given, then
// it is used (to provide determinism). If load_file is given, the seeds
// (both random & MD5) are loaded from that file. This takes precedence
// over the "seed" argument. If write_file is given, the seeds are written
// to that file.
//
extern void init_random_seed(const char* load_file, const char* write_file);
// Initializes RNGs for bro_random() and MD5 usage. If load_file is given,
// the seeds (both random & MD5) are loaded from that file. This takes
// precedence over the "use_empty_seeds" argument, which just
// zero-initializes all seed values. If write_file is given, the seeds are
// written to that file.
extern void init_random_seed(const char* load_file, const char* write_file,
bool use_empty_seeds);
// Retrieves the initial seed computed after the very first call to
// init_random_seed(). Repeated calls to init_random_seed() will not affect
@ -340,6 +340,14 @@ std::string normalize_path(std::string_view path);
*/
std::string without_bropath_component(std::string_view path);
/**
* Gets the full path used to invoke some executable.
* @param invocation any possible string that may be seen in argv[0], such as
* absolute path, relative path, or name to lookup in PATH.
* @return the absolute path to the executable file
*/
std::string get_exe_path(const std::string& invocation);
/**
* Locate a file within a given search path.
* @param filename Name of a file to find.