Remove a check in `MadviseAwayAlternateSignalStack()`, again.
We're testing and benchmarking ART on devices with old
kernels which may not support `MADV_FREE`, so the
`madvise()` call may fail in these test environments.
It should succeed on devices with Android 12+.
Test: m
Bug: 38383823
Bug: 215310343
Change-Id: I2d2a7603da4e42b119a1606ab379b496bcdadfdb
diff --git a/runtime/thread_android.cc b/runtime/thread_android.cc
index 9df1532..0f41e2f 100644
--- a/runtime/thread_android.cc
+++ b/runtime/thread_android.cc
@@ -42,8 +42,10 @@
IsAligned<kPageSize>(old_ss.ss_sp) &&
IsAligned<kPageSize>(old_ss.ss_size)) {
CHECK_EQ(old_ss.ss_flags & SS_ONSTACK, 0);
- result = madvise(old_ss.ss_sp, old_ss.ss_size, MADV_FREE);
- CHECK_EQ(result, 0);
+ // Note: We're testing and benchmarking ART on devices with old kernels
+ // which may not support `MADV_FREE`, so we do not check the result.
+ // It should succeed on devices with Android 12+.
+ madvise(old_ss.ss_sp, old_ss.ss_size, MADV_FREE);
}
}