Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed 'divMod->OperGet() != GT_UMOD' during 'Lowering nodeinfo' #68136

Closed
jakobbotsch opened this issue Apr 17, 2022 · 3 comments
Closed
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@jakobbotsch
Copy link
Member

Description

The following program hits an assertion on arm64.

Reproduction Steps

// Generated by Fuzzlyn v1.5 on 2022-04-17 16:25:43
// Run on Arm64 Linux
// Seed: 10863771617286163364
// Reduced from 174.2 KiB to 0.5 KiB in 00:03:09
// Hits JIT assert in Release:
// Assertion failed 'divMod->OperGet() != GT_UMOD' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Lowering nodeinfo' (IL size 30; hash 0xade6b36b; FullOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/lower.cpp Line: 5500
// 
public class Program
{
    public static IRuntime s_rt;
    public static ulong s_1;
    public static void Main()
    {
        var vr1 = (uint)((int)M2(ref s_1, 0) % (long)1);
        M2(ref s_1, vr1);
    }

    public static byte M2(ref ulong arg0, uint arg1)
    {
        s_rt.WriteLine(arg0);
        return 0;
    }
}

public interface IRuntime
{
    void WriteLine<T>(T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(T value) => System.Console.WriteLine(value);
}

Expected behavior

No assertion hit.

Actual behavior

Assertion hit.

Regression?

Presumably from one of the recent modulo optimizations.

Known Workarounds

No response

Configuration

No response

Other information

cc @TIHan @dotnet/jit-contrib

@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Apr 17, 2022
@ghost
Copy link

ghost commented Apr 17, 2022

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

Issue Details

Description

The following program hits an assertion on arm64.

Reproduction Steps

// Generated by Fuzzlyn v1.5 on 2022-04-17 16:25:43
// Run on Arm64 Linux
// Seed: 10863771617286163364
// Reduced from 174.2 KiB to 0.5 KiB in 00:03:09
// Hits JIT assert in Release:
// Assertion failed 'divMod->OperGet() != GT_UMOD' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Lowering nodeinfo' (IL size 30; hash 0xade6b36b; FullOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/lower.cpp Line: 5500
// 
public class Program
{
    public static IRuntime s_rt;
    public static ulong s_1;
    public static void Main()
    {
        var vr1 = (uint)((int)M2(ref s_1, 0) % (long)1);
        M2(ref s_1, vr1);
    }

    public static byte M2(ref ulong arg0, uint arg1)
    {
        s_rt.WriteLine(arg0);
        return 0;
    }
}

public interface IRuntime
{
    void WriteLine<T>(T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(T value) => System.Console.WriteLine(value);
}

Expected behavior

No assertion hit.

Actual behavior

Assertion hit.

Regression?

Presumably from one of the recent modulo optimizations.

Known Workarounds

No response

Configuration

No response

Other information

cc @TIHan @dotnet/jit-contrib

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@TIHan
Copy link
Contributor

TIHan commented Apr 25, 2022

I cannot reproduce the assert in Windows arm64 - I'm going to assume that it is possible that it can only occur in linux?

@kunalspathak
Copy link
Member

You need to set the following environment variables to repro it. (I was able to repro it).

COMPlus_AltJit=Main
COMPlus_AltJitName=clrjit_universal_arm64_x64.dll
COMPlus_JitDisasm=Main
COMPlus_TieredCompilation=0

@TIHan TIHan mentioned this issue May 5, 2022
2 tasks
@TIHan TIHan closed this as completed Jun 11, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

No branches or pull requests

4 participants