diff options
author | Johan Lorensson <lateralusx.github@gmail.com> | 2018-03-16 03:02:06 +0300 |
---|---|---|
committer | Ludovic Henry <luhenry@microsoft.com> | 2018-03-16 03:02:06 +0300 |
commit | 395b37c28655a23043a676e60aa1d503b6c50521 (patch) | |
tree | 0e2ca739b9335467a89112d6a740c92e2183081b /msvc/libmonoruntime-common.targets.filters | |
parent | 5820d1fc668ccf41a1fb202a560d400eabf30621 (diff) |
Fix issue #7596 on Windows x64. (#7625)
* Fix error in vcxproj filter causing load error in Visual Studio.
* Fixes issue #7596 on Windows x64.
Passing value types in Windows x64 not fitting into register will be passed
by reference (ArgValuetypeAddrInIReg or ArgValuetypeAddrOnStack )
using a local variable allocated in caller’s frame.
Current implementation sized and marshaled the native struct correctly when
using pinvoke, but it sized the final local passed as reference to the native method
using the managed stack size instead of the native. This caused the final copy
into the local to overwrite other locals on stack if managed and native struct stack
sizes differed.
The fix is to flag the local variable used as stack parameter with its pinvoke state.
This makes sure the stack allocation size will be correct when using value types
passed on the stacks in pinvokes.
When running other unit tests with sequence points I hit a similar issue with
empty structs as return parameters (using [StructLayout (LayoutKind.Sequential, Size = 0)].
This commit includes a fix to ignore the return value if it’s an empty struct on Windows x64.
Diffstat (limited to 'msvc/libmonoruntime-common.targets.filters')
-rw-r--r-- | msvc/libmonoruntime-common.targets.filters | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/msvc/libmonoruntime-common.targets.filters b/msvc/libmonoruntime-common.targets.filters index 9d0f46fb827..f847b679247 100644 --- a/msvc/libmonoruntime-common.targets.filters +++ b/msvc/libmonoruntime-common.targets.filters @@ -127,9 +127,9 @@ <ClCompile Include="$(MonoSourceLocation)\mono\metadata\icall-table.c"> <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClCompile> - <ClCompile Include="$(MonoSourceLocation)\mono\metadata\icall-table.h"> - <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common</Filter> - </ClCompile> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\icall-table.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClInclude> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\icall-internals.h"> <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClInclude> |