Repository navigation
ILVerify error cleanup - #135798
ILVerify error cleanup#135798
Conversation
The existing verifier already covers most of the legacy diagnostics under newer error codes. I found one concrete gap: `unaligned.` currently ignores its alignment operand, so I’m adding that check and a regression test, while removing the obsolete commented-out entries. Closes #37393
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
There was a problem hiding this comment.
🟢 Approval recommended
The targeted validation and regression cases are straightforward; the remaining diagnostic-message feedback is non-blocking.
1 open finding
What changed in this PR
This PR closes an ILVerify validation gap by checking unaligned. operands and removing obsolete diagnostic comments.
Changes:
- Accept only alignment values 1, 2, and 4.
- Add valid-alignment coverage and an invalid-alignment regression case.
- Add the diagnostic code without renumbering existing codes.
Builds and tests were not run.
| File | Description |
|---|---|
| src/coreclr/tools/ILVerification/VerifierError.cs | Removes obsolete comments and adds UnalignedAlignment. |
| src/coreclr/tools/ILVerification/ILImporter.Verify.cs | Validates the alignment operand. |
| src/coreclr/tools/ILVerification.Tests/ILTests/PrefixTests.il | Covers valid values and rejects alignment 3. |
🧠 Review effort: Balanced
|
/ba-g opened #135843 on the test failure |
|
LGTM. It correctly restricts |
Resolve the conflict in VerifierError.cs with dotnet#135798, which removed the commented-out native verifier codes from the enum: keep main's enum and put this branch's doc comments back on each of its values. The other files merge without conflicts.
dotnet#135924 made IsByRefLike(StackValue) return true for ByRef-like types as well as ByRefs, so ArrayByRef, TailByRef and BoxByRef now cover ByRef-like types too; say so in their summaries. Document UnalignedAlignment, which dotnet#135798 added.

The existing verifier already covers most of the legacy diagnostics under newer error codes. I found one concrete gap:
unaligned.currently ignores its alignment operand, so I’m adding that check and a regression test, while removing the obsolete commented-out entries.Closes #37393