From 45e4548289e3ba71ad715d05959023db6ae6c407 Mon Sep 17 00:00:00 2001 From: Joshua Marantz Date: Thu, 8 Oct 2020 16:16:20 -0400 Subject: [PATCH] disable exact memory checks until we can sort out what changed in tcmalloc (#13447) Signed-off-by: Joshua Marantz --- test/common/stats/stat_test_utility.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/common/stats/stat_test_utility.cc b/test/common/stats/stat_test_utility.cc index a47c84d346f1..4b8b678a115e 100644 --- a/test/common/stats/stat_test_utility.cc +++ b/test/common/stats/stat_test_utility.cc @@ -119,12 +119,18 @@ MemoryTest::Mode MemoryTest::mode() { const size_t end_mem = Memory::Stats::totalCurrentlyAllocated(); bool can_measure_memory = end_mem > start_mem; + // As of Oct 8, 2020, tcmalloc has changed such that Memory::Stats::totalCurrentlyAllocated + // is not deterministic, even with single-threaded tests. When possible, this should be fixed, + // and the following block of code uncommented. This affects approximate comparisons, not + // just exact ones. +#if 0 if (getenv("ENVOY_MEMORY_TEST_EXACT") != nullptr) { // Set in "ci/do_ci.sh" for 'release' tests. RELEASE_ASSERT(can_measure_memory, "$ENVOY_MEMORY_TEST_EXACT is set for canonical memory measurements, " "but memory measurement looks broken"); return Mode::Canonical; } +#endif // Different versions of STL and other compiler/architecture differences may // also impact memory usage, so when not compiling with MEMORY_TEST_EXACT,