Skip to content

Conversation

@manofstick
Copy link
Contributor

@manofstick manofstick commented Nov 4, 2016

This is a fix for #1689

seekReadMethodDefAsMethodDataUncached didn't honour the total parameter count of both the type object and the method object. If there was only one (i.e. generic parameters on either the method, or the class), then the correct result would have been achieved, but when both were specific it caused corruption of the resultant MethodData structure.

seekReadMethodDefAsMethodDataUncached didn't honour the total parameter
count of both the type object and the method object. If there was only
one, then the correct result would have been achieved, but when both
were specific it caused corruption of the resultant MethodData
structure.
and seekReadMethodDefAsMethodDataUncached ctxtH idx =
let ctxt = getHole ctxtH
let (_code_rva, _implflags, _flags, nameIdx, typeIdx, _paramIdx) = seekReadMethodRow ctxt idx
let nm = readStringHeap ctxt nameIdx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this code moved in position? I don't think it matters, but best to keep it as it was if the change isn't necessary for the fix

@dsyme
Copy link
Contributor

dsyme commented Nov 4, 2016

@manofstick This fix looks sound to me. It would be good to have a test case added. I presume you need a generic method in a generic interface where the method is called and/or impemented at exactly the generic type instantiation?

@KevinRansom KevinRansom merged commit 3fa60f9 into dotnet:master Nov 4, 2016
@KevinRansom
Copy link
Contributor

@manofstick Please send a new pr with a test case.

thanks for taking care of this.

Kevin

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants