Remove a check in `MadviseAwayAlternateSignalStack()`.
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: Rely on TreeHugger.
Bug: 38383823
Change-Id: I633cc8dce1be013a31cd5fb756b498d5043b2550
diff --git a/runtime/thread_android.cc b/runtime/thread_android.cc
index fadfc09..9b58c95 100644
--- a/runtime/thread_android.cc
+++ b/runtime/thread_android.cc
@@ -33,8 +33,10 @@
stack_t old_ss;
int result = sigaltstack(nullptr, &old_ss);
CHECK_EQ(result, 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);
}
} // namespace art