public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libsanitizer: cherry-pick commit 05551c658269 from upstream
@ 2023-04-27  2:32 H.J. Lu
  2023-04-27  7:03 ` Martin Liška
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2023-04-27  2:32 UTC (permalink / raw)
  To: gcc-patches

cherry-pick:

05551c658269 [sanitizer] Correct alignment of x32 __sanitizer_siginfo

	* sanitizer_common/sanitizer_platform_limits_posix.h
	(__sanitizer_siginfo_pad): Use u64 to align x32
	__sanitizer_siginfo to 8 bytes.
---
 .../sanitizer_common/sanitizer_platform_limits_posix.h       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index cfca7bdedbe..e6f298c26e1 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -578,8 +578,13 @@ struct __sanitizer_sigset_t {
 #endif
 
 struct __sanitizer_siginfo_pad {
+#if SANITIZER_X32
+  // x32 siginfo_t is aligned to 8 bytes.
+  u64 pad[128 / sizeof(u64)];
+#else
   // Require uptr, because siginfo_t is always pointer-size aligned on Linux.
   uptr pad[128 / sizeof(uptr)];
+#endif
 };
 
 #if SANITIZER_LINUX
-- 
2.40.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-27 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27  2:32 [PATCH] libsanitizer: cherry-pick commit 05551c658269 from upstream H.J. Lu
2023-04-27  7:03 ` Martin Liška
2023-04-27 16:25   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).