From df442c63f038b4ac67fe25e1973666d309e1d213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 11 Mar 2024 06:50:35 +0100 Subject: [PATCH] Guard against non-sensical ReadyToRunGenericHelperNode --- .../Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs index 10e5d8d162e7b4..cb54964bcb05b8 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs @@ -39,6 +39,9 @@ public bool HandlesInvalidEntries(NodeFactory factory) public ReadyToRunGenericHelperNode(NodeFactory factory, ReadyToRunHelperId helperId, object target, TypeSystemEntity dictionaryOwner) { + Debug.Assert( + (dictionaryOwner is TypeDesc type && type.HasInstantiation) + || (dictionaryOwner is MethodDesc method && method.HasInstantiation)); _id = helperId; _dictionaryOwner = dictionaryOwner; _target = target;