Skip to content

Get ThreadContext for AVX registers - #104514

Merged
janvorli merged 10 commits into
dotnet:mainfrom
mikelle-rogers:dev/mirogers/string-interpolation
Jul 9, 2024
Merged

Get ThreadContext for AVX registers#104514
janvorli merged 10 commits into
dotnet:mainfrom
mikelle-rogers:dev/mirogers/string-interpolation

Conversation

@mikelle-rogers

@mikelle-rogers mikelle-rogers commented Jul 6, 2024

Copy link
Copy Markdown
Member

In MachExceptionInfo constructor, update the AVX registers using thread_get_state.
This fixes #78991.
We found that the null reference exception happened because we were not updating the upper half of the ymm register in the MachExceptionInfo. This caused only part of a structure to be copied from the ymm register to a new location. Instead of the second half of the structure in the new location, there were zeros.

@mikelle-rogers mikelle-rogers self-assigned this Jul 6, 2024
@ghost ghost added the area-ExceptionHandling-coreclr only use for closed issues label Jul 6, 2024
@mikelle-rogers
mikelle-rogers marked this pull request as ready for review July 6, 2024 20:46
@mikelle-rogers
mikelle-rogers requested review from a team and janvorli July 6, 2024 21:25
Comment thread src/coreclr/pal/src/thread/context.cpp Outdated
Comment thread src/coreclr/pal/src/exception/machexception.cpp Outdated
Comment thread src/coreclr/pal/src/exception/machexception.cpp
@mikelle-rogers
mikelle-rogers requested a review from jkotas July 9, 2024 00:31
@jkotas

jkotas commented Jul 9, 2024

Copy link
Copy Markdown
Member

The shape of the change looks good to me now. It will defer to @janvorli to signoff.

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@janvorli
janvorli merged commit 5b5d791 into dotnet:main Jul 9, 2024
matouskozak added a commit to matouskozak/runtime that referenced this pull request Jul 11, 2024
@janvorli

Copy link
Copy Markdown
Member

/azp backport to release/8.0-staging

@hoyosjs

hoyosjs commented Jul 12, 2024

Copy link
Copy Markdown
Member

/backport to release/8.0-staging

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/9912412663

@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ExceptionHandling-coreclr only use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullReferenceException when you use the short format of string.format $"{sample}" when debugging .NET 7 on x64 macOS

4 participants