Skip to content

Conversation

max-charlamb
Copy link
Member

Fixed a portion of this in #115131, but caused a failure of getting a methodDesc to return S_OK instead of S_FALSE.

Clean up cDAC implementation.

@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 19:04
Copy link
Contributor

@Copilot 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 a bug in the DAC (Data Access Component) implementation where ClrDataAccess::StartEnumMethodInstancesByAddress was incorrectly returning S_OK instead of S_FALSE when failing to get a method descriptor. The fix ensures consistent error handling behavior across both the native DAC implementation and the managed cDAC implementation.

Key changes:

  • Fixed the native DAC implementation to return S_FALSE when GetCodeMethodDesc fails
  • Cleaned up redundant code in the managed cDAC implementation by consolidating initialization

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/debug/daccess/daccess.cpp Added missing S_FALSE assignment when GetCodeMethodDesc fails
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.IXCLRDataProcess.cs Removed redundant S_OK initialization and duplicate S_FALSE assignment

Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@max-charlamb max-charlamb merged commit 0eec0be into dotnet:main Aug 25, 2025
97 of 99 checks passed
@max-charlamb max-charlamb deleted the dac-bug branch August 25, 2025 14:03
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 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.

2 participants