AddressIsReadable: Enable Linux rt_sigprocmask probe on Android Previously AddressIsReadable() unconditionally returned true on Android, making frame-pointer stack unwinding unsafe when encountering unmapped or inaccessible frame pointers. Android runs on the Linux kernel, provides <syscall.h> and SYS_rt_sigprocmask, and allows rt_sigprocmask in app seccomp filters (the same probe LLVM libunwind uses on Android). Remove the defined(__ANDROID__) exclusion so Android uses the Linux implementation. PiperOrigin-RevId: 1033240461
diff --git a/absl/debugging/internal/address_is_readable.cc b/absl/debugging/internal/address_is_readable.cc index 88aa516..18c0170 100644 --- a/absl/debugging/internal/address_is_readable.cc +++ b/absl/debugging/internal/address_is_readable.cc
@@ -21,7 +21,7 @@ #include "absl/base/config.h" -#if !defined(__linux__) || defined(__ANDROID__) +#if !defined(__linux__) namespace absl { ABSL_NAMESPACE_BEGIN @@ -34,7 +34,7 @@ ABSL_NAMESPACE_END } // namespace absl -#else // __linux__ && !__ANDROID__ +#else // __linux__ #include <stdint.h> #include <syscall.h> @@ -99,4 +99,4 @@ ABSL_NAMESPACE_END } // namespace absl -#endif // __linux__ && !__ANDROID__ +#endif // __linux__