[compiler-rt] [compiler-rt] Fixed Android 8.1 `getauxval(AT_PAGESZ)` crashes if called from `.preinit_array`. (#113427) (PR #116121)
Dan Albert via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 11:27:02 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
----------------
DanAlbert wrote:
But not unconditionally. This is wrong on ~every device. Can you not use `getpagesize()`? Or the `sysconf(_SC_PAGESIZE)` that's the fallback here?
https://github.com/llvm/llvm-project/pull/116121
More information about the llvm-commits
mailing list