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

JIT: Assertion failed 'HBtab->ebdTryBeg->HasFlag(BBF_DONT_REMOVE)' in during 'Remove empty try/catch/fault' #110954

Open
amanasifkhalid opened this issue Dec 26, 2024 · 1 comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs
Milestone

Comments

@amanasifkhalid
Copy link
Member

Failing in R2R legs of runtime-coreclr outerloop (example run). Antigen is also catching this (example run); here's a reduced repro on win-x64:

// Found by Antigen
// Reduced from 26.41 KB to 2.24 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
{
    static Vector<ulong> s_v_ulong_57 = Vector.Create((ulong)54);
    bool bool_66 = true;
    Vector<ulong> v_ulong_118 = Vector.Create((ulong)54);
    private static List<string> toPrint = new List<string>();
    public void Method0()
    {
        unchecked
        {
            try
            {
            }
            catch (System.ObjectDisposedException)
            {
            }
            finally
            {
                try
                {
                    Vector256.AsUInt64(Vector256<long>.Zero);
                }
                catch (System.MethodAccessException)
                {
                }
                catch (System.OutOfMemoryException)
                {
                    try
                    {
                    }
                    catch (System.TimeoutException)
                    {
                    }
                    catch (System.OverflowException)
                    {
                    }
                    finally
                    {
                        try
                        {
                            bool_66 = Vector.GreaterThanOrEqualAll(v_ulong_118 += s_v_ulong_57 - v_ulong_118+ v_ulong_118 ^ v_ulong_118^ v_ulong_118 + v_ulong_118, v_ulong_118 += s_v_ulong_57 - v_ulong_118+ v_ulong_118 ^ v_ulong_118^ v_ulong_118 + v_ulong_118);
                        }
                        catch (System.NullReferenceException)
                        {
                        }
                        catch (System.EntryPointNotFoundException)
                        {
                        }
                        finally
                        {
                        }
                    }
                }
                catch (System.RankException)
                {
                }
            }
            return;
        }
    }
    public static void Main(string[] args)
    {
    }
    public static int Antigen()
    {
        new TestClass().Method0();
        return string.Join(Environment.NewLine, toPrint).GetHashCode();
    }
}
/*
Environment:

set DOTNET_JitStressEvexEncoding=1
set DOTNET_JitClassProfiling=0
set DOTNET_TieredCompilation=0
set DOTNET_PreferredVectorBitWidth=512
set DOTNET_JitStressRegs=0
set DOTNET_JitThrowOnAssertionFailure=1
set DOTNET_LegacyExceptionHandling=1

Debug: 1538163399

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

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


*/

cc @dotnet/jit-contrib @AndyAyersMS

@amanasifkhalid amanasifkhalid added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs labels Dec 26, 2024
@amanasifkhalid amanasifkhalid added this to the 10.0.0 milestone Dec 26, 2024
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs
Projects
None yet
Development

No branches or pull requests

1 participant