Commit 6229f5f
authored
Redo ILVerfificaiton (#90418)
* Now checks all assemblies in the output directory rather than just `test.exe`
* Once again respects the the ability to skip verifying a single assembly via `[SkipIlVerify("foo.dll")]`
* Now loads core libraries from the output directory (if they exist) instead of from the runtime install dir.
* ALC logic was removed. I do not understand what value this provided.
* The class libraries lead to a lot of errors. Rather than having to filter out a large number of errors, I added diff'ing. ILVerify will check the input assembly and remove any errors that existed in the input assembly. This makes verifying class libraries viable. Without it, you'd have to use `[SkipIlverify]` on every core link test or filter out a lot of `VerifierError` values.
* Moved IL verification back to `InitialChecking` where `PeVerifier` was
* Add a test to verify that il verification is mostly working. It doesn't give complete coverage over every behavior, but it's better than nothing.
* `SkipPeVerify` renamed to `SkipIlVerify`
* `SkipPeVerifyForToolchian` was removed. There is only 1 tool now.
* Removed `PeVerifier`.
* Remove many [SkipIlVerify] attributes. Diffing means they are no longer needed
* `ValidateTypeRefsHaveValidAssemblyRefs` now runs regardless of whether or not the IL is verified. It wasn't clear to me why this logic would only be useful when il was verified.
* Change `UninitializedLocals` to use `ExpectIlFailure`. This test seems to expect invalid il. Might as well assert that rather than skip ilverify entirely.
* Remove the logic that disables ilverify when a test uses the unsafe argument. Diffing makes this obsolete.
* IL Verification errors have been greatly improved.
** will now output all IL errors in the failure message rather than just the first invalid IL.
** Type and Method names are now displayed in the error message. I didn't do an exhaustive implementation, SRM is so tedious to use, but it's better than not having it
** Tokens and Offsets are formatted nicely
* Extension points opened up for Unity.
** We need to supply different search directories.
** We need to search for `.winmd` files since we support windows runtime.
** In general I opened some things up in case we need to call them1 parent 5ef2a9b commit 6229f5f
File tree
60 files changed
+653
-314
lines changed- src
- coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner
- tools/illink/test
- ILLink.RoslynAnalyzer.Tests/generated/ILLink.RoslynAnalyzer.Tests.Generator/ILLink.RoslynAnalyzer.Tests.TestCaseGenerator
- Mono.Linker.Tests.Cases.Expectations/Assertions
- Mono.Linker.Tests.Cases
- Attributes.Debugger/KeepDebugMembers
- Attributes
- NoSecurity
- OnlyKeepUsed
- CoreLink
- DataFlow
- Inheritance.Interfaces/OnReferenceType/NoInstanceCtor
- References
- Resources
- Substitutions
- TestFramework
- Dependencies
- TypeForwarding
- UnreachableBlock
- Mono.Linker.Tests/TestCasesRunner
- ILVerification
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
60 files changed
+653
-314
lines changedLines changed: 0 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 48 | | |
65 | 49 | | |
66 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 8 | | |
15 | | - | |
| 9 | + | |
16 | 10 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 11 | + | |
22 | 12 | | |
23 | 13 | | |
24 | 14 | | |
25 | | - | |
| 15 | + | |
26 | 16 | | |
27 | 17 | | |
28 | 18 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| |||
0 commit comments