Open ivanpovazan opened 2 years ago
@lambdageek should we try to fix this for .NET7?
Assigning to @LeVladIonescu related to current work
Current situation. Mono is reporting the following warnings for StdCallMemberFunctionTest
and CdeclMemberFunctionTest
tests:
Multiple calling conventions are not supported for UnmanagedCallersOnlyAttribute parameter CallConvs, specified for method GetWidthAsLong. Only the first calling convention will be taken into account
Multiple calling conventions are not supported for UnmanagedCallersOnlyAttribute parameter CallConvs, specified for method GetE. Only the first calling convention will be taken into account
Multiple calling conventions are not supported for UnmanagedCallersOnlyAttribute parameter CallConvs, specified for method GetHeightAsInt. Only the first calling convention will be taken into account
Multiple calling conventions are not supported for UnmanagedCallersOnlyAttribute parameter CallConvs, specified for method GetWidth. Only the first calling convention will be taken into account
Multiple calling conventions are not supported for UnmanagedCallersOnlyAttribute parameter CallConvs, specified for method GetSize. Only the first calling convention will be taken into account
This could be related to missing support for CallConvMemberFunction https://github.com/dotnet/runtime/issues/50440 as is listed in the PR description.
The ThisCallTest
is still failing with:
System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) ThisCallNative/SizeF ThisCallTest/<>c:<get_ManagedVtable>b__20_0 (ThisCallNative/C*,int)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(Delegate d)
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate[GetSizeFn](GetSizeFn d)
at ThisCallTest.get_ManagedVtable()
at ThisCallTest.Test8ByteHFAReverse()
at ThisCallTest.TestEntryPoint()
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual: 101
at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual, IEqualityComparer`1 comparer)
at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual)
at __GeneratedMainWrapper.Main()
Expected: 100
Actual: 101
END EXECUTION - FAILED
and PlatformDefaultMemberFunctionTest
is passing correctly.
@matouskozak I suggest we enable the tests that are now passing.
Enabled tests (https://github.com/dotnet/runtime/pull/96243):
Test to fix:
@matouskozak are you currently actively working on the fix for ThisCallTest
?
If not, I would suggest updating the issue description with the current state and add a disabled test label.
Summary
Runtime tests:
/JIT/Directed/callconv/PlatformDefaultMemberFunction/PlatformDefaultMemberFunctionTest/*
/JIT/Directed/callconv/CdeclMemberFunction/CdeclMemberFunctionTest/*
/JIT/Directed/callconv/StdCallMemberFunction/StdCallMemberFunctionTest/*
/JIT/Directed/callconv/ThisCall/ThisCallTest/*
are failing in FullAOT mode on Mono with nearly the same
Attempting to JIT compile method xxx while running in aot-only mode
.StdCallMemberFunctionTest
Output
Full output for
/JIT/Directed/callconv/StdCallMemberFunction/StdCallMemberFunctionTest/*
:Repro
1) Enable building the test with Mono AOT
2) Build Mono
3) Build the test
4) AOT compile the test
5) Run the test (note: adjust the paths)
Additional notes
Tests exclusion details should be updated to reference this tracking issue:Done.Possibly related to: https://github.com/dotnet/runtime/issues/50440
cc: @lambdageek @lateralusX