Description
This is a placeholder for now for the open PR #115345. This PR changes invoke so that it always goes through the IL Emit path unlike previously where it will go through the interpreted (c++ runtime) path for the first call to each method. Thus there is likely an underlying bug that needs to be fixed to account for both cases.
Note that if the switch "Switch.System.Reflection.ForceInterpretedInvoke" is set, then the interpreted path is aways used. This is not the case for the failing test platforms.
Also, the test class has a namespace that starts with "System.Reflection" and that namespace is checked for in Mono to avoid reflection frames. See get_executing
and get_caller_no_reflection which may or may not be related.
The test output for the failing interpreter and Wasm tests look like this:
[22:01:08] info: [FAIL] System.Reflection.Tests.AssemblyTests.GetCallingAssemblyInCctor
[22:01:08] info: Assert.Equal() Failure: Values differ
[22:01:08] info: Expected: System.Reflection.Tests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
[22:01:08] info: Actual: xunit.execution.dotnet, Version=2.9.2.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c
[22:01:08] info: at System.Reflection.Tests.AssemblyTests.TestGetCallingAssemblyInCctor.Run()
[22:01:08] info: at System.Object.InvokeStub_AssemblyTests.GetCallingAssemblyInCctor(IntPtr , Object )
[22:01:08] info: at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Failing configurations:
net10.0-browser-Release-wasm-Mono_Release-WasmTestOnChrome-(Windows.Server2025.Amd64.Open)windows.server2025.a
net10.0-browser-Release-wasm-Mono_Release-WasmTestOnChrome-(Windows.Amd64.Server2022.Open)windows.amd64.serve
net10.0-linux-Debug-x64-Mono_Interpreter_Debug-Ubuntu.2204.Amd64.Open
net10.0-linux-Debug-x64-Mono_Interpreter_Debug-(Debian.13.Amd64.Open)[email protected]/do
net10.0-linux-Debug-x64-Mono_Interpreter_Debug-(Centos.10.Amd64.Open)[email protected]/d
net10.0-browser-Release-wasm-Mono_Release-WasmTestOnFirefox-(Ubuntu.2204.Amd64)[email protected]
net10.0-browser-Release-wasm-Mono_Release-WasmTestOnChrome-(Ubuntu.2204.Amd64)[email protected]
net10.0-browser-Release-wasm-Mono_Release-WasmTestOnChrome-(Ubuntu.2204.Amd64)[email protected]