From 9c5ff6b248e7c81e5951f7a9e5f37e4d90df2234 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 3 Aug 2026 02:03:40 +1200 Subject: [PATCH] Mach exception thread: Fix msg alignment msg_in and msg_out were ending up with only 4-byte alignment, which is undefined behaviour, since they contain 64-bit fields. Probably doesn't cause any issues, but it showed up in ubsan. --- Source/Core/Core/MemTools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/MemTools.cpp b/Source/Core/Core/MemTools.cpp index f66aca2e0e..a7919fbef2 100644 --- a/Source/Core/Core/MemTools.cpp +++ b/Source/Core/Core/MemTools.cpp @@ -134,7 +134,7 @@ static void ExceptionThread(mach_port_t port) { Common::SetCurrentThreadName("Mach exception thread"); #pragma pack(4) - struct + struct alignas(8) { mach_msg_header_t Head; NDR_record_t NDR; @@ -147,7 +147,7 @@ static void ExceptionThread(mach_port_t port) mach_msg_trailer_t trailer; } msg_in; - struct + struct alignas(8) { mach_msg_header_t Head; NDR_record_t NDR;