Skip to content

Commit f7067f1

Browse files
committed
Update Aarch64 sigframe size
Resolves #3877
1 parent c360a0a commit f7067f1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/RecordSession.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,8 +1729,7 @@ bool RecordSession::signal_state_changed(RecordTask* t, StepState* step_state) {
17291729
/* this returns 512 when XSAVE unsupported */
17301730
xsave_area_size();
17311731
} else if (t->arch() == aarch64) {
1732-
sigframe_size = sizeof(ARM64Arch::rt_sigframe) +
1733-
sizeof(ARM64Arch::user_fpsimd_state);
1732+
sigframe_size = sizeof(ARM64Arch::rt_sigframe);
17341733
} else {
17351734
DEBUG_ASSERT(0 && "Add sigframe size for your architecture here");
17361735
}

src/kernel_abi.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,17 +2520,21 @@ struct ARM64Arch : public GenericArch<SupportedArch::aarch64, WordSize64Defs> {
25202520
struct hw_bp dbg_regs[16];
25212521
};
25222522

2523+
// Also defined as mcontext_t in some headers
25232524
struct __attribute((aligned(16))) sigcontext {
25242525
__u64 fault_addr;
25252526
user_pt_regs regs;
25262527
// ISA extension state follows here
2528+
unsigned char __reserved[4096] __attribute((aligned(16)));
25272529
};
25282530

2531+
// Also defined as ucontext_t in some headers
25292532
struct ucontext {
25302533
unsigned long uc_flags;
25312534
ptr<ucontext> uc_link;
25322535
stack_t uc_stack;
25332536
kernel_sigset_t uc_sigmask;
2537+
/* 128 bytes are reserved for the sigmask so reflect that here */
25342538
uint8_t __unused1[1024 / 8 - sizeof(kernel_sigset_t)];
25352539
struct sigcontext uc_mcontext;
25362540
};

0 commit comments

Comments
 (0)