Skip to content

JIT ARM32: Assertion failed 'size == EA_4BYTE' during 'Generate code' #60827

@jakobbotsch

Description

@jakobbotsch

Description

The following program hits a JIT assert when compiled with optimizations on.

Reproduction Steps

// Generated by Fuzzlyn v1.5 on 2021-10-24 15:05:24
// Run on Arm Linux
// Seed: 12233313255942773337
// Reduced from 205.3 KiB to 0.5 KiB in 00:03:57
// Hits JIT assert in Release:
// Assertion failed 'size == EA_4BYTE' in 'S0:M21():ushort:this' during 'Generate code' (IL size 20)
// 
//     File: /__w/1/s/src/coreclr/jit/emitarm.cpp Line: 2912
// 
public struct S0
{
    public bool F1;
    public ushort F2;
    public sbyte F3;
    public ushort M21()
    {
        var vr2 = Program.s_6;
        Program.M25(vr2, 0, this);
        return 1;
    }
}

public class Program
{
    public static S0 s_6;
    public static S0[][] s_90 = new S0[][]{new S0[]{new S0()}};
    public static void Main()
    {
        var vr6 = s_90[0][0].M21();
    }

    public static void M25(S0 argThis, ulong arg0, S0 arg1)
    {
        var vr5 = s_6.F1;
    }
}

Expected behavior

No assert hit.

Actual behavior

We hit the assert.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

cc @dotnet/jit-contrib

Metadata

Metadata

Assignees

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbugos-linuxLinux OS (any supported distro)

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions