@@ -2723,10 +2723,10 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_arm64 &) {
2723
2723
const pint_t pc = static_cast <pint_t >(this ->getReg (UNW_REG_IP));
2724
2724
// The PC might contain an invalid address if the unwind info is bad, so
2725
2725
// 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 )))
2728
2728
return false ;
2729
- auto *instructions = reinterpret_cast <uint32_t *>(pc);
2729
+ auto *instructions = reinterpret_cast <const uint32_t *>(pc);
2730
2730
// Look for instructions: mov x8, #0x8b; svc #0x0
2731
2731
if (instructions[0 ] != 0xd2801168 || instructions[1 ] != 0xd4000001 )
2732
2732
return false ;
@@ -2779,10 +2779,10 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_riscv &) {
2779
2779
const pint_t pc = static_cast <pint_t >(getReg (UNW_REG_IP));
2780
2780
// The PC might contain an invalid address if the unwind info is bad, so
2781
2781
// 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 )))
2784
2784
return false ;
2785
- const auto *instructions = reinterpret_cast <uint32_t *>(pc);
2785
+ const auto *instructions = reinterpret_cast <const uint32_t *>(pc);
2786
2786
// Look for the two instructions used in the sigreturn trampoline
2787
2787
// __vdso_rt_sigreturn:
2788
2788
//
@@ -2838,10 +2838,10 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_s390x &) {
2838
2838
const pint_t pc = static_cast <pint_t >(this ->getReg (UNW_REG_IP));
2839
2839
// The PC might contain an invalid address if the unwind info is bad, so
2840
2840
// 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 )))
2843
2843
return false ;
2844
- const auto inst = *reinterpret_cast <uint16_t *>(pc);
2844
+ const auto inst = *reinterpret_cast <const uint16_t *>(pc);
2845
2845
if (inst == 0x0a77 || inst == 0x0aad ) {
2846
2846
_info = {};
2847
2847
_info.start_ip = pc;
0 commit comments