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 'ssaNum != SsaConfig::RESERVED_SSA_NUM #57916

Closed
kunalspathak opened this issue Aug 23, 2021 · 5 comments
Closed

Assertion failed 'ssaNum != SsaConfig::RESERVED_SSA_NUM #57916

kunalspathak opened this issue Aug 23, 2021 · 5 comments
Assignees
Labels
arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-windows
Milestone

Comments

@kunalspathak
Copy link
Member

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// This file is auto-generated.
// Seed: -1
//
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
public class TestClass14445 {
    public struct S1 {
        public int int32_1;
    }
    public struct S2 {
        public short int16_2;
    }
    public struct S3 {
    }
    public struct S4 {
        public short int16_1;
    }
    public struct S5 {
        public S1 s1_1;
    }
    static bool s_boolean_0 = true;
    static char s_char_2 = 'F';
    static S1 s_s1_14 = new S1();
    static S2 s_s2_15 = new S2();
    static S3 s_s3_16 = new S3();
    static S5 s_s5_18 = new S5();
    static int s_loopInvariant = 1;
    public int LeafMethod6() {
        unchecked {
            return 15 + 4;
        }
    }
    [MethodImpl(MethodImplOptions.NoInlining)]
    public S3 LeafMethod16() {
        unchecked {
            return s_s3_16;
        }
    }
    public short Method1(S4 p_s4_0) {
        unchecked {
            switch (s_char_2) {
                case 'E':
                    break;
                case '5':
                    break;
                case 'A':
                    break;
                default:
                    try {
                        if (s_boolean_0 = s_boolean_0 = true) {
                        } else {
                            if (s_boolean_0) {
                            } else {
                                try {
                                    int int32_21 = 15 + 4;
                                } catch (ArgumentException) {
                                } catch (MulticastNotSupportedException) {
                                } finally {
                                }
                            }
                            try {
                                s_s5_18.s1_1.int32_1 >>= s_s1_14.int32_1 &= 4;
                            } catch (OutOfMemoryException) {
                            } catch (ExecutionEngineException) {
                            } finally {
                            }
                        }
                        {
                            int __loopvar2 = s_loopInvariant;
                            for (; ; )
                            {
                                if (__loopvar2 >= 15 + 4) {
                                    break;
                                }
                                try {
                                    LeafMethod6();
                                } finally {
                                    LeafMethod16();
                                }
                            }
                        }
                    } catch (MethodAccessException) {
                    } catch (TypeUnloadedException) {
                    } finally {
                    }
                    break;
            }
            return s_s2_15.int16_2 *= 15 + 4;
        }
    }
    public void Method0() {
        unchecked {
            S4 s4_3 = new S4();
            s4_3.int16_1 = Method1(s4_3);
            return;
        }
    }
    public static void Main(string[] args) {
        TestClass14445 objTestClass14445 = new TestClass14445();
        objTestClass14445.Method0();
    }
}
/*
Got output diff:
--------- Baseline ---------  

Environment:



--------- Test ---------  

Environment:



Assert failure(PID 36284 [0x00008dbc], Thread: 35368 [0x8a28]): Assertion failed 'ssaNum != SsaConfig::RESERVED_SSA_NUM' in 'TestClass14445:Method1(S4):short:this' during 'Do value numbering' (IL size 163)

    File: D:\git\runtime\src\coreclr\jit\compiler.h Line: 352
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x86.Checked\tests\Core_Root\CoreRun.exe


*/
@kunalspathak kunalspathak added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 23, 2021
@ghost
Copy link

ghost commented Aug 23, 2021

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

Issue Details
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// This file is auto-generated.
// Seed: -1
//
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
public class TestClass14445 {
    public struct S1 {
        public int int32_1;
    }
    public struct S2 {
        public short int16_2;
    }
    public struct S3 {
    }
    public struct S4 {
        public short int16_1;
    }
    public struct S5 {
        public S1 s1_1;
    }
    static bool s_boolean_0 = true;
    static char s_char_2 = 'F';
    static S1 s_s1_14 = new S1();
    static S2 s_s2_15 = new S2();
    static S3 s_s3_16 = new S3();
    static S5 s_s5_18 = new S5();
    static int s_loopInvariant = 1;
    public int LeafMethod6() {
        unchecked {
            return 15 + 4;
        }
    }
    [MethodImpl(MethodImplOptions.NoInlining)]
    public S3 LeafMethod16() {
        unchecked {
            return s_s3_16;
        }
    }
    public short Method1(S4 p_s4_0) {
        unchecked {
            switch (s_char_2) {
                case 'E':
                    break;
                case '5':
                    break;
                case 'A':
                    break;
                default:
                    try {
                        if (s_boolean_0 = s_boolean_0 = true) {
                        } else {
                            if (s_boolean_0) {
                            } else {
                                try {
                                    int int32_21 = 15 + 4;
                                } catch (ArgumentException) {
                                } catch (MulticastNotSupportedException) {
                                } finally {
                                }
                            }
                            try {
                                s_s5_18.s1_1.int32_1 >>= s_s1_14.int32_1 &= 4;
                            } catch (OutOfMemoryException) {
                            } catch (ExecutionEngineException) {
                            } finally {
                            }
                        }
                        {
                            int __loopvar2 = s_loopInvariant;
                            for (; ; )
                            {
                                if (__loopvar2 >= 15 + 4) {
                                    break;
                                }
                                try {
                                    LeafMethod6();
                                } finally {
                                    LeafMethod16();
                                }
                            }
                        }
                    } catch (MethodAccessException) {
                    } catch (TypeUnloadedException) {
                    } finally {
                    }
                    break;
            }
            return s_s2_15.int16_2 *= 15 + 4;
        }
    }
    public void Method0() {
        unchecked {
            S4 s4_3 = new S4();
            s4_3.int16_1 = Method1(s4_3);
            return;
        }
    }
    public static void Main(string[] args) {
        TestClass14445 objTestClass14445 = new TestClass14445();
        objTestClass14445.Method0();
    }
}
/*
Got output diff:
--------- Baseline ---------  

Environment:



--------- Test ---------  

Environment:



Assert failure(PID 36284 [0x00008dbc], Thread: 35368 [0x8a28]): Assertion failed 'ssaNum != SsaConfig::RESERVED_SSA_NUM' in 'TestClass14445:Method1(S4):short:this' during 'Do value numbering' (IL size 163)

    File: D:\git\runtime\src\coreclr\jit\compiler.h Line: 352
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x86.Checked\tests\Core_Root\CoreRun.exe


*/
Author: kunalspathak
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 23, 2021
@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

@kunalspathak
Copy link
Member Author

The repro is on windows/x86

@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 23, 2021
@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Aug 23, 2021
@jakobbotsch
Copy link
Member

Probably fixed by #57274?

@kunalspathak
Copy link
Member Author

Yep, it doesn't repro with latest main.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-windows
Projects
None yet
Development

No branches or pull requests

3 participants