-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Generate diagnosable failfast in GVM resolution #78904
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
Conversation
If the program hits the conditions in dotnet#77070, generate a failfast message that makes it possible to create a workaround. Instead of: ``` Process terminated. Generic virtual method pointer lookup failure. Declaring type handle: MethodTable:0x00007FF66E8587B8 Target type handle: MethodTable:0x00007FF66E858810 Method name: Serialize Instantiation: Argument 00000000: MethodTable:0x00007FF66E85DA08 ``` Generate: ``` Process terminated. Generic virtual method pointer lookup failure. Declaring type handle: EETypeRva:0x005438B8(MemoryPackFormatter2`1[MemPackObject]) Target type handle: EETypeRva:0x00543910(MemoryPackableFormatter2`1[MemPackObject]) Method name: Serialize Instantiation: Argument 00000000: EETypeRva:0x00529B38(System.Buffers.ArrayBufferWriter`1[System.Byte]) ``` The workaround is then: ```xml <Directives> <Application> <Assembly Name="repro"> <Type Name="MemoryPackableFormatter2`1[[MemPackObject]]"> <Method Name="Serialize" Dynamic="Required All"> <GenericArgument Name="System.Buffers.ArrayBufferWriter`1[[System.Byte, mscorlib]],System.Memory" /> </Method> </Type> </Assembly> </Application> </Directives> ```
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsIf the program hits the conditions in #77070, generate a failfast message that makes it possible to create a workaround. Instead of:
Generate:
The workaround is then: <Directives>
<Application>
<Assembly Name="repro">
<Type Name="MemoryPackableFormatter2`1[[MemPackObject]]">
<Method Name="Serialize" Dynamic="Required All">
<GenericArgument Name="System.Buffers.ArrayBufferWriter`1[[System.Byte, mscorlib]],System.Memory" />
</Method>
</Type>
</Assembly>
</Application>
</Directives>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/backport to release 7.0 |
Started backporting to release: https://github.com/dotnet/runtime/actions/runs/3569164394 |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3569166116 |
@MichalStrehovsky an error occurred while backporting to release, please check the run log for details! Error: The specified backport target branch release wasn't found in the repo. |
LGTM. Looks like there's a little more info needed in the workaround than provided in the message, namely the assembly of the type argument. Is that right? |
Yep, that's correct. Is probably fixable. Ideally people shouldn't see these in the first place :/ |
If the program hits the conditions in #77070, generate a failfast message that makes it possible to create a workaround.
Instead of:
Generate:
The workaround is then:
Cc @dotnet/ilc-contrib expedited code review would be appreciated. I'd like service this into the January update.