Skip to content

JIT: Bad codegen with runtime async #121552

Closed

Description

@jakobbotsch
// Generated by Fuzzlyn v3.3 on 2025-11-12 13:45:27
// Run on X64 Windows
// Seed: 9361297366916585528-async,runtimeasync,vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86pclmulqdqv256,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base
// Reduced from 39.8 KiB to 1.1 KiB in 00:01:42
// Release: Outputs 1
// Release with Runtime Async: Outputs 0
using System.Threading.Tasks;

public struct S0
{
    public byte F0;
    public sbyte F1;
    public short F2;
    public ushort F3;
    public uint F4;
    public bool F5;
    public ulong F6;
    public S0(ushort f3) : this()
    {
        F3 = f3;
    }
}

public class Program
{
    public static S0[][] s_2 = new S0[][]
    {
        new S0[]
        {
            new S0(1)
        }
    };
    public static void Main()
    {
        M2().GetAwaiter().GetResult();
    }

    public static async Task<uint[, ]> M2()
    {
        S0 var17 = s_2[0][0];
        var17.F3 *= var17.F3++;
        await Task.Yield();
        System.Console.WriteLine(var17.F0);
        System.Console.WriteLine(var17.F1);
        System.Console.WriteLine(var17.F2);
        System.Console.WriteLine(var17.F3);
        System.Console.WriteLine(var17.F4);
        System.Console.WriteLine(var17.F5);
        System.Console.WriteLine(var17.F6);
        return new uint[, ]
        {
            {
                0
            }
        };
    }
}

Activity

  1. added
    untriaged
    on Nov 12, 2025
  2. self-assigned this
    on Nov 12, 2025
  3. added
    needs-area-label
    on Nov 12, 2025
  4. added
    area-CodeGen-coreclr
    and removed
    untriaged
    needs-area-label
    on Nov 12, 2025
  5. added this to the 11.0.0 milestone on Nov 12, 2025
  6. dotnet-policy-service commented on Nov 12, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
    See info in area-owners.md if you want to be subscribed.

  7. locked and limited conversation to collaborators on Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrruntime-async

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions