Skip to content

JIT: Exception thrown only with runtime async #119061

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v3.3 on 2025-08-24 19:06:54
// Run on X64 Windows
// Seed: 2029915296848588320-async,runtimeasync,vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base
// Reduced from 177.7 KiB to 1.1 KiB in 00:06:08
// Release: Runs successfully
// Release with Runtime Async: Throws 'System.OverflowException'
using System.Threading.Tasks;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

public struct S0
{
    public int F0;
    public S0(int f0) : this()
    {
        F0 = f0;
    }
}

public class C0
{
    public ushort F1;
}

public class C1
{
    public S0 F8;
}

public class Program
{
    public static C1 s_6 = new C1();
    public static void Main()
    {
        s_6.F8 = new S0(-1);
        var vr4 = s_6.F8.F0;
        Vector128<short> vr6 = default(Vector128<short>);
        M3(vr4, vr6).GetAwaiter().GetResult();
    }

    public static async Task<ushort> M3(int arg1, Vector128<short> arg2)
    {
        bool[] var0 = new bool[]
        {
            false
        };
        for (sbyte lvar1 = 10; lvar1 < 12; lvar1++)
        {
            if (var0[0])
            {
                var vr2 = (uint)(3329109910U / (-9223372036854775808L / (arg1 | 1)));
                var vr1 = (short)Lzcnt.LeadingZeroCount(vr2);
                arg2 = Vector128.CreateScalar(vr1);
            }
        }

        C0 vr8 = new C0();
        return vr8.F1;
    }
}

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions