diff options
author | Dapeng Gao <dapeng@dpgao.cn> | 2022-11-15 00:21:38 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2022-11-15 00:25:46 +0000 |
commit | 40e0fa10f58d90744c2857b57adf0ddbce1a1e1c (patch) | |
tree | cf4b81636279b81409927b0fbd5415b7d30faa73 /sys/riscv | |
parent | c72f25972750e9de29257165140617b307e9b662 (diff) | |
download | src-40e0fa10f58d90744c2857b57adf0ddbce1a1e1c.tar.gz src-40e0fa10f58d90744c2857b57adf0ddbce1a1e1c.zip |
Diffstat (limited to 'sys/riscv')
-rw-r--r-- | sys/riscv/riscv/unwind.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/riscv/riscv/unwind.c b/sys/riscv/riscv/unwind.c index 9efb1fef9451..a66ffebcdc35 100644 --- a/sys/riscv/riscv/unwind.c +++ b/sys/riscv/riscv/unwind.c @@ -47,7 +47,8 @@ unwind_frame(struct thread *td, struct unwind_state *frame) fp = frame->fp; - if (!kstack_contains(td, fp - sizeof(fp) * 2, sizeof(fp) * 2)) + if (!is_aligned(fp, sizeof(fp)) || + !kstack_contains(td, fp - sizeof(fp) * 2, sizeof(fp) * 2)) return (false); frame->sp = fp; |