[lsan] Fix stack buffer overwrite in SuspendedThreadsListMac::GetRegistersAndSP

The call to the thread_get_state syscall (that fetches the register values for a thread) on arm64 is mistakenly claiming that the buffer to receive the register state is larger that its actual size on the stack -- the struct on the stack is arm_thread_state64_t, but the MACHINE_THREAD_STATE + MACHINE_THREAD_STATE_COUNT refer to the "unified arm state" struct (which is larger).

Fixes https://github.com/llvm/llvm-project/issues/58503.

Differential Revision: https://reviews.llvm.org/D137292

GitOrigin-RevId: 32bada2edaf8a6ecb515925dda5e736783f5d8eb
1 file changed