From 22e93a0278ef82d01b3d372771a29d2d1e6312fd Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Wed, 1 Dec 2021 07:27:43 +0200 Subject: [PATCH] Fix remote unwinding on win-arm64 --- src/coreclr/pal/src/libunwind/libunwind-version.txt | 1 + src/coreclr/pal/src/libunwind/src/aarch64/Gglobal.c | 2 +- src/coreclr/pal/src/libunwind/src/riscv/Gglobal.c | 3 ++- src/coreclr/pal/src/libunwind/src/s390x/Gglobal.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/coreclr/pal/src/libunwind/libunwind-version.txt b/src/coreclr/pal/src/libunwind/libunwind-version.txt index 342ac3ecde6b5..bdb4658cda99b 100644 --- a/src/coreclr/pal/src/libunwind/libunwind-version.txt +++ b/src/coreclr/pal/src/libunwind/libunwind-version.txt @@ -4,3 +4,4 @@ https://github.com/libunwind/libunwind/commit/b3ca1b59a795a617877c01fe5d299ab7a0 Replace CMakeLists.txt, src/CMakeLists.txt, configure.cmake with .NET custom version Keep .NET oop directory Reapply changes from https://github.com/dotnet/runtime/commit/1b5719c2e3dde393531eaeb5b5cde05dabeef5b8 +Apply https://github.com/libunwind/libunwind/pull/317 diff --git a/src/coreclr/pal/src/libunwind/src/aarch64/Gglobal.c b/src/coreclr/pal/src/libunwind/src/aarch64/Gglobal.c index 2987f2aff3425..23bececa992cf 100644 --- a/src/coreclr/pal/src/libunwind/src/aarch64/Gglobal.c +++ b/src/coreclr/pal/src/libunwind/src/aarch64/Gglobal.c @@ -47,9 +47,9 @@ tdep_init (void) dwarf_init (); +#ifndef UNW_REMOTE_ONLY tdep_init_mem_validate (); -#ifndef UNW_REMOTE_ONLY aarch64_local_addr_space_init (); #endif atomic_store(&tdep_init_done, 1); /* signal that we're initialized... */ diff --git a/src/coreclr/pal/src/libunwind/src/riscv/Gglobal.c b/src/coreclr/pal/src/libunwind/src/riscv/Gglobal.c index 65f11b353685d..cb8009e1d2696 100644 --- a/src/coreclr/pal/src/libunwind/src/riscv/Gglobal.c +++ b/src/coreclr/pal/src/libunwind/src/riscv/Gglobal.c @@ -115,9 +115,10 @@ tdep_init (void) mi_init (); dwarf_init (); - tdep_init_mem_validate (); #ifndef UNW_REMOTE_ONLY + tdep_init_mem_validate (); + riscv_local_addr_space_init (); #endif atomic_store(&tdep_init_done, 1); /* signal that we're initialized... */ diff --git a/src/coreclr/pal/src/libunwind/src/s390x/Gglobal.c b/src/coreclr/pal/src/libunwind/src/s390x/Gglobal.c index be49c3f68227e..20544a57fa017 100644 --- a/src/coreclr/pal/src/libunwind/src/s390x/Gglobal.c +++ b/src/coreclr/pal/src/libunwind/src/s390x/Gglobal.c @@ -89,9 +89,9 @@ tdep_init (void) dwarf_init (); +#ifndef UNW_REMOTE_ONLY tdep_init_mem_validate (); -#ifndef UNW_REMOTE_ONLY s390x_local_addr_space_init (); #endif atomic_store(&tdep_init_done, 1); /* signal that we're initialized... */