[compiler-rt] 58b6521 - [scudo] Use portable sysconf instead of deprecated getpagesize

Dominic Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 11:02:34 PDT 2022


Author: Dominic Chen
Date: 2022-03-17T11:02:26-07:00
New Revision: 58b6521eb5a06361d2965185de315eefa06dfe6a

URL: https://github.com/llvm/llvm-project/commit/58b6521eb5a06361d2965185de315eefa06dfe6a
DIFF: https://github.com/llvm/llvm-project/commit/58b6521eb5a06361d2965185de315eefa06dfe6a.diff

LOG: [scudo] Use portable sysconf instead of deprecated getpagesize

Differential Revision: https://reviews.llvm.org/D121859

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/tests/map_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/tests/map_test.cpp b/compiler-rt/lib/scudo/standalone/tests/map_test.cpp
index 095e1b6a5d2a0..ff05258db58d1 100644
--- a/compiler-rt/lib/scudo/standalone/tests/map_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/map_test.cpp
@@ -17,7 +17,7 @@ static const char *MappingName = "scudo:test";
 
 TEST(ScudoMapTest, PageSize) {
   EXPECT_EQ(scudo::getPageSizeCached(),
-            static_cast<scudo::uptr>(getpagesize()));
+            static_cast<scudo::uptr>(sysconf(_SC_PAGESIZE)));
 }
 
 TEST(ScudoMapDeathTest, MapNoAccessUnmap) {


        


More information about the llvm-commits mailing list