Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Umbrella] Refresh IL verification #22872

Open
15 of 26 tasks
jcouv opened this issue Oct 26, 2017 · 6 comments
Open
15 of 26 tasks

[Umbrella] Refresh IL verification #22872

jcouv opened this issue Oct 26, 2017 · 6 comments

Comments

@jcouv
Copy link
Member

jcouv commented Oct 26, 2017

Recent versions of the C# compiler produce unverifiable code (by current spec). All new compiler tests that hit this just disable the verification step, but we'd like to reverse the trend.
Below is a rough plan how we can be back to verifying the compiler output.

Tagging @VSadov @gafter and folks who have been contributing to ILVerify (with our thanks): @ArztSamuel @gregkalapos @mmayr-at @discostu105

@jcouv
Copy link
Member Author

jcouv commented Oct 26, 2017

@VSadov posted a proposal for informal spec for ref return: dotnet/designs#17

@jcouv
Copy link
Member Author

jcouv commented Oct 27, 2017

@VSadov Note that ILVerify is currently only built for target framework netcoreapp2.0, but the compiler emit tests aren't yet built or run for this target. We'll either have to change ILVerify to also target net46, or we'll have to find a way for emit tests to target netcoreapp2.0...

@ArztSamuel
Copy link

ILVerify is now also targeting net46, since dotnet/corert#4862.

@VSadov
Copy link
Member

VSadov commented Nov 7, 2017

FYI: updated with the reference to another draft. Now for the "readonly references" rules.

dotnet/designs#21

@jcouv
Copy link
Member Author

jcouv commented Nov 16, 2017

I went through the C# emit tests and classified the observable differences in behavior between ILVerify and PEVerify. Also updated the OP notes.

I need to investigate some of them to confirm whether they are a Roslyn problem or an ILVerify problem (for instance, I suspect the one labelled "Mscorlib" may be a Roslyn issue). Also some issues are not high-priority (the one labelled "NoPIA").

The ones I'm pretty sure about: ILVerify doesn't support net modules (only supports assemblies), and it doesn't support TypedReference. I'll file bugs and then we can discuss which issues are more important.

@VSadov
Copy link
Member

VSadov commented Nov 17, 2017

I have tried to order remaining unimplemented error IDs from https://github.com/dotnet/corert/blob/master/src/ILVerify/src/VerifierError.cs

I do not have a lot of insight if some are easier to implement than others within existing infrastructure. I just looked at possibility to see particular violations as a result of some compiler bug.
In that sense some errors could be more "useful" than others.

I have listed "interesting" errors here: https://github.com/dotnet/corert/issues/4958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants