mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
win: Fix 64-bit detection in ProcessInfo
The ProcessInfo initialization fails on ARM on Windows with 'ReadProcessData failed'. The 64-bit detection logic only checks whether it's on x64 and ignores ARM64. On ARM64, the ReadProcessData template should be instantiated with internal::Traits64 as it is on x64. Test: Run crashpad_tests on ARM, 'ReadProcessData failed' is gone Change-Id: I0f47d8601a39aaa1b8ba07d34d1f41b7739233e7 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1615024 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
d221b7cada
commit
949a022939
@ -513,8 +513,14 @@ bool ProcessInfo::Initialize(HANDLE process) {
|
||||
// distinguish between these two cases.
|
||||
SYSTEM_INFO system_info;
|
||||
GetSystemInfo(&system_info);
|
||||
is_64_bit_ =
|
||||
system_info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64;
|
||||
|
||||
#if defined(ARCH_CPU_X86_FAMILY)
|
||||
constexpr uint16_t kNative64BitArchitecture = PROCESSOR_ARCHITECTURE_AMD64;
|
||||
#elif defined(ARCH_CPU_ARM_FAMILY)
|
||||
constexpr uint16_t kNative64BitArchitecture = PROCESSOR_ARCHITECTURE_ARM64;
|
||||
#endif
|
||||
|
||||
is_64_bit_ = system_info.wProcessorArchitecture == kNative64BitArchitecture;
|
||||
}
|
||||
|
||||
#if defined(ARCH_CPU_32_BITS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user