Skip to content

[cDAC] Fix issues found when running full SOS test suite #115432

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

Pipeline Changes

  • Changes runtime-diagnostics pipeline to build the cDAC in debug mode. This enforces the debug assertions during testing.

Fixes

  • [cDAC] Implement ISOSDacImpl.GetAssemblyList #114800 broke the ISOSDacInterface::GetModuleData because it enforced only sending flag values that were defined in the cDAC. Clients expected flag data that was not defined in the module flag enum, this PR adds all flags currently defined in the runtime.
  • ISOSDacInterface::GetFrameName only worked on Frame names implemented in the cDAC. This PR adds the rest of the Frames used in any version of the runtime to possible return values.
  • ISOSDacInterface::GetFrameName return value pNeeded returns a different number depending on if a return buffer is provided. If a return buffer is provided it returns the number of characters in the Frame name. If a return buffer is not provided it returns the number of characters in the Frame name + 1 (for a null terminator). This PR implements this behavior to match the DAC.
  • IXCLRDataModule::GetFlags had a bug where it switched on the wrong enum value (oops).
  • ISOSDacInterface::GetAssemblyList had a bug in its debug verification logic. The DAC implementation has a different behavior if the values array is null or not. This led to incorrect count values being returned.

@Copilot Copilot AI review requested due to automatic review settings May 9, 2025 19:13
@max-charlamb
Copy link
Contributor Author

/azp run dotnet-diagnostics

Copy link

No pipelines are associated with this pull request.

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 several issues encountered during full SOS test suite runs by properly handling flag values and frame names, as well as updating pipeline configurations for enforced debug builds.

  • Update of GetAssemblyList parameter to allow null values.
  • Correction of loop condition and flag check logic in GetAssemblyList and IXCLRDataModule.GetFlags.
  • Expanded enum definitions and pipeline configuration adjustments.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs Updated nullability for the values array, modified loop condition, and adjusted debug handling in GetAssemblyList and GetFrameName.
src/native/managed/cdac/mscordaccore_universal/Legacy/ISOSDacInterface.cs Updated the interface to accept a nullable values array in GetAssemblyList.
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataModule.cs Corrected the flag check from EditAndContinue to ReflectionEmit to accurately reflect module properties.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/FrameIterator.cs Added several frame type enum members to support additional frame types.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs Expanded and updated ModuleFlags_1 enum definitions and updated GetFlags accordingly.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs Updated ModuleFlags definition to match changes applied in Loader_1.cs.
eng/pipelines/runtime-diagnostics.yml Adjusted build arguments to force Debug mode and propagate configuration values.
Comments suppressed due to low confidence (1)

eng/pipelines/runtime-diagnostics.yml:44

  • [nitpick] Confirm that enforcing Debug configuration via '-c Debug' is intentional for all builds and does not conflict with other pipeline or project configuration defaults.
buildArgs: -s clr+libs+tools.cdac+host+packs -c Debug -rc $(_BuildConfig) -lc $(_BuildConfig)

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 Author

/azp run runtime-diagnostics

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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