[compiler-rt] [compiler-rt] Fixed Android 8.1 `getauxval(AT_PAGESZ)` crashes if called from `.preinit_array`. (#113427) (PR #116121)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 01:40:25 PST 2024


================
@@ -1214,6 +1220,16 @@ uptr GetPageSize() {
   CHECK_EQ(rv, 0);
   return (uptr)pz;
 #    elif SANITIZER_USE_GETAUXVAL
+#      if SANITIZER_ANDROID && __ANDROID_API__ < 35
+  // The 16 KB page size was introduced in Android 15 (API level 35), while
----------------
fmayer wrote:

we can't use getpagesize for the same reason as above. it is correct that with old API levels, pagesize was a 4k constant.

https://github.com/llvm/llvm-project/pull/116121


More information about the llvm-commits mailing list