Skip to content

Commit 1cbcd05

Browse files
trop[bot]MarshallOfSound
authored andcommitted
fix: correct crash reporter for Windows on Arm (electron#17793)
ARM64 cleans up and moves around RUNTIME_FUNCTION structure fields. With this patch applied, electron should build cleanly for Windows on Arm.
1 parent 40c7e76 commit 1cbcd05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

atom/common/crash_reporter/crash_reporter_win.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,13 @@ bool RegisterNonABICompliantCodeRange(void* start, size_t size_in_bytes) {
9393

9494
// All addresses are 32bit relative offsets to start.
9595
record->runtime_function.BeginAddress = 0;
96+
#if defined(_M_ARM64)
97+
record->runtime_function.FunctionLength =
98+
base::checked_cast<DWORD>(size_in_bytes);
99+
#else
96100
record->runtime_function.EndAddress =
97101
base::checked_cast<DWORD>(size_in_bytes);
102+
#endif
98103
record->runtime_function.UnwindData =
99104
offsetof(ExceptionHandlerRecord, unwind_info);
100105

0 commit comments

Comments
 (0)