This fixes the recently introduced issue #81106 tracking Crossgen2
crash due to not being able to distinguish two function pointers
differing only by calling convention (one of the pointers is Static
and the other is Static | UnmanagedCallingConvention).
This change also removes the issues.targets exclusion for the
new function pointer test that Fan Yang had to add to unblock
merging in the test in the first place.
Thanks
Tomas
* Delete superfluous comment per Michal's PR feedback
mangledName = GetMangledTypeName(((PointerType)type).ParameterType) + NestMangledName("Pointer");
break;
case TypeFlags.FunctionPointer:
- // TODO: need to also encode calling convention (or all modopts?)
var fnPtrType = (FunctionPointerType)type;
- mangledName = "__FnPtr" + EnterNameScopeSequence;
+ mangledName = "__FnPtr_" + ((int)fnPtrType.Signature.Flags).ToString("X2") + EnterNameScopeSequence;
mangledName += GetMangledTypeName(fnPtrType.Signature.ReturnType);
mangledName += EnterNameScopeSequence;
<ExcludeList Include="$(XunitTestBinBase)/JIT/opt/ObjectStackAllocation/ObjectStackAllocationTests/*">
<Issue>https://github.com/dotnet/runtime/issues/81103</Issue>
</ExcludeList>
- <ExcludeList Include = "$(XunitTestBinBase)/Loader/classloader/Casting/Functionpointer/**">
- <Issue>https://github.com/dotnet/runtime/issues/81106</Issue>
- </ExcludeList>
</ItemGroup>
<!-- Crossgen2 x86 specific excludes -->