Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161047499
D43409.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43409.diff
View Options
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
--- a/sys/amd64/amd64/db_trace.c
+++ b/sys/amd64/amd64/db_trace.c
@@ -205,7 +205,8 @@
*/
tf_addr = *fp + 16;
- if (!__is_aligned(tf_addr, _Alignof(*tf)) || !INKERNEL(tf_addr)) {
+ if (!__is_aligned(tf_addr, _Alignof(struct trapframe)) ||
+ !INKERNEL(tf_addr)) {
db_printf("--- invalid trapframe %p\n", (void *)tf_addr);
*ip = 0;
*fp = 0;
diff --git a/sys/arm64/arm64/db_trace.c b/sys/arm64/arm64/db_trace.c
--- a/sys/arm64/arm64/db_trace.c
+++ b/sys/arm64/arm64/db_trace.c
@@ -92,7 +92,7 @@
struct trapframe *tf;
tf = (struct trapframe *)(uintptr_t)frame->fp - 1;
- if (!__is_aligned(tf, _Alignof(*tf)) ||
+ if (!__is_aligned(tf, _Alignof(struct trapframe)) ||
!kstack_contains(td, (vm_offset_t)tf,
sizeof(*tf))) {
db_printf("--- invalid trapframe %p\n", tf);
diff --git a/sys/riscv/riscv/db_trace.c b/sys/riscv/riscv/db_trace.c
--- a/sys/riscv/riscv/db_trace.c
+++ b/sys/riscv/riscv/db_trace.c
@@ -83,7 +83,7 @@
struct trapframe *tf;
tf = (struct trapframe *)(uintptr_t)frame->sp;
- if (!__is_aligned(tf, _Alignof(*tf)) ||
+ if (!__is_aligned(tf, _Alignof(struct trapframe)) ||
!kstack_contains(td, (vm_offset_t)tf,
sizeof(*tf))) {
db_printf("--- invalid trapframe %p\n", tf);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 1, 3:05 AM (14 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34539106
Default Alt Text
D43409.diff (1 KB)
Attached To
Mode
D43409: Stop using expressions in _Alignof()
Attached
Detach File
Event Timeline
Log In to Comment