Skip to content

Commit f939065

Browse files
ckennellycopybara-github
authored andcommitted
Permit drop frames test to run under sanitizers.
They do not produce working profiles, but this allows us to confirm our allocation/deallocation test patterns are UB-free. PiperOrigin-RevId: 705163461 Change-Id: I8e0c9dc21b85aa18673bba2edcc14ad0c85d9caf
1 parent 36c213b commit f939065

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tcmalloc/testing/BUILD

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -885,11 +885,6 @@ cc_test(
885885
create_tcmalloc_testsuite(
886886
name = "profile_drop_frames_test",
887887
srcs = ["profile_drop_frames_test.cc"],
888-
tags = [
889-
"noasan",
890-
"nomsan",
891-
"notsan",
892-
],
893888
deps = [
894889
"//tcmalloc:malloc_extension",
895890
"//tcmalloc/internal:profile_builder",

tcmalloc/testing/profile_drop_frames_test.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,22 @@ TEST(AllocationSampleTest, ProfileDropFrames) {
361361
});
362362
};
363363
check(alloc_profile);
364+
365+
#if !defined(ABSL_HAVE_ADDRESS_SANITIZER) && \
366+
!defined(ABSL_HAVE_MEMORY_SANITIZER) && \
367+
!defined(ABSL_HAVE_THREAD_SANITIZER) && \
368+
!defined(UNDEFINED_BEHAVIOR_SANITIZER)
364369
EXPECT_GT(got_stacks, 20);
370+
#endif
365371
got_stacks = 0;
366372
check(lifetime_profile);
373+
#if !defined(ABSL_HAVE_ADDRESS_SANITIZER) && \
374+
!defined(ABSL_HAVE_MEMORY_SANITIZER) && \
375+
!defined(ABSL_HAVE_THREAD_SANITIZER) && \
376+
!defined(UNDEFINED_BEHAVIOR_SANITIZER)
367377
EXPECT_GT(got_stacks, 20);
368378
EXPECT_FALSE(failed);
379+
#endif
369380
}
370381

371382
} // namespace

0 commit comments

Comments
 (0)