Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[clr-interp] Stackoverflow on x64 #121631

@rolfbjarne

Description

@rolfbjarne

Description

This happens in our test suite:

Stack overflow.
Repeated 7349 times:
--------------------------------
   at System.Runtime.InteropServices.DynamicInterfaceCastableHelpers.GetInterfaceImplementation(System.Runtime.InteropServices.IDynamicInterfaceCastable, System.RuntimeType)
--------------------------------
   at Xamarin.Tests.AvailabilityExtensions.IsAvailable(System.Collections.Generic.IEnumerable`1<System.ValueTuple`3<System.Runtime.Versioning.OSPlatformAttribute,Xamarin.Utils.ApplePlatform,System.Version>>, Xamarin.Tests.PlatformInfo, Xamarin.Utils.ApplePlatform)
   at Xamarin.Tests.AvailabilityExtensions.IsAvailable(System.Collections.Generic.IEnumerable`1<System.Runtime.Versioning.OSPlatformAttribute>, Xamarin.Tests.PlatformInfo)
   at Xamarin.Tests.AvailabilityExtensions.IsAvailable(System.Reflection.ICustomAttributeProvider, Xamarin.Tests.PlatformInfo)
   at Xamarin.Tests.AvailabilityExtensions.IsAvailableOnHostPlatform(System.Reflection.ICustomAttributeProvider)
   at Introspection.ApiBaseTest.SkipDueToAttribute(System.Reflection.MemberInfo)
   at Introspection.ApiCMAttachmentTest.Skip(System.Type)
[...]

Reproduction Steps

Needs Xcode 26.1.1 installed in /Applications/Xcode_26.1.1.app.

$ git clone --recursive https://github.com/dotnet/macios
$ cd macios
$ git checkout dev/rolf/net11.0-coreclr
$ git reset --hard 0129a5d735b6ff4947c354e7ffa6233c6fa4a2c9
$ ./configure --disable-all-platforms --enable-maccatalyst
$ make all -j8
$ make install -j8
$ make build run-bare TEST_VARIATION=coreclr RID=maccatalyst-x64 -C tests/introspection/dotnet/MacCatalyst

Expected behavior

Successful test execution.

Actual behavior

Stack overflow.
$ make build run-bare TEST_VARIATION=coreclr RID=maccatalyst-x64
Found ccache on the system, enabling it
Detected the macios-adr repository, automatically enabled the Xamarin build
2025-11-14 16:16:43.642 introspection[86919:4310425] Microsoft.MacCatalyst: Invalid IDE Port: -1
2025-11-14 16:16:47.496 introspection[86919:4309880] Queuing test loading on background thread
2025-11-14 16:16:47.503 introspection[86919:4310554] Loading tests on background thread
2025-11-14 16:16:47.580 introspection[86919:4310554] Loaded tests on background thread, queuing UI update on main thead
2025-11-14 16:16:47.907 introspection[86919:4309880] Updating UI on main thead
2025-11-14 16:16:48.089 introspection[86919:4309880] AutoRun ()
2025-11-14 16:16:48.089 introspection[86919:4309880] AutoRun (): queuing test run on main thread
2025-11-14 16:16:48.095 introspection[86919:4309880] AutoRun (): running tests on main thread
2025-11-14 16:16:48.129 introspection[86919:4309880] [Runner executing:	Run Everything]
2025-11-14 16:16:48.129 introspection[86919:4309880] [MonoTouch Version:	26.0.11017]
2025-11-14 16:16:48.130 introspection[86919:4309880] [Assembly:	Microsoft.MacCatalyst.dll (64 bits)]
2025-11-14 16:16:48.130 introspection[86919:4309880] [GC:	sgen]
2025-11-14 16:16:48.130 introspection[86919:4309880] [iPad:	iPadOS v18.7]
2025-11-14 16:16:48.130 introspection[86919:4309880] [Device Name:	iPad]
2025-11-14 16:16:48.131 introspection[86919:4309880] [Device UDID:	unknown]
2025-11-14 16:16:48.158 introspection[86919:4309880] [Device Locale:	en_US@rg=eszzzz]
2025-11-14 16:16:48.160 introspection[86919:4309880] [Device Date/Time:	11/14/2025 4:16:48 PM]
2025-11-14 16:16:48.161 introspection[86919:4309880] [Bundle:	com.xamarin.introspection]
2025-11-14 16:16:48.171 introspection[86919:4310580] introspection
2025-11-14 16:16:48.175 introspection[86919:4310580] Introspection
2025-11-14 16:16:48.175 introspection[86919:4310580] Introspection.ApiCMAttachmentTest
2025-11-14 16:16:48.298 introspection[86919:4310580] 	[PASS] CheckAttachments
Stack overflow.
Repeated 59038 times:
--------------------------------
   at System.Runtime.InteropServices.DynamicInterfaceCastableHelpers.GetInterfaceImplementation(System.Runtime.InteropServices.IDynamicInterfaceCastable, System.RuntimeType)
--------------------------------
   at Xamarin.Tests.AvailabilityExtensions.IsAvailable(System.Collections.Generic.IEnumerable`1<System.ValueTuple`3<System.Runtime.Versioning.OSPlatformAttribute,Xamarin.Utils.ApplePlatform,System.Version>>, Xamarin.Tests.PlatformInfo, Xamarin.Utils.ApplePlatform)
   at Xamarin.Tests.AvailabilityExtensions.IsAvailable(System.Collections.Generic.IEnumerable`1<System.Runtime.Versioning.OSPlatformAttribute>, Xamarin.Tests.PlatformInfo)
   at Xamarin.Tests.AvailabilityExtensions.IsAvailable(System.Reflection.ICustomAttributeProvider, Xamarin.Tests.PlatformInfo)
   at Xamarin.Tests.AvailabilityExtensions.IsAvailableOnHostPlatform(System.Reflection.ICustomAttributeProvider)
   at Introspection.ApiBaseTest.SkipDueToAttribute(System.Reflection.MemberInfo)
   at Introspection.ApiCMAttachmentTest.Skip(System.Type)
   at Introspection.ApiCMAttachmentTest.CheckFailAttachments()
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, Void**, System.Signature, Boolean)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(System.Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(System.Object, System.Reflection.BindingFlags)
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at System.Reflection.MethodBase.Invoke(System.Object, System.Object[])
   at NUnit.Framework.Internal.Reflect.InvokeMethod(System.Reflection.MethodInfo, System.Object, System.Object[])
   at NUnit.Framework.Internal.MethodWrapper.Invoke(System.Object, System.Object[])
   at NUnit.Framework.Internal.Commands.TestMethodCommand.InvokeTestMethod(NUnit.Framework.Internal.TestExecutionContext)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(NUnit.Framework.Internal.TestExecutionContext)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(NUnit.Framework.Internal.TestExecutionContext)
   at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork()
   at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
   at NUnit.Framework.Internal.Execution.WorkItem.Execute()
   at NUnit.Framework.Internal.Execution.MainThreadWorkItemDispatcher.Dispatch(NUnit.Framework.Internal.Execution.WorkItem)
   at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
   at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformWork()
   at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
   at NUnit.Framework.Internal.Execution.WorkItem.Execute()
   at NUnit.Framework.Internal.Execution.MainThreadWorkItemDispatcher.Dispatch(NUnit.Framework.Internal.Execution.WorkItem)
   at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
   at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformWork()
   at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
   at NUnit.Framework.Internal.Execution.WorkItem.Execute()
   at NUnit.Framework.Internal.Execution.MainThreadWorkItemDispatcher.Dispatch(NUnit.Framework.Internal.Execution.WorkItem)
   at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
   at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformWork()
   at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
   at NUnit.Framework.Internal.Execution.WorkItem.Execute()
   at NUnit.Framework.Internal.Execution.MainThreadWorkItemDispatcher.Dispatch(NUnit.Framework.Internal.Execution.WorkItem)
   at NUnit.Framework.Internal.Execution.MainThreadWorkItemDispatcher.Start(NUnit.Framework.Internal.Execution.WorkItem)
   at NUnit.Framework.Api.NUnitTestAssemblyRunner.StartRun(NUnit.Framework.Interfaces.ITestListener)
   at NUnit.Framework.Api.NUnitTestAssemblyRunner+<>c__DisplayClass38_0.<RunAsync>b__0()
   at NUnit.Framework.Api.NUnitTestAssemblyRunner.WrapInNUnitCallContext(System.Action)
   at NUnit.Framework.Api.NUnitTestAssemblyRunner.RunAsync(NUnit.Framework.Interfaces.ITestListener, NUnit.Framework.Interfaces.ITestFilter)
   at NUnit.Framework.Api.NUnitTestAssemblyRunner.Run(NUnit.Framework.Interfaces.ITestListener, NUnit.Framework.Interfaces.ITestFilter)
   at MonoTouch.NUnit.UI.BaseTouchRunner.Run(NUnit.Framework.Internal.Test)
   at MonoTouch.NUnit.UI.BaseTouchRunner.Run()
   at MonoTouch.NUnit.UI.BaseTouchRunner.<AutoRun>b__49_0()
   at MonoTouch.NUnit.UI.TouchRunner+<>c__DisplayClass19_0.<ExecuteOnMainThread>b__0()
   at Foundation.NSAsyncActionDispatcher.Apply()
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, Void**, System.Signature, Boolean)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(System.Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(System.Object, System.Reflection.BindingFlags)
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at ObjCRuntime.Runtime.InvokeMethod(System.Reflection.MethodBase, System.Object, IntPtr)
   at ObjCRuntime.Runtime.InvokeMethod(MonoObject*, MonoObject*, IntPtr)
   at ObjCRuntime.Runtime.bridge_runtime_invoke_method(MonoObject*, MonoObject*, IntPtr, IntPtr*)
   at UIKit.UIApplication.UIApplicationMain(Int32, System.String[], IntPtr, IntPtr)
   at UIKit.UIApplication.Main(System.String[], System.Type, System.Type)
   at MainClass.Main(System.String[])
make: *** [run-bare] Abort trap: 6

Regression?

No

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions