[compiler-rt] 4c98a71 - [nfc][sanitizer] Unmap memory in test (#112644)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 18:29:19 PDT 2024


Author: Vitaly Buka
Date: 2024-10-16T18:29:15-07:00
New Revision: 4c98a71993ddba09ab6e81c905d2a1cc08d8d76e

URL: https://github.com/llvm/llvm-project/commit/4c98a71993ddba09ab6e81c905d2a1cc08d8d76e
DIFF: https://github.com/llvm/llvm-project/commit/4c98a71993ddba09ab6e81c905d2a1cc08d8d76e.diff

LOG: [nfc][sanitizer] Unmap memory in test (#112644)

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp

Removed: 
    


################################################################################
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 be577c3364049c..bed19d15a8ec77 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


        


More information about the llvm-commits mailing list