[PATCH] D121859: [scudo] Use portable sysconf instead of deprecated getpagesize

Dominic Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 14:15:50 PDT 2022


ddcc created this revision.
ddcc added reviewers: vitalybuka, eugenis, cryptoad, mcgrathr, hctim.
Herald added a project: All.
ddcc requested review of this revision.
Herald added a project: Sanitizers.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121859

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


Index: compiler-rt/lib/scudo/standalone/tests/map_test.cpp
===================================================================
--- compiler-rt/lib/scudo/standalone/tests/map_test.cpp
+++ compiler-rt/lib/scudo/standalone/tests/map_test.cpp
@@ -16,7 +16,7 @@
 
 TEST(ScudoMapTest, PageSize) {
   EXPECT_EQ(scudo::getPageSizeCached(),
-            static_cast<scudo::uptr>(getpagesize()));
+            static_cast<scudo::uptr>(sysconf(_SC_PAGESIZE)));
 }
 
 TEST(ScudoMapDeathTest, MapNoAccessUnmap) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121859.415984.patch
Type: text/x-patch
Size: 500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/61c499da/attachment.bin>


More information about the llvm-commits mailing list