Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unix ARM floating point registers unwinding #58915

Merged
merged 3 commits into from
Sep 10, 2021

Conversation

janvorli
Copy link
Member

There are two problems unwinding ARM floating point registers. One is that the PAL_VirtualUnwind
is not supporting that and the second is that the libunwind we carry and use actually doesn't
have support for unwinding those.

This change updates the libunwind so that both exidx and dwarf ways of unwinding can unwind
these registers and also adds support to our PAL_VirtualUnwind to copy the callee saved
floating point registers D8..D15 between the native and windows style contexts.

I am planning to make a PR for the libunwind upstream, but given the very low amount of time
we have remaining for .NET 6 completion, I am making the change here first. Once I get them
upstream later, I'll update the whole libunwind from there.

Close #57040

There are two problems unwinding ARM floating point registers. One is that the PAL_VirtualUnwind
is not supporting that and the second is that the libunwind we carry and use actually doesn't
have support for unwinding those.

This change updates the libunwind so that both exidx and dwarf ways of unwinding can unwind
these registers and also adds support to our PAL_VirtualUnwind to copy the callee saved
floating point registers D8..D15 between the native and windows style contexts.

I am planning to make a PR for the libunwind upstream, but given the very low amount of time
we have remaining for .NET 6 completion, I am making the change here first. Once I get them
upstream later, I'll update the whole libunwind from there.
@janvorli janvorli added this to the 6.0.0 milestone Sep 10, 2021
@janvorli janvorli self-assigned this Sep 10, 2021
@janvorli janvorli force-pushed the fix-arm32-float-unwind branch from 74bf015 to 791bf92 Compare September 10, 2021 13:34
Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good for us. I wonder about the meaning of unw_get_save_loc and tdep_access_fpreg in the case where an S register is passed in as the register to examine, but in offline conversation I've been convinced the CoreCLR codebase doesn't do that.

@janvorli
Copy link
Member Author

Right. I might need to give it some little massage before pushing it upstream, but for our purposes, it is sufficient.

@janvorli janvorli merged commit 1b5719c into dotnet:main Sep 10, 2021
@janvorli janvorli deleted the fix-arm32-float-unwind branch September 10, 2021 19:27
@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix ARM32 floating point registers unwinding in PAL
2 participants