From 4c98a71993ddba09ab6e81c905d2a1cc08d8d76e Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 16 Oct 2024 18:29:15 -0700 Subject: [PATCH] [nfc][sanitizer] Unmap memory in test (#112644) --- compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp index be577c336404..bed19d15a8ec 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp @@ -78,6 +78,8 @@ TEST(SanitizerCommon, IsAccessibleMemoryRange) { EXPECT_TRUE(IsAccessibleMemoryRange(mem + 2 * page_size, page_size)); EXPECT_FALSE(IsAccessibleMemoryRange(mem, 3 * page_size)); EXPECT_FALSE(IsAccessibleMemoryRange(0x0, 2)); + + munmap((void *)mem, 3 * page_size); } } // namespace __sanitizer