Skip to content

Commit bc7bb5a

Browse files
fixup! [libunwind] Replace process_vm_readv with pipe
1 parent 41025a1 commit bc7bb5a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libunwind/src/UnwindCursor.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#define __UNWINDCURSOR_HPP__
1313

1414
#include "cet_unwind.h"
15+
#include <errno.h>
16+
#include <signal.h>
1517
#include <stdint.h>
1618
#include <stdio.h>
1719
#include <stdlib.h>
@@ -33,7 +35,6 @@
3335
#if defined(_LIBUNWIND_TARGET_LINUX) && \
3436
(defined(_LIBUNWIND_TARGET_AARCH64) || defined(_LIBUNWIND_TARGET_RISCV) || \
3537
defined(_LIBUNWIND_TARGET_S390X))
36-
#include <fcntl.h>
3738
#include <sys/syscall.h>
3839
#include <sys/uio.h>
3940
#include <unistd.h>
@@ -2725,7 +2726,7 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_arm64 &) {
27252726
if (!isReadableAddr(static_cast<void *>(pc)) ||
27262727
!isReadableAddr(static_cast<void *>(pc + 4)))
27272728
return false;
2728-
auto *instructions = static_cast<uint32_t *>(pc);
2729+
auto *instructions = reinterpret_cast<uint32_t *>(pc);
27292730
// Look for instructions: mov x8, #0x8b; svc #0x0
27302731
if (instructions[0] != 0xd2801168 || instructions[1] != 0xd4000001)
27312732
return false;
@@ -2781,7 +2782,7 @@ bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_riscv &) {
27812782
if (!isReadableAddr(static_cast<void *>(pc)) ||
27822783
!isReadableAddr(static_cast<void *>(pc + 4)))
27832784
return false;
2784-
const auto *instructions = static_cast<uint32_t *>(pc);
2785+
const auto *instructions = reinterpret_cast<uint32_t *>(pc);
27852786
// Look for the two instructions used in the sigreturn trampoline
27862787
// __vdso_rt_sigreturn:
27872788
//

0 commit comments

Comments
 (0)