• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2023 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "third_party/libFuzzer/src/FuzzerDefs.h"
6 
7 // Small shim to expose LLVMFuzzerRunDriver from libfuzzer.
8 // This is exposed as a visible symbol in the libfuzzer-API-compatible
9 // fuzzers framework centipede, but for some reason is not exposed in libfuzzer
10 // itself. Expose it so we can write a fuzzer the same way for each.
11 
LLVMFuzzerRunDriver(int * argc,char *** argv,int (* UserCb)(const uint8_t * Data,size_t Size))12 extern "C" __attribute__((visibility("default"))) int LLVMFuzzerRunDriver(
13     int* argc,
14     char*** argv,
15     int (*UserCb)(const uint8_t* Data, size_t Size)) {
16   return fuzzer::FuzzerDriver(argc, argv, UserCb);
17 }
18