Skip to content

Commit 440d9dc

Browse files
fixup! [libunwind] Replace process_vm_readv with pipe
1 parent bc7bb5a commit 440d9dc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

libunwind/src/UnwindCursor.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,10 +2723,10 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_arm64 &) {
27232723
const pint_t pc = static_cast<pint_t>(this->getReg(UNW_REG_IP));
27242724
// The PC might contain an invalid address if the unwind info is bad, so
27252725
// directly accessing it could cause a SIGSEGV.
2726-
if (!isReadableAddr(static_cast<void *>(pc)) ||
2727-
!isReadableAddr(static_cast<void *>(pc + 4)))
2726+
if (!isReadableAddr(static_cast<const void *>(pc)) ||
2727+
!isReadableAddr(static_cast<const void *>(pc + 4)))
27282728
return false;
2729-
auto *instructions = reinterpret_cast<uint32_t *>(pc);
2729+
auto *instructions = reinterpret_cast<const uint32_t *>(pc);
27302730
// Look for instructions: mov x8, #0x8b; svc #0x0
27312731
if (instructions[0] != 0xd2801168 || instructions[1] != 0xd4000001)
27322732
return false;
@@ -2779,10 +2779,10 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_riscv &) {
27792779
const pint_t pc = static_cast<pint_t>(getReg(UNW_REG_IP));
27802780
// The PC might contain an invalid address if the unwind info is bad, so
27812781
// directly accessing it could cause a SIGSEGV.
2782-
if (!isReadableAddr(static_cast<void *>(pc)) ||
2783-
!isReadableAddr(static_cast<void *>(pc + 4)))
2782+
if (!isReadableAddr(static_cast<const void *>(pc)) ||
2783+
!isReadableAddr(static_cast<const void *>(pc + 4)))
27842784
return false;
2785-
const auto *instructions = reinterpret_cast<uint32_t *>(pc);
2785+
const auto *instructions = reinterpret_cast<const uint32_t *>(pc);
27862786
// Look for the two instructions used in the sigreturn trampoline
27872787
// __vdso_rt_sigreturn:
27882788
//
@@ -2838,10 +2838,10 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_s390x &) {
28382838
const pint_t pc = static_cast<pint_t>(this->getReg(UNW_REG_IP));
28392839
// The PC might contain an invalid address if the unwind info is bad, so
28402840
// directly accessing it could cause a SIGSEGV.
2841-
if (!isReadableAddr(static_cast<void *>(pc)) ||
2842-
!isReadableAddr(static_cast<void *>(pc + 2)))
2841+
if (!isReadableAddr(static_cast<const void *>(pc)) ||
2842+
!isReadableAddr(static_cast<const void *>(pc + 2)))
28432843
return false;
2844-
const auto inst = *reinterpret_cast<uint16_t *>(pc);
2844+
const auto inst = *reinterpret_cast<const uint16_t *>(pc);
28452845
if (inst == 0x0a77 || inst == 0x0aad) {
28462846
_info = {};
28472847
_info.start_ip = pc;

0 commit comments

Comments
 (0)