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

[cdac] Remove GetMethodDescData fallback to legacy DAC #110702

Merged

Conversation

elinor-fung
Copy link
Member

After #110322 goes in, the cDAC GetMethodDescData implementation should be done, so we can stop delegating to the legacy DAC as a fallback.

Contributes to #109426.

Copy link
Contributor

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

@max-charlamb
Copy link
Contributor

Do you think it would be beneficial to verify that the HResult is the same for cDAC/DAC in debug builds? Previously this didn't matter as if the cDAC returned !OK, we would just return the fallback. It may be hard to identify scenarios where the cDAC fails but the DAC does not.

Instead of immediately returning on failure, we could call the fallback and assert the same result code, then return the cDAC result.

@elinor-fung
Copy link
Member Author

I think that makes sense for the error cases that aren't just basic input checks. I'll switch the various debug-only checks we have against for cDAC/DAC match to compare the HRESULTs if cDAC throws/catches an exception.

@@ -264,7 +264,7 @@ public TypeHandle GetTypeHandle(TargetPointer typeHandlePointer)

if ((addressLowBits != TypeHandleBits.MethodTable) && (addressLowBits != TypeHandleBits.TypeDesc))
{
throw new InvalidOperationException("Invalid type handle pointer");
throw new ArgumentException("Invalid type handle pointer", nameof(typeHandlePointer));
Copy link
Member Author

Choose a reason for hiding this comment

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

Switched these to match the HRESULT returned by the DAC. Found via @max-charlamb's suggestion in #110702 (comment)

@elinor-fung elinor-fung merged commit d108be1 into dotnet:main Dec 16, 2024
147 checks passed
@elinor-fung elinor-fung deleted the cdac-getMethodDescData-noFallback branch December 16, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants