Skip to content

JIT: Assertion failed 'size != 0' during 'Generate code'  #78891

Closed
@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v1.5 on 2022-11-27 16:12:12
// Run on X64 Linux
// Seed: 1519985817266593815
// Reduced from 636.6 KiB to 0.7 KiB in 00:12:11
// Hits JIT assert in Release:
// Assertion failed 'size != 0' in 'Program:M59(S5,S5)' during 'Generate code' (IL size 67; hash 0xe3dadd47; FullOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/alloc.h Line: 173
// 
public class C0
{
    public long F1;
}

public struct S5
{
    public bool F1;
    public int F2;
    public C0 F4;
    public short F5;
    public ulong F6;
    public uint F7;
}

public class Program
{
    public static S5 s_48;
    public static void Main()
    {
        var vr2 = new S5();
        var vr3 = new S5();
        M59(vr2, vr3);
    }

    public static void M59(S5 arg0, S5 arg1)
    {
        try
        {
            arg0 = arg1;
            arg0 = arg1;
            short var3 = arg1.F5;
            System.Console.WriteLine(var3);
        }
        finally
        {
            if (s_48.F4.F1 > arg0.F7)
            {
                arg0.F1 |= false;
            }
        }
    }
}

Repros with altjit too, doesn't look to be a recent regression.

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions