mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-03 20:24:14 +02:00
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.
This commit is contained in:
@@ -134,7 +134,7 @@ static void ExceptionThread(mach_port_t port)
|
|||||||
{
|
{
|
||||||
Common::SetCurrentThreadName("Mach exception thread");
|
Common::SetCurrentThreadName("Mach exception thread");
|
||||||
#pragma pack(4)
|
#pragma pack(4)
|
||||||
struct
|
struct alignas(8)
|
||||||
{
|
{
|
||||||
mach_msg_header_t Head;
|
mach_msg_header_t Head;
|
||||||
NDR_record_t NDR;
|
NDR_record_t NDR;
|
||||||
@@ -147,7 +147,7 @@ static void ExceptionThread(mach_port_t port)
|
|||||||
mach_msg_trailer_t trailer;
|
mach_msg_trailer_t trailer;
|
||||||
} msg_in;
|
} msg_in;
|
||||||
|
|
||||||
struct
|
struct alignas(8)
|
||||||
{
|
{
|
||||||
mach_msg_header_t Head;
|
mach_msg_header_t Head;
|
||||||
NDR_record_t NDR;
|
NDR_record_t NDR;
|
||||||
|
|||||||
Reference in New Issue
Block a user