aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c
index 4e22e268f0..afcf7638f7 100644
--- a/test/core/end2end/fuzzers/client_fuzzer.c
+++ b/test/core/end2end/fuzzers/client_fuzzer.c
@@ -36,6 +36,7 @@
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/surface/channel.h"
+#include "test/core/util/memory_counters.h"
#include "test/core/util/mock_endpoint.h"
static const bool squelch = true;
@@ -48,7 +49,9 @@ static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_test_only_set_metadata_hash_seed(0);
+ struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);
+ grpc_memory_counters_init();
grpc_init();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
@@ -150,5 +153,8 @@ done:
grpc_byte_buffer_destroy(response_payload_recv);
}
grpc_shutdown();
+ counters = grpc_memory_counters_snapshot();
+ grpc_memory_counters_destroy();
+ GPR_ASSERT(counters.total_size_relative == 0);
return 0;
}