Restrict GetILAddressMap HResult debug assertion to specific error codes in cDAC#124615
Restrict GetILAddressMap HResult debug assertion to specific error codes in cDAC#124615
Conversation
The DAC returns E_FAIL while the cDAC returns CORDBG_E_READVIRTUAL_FAILURE for GetILAddressMap failures. Use the same permissive pattern already used for GetILOffsetsByAddress: treat any two failure HResults (both negative) as equivalent. Co-authored-by: max-charlamb <44248479+max-charlamb@users.noreply.github.com>
|
@copilot, the change was not made |
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
…fsetsByAddress Co-authored-by: max-charlamb <44248479+max-charlamb@users.noreply.github.com>
The change was in the branch but wasn't showing in the PR due to a push sync issue. Re-pushed in |
|
@copilot we should verify that the error codes are CORDBG_E_READVIRTUAL_FAILURE or HResults.E_FAIL. We shouldn't accept any failing HResult. |
… E_FAIL Instead of accepting any failing HResult, verify that both error codes are specifically CORDBG_E_READVIRTUAL_FAILURE or E_FAIL. Co-authored-by: max-charlamb <44248479+max-charlamb@users.noreply.github.com>
Updated in |
There was a problem hiding this comment.
Pull request overview
This PR fixes a cDAC runtime-diagnostics pipeline failure caused by a debug assertion that was too strict when comparing HResults between the legacy DAC and cDAC implementations. The legacy DAC returns E_FAIL while cDAC returns CORDBG_E_READVIRTUAL_FAILURE for read failures in GetILAddressMap, causing the strict equality check to fail.
Changes:
- Updated
GetILAddressMapdebug assertion to accept specific known error codes (E_FAIL or CORDBG_E_READVIRTUAL_FAILURE) instead of requiring exact HResult equality - Added an
IsReadFailurehelper function to encapsulate the specific error code checking logic - Removed an extraneous blank line for consistency
|
Any reason not to modify the cDAC to match the DAC by wrapping the boundaries in a throw E_FAIL? |
I was potentially going to do this. We would want to E_FAIL if there is no DebugInfo for the particular method. It's a more invasive change but possible. I'd like to get my dump testing PR merged and then I can have a test for this particular situation. |
|
Closing in favor of #124783 |
Description
The cDAC runtime-diagnostics pipeline fails because the legacy DAC returns
E_FAIL(0x80004005) while the cDAC returnsCORDBG_E_READVIRTUAL_FAILURE(0x80131c49) forGetILAddressMapfailures. The strictDebug.Asserton HResult equality trips on this mismatch.Changed the assertion in
ClrDataMethodInstance.csto use a localIsReadFailurehelper that specifically accepts onlyHResults.E_FAILorCorDbgHResults.CORDBG_E_READVIRTUAL_FAILURE, rather than accepting any negative (failing) HResult. This ensures unexpected error codes are still caught while allowing the known DAC/cDAC mismatch.This fixes the
VarargPInvokeInteropMDinruntime-diagnostics.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.