Skip to content

Commit 08d3387

Browse files
authored
[compiler-rt] Add comment.
1 parent b17a047 commit 08d3387

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,9 @@ uptr GetPageSize() {
12231223
# if SANITIZER_ANDROID && __ANDROID_API__ < 35
12241224
// The 16 KB page size was introduced in Android 15 (API level 35), while
12251225
// earlier versions of Android always used a 4 KB page size.
1226+
// We are checking the weak definition of `strerrorname_np` (introduced in API
1227+
// level 35) because some earlier API levels crashed when
1228+
// `getauxval(AT_PAGESZ)` was called from the `.preinit_array`.
12261229
if (!strerrorname_np)
12271230
return 4096;
12281231
# endif

0 commit comments

Comments
 (0)