Repository navigation
Fix missing ILVerify messages for LdftnCtor and TailStackEmpty - #135877
Merged
Merged
Conversation
For errors reported by the IL importer, Verifier looks up the message in Strings.resx by the VerifierError name and falls back to that name if the entry is missing or empty. LdftnCtor's entry was named LdftnConstructor, and TailStackEmpty had no entry, so both were reported with the bare error name. Rename the former and add the latter using its enum comment. Add a test that every error other than None has a non-empty entry.
|
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. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
jkotas
enabled auto-merge (squash)
October 15, 2026 18:45
This was referenced Oct 15, 2026
Closed
Member
|
/ba-g known failures that are being worked on |
Contributor
Author
|
Thank you for the review and merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: ILVerify reports
LdftnCtorandTailStackEmptywith the error name as the message. With theILVerifyCLI built frommain(relevant lines; paths shortened):For errors reported by the IL importer,
Verifierlooks up the message inStrings.resxby the error's name, and uses the name when the entry is missing or empty (Verifier.cs:394-401). The entry forLdftnCtoris namedLdftnConstructor, andTailStackEmptyhas no entry.Fix: rename the entry to
LdftnCtor, and add aTailStackEmptyentry with the text of its comment inVerifierError.cs, "Stack not empty after tail call." Renaming the entry rather than the enum member leaves the publicVerifierErrorunchanged, along with the CLI's--ignore-errorpatterns, which match error names. Nothing else in the repo referencesLdftnConstructor.Validation
New test:
VerificationResultTests.EveryErrorHasMessagechecks that everyVerifierErrorother thanNonehas a non-empty entry inStrings.resx. With the fix reverted, it fails, listingLdftnCtorandTailStackEmpty; every other error already has an entry.I understand this test may be considered low value for a resource fix, and I have no problem dropping it. I added it because I have seen tools built on PEVerify rely on the message text and break when it changes. The text is not part of the contract, and the test does not check wording; it catches a missing or empty entry, which silently turns a message into the bare error name, as happened here.
ILVerification.Tests, on
mainat 11ce222, with linux-x64 and SDK 11.0.100-rc.1.26420.103. Each row ran./dotnet.sh build src/coreclr/tools/ILVerification.Tests/ILVerification.Tests.csproj -c <config>, then./dotnet.sh teston the same project with--no-build:mainunchangedmainunchangedLdftnCtorandTailStackEmptyLdftnConstructoragainLdftnCtorTailStackEmptyentryTailStackEmptyILVerifyCLI, built from this branch, on the same two methods (relevant lines; paths shortened):Note
This PR was prepared with AI assistance (Anthropic Claude and OpenAI Codex), under my direction. I reviewed it before posting.