-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Encode calling convention in mangled function pointer representation #81122
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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). Thanks Tomas
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,9 +290,9 @@ private string ComputeMangledTypeName(TypeDesc type) | |
| mangledName = GetMangledTypeName(((PointerType)type).ParameterType) + NestMangledName("Pointer"); | ||
| break; | ||
| case TypeFlags.FunctionPointer: | ||
| // TODO: need to also encode calling convention (or all modopts?) | ||
| // TODO: need to also encode modopts? | ||
| var fnPtrType = (FunctionPointerType)type; | ||
| mangledName = "__FnPtr" + EnterNameScopeSequence; | ||
| mangledName = "__FnPtr_" + ((int)fnPtrType.Signature.Flags).ToString("X2") + EnterNameScopeSequence; | ||
|
||
| mangledName += GetMangledTypeName(fnPtrType.Signature.ReturnType); | ||
|
|
||
| mangledName += EnterNameScopeSequence; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.