Skip to content

Assertion failed 'HBtab->ebdTryBeg->HasFlag(BBF_DONT_REMOVE)' during 'Remove empty try-catch-fault 2/3 #110958

@kunalspathak

Description

@kunalspathak
// Found by Antigen
// Reduced from 17.57 KB to 2.06 KB.


using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;
using System.Runtime.Intrinsics.X86;
using System.Numerics;
public class TestClass
{
    long long_30 = 5;
    ulong ulong_36 = 0;
    SveMaskPattern SveMaskPattern_37 = SveMaskPattern.VectorCount1;
    private static List<string> toPrint = new List<string>();
    public void Method0()
    {
        unchecked
        {
            ulong ulong_77 = 2;
            SveMaskPattern SveMaskPattern_78 = SveMaskPattern_37;
            try
            {
                try
                {
                    ulong_36 -= ulong_77;
                }
                catch (System.FieldAccessException)
{}                catch (System.ExecutionEngineException)
                {
                }
            }
            catch (System.RankException)
            {
            }
            catch (System.MemberAccessException)
            {
                do
                {
                    try
                    {
                        switch ((15<<4)* long_30)
                        {
                            case -1:
                            {
                                break;
                            }
                            default:
                            {
                                break;
                            }
                        }
                    }
                    catch (System.InvalidProgramException)
                    {
                    }
                    catch (System.InvalidCastException)
                    {
                    }
                }
                while (15<4);
            }
            catch (System.AggregateException)
            {
            }
            finally
            {
            }
            return;
        }
    }
    public static void Main(string[] args)
    {
      Antigen();
    }
    public static int Antigen()
    {
        new TestClass().Method0();
        return string.Join(Environment.NewLine, toPrint).GetHashCode();
    }
}
/*
Environment:

set DOTNET_JitCFGUseDispatcher=1
set DOTNET_JitRandomEdgeCounts=1
set DOTNET_JitAlignLoops=0
set DOTNET_JitClassProfiling=0
set DOTNET_JitStressEvexEncoding=1
set DOTNET_TieredCompilation=0
set DOTNET_PreferredVectorBitWidth=512
set DOTNET_JitStress=2
set DOTNET_JitThrowOnAssertionFailure=1
set DOTNET_LegacyExceptionHandling=1

Debug: 467075166

Release: 0
JIT assert failed:
Assertion failed 'HBtab->ebdTryBeg->HasFlag(BBF_DONT_REMOVE)' in 'TestClass:Method0():this' during 'Remove empty try-catch-fault 2' (IL size 70; hash 0x46e9aa75; FullOpts)

    File: D:\a\_work\1\s\src\coreclr\jit\jiteh.cpp Line: 3236


*/

Might be related to #110954

Metadata

Metadata

Assignees

Labels

arch-x64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedos-windows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions