Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
39 changes: 39 additions & 0 deletions tcmalloc/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,45 @@ cc_test(
],
)

cc_test(
name = "percpu_tcmalloc_no_glibc_rseq_test",
timeout = "long",
srcs = ["percpu_tcmalloc_test.cc"],
copts = TCMALLOC_DEFAULT_COPTS,
# Exercise tcmalloc's own rseq registration rather than glibc's.
env = {"GLIBC_TUNABLES": "glibc.pthread.rseq=0"},
linkstatic = 1,
malloc = ":system_malloc",
tags = [
"nohwasan",
"noubsan",
],
deps = [
":affinity",
":config",
":cpu_utils",
":logging",
":page_size",
":percpu",
":percpu_tcmalloc",
":sysinfo",
":util",
"//tcmalloc:malloc_extension",
"//tcmalloc/testing:testutil",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:fixed_array",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/functional:function_ref",
"@com_google_absl//absl/random",
"@com_google_absl//absl/random:seed_sequences",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)

cc_test(
name = "percpu_tcmalloc_fuzz",
srcs = ["percpu_tcmalloc_fuzz.cc"],
Expand Down
32 changes: 32 additions & 0 deletions tcmalloc/internal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,38 @@ tcmalloc_cc_test(
"tcmalloc::testing_testutil"
)

tcmalloc_cc_test(
NAME
tcmalloc_internal_percpu_tcmalloc_no_glibc_rseq_test
SRCS
"percpu_tcmalloc_test.cc"
DEPS
"GTest::gtest_main"
"GTest::gmock_main"
"GTest::gmock"
"absl::base"
"absl::core_headers"
"absl::fixed_array"
"absl::flat_hash_set"
"absl::function_ref"
"absl::random_random"
"absl::random_seed_sequences"
"absl::span"
"absl::synchronization"
"absl::time"
"tcmalloc::internal_affinity"
"tcmalloc::internal_config"
"tcmalloc::internal_cpu_utils"
"tcmalloc::internal_logging"
"tcmalloc::internal_page_size"
"tcmalloc::internal_percpu"
"tcmalloc::internal_percpu_tcmalloc"
"tcmalloc::internal_sysinfo"
"tcmalloc::internal_util"
"tcmalloc::malloc_extension"
"tcmalloc::testing_testutil"
)

tcmalloc_cc_test(
NAME
tcmalloc_internal_percpu_tcmalloc_fuzz
Expand Down
Loading