winnt.h: fix ARM64 CONTEXT V register type

The fallback CONTEXT struct for ARM64 (used when __aarch64__ is defined
but _ARM64_CONTEXT_DECLARED is not set) incorrectly defined V[32] as
DWORD64 (64-bit) instead of ARM64_NT_NEON128 (128-bit).

This caused register corruption when RtlRestoreContext restores NEON/VFP
registers, as the struct size was 256 bytes instead of the correct
512 bytes.

Fixes potential corruption on toolchains that define __aarch64__ but not
_ARM64_ (e.g., clang on macOS or certain cross-compilation scenarios).
This commit is contained in:
Benjamin Oldenburg 2026-03-20 16:38:47 +07:00
parent da60605fd5
commit 4fb1e212c1

View File

@ -2079,7 +2079,7 @@ typedef DWORD LCID;
DWORD64 Lr;
DWORD64 Sp;
DWORD64 Pc;
DWORD64 V[32];
ARM64_NT_NEON128 V[32];
DWORD Fpcr;
DWORD Fpsr;
DWORD Bcr[8];