Skip to content

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

Description

@jakobbotsch

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

Activity

  1. ghost added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Apr 17, 2022
  2. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Apr 17, 2022
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Apr 18, 2022
  4. added this to the 7.0.0 milestone on Apr 18, 2022
  5. TIHan commented on Apr 25, 2022

    @TIHan
    Contributor

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

  6. kunalspathak commented on Apr 26, 2022

    @kunalspathak
    Contributor

    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
    
  7. ghost locked as resolved and limited conversation to collaborators on Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions