Fix createdump on the alpine distro (#42565)
authorMike McLaughlin <mikem@microsoft.com>
Tue, 22 Sep 2020 16:36:48 +0000 (09:36 -0700)
committerGitHub <noreply@github.com>
Tue, 22 Sep 2020 16:36:48 +0000 (09:36 -0700)
commit436ddc2aded81547e8479c8ccf2fe6f36db1b82e
tree1dabc225212565ea9100d57171939e9f9d1ed310
parent5bd72926ed60d0f333a75651679a34ddbd7fec12
Fix createdump on the alpine distro (#42565)

The stack unwinding in createdump was looping forever on the same IP (different SP) when it
was attempting to unwind a frame that was in the ld module (typically libld*.so or on alpine
ld-musl-x86_64.so). The ld module on Alpine doesn't having any unwind info (GNU_EH_FRAME empty)
causing the libunwind code to loop on the same IP.

This was caused by a recent change in PR #42159 to createdump that included the ld in the
coredump. Createdump wouldn't attempt to unwind IPs in the ld module because it wasn't added
to the module lookup list.

Including the ld module is important to the windbg linux support so it will have to be revisited
in 6.0 by changing the remote unwinder to handle this case of the Alpine ld module.
src/coreclr/src/debug/createdump/crashinfounix.cpp