Open
Description
Brief Description
Two tests didn't seem to succeed even after I reverted the code I was working on. The function call did go through, but some data coming from C# was uninitialized in C++. C# context everything looked fine.
It seems there is a size difference between C# std.BasicString
(32 bytes) and C++ std::basic_string (40 bytes). These tests did not fail on the pull request #1887, hence I would conclude that Windows has some extra payload when compiling on debug.
How is Std.cs generated? With headers attached to Std module?
Is this just that CppSharp does not define _RELEASE
or _DEBUG
for clang, so the header is different from the binary?
OS: Windows
std::basic_string size on C++
std.BasicString on Std.cs on VTables.CSharp:
namespace BasicString
{
[StructLayout(LayoutKind.Sequential, Size = 32, Pack = 8)]
public unsafe partial struct __Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C
{
internal global::Std.CompressedPair.__Internalc__N_std_S__Compressed_pair____N_std_S_allocator__C___N_std_S__String_val____N_std_S__Simple_types__C_Vb1 _Mypair;
[SuppressUnmanagedCodeSecurity, DllImport("Std-symbols", EntryPoint = "??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ", CallingConvention = __CallingConvention.Cdecl)]
internal static extern __IntPtr ctorc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C(__IntPtr __instance);
[SuppressUnmanagedCodeSecurity, DllImport("Std-symbols", EntryPoint = "??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ", CallingConvention = __CallingConvention.Cdecl)]
internal static extern void dtorc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C(__IntPtr __instance);
}
}
Metadata
Metadata
Assignees
Labels
No labels