Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bazel/deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ tcmalloc:
project_name: "tcmalloc"
project_desc: "Fast, multi-threaded malloc implementation"
project_url: "https://github.com/google/tcmalloc"
release_date: "2024-12-27"
release_date: "2025-09-27"
Comment thread
agrawroh marked this conversation as resolved.
Outdated
use_category:
- dataplane_core
- controlplane
Expand Down
4 changes: 2 additions & 2 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
urls = ["https://github.com/google/libsxg/archive/{version}.tar.gz"],
),
tcmalloc = dict(
version = "5da4a882003102fba0c0c0e8f6372567057332eb",
sha256 = "fd92d64d8302f1677570fdff844e8152c314e559a6c788c6bfc3844954d0dabd",
version = "12f255231938d30493186b0a037feedd70f5a1c1",
sha256 = "2a6bef88f8cccda4a63a2f4bb09e655b3ee5ea0a2ce68d16e6ea2d5f5c4be9c1",
strip_prefix = "tcmalloc-{version}",
urls = ["https://github.com/google/tcmalloc/archive/{version}.tar.gz"],
),
Expand Down
4 changes: 2 additions & 2 deletions bazel/tcmalloc.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/tcmalloc/BUILD b/tcmalloc/BUILD
--- a/tcmalloc/BUILD 2025-01-28 16:41:20.424424728 +0000
+++ b/tcmalloc/BUILD 2025-01-28 16:41:09.408433981 +0000
@@ -21,7 +21,7 @@
load("//tcmalloc:copts.bzl", "TCMALLOC_DEFAULT_COPTS")
@@ -24,7 +24,7 @@
load("//tcmalloc:copts.bzl", "TCMALLOC_DEFAULT_COPTS", "TCMALLOC_DEFAULT_CXXOPTS")
load("//tcmalloc:variants.bzl", "create_tcmalloc_benchmark", "create_tcmalloc_libraries", "create_tcmalloc_testsuite")

-package(default_visibility = ["//visibility:private"])
Expand Down
6 changes: 3 additions & 3 deletions test/common/common/matchers_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ TEST_F(StringMatcher, Memory) {
// The memory constraints were added to ensure that the amount of memory
// used by matchers is carefully analyzed. These constraints can be relaxed
// when additional features are added, but it should be done in a thoughtful manner.
// Adding 3*8192 bytes because tcmalloc consumption estimation may return
// Adding 5*8192 bytes because tcmalloc consumption estimation may return
// different values depending on memory alignment.
EXPECT_MEMORY_LE(prefix_consumed_bytes, 530176 + 3 * 8192);
EXPECT_MEMORY_LE(prefix_consumed_bytes, 530176 + 5 * 8192);
}
// Regex matcher.
{
Expand All @@ -494,7 +494,7 @@ TEST_F(StringMatcher, Memory) {
// when additional features are added, but it should be done in a thoughtful manner.
// Adding 10*8192 bytes because tcmalloc consumption estimation may return
// different values depending on memory alignment.
EXPECT_MEMORY_LE(regex_consumed_bytes, 15038016 + 10 * 8192);
EXPECT_MEMORY_LE(regex_consumed_bytes, 15603776 + 10 * 8192);
}
}

Expand Down
5 changes: 4 additions & 1 deletion test/exe/main_common_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ TEST_P(MainCommonDeathTest, OutOfMemoryHandler) {
// Allocating a fixed-size large array that results in OOM on gcc
// results in a compile-time error on clang of "array size too big",
// so dynamically find a size that is too large.
const uint64_t initial = 1 << 30;
// Start with a size that exceeds the x86_64 virtual address space limit (128TB)
// so that mmap fails immediately and tcmalloc prints its "Unable to allocate"
// message to stderr.
const uint64_t initial = uint64_t{1} << 46;
for (uint64_t size = initial;
size >= initial; // Disallow wraparound to avoid infinite loops on failure.
size *= 1000) {
Expand Down
3 changes: 2 additions & 1 deletion test/integration/stats_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ TEST_P(ClusterMemoryTestRunner, MemoryLargeClusterSize) {
// 2022/10/27 44000 Update tcmalloc
// 2025/07/28 40266 44299 44500 Add request_count_ field to ActiveClient
// 2026/01/23 44528 45000 Fix test flakes
// 2026/02/13 43467 45575 46000 Update tcmalloc to 12f2552 (2025-09-27)

// Note: when adjusting this value: EXPECT_MEMORY_EQ is active only in CI
// 'release' builds, where we control the platform and tool-chain. So you
Expand All @@ -416,7 +417,7 @@ TEST_P(ClusterMemoryTestRunner, MemoryLargeClusterSize) {
// https://github.com/envoyproxy/envoy/blob/main/source/docs/stats.md#stats-memory-tests
// for details on how to fix.

EXPECT_MEMORY_LE(m_per_cluster, 45000); // Round up to allow platform variations.
EXPECT_MEMORY_LE(m_per_cluster, 46000); // Round up to allow platform variations.
}

TEST_P(ClusterMemoryTestRunner, MemoryLargeHostSizeWithStats) {
Expand Down
Loading