-
Notifications
You must be signed in to change notification settings - Fork 5k
[cDAC] Implement 'no-op' ISOSDacInterface methods #115207
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
Conversation
There was a problem hiding this 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 implements no-op versions of various ISOSDacInterface methods for CoreCLR by returning fixed error codes and adding debug assertions that compare legacy implementation results.
- Updated several interface methods to return constant error codes.
- Added #if DEBUG blocks with Debug.Assert calls to verify that the legacy implementation returns matching error codes in debug builds.
if (_legacyImpl is not null) | ||
{ | ||
int hrLocal = _legacyImpl.GetAppDomainConfigFile(appDomain, count, configFile, pNeeded); | ||
Debug.Assert(hrLocal == hr, $"cDAC: {hr:x}, DAC: {hrLocal:x}"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple no-op implementations repeat a similar debug assertion block for verifying legacy implementation results. Consider refactoring this common pattern into a helper method to reduce duplication and improve maintainability.
if (_legacyImpl is not null) | |
{ | |
int hrLocal = _legacyImpl.GetAppDomainConfigFile(appDomain, count, configFile, pNeeded); | |
Debug.Assert(hrLocal == hr, $"cDAC: {hr:x}, DAC: {hrLocal:x}"); | |
} | |
DebugAssertLegacyResult(_legacyImpl, legacy => legacy.GetAppDomainConfigFile(appDomain, count, configFile, pNeeded), hr); |
Copilot uses AI. Check for mistakes.
Tagging subscribers to this area: @tommcdon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run runtime-diagnostics |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g Test failures are unrelated to changes in this PR. Bypassing due to known issue with Build Analysis hanging. |
Quick pass going through methods which the DAC does not implement. I matched the error code returned by the DAC implementation.