Skip to content

Commit 5161ccd

Browse files
Guard against non-sensical ReadyToRunGenericHelperNode (#99513)
1 parent bbecf54 commit 5161ccd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public bool HandlesInvalidEntries(NodeFactory factory)
3939

4040
public ReadyToRunGenericHelperNode(NodeFactory factory, ReadyToRunHelperId helperId, object target, TypeSystemEntity dictionaryOwner)
4141
{
42+
Debug.Assert(
43+
(dictionaryOwner is TypeDesc type && type.HasInstantiation)
44+
|| (dictionaryOwner is MethodDesc method && method.HasInstantiation));
4245
_id = helperId;
4346
_dictionaryOwner = dictionaryOwner;
4447
_target = target;

0 commit comments

Comments
 (0)