@MichalStrehovsky I'm seeing odd Segmentation fault failures innativeaot.CustomMain andnativeaot.GenerateUnmanagedEntryPoints -- does that look familiar / is there any chance they're related to this PR (it does touch nativeaot's corelib)?
If you click through the test results, you'll find a link to how to download the crash dump for this (it'srunfo get-helix-payload -j 02391e98-2ed5-4279-97a4-f74c743cbe2c -w nativeaot.SmokeTests -o c:\hell). We're crashing on a stack overflow, the repeating part is: Exceptions.exe!S_P_CoreLib_System_ThrowHelper__ThrowArgumentNullException() Line 298Unknown Exceptions.exe!S_P_CoreLib_System_MemoryExtensions__IndexOfAny_7<Char>() Line 2102Unknown Exceptions.exe!S_P_CoreLib_System_MemoryExtensions__ContainsAny_7<Char>() Line 496Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_General_Helpers__EscapeTypeNameIdentifier() Line 115Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__get_Name() Line 197Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeNamedTypeInfo__get_FullName() Line 96Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__ToString() Line 147Unknown Exceptions.exe!S_P_CoreLib_System_Exception__AppendExceptionStackFrame() Line 141Unknown Exceptions.exe!S_P_CoreLib_System_Runtime_EH__AppendExceptionStackFrameViaClasslib() Line 270Unknown Exceptions.exe!S_P_CoreLib_System_Runtime_EH__UpdateStackTrace() Line 881Unknown Exceptions.exe!S_P_CoreLib_System_Runtime_EH__DispatchEx() Line 707Unknown Exceptions.exe!S_P_CoreLib_System_Runtime_EH__RhThrowEx() Line 641Unknown Exceptions.exe!RhpThrowEx() Line 190Unknown Exceptions.exe!S_P_CoreLib_System_ThrowHelper__ThrowArgumentNullException() Line 298Unknown
This by itself doesn't make much sense. The way we got into the repeating part is: Exceptions.exe!S_P_CoreLib_System_ThrowHelper__ThrowArgumentNullException() Line 298Unknown Exceptions.exe!S_P_CoreLib_System_MemoryExtensions__IndexOfAny_7<Char>() Line 2102Unknown Exceptions.exe!S_P_CoreLib_System_MemoryExtensions__ContainsAny_7<Char>() Line 496Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_General_Helpers__EscapeTypeNameIdentifier() Line 115Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__get_Name() Line 197Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeNamedTypeInfo__get_FullName() Line 96Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__ToString() Line 147Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeTypeInfo__EstablishDebugName() Line 739Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__GetRuntimeNamedTypeInfo() Line 80Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_General_TypeUnifier__GetNamedType_0() Line 57Unknown Exceptions.exe!S_P_CoreLib_Internal_Reflection_Core_Execution_ExecutionDomain__GetNamedTypeForHandle() Line 106Unknown Exceptions.exe!S_P_Reflection_Execution_Internal_Reflection_Execution_ReflectionExecutionDomainCallbacksImplementation__GetNamedTypeForHandle() Line 40Unknown Exceptions.exe!S_P_CoreLib_Internal_Reflection_Core_NonPortable_RuntimeTypeUnifier__GetRuntimeTypeBypassCache() Line 91Unknown Exceptions.exe!S_P_CoreLib_System_Type__GetTypeFromMethodTableSlow() Line 56Unknown Exceptions.exe!S_P_CoreLib_System_Type__GetTypeFromMethodTable() Line 41Unknown Exceptions.exe!S_P_CoreLib_System_Type__GetTypeFromHandle() Line 24Unknown Exceptions.exe!UInt32__CreateChecked<Char>() Line 630Unknown Exceptions.exe!S_P_CoreLib_System_Buffers_SearchValues__TryGetSingleRange<Char>() Line 194Unknown Exceptions.exe!S_P_CoreLib_System_Buffers_SearchValues__Create_0() Line 86Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_General_Helpers___cctor() Line 27Unknown Exceptions.exe!S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__EnsureClassConstructorRun() Line 88Unknown Exceptions.exe!S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__CheckStaticClassConstructionReturnGCStaticBase() Line 35Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_General_Helpers__EscapeTypeNameIdentifier() Line 115Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__get_Name() Line 197Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeNamedTypeInfo__get_FullName() Line 96Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__ToString() Line 147Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeTypeInfo__EstablishDebugName() Line 739Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__GetRuntimeNamedTypeInfo() Line 80Unknown Exceptions.exe!S_P_CoreLib_System_Reflection_Runtime_General_TypeUnifier__GetNamedType_0() Line 57Unknown Exceptions.exe!S_P_CoreLib_Internal_Reflection_Core_Execution_ExecutionDomain__GetNamedTypeForHandle() Line 106Unknown Exceptions.exe!S_P_Reflection_Execution_Internal_Reflection_Execution_ReflectionExecutionDomainCallbacksImplementation__GetNamedTypeForHandle() Line 40Unknown Exceptions.exe!S_P_CoreLib_Internal_Reflection_Core_NonPortable_RuntimeTypeUnifier__GetRuntimeTypeBypassCache() Line 91Unknown Exceptions.exe!S_P_CoreLib_System_Type__GetTypeFromMethodTableSlow() Line 56Unknown Exceptions.exe!S_P_CoreLib_System_Type__GetTypeFromMethodTable() Line 41Unknown Exceptions.exe!S_P_CoreLib_System_Type__GetTypeFromHandle() Line 24Unknown Exceptions.exe!S_P_CoreLib_System_Collections_Generic_Dictionary_2<System___Canon__System___Canon>___ctor_2() Line 65Unknown Exceptions.exe!S_P_CoreLib_System_Collections_Generic_Dictionary_2<System___Canon__System___Canon>___ctor_0() Line 42Unknown Exceptions.exe!S_P_CoreLib_System_AppContext__InitializeDataStore() Line 17Unknown Exceptions.exe!S_P_CoreLib_System_AppContext___cctor() Line 18Unknown
The problem is that this PR is introducing use of reflection into the implementation of reflection. That doesn't lead to anything good. |
Followup afterdotnet/roslyn-analyzers#6898,#91727