reviewable/pr17308/r1
yang-g 6 years ago
parent c930956289
commit 606be620d8
  1. 2
      test/core/end2end/fuzzers/api_fuzzer.cc
  2. 4
      test/core/util/memory_counters.cc

@ -35,6 +35,7 @@
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/timer_manager.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/init.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/metadata.h"
#include "test/core/end2end/data/ssl_test_data.h"
@ -1200,5 +1201,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_resource_quota_unref(g_resource_quota);
grpc_shutdown();
grpc_maybe_wait_for_async_shutdown();
return 0;
}

@ -122,9 +122,9 @@ LeakDetector::LeakDetector(bool enable) : enabled_(enable) {
}
LeakDetector::~LeakDetector() {
// Wait for grpc_shutdown() to finish its async work.
grpc_maybe_wait_for_async_shutdown();
if (enabled_) {
// Wait for grpc_shutdown() to finish its async work.
grpc_maybe_wait_for_async_shutdown();
struct grpc_memory_counters counters = grpc_memory_counters_snapshot();
if (counters.total_size_relative != 0) {
gpr_log(GPR_ERROR, "Leaking %" PRIuPTR " bytes",

Loading…
Cancel
Save