Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if(APPLE)
set(X86_64 x86_64 x86_64h)
endif()

if(WIN32)
set(ARM32 ${ARM32} armv7)
endif()

set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64} ${RISCV64}
${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X} ${SPARC} ${SPARCV9}
${HEXAGON} ${LOONGARCH64})
Expand Down
7 changes: 7 additions & 0 deletions compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,17 @@ void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) {
stack_frame.AddrStack.Offset = ctx.Rsp;
# endif
# else
# if SANITIZER_ARM
int machine_type = IMAGE_FILE_MACHINE_ARM;
stack_frame.AddrPC.Offset = ctx.Pc;
stack_frame.AddrFrame.Offset = ctx.R11;
stack_frame.AddrStack.Offset = ctx.Sp;
# else
int machine_type = IMAGE_FILE_MACHINE_I386;
stack_frame.AddrPC.Offset = ctx.Eip;
stack_frame.AddrFrame.Offset = ctx.Ebp;
stack_frame.AddrStack.Offset = ctx.Esp;
# endif
# endif
stack_frame.AddrPC.Mode = AddrModeFlat;
stack_frame.AddrFrame.Mode = AddrModeFlat;
Expand Down
5 changes: 5 additions & 0 deletions compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,13 @@ void SignalContext::InitPcSpBp() {
sp = (uptr)context_record->Rsp;
# endif
# else
# if SANITIZER_ARM
bp = (uptr)context_record->R11;
sp = (uptr)context_record->Sp;
# else
bp = (uptr)context_record->Ebp;
sp = (uptr)context_record->Esp;
# endif
# endif
}

Expand Down
Loading