|
|
|
@ -31,9 +31,8 @@ bool squelch = true; |
|
|
|
|
bool leak_check = true; |
|
|
|
|
|
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
|
|
|
|
struct grpc_memory_counters counters; |
|
|
|
|
grpc_core::testing::LeakDetector leak_detector(true); |
|
|
|
|
grpc_init(); |
|
|
|
|
grpc_memory_counters_init(); |
|
|
|
|
grpc_slice input = grpc_slice_from_copied_buffer((const char*)data, size); |
|
|
|
|
grpc_slice output; |
|
|
|
|
if (grpc_strict_percent_decode_slice( |
|
|
|
@ -46,9 +45,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
|
|
|
|
} |
|
|
|
|
grpc_slice_unref(grpc_permissive_percent_decode_slice(input)); |
|
|
|
|
grpc_slice_unref(input); |
|
|
|
|
counters = grpc_memory_counters_snapshot(); |
|
|
|
|
grpc_memory_counters_destroy(); |
|
|
|
|
grpc_shutdown(); |
|
|
|
|
GPR_ASSERT(counters.total_size_relative == 0); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|