diff options
| author | Mai <mathew1800@gmail.com> | 2022-06-12 03:44:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-12 03:44:18 -0400 |
| commit | f1993182f0f68df02fe977df2402f286d3aecad8 (patch) | |
| tree | 20f9acccba470853a06fd1252a67e2305111883a /Source | |
| parent | 05160d8d2ef5a9ca1b51e40e57e514941cb4e0d6 (diff) | |
| parent | 3e5f1a4f9941587bf6319d8d77e4508a7d4fd394 (diff) | |
Merge pull request #10744 from OatmealDome/ventura-exception
MemTools: Always provide a valid pointer in send_msg for mach_msg_overwrite
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/MemTools.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/Core/MemTools.cpp b/Source/Core/Core/MemTools.cpp index c9109bfd1f..0011fd3bce 100644 --- a/Source/Core/Core/MemTools.cpp +++ b/Source/Core/Core/MemTools.cpp @@ -157,7 +157,6 @@ static void ExceptionThread(mach_port_t port) #pragma pack() memset(&msg_in, 0xee, sizeof(msg_in)); memset(&msg_out, 0xee, sizeof(msg_out)); - mach_msg_header_t* send_msg = nullptr; mach_msg_size_t send_size = 0; mach_msg_option_t option = MACH_RCV_MSG; while (true) @@ -167,7 +166,7 @@ static void ExceptionThread(mach_port_t port) // thread_set_exception_ports, or MACH_NOTIFY_NO_SENDERS due to // mach_port_request_notification. CheckKR("mach_msg_overwrite", - mach_msg_overwrite(send_msg, option, send_size, sizeof(msg_in), port, + mach_msg_overwrite(&msg_out.Head, option, send_size, sizeof(msg_in), port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL, &msg_in.Head, 0)); if (msg_in.Head.msgh_id == MACH_NOTIFY_NO_SENDERS) @@ -216,7 +215,6 @@ static void ExceptionThread(mach_port_t port) msg_out.Head.msgh_size = offsetof(__typeof__(msg_out), new_state) + msg_out.new_stateCnt * sizeof(natural_t); - send_msg = &msg_out.Head; send_size = msg_out.Head.msgh_size; option |= MACH_SEND_MSG; } |
