Skip to content

JIT: Assertion failed 'tree->gtVNPair.BothDefined() || tree->OperIs(GT_PHI_ARG)' during 'Do value numbering'  #81688

Closed

Description

@jakobbotsch
// Generated by Fuzzlyn v1.5 on 2023-02-05 18:35:15
// Run on X86 Windows
// Seed: 5123563567841620061
// Reduced from 103.5 KiB to 1.7 KiB in 00:02:17
// Hits JIT assert in Release:
// Assertion failed 'tree->gtVNPair.BothDefined() || tree->OperIs(GT_PHI_ARG)' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Do value numbering' (IL size 57; hash 0xade6b36b; FullOpts)
// 
//     File: D:\a\_work\1\s\src\coreclr\jit\valuenum.cpp Line: 11371
// 
public class Program
{
    public static ushort s_2;
    public static sbyte s_6;
    public static byte[] s_17;
    public static byte s_18;
    public static void Main()
    {
        CollectibleALC alc = new CollectibleALC();
        System.Reflection.Assembly asm = alc.LoadFromAssemblyPath(System.Reflection.Assembly.GetExecutingAssembly().Location);
        System.Reflection.MethodInfo mi = asm.GetType(typeof(Program).FullName).GetMethod(nameof(MainInner));
        System.Type runtimeTy = asm.GetType(typeof(Runtime).FullName);
        mi.Invoke(null, new object[]{System.Activator.CreateInstance(runtimeTy)});
    }

    public static void MainInner(IRuntime rt)
    {
        for (int vr4 = 0; vr4 < 0; vr4++)
        {
            byte vr5 = (byte)s_2;
            if (vr5 <= -1)
            {
                try
                {
                    sbyte vr8 = s_6;
                }
                finally
                {
                    vr5 = s_17[0];
                }
            }
            else
            {
                try
                {
                    s_18 = vr5;
                }
                finally
                {
                    M19();
                }
            }
        }
    }

    public static byte M19()
    {
        return default(byte);
    }
}

public interface IRuntime
{
    void WriteLine<T>(string site, T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(string site, T value) => System.Console.WriteLine(value);
}

public class CollectibleALC : System.Runtime.Loader.AssemblyLoadContext
{
    public CollectibleALC(): base(true)
    {
    }
}

Bisected to #79771, @SingleAccretion said they would take a look

Activity

  1. ghost added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Feb 6, 2023
  2. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Feb 6, 2023
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Feb 6, 2023
  4. added this to the 8.0.0 milestone on Feb 6, 2023
  5. SingleAccretion commented on Apr 20, 2023

    @SingleAccretion
    Contributor

    Fixed by #82329.

  6. removed their assignment
    on Apr 20, 2023
  7. ghost locked as resolved and limited conversation to collaborators on May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions