Skip to content

[DAC] ClrDataAccess::StartEnumMethodInstancesByAddress return S_FALSE on failure #119021

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

max-charlamb
Copy link
Contributor

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.

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.

2 participants