Skip to content

Commit 05551c6

Browse files
committed
[sanitizer] Correct alignment of x32 __sanitizer_siginfo
Since alignment of x32 siginfo_t is 8 bytes, not 4 bytes, use u64 in __sanitizer_siginfo_pad to align x32 __sanitizer_siginfo to 8 bytes. Fixes llvm#62394 Differential Revision: https://reviews.llvm.org/D149309
1 parent d6ef90f commit 05551c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,13 @@ struct __sanitizer_sigset_t {
578578
#endif
579579

580580
struct __sanitizer_siginfo_pad {
581+
#if SANITIZER_X32
582+
// x32 siginfo_t is aligned to 8 bytes.
583+
u64 pad[128 / sizeof(u64)];
584+
#else
581585
// Require uptr, because siginfo_t is always pointer-size aligned on Linux.
582586
uptr pad[128 / sizeof(uptr)];
587+
#endif
583588
};
584589

585590
#if SANITIZER_LINUX

0 commit comments

Comments
 (0)