Skip to content

JIT: Assertion failed 'gtOper < GT_COUNT' during 'VN-based dead store removal'  #91839

@jakobbotsch

Description

@jakobbotsch

Seen in Fuzzlyn run https://dev.azure.com/dnceng-public/public/_build/results?buildId=398157&view=results.

// Generated by Fuzzlyn v1.6 on 2023-09-07 11:19:41
// Run on Arm64 MacOS
// Seed: 11985832646151267898
// Reduced from 30.2 KiB to 0.9 KiB in 00:00:24
// Hits JIT assert in Release:
// Assertion failed 'gtOper < GT_COUNT' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'VN-based dead store removal' (IL size 94; hash 0xade6b36b; FullOpts)
// 
//     File: /Users/runner/work/1/s/src/coreclr/jit/gentree.h Line: 1024
// 
using System.Runtime.CompilerServices;

public interface I0
{
}

public interface I2
{
}

public struct S0
{
    public ulong F0;
    public long F2;
    public short F3;
    public S0(long f2): this()
    {
        F2 = f2;
    }
}

public class C0 : I0
{
}

public struct S1
{
    public S0 F4;
    public bool F5;
    public S1(S0 f4): this()
    {
        F4 = f4;
    }
}

public class Program
{
    public static I0[] s_1;
    public static I2 s_5;
    public static void Main()
    {
        S1 vr2 = new S1(new S0(0));
        if (vr2.F5)
        {
            s_5 = s_5;
        }

        S1 vr3 = vr2;
        vr3.F4 = vr3.F4;
        for (int vr4 = 0; vr4 < 1; vr4++)
        {
            var vr5 = vr3.F4;
            M2(vr5);
        }

        System.Console.WriteLine(vr3.F4.F2);
    }

    public static void M2(S0 arg0)
    {
        s_1 = new I0[]{new C0()};
    }
}

Haven't been able to repro this with AltJit.

Metadata

Metadata

Labels

arch-arm64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIos-mac-os-xmacOS aka OSX

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions