-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
stdcall functions with values returned-by-pointer-arg have incorrectly decorated names #89307
Copy link
Copy link
Closed
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: Windows
Metadata
Metadata
Assignees
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: Windows
Type
Fields
Give feedbackNo fields configured for issues without a type.
Functions using the
stdcallcalling convention return values in one of three ways (wikipedia):EAXregisterEAXandEDXregistersIn the third case, the pointer is not considered to be part of the argument list size for the purposes of the
@sizename mangling suffix. For example:However, if we try to link to this function from Rust:
Then we get a linker error because the argument list size is incorrectly calculated as
4instead of0:Thanks to @kennykerr for the repro!