[cDAC] Loosen EHInfo test to account for possible optimization of finally clause into fault clause#125892
[cDAC] Loosen EHInfo test to account for possible optimization of finally clause into fault clause#125892rcj1 merged 2 commits intodotnet:mainfrom
finally clause into fault clause#125892Conversation
finally clause into fault clausefinally clause into fault clause
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
There was a problem hiding this comment.
Pull request overview
This PR loosens a cDAC dump-based integration test for ExecutionManager EH clause enumeration to accommodate a JIT optimization that can transform a try/finally into a try/fault (notably via Compiler::fgCloneFinally()), which can change the reported clause type.
Changes:
- Rename the test to reflect the updated expectation (
FinallyorFault). - Update the assertion to accept either
ExceptionClauseFlags.FinallyorExceptionClauseFlags.Fault. - Add an explanatory comment documenting why the test allows both outcomes.
noahfalk
left a comment
There was a problem hiding this comment.
I spent a while trying to figure out whether the spec or usage in SOS stated whether we expected the flag to represent the original clause or how the JIT lowered the clause. Nothing is specified but given its role in SOS disassembly viewer it seemed like the JIT lowering was a reasonable thing to report.
I'd suggest adding a comment in the data contract spec clarifying that these flags are set based on how the JIT lowered it and may not match the corresponding IL flag.
|
/ba-g comment only change |
1 similar comment
|
/ba-g comment only change |
No description provided.