dotnet / dotnet/runtime

cDAC + SOS validation behavior

Open
#124,829 1 comment 1 reaction 0 assignees View on GitHub
area-Diagnostics-cdac enhancement
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Currently SOS + DAC has built-in logic to validate various runtime datastructures at different points in the analysis. When these validations fail often SOS will bluntly report that a given pointer isn't a valid XYZ type. Developers using SOS don't get much control over this and we see various problems:

- When a dev is intentionally trying to investigate a datastructure that has been corrupted SOS might block them from seeing any info about it because the validation check eagerly reports failure.
- Other times invalid state goes unnoticed until deeper into some analysis at which point SOS isn't prepared for it and it fails in unhelpful ways

I don't expect there is any one best scheme for validating EE data types. Instead we should explore what we can do to add a bit more flexibility and consider if default behavior should be changed. As a concrete example all the DumpXYZ commands should probably have an option to do best-effort data display with warnings about bad data rather than displaying an error only.

See the discussion in https://github.com/dotnet/runtime/pull/124780 for more history on this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.