[clang] [llvm] [libunwind] [clang-tools-extra] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

Alexander Richardson via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 11:39:06 PST 2023


================
@@ -2817,7 +2817,7 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_s390x &) {
   const pint_t pc = static_cast<pint_t>(this->getReg(UNW_REG_IP));
   // The PC might contain an invalid address if the unwind info is bad, so
   // directly accessing it could cause a SIGSEGV.
-  if (!isReadableAddr(pc) || !isReadableAddr(pc + 2))
+  if (!isReadableAddr(pc))
----------------
arichardson wrote:

We might get a false-negative `return false` here if the instruction happens to be the last four bytes before the end of the page boundary but I don't think it it matters.

https://github.com/llvm/llvm-project/pull/74791


More information about the cfe-commits mailing list