Skip to content

Fix verify#32917

Closed
jaredpar wants to merge 6 commits intodotnet:masterfrom
jaredpar:fix-verify
Closed

Fix verify#32917
jaredpar wants to merge 6 commits intodotnet:masterfrom
jaredpar:fix-verify

Conversation

@jaredpar
Copy link
Member

No description provided.

The `MissingTypeKindBasisTypes` test is copied from `UseSiteErrorTests`
and given verification succeeds there it's reasonable to expect that it
would succeed here. However there are a few factors here that aren't
obvious at a glance.

The first is that not all of the compilations in `UseSiteErrorTests` are
verifable. The `compilation1` is not verifiable in either suite, it's
hard to miss because it's not tested. The reason why is that the corlib
reference name is mincorlib, not mscorlib. PEVerify is hard coded to
think the name of corlib will always be mscorlib. Hence any attempt to
verify against a different name corlib will always fail.

Well ... almost always. It fails only when it's used in the IL. For
`compilation2` there is no direct reference to corlib, hence mincorlib
doesn't appear in the IL and it passes verification. With NRT though we
silently emit an attribute in the binary for nullable tracking and this
does reference corlib (the attribute derives from `System.Attribute`)
and hence verification fails.

Adjusted the suite to make this expected.

closes dotnet#30747
This changes our core compiler helpers to default verification off of
the target framework and references. This should remove some confusion
about verification in the test suites and make it more correct by
default.
@jaredpar jaredpar added Area-Compilers PR For Personal Review Only The PR doesn’t require anyone other than the developer to review it. labels Jan 29, 2019
@jaredpar jaredpar requested a review from a team as a code owner January 29, 2019 19:33
@jaredpar jaredpar closed this Mar 12, 2019
@jaredpar jaredpar deleted the fix-verify branch March 12, 2019 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers PR For Personal Review Only The PR doesn’t require anyone other than the developer to review it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant