This repository was archived by the owner on Nov 1, 2020. It is now read-only.
[ILVerify] Fix leave from catch into enclosing try and assignability of readonly ByRefs - #5097
Merged
Merged
Conversation
jkotas
reviewed
Dec 12, 2017
|
|
||
| var value = (StackValue)obj; | ||
| return this.Kind == value.Kind && this.Flags == value.Flags && this.Type == value.Type; | ||
| return this.Kind == value.Kind && this.IsReadOnly == value.IsReadOnly && this.Type == value.Type; |
Member
There was a problem hiding this comment.
It may be better to inline the subset to compare into the calller.
I think that the right set of flags to compare will depend on who is calling it, and that there is no right subset to compare to make everybody happy.
Collaborator
Author
There was a problem hiding this comment.
I changed this to only check for the readonly flag, since PEVerify overloaded the == in the same way. I think it was implemented this way, because comparing the equality of two stack values by also considering flags like PermanentHome or ThisPtr is never actually used.
Anyway, I do agree that it would make more sense semantically to compare all flags in the equality operations and inline checks that require a subset.
Contributor
|
Thanks! 👍 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This fixes two bugs discovered in course of the prototyped Roslyn test integration:
@jcouv FYI: this should fix the
LeaveIntoTryandUnexpectedTypeOnStackflags of your prototype. I have also had a quick look over all other flags; many are related to ILVerify not supporting TypedReferences / ArgIterators, and there are also a lot of special cases which are not implemented by ILVerify yet. I will have to look up how PEVerify implements those first.For some of the other flags I have to actually debug the Roslyn tests, but I am still working on getting that to run.