Skip to content

Fix two ExInfo offsets and add missing asserts for them#120307

Merged
janvorli merged 1 commit intodotnet:mainfrom
janvorli:fix-offsets-and-add-assert
Oct 3, 2025
Merged

Fix two ExInfo offsets and add missing asserts for them#120307
janvorli merged 1 commit intodotnet:mainfrom
janvorli:fix-offsets-and-add-assert

Conversation

@janvorli
Copy link
Member

@janvorli janvorli commented Oct 1, 2025

There was a missing assert in AsmOffsets.cs for the ExInfo::m_propagateExceptionCallback/Context and the offset was incorrect for 64 bit architectures.

This change fixes it.

There was a missing assert in AsmOffsets.cs for the
ExInfo::m_propagateExceptionCallback/Context and the offset was incorrect for 64 bit architectures.

This change fixes it.
@janvorli janvorli requested a review from jkotas October 1, 2025 20:52
@janvorli janvorli self-assigned this Oct 1, 2025
Copilot AI review requested due to automatic review settings October 1, 2025 20:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes assembly offset calculations for ExInfo structure fields on 64-bit architectures and adds missing compile-time assertions to verify the correctness of these offsets.

  • Updates offset values for m_pReversePInvokePropagationCallback and m_pReversePInvokePropagationContext fields to account for ARM64 vs other 64-bit architectures
  • Adds static assertions to validate that the calculated offsets match the actual structure layout at compile time

@janvorli
Copy link
Member Author

janvorli commented Oct 1, 2025

@jkotas this change is already part of the backport of the 2nd pass EH in native code to .NET 10, I've realized this was missing when manually backporting it. So this puts it to main too.

@janvorli janvorli merged commit 90fc213 into dotnet:main Oct 3, 2025
98 checks passed
@janvorli janvorli deleted the fix-offsets-and-add-assert branch October 3, 2025 18:54
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2025
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.

3 participants