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 '(tree->gtFlags & GTF_GLOB_REF) || ((obj != nullptr) && (obj->gtOper == GT_LCL_VAR))' during 'Morph - Structs/AddrExp' (IL size 36) #62815

Closed
kunalspathak opened this issue Dec 14, 2021 · 3 comments
Labels
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

Comments

@kunalspathak
Copy link
Member

While trying to play around with #60330, hit this assert

using System.Numerics;
using System.Runtime.CompilerServices;
using System.Threading;

class MainClass
{
    public static void Main(string[] args)
    {
        MainClass m = new MainClass();
        m.Foo();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private void Foo()
    {
        Vector3 val = new Vector3(0.0f, 0.0f, 0.0f);
        Bar(val, Vector3.Zero);
    }

    private bool Bar(Vector3 input, Vector3 input2)
    {
        return input.X == input2.Y;
    }
}
TestEnvironment:
COMPlus_TieredCompilation=0

Assert failure(PID 41684 [0x0000a2d4], Thread: 19924 [0x4dd4]): Assertion failed '(tree->gtFlags & GTF_GLOB_REF) || ((obj != nullptr) && (obj->gtOper == GT_LCL_VAR))' in 'MainClass:Foo():this' during 'Morph - Structs/AddrExp' (IL size 36)

    File: D:\git\runtime\src\coreclr\jit\morph.cpp Line: 16864
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\corerun.exe
@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 Dec 14, 2021
@ghost
Copy link

ghost commented Dec 14, 2021

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

Issue Details

While trying to play around with #60330, hit this assert

using System.Numerics;
using System.Runtime.CompilerServices;
using System.Threading;

class MainClass
{
    public static void Main(string[] args)
    {
        MainClass m = new MainClass();
        m.Foo();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private void Foo()
    {
        Vector3 val = new Vector3(0.0f, 0.0f, 0.0f);
        Bar(val, Vector3.Zero);
    }

    private bool Bar(Vector3 input, Vector3 input2)
    {
        return input.X == input2.Y;
    }
}
TestEnvironment:
COMPlus_TieredCompilation=0

Assert failure(PID 41684 [0x0000a2d4], Thread: 19924 [0x4dd4]): Assertion failed '(tree->gtFlags & GTF_GLOB_REF) || ((obj != nullptr) && (obj->gtOper == GT_LCL_VAR))' in 'MainClass:Foo():this' during 'Morph - Structs/AddrExp' (IL size 36)

    File: D:\git\runtime\src\coreclr\jit\morph.cpp Line: 16864
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\corerun.exe


<table>
  <tr>
    <th align="left">Author:</th>
    <td>kunalspathak</td>
  </tr>
  <tr>
    <th align="left">Assignees:</th>
    <td>-</td>
  </tr>
  <tr>
    <th align="left">Labels:</th>
    <td>

`area-CodeGen-coreclr`, `untriaged`

</td>
  </tr>
  <tr>
    <th align="left">Milestone:</th>
    <td>-</td>
  </tr>
</table>
</details>

@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

@SingleAccretion
Copy link
Contributor

I have checked, and #62883 did indeed fix the issue (the reproduction is no more, and it was caused by the forward substitution in the first place). As such, closing.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 19, 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 untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants