Repository navigation
Commit aa8eb01
Generate diagnosable failfast in GVM resolution (#78936)
If the program hits the conditions in #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>
```
Co-authored-by: Michal Strehovský <[email protected]>1 parent a31811b commit aa8eb01
1 file changed
Lines changed: 6 additions & 6 deletions
File tree
- src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
620 | | - | |
| 619 | + | |
| 620 | + | |
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
| 625 | + | |
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| |||
0 commit comments