LLVMfuzzer extern C

pull/13147/head
Yash Tibrewal 7 years ago
parent 0aeef4f0e7
commit 11a518995e
  1. 2
      test/core/client_channel/uri_fuzzer_test.cc
  2. 2
      test/core/end2end/fuzzers/api_fuzzer.cc
  3. 2
      test/core/end2end/fuzzers/client_fuzzer.cc
  4. 2
      test/core/end2end/fuzzers/server_fuzzer.cc
  5. 2
      test/core/http/request_fuzzer.cc
  6. 2
      test/core/http/response_fuzzer.cc
  7. 2
      test/core/json/fuzzer.cc
  8. 2
      test/core/nanopb/fuzzer_response.cc
  9. 2
      test/core/nanopb/fuzzer_serverlist.cc
  10. 2
      test/core/security/ssl_server_fuzzer.cc
  11. 2
      test/core/slice/percent_decode_fuzzer.cc
  12. 2
      test/core/slice/percent_encode_fuzzer.cc
  13. 2
      test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
  14. 2
      test/core/util/one_corpus_entry_fuzzer.cc

@ -28,7 +28,7 @@
bool squelch = true;
bool leak_check = true;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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;

@ -733,7 +733,7 @@ static validator *make_finished_batch_validator(call_state *cs,
return create_validator(finished_batch, bi);
}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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 == NULL) 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) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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);
}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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);
}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" 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();

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

Loading…
Cancel
Save