Un extern the fuzzers

pull/13432/head
ncteisen 7 years ago
parent 01a7547a3f
commit 0e6b5b3ba3
  1. 2
      src/core/lib/iomgr/tcp_client_uv.cc
  2. 2
      test/core/client_channel/uri_fuzzer_test.cc
  3. 4
      test/core/end2end/fuzzers/api_fuzzer.cc
  4. 2
      test/core/end2end/fuzzers/client_fuzzer.cc
  5. 2
      test/core/end2end/fuzzers/server_fuzzer.cc
  6. 2
      test/core/http/request_fuzzer.cc
  7. 2
      test/core/http/response_fuzzer.cc
  8. 2
      test/core/json/fuzzer.cc
  9. 2
      test/core/nanopb/fuzzer_response.cc
  10. 2
      test/core/nanopb/fuzzer_serverlist.cc
  11. 2
      test/core/security/ssl_server_fuzzer.cc
  12. 2
      test/core/slice/percent_decode_fuzzer.cc
  13. 2
      test/core/slice/percent_encode_fuzzer.cc
  14. 2
      test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
  15. 2
      test/core/util/fuzzer_corpus_test.cc
  16. 2
      test/core/util/one_corpus_entry_fuzzer.cc

@ -161,13 +161,11 @@ static void tcp_client_connect_impl(grpc_exec_ctx* exec_ctx,
}
// overridden by api_fuzzer.c
extern "C" {
void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx* exec_ctx, grpc_closure* closure, grpc_endpoint** ep,
grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
const grpc_resolved_address* addr,
grpc_millis deadline) = tcp_client_connect_impl;
}
void grpc_tcp_client_connect(grpc_exec_ctx* exec_ctx, grpc_closure* closure,
grpc_endpoint** ep,

@ -28,7 +28,7 @@
bool squelch = true;
bool leak_check = true;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
char* s = static_cast<char*>(gpr_malloc(size + 1));
memcpy(s, data, size);
s[size] = 0;

@ -441,7 +441,7 @@ grpc_ares_request* my_dns_lookup_ares(
// client connection
// defined in tcp_client_posix.c
void (*grpc_tcp_client_connect_impl)(
extern void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx* exec_ctx, grpc_closure* closure, grpc_endpoint** ep,
grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
const grpc_resolved_address* addr, grpc_millis deadline);
@ -740,7 +740,7 @@ static validator* make_finished_batch_validator(call_state* cs,
return create_validator(finished_batch, bi);
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
char* grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER");
if (squelch && grpc_trace_fuzzer == nullptr) gpr_set_log_function(dont_log);

@ -37,7 +37,7 @@ static void* tag(int n) { return (void*)(uintptr_t)n; }
static void dont_log(gpr_log_func_args* args) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);

@ -35,7 +35,7 @@ static int detag(void* p) { return (int)(uintptr_t)p; }
static void dont_log(gpr_log_func_args* args) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);

@ -27,7 +27,7 @@
bool squelch = true;
bool leak_check = true;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_http_parser parser;
grpc_http_request request;
memset(&request, 0, sizeof(request));

@ -26,7 +26,7 @@
bool squelch = true;
bool leak_check = true;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_http_parser parser;
grpc_http_response response;
memset(&response, 0, sizeof(response));

@ -29,7 +29,7 @@
bool squelch = true;
bool leak_check = true;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
char* s;
struct grpc_memory_counters counters;
grpc_memory_counters_init();

@ -28,7 +28,7 @@ bool leak_check = true;
static void dont_log(gpr_log_func_args* args) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
grpc_slice slice = grpc_slice_from_copied_buffer((const char*)data, size);
grpc_grpclb_initial_response* response;

@ -28,7 +28,7 @@ bool leak_check = true;
static void dont_log(gpr_log_func_args* args) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
grpc_slice slice = grpc_slice_from_copied_buffer((const char*)data, size);
grpc_grpclb_serverlist* serverlist;

@ -51,7 +51,7 @@ static void on_handshake_done(grpc_exec_ctx* exec_ctx, void* arg,
GPR_ASSERT(error != GRPC_ERROR_NONE);
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);
if (leak_check) grpc_memory_counters_init();

@ -29,7 +29,7 @@
bool squelch = true;
bool leak_check = true;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
struct grpc_memory_counters counters;
grpc_memory_counters_init();
grpc_slice input = grpc_slice_from_copied_buffer((const char*)data, size);

@ -51,7 +51,7 @@ static void test(const uint8_t* data, size_t size, const uint8_t* dict) {
GPR_ASSERT(counters.total_size_relative == 0);
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
test(data, size, grpc_url_percent_encoding_unreserved_bytes);
test(data, size, grpc_compatible_percent_encoding_unreserved_bytes);
return 0;

@ -34,7 +34,7 @@ static void onhdr(grpc_exec_ctx* exec_ctx, void* ud, grpc_mdelem md) {
}
static void dont_log(gpr_log_func_args* args) {}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
if (squelch) gpr_set_log_function(dont_log);
grpc_init();

@ -28,7 +28,7 @@
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/test_config.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
extern "C" bool squelch;
extern "C" bool leak_check;

@ -21,7 +21,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/iomgr/load_file.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
extern bool squelch;
extern bool leak_check;

Loading…
Cancel
Save