-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Fix tailcall-to-loop improper locals zeroing (#81083)
The zeroing that the tailcall-to-loop optimization does was zeroing the promoted copies for implicit byrefs even when promotion of them was undone. This was introducing unexpected references to the promoted fields. Fix #81081
- Loading branch information
1 parent
1145e01
commit 9b76c28
Showing
3 changed files
with
82 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/tests/JIT/Regression/JitBlue/Runtime_81081/Runtime_81081.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
class Runtime_81081 | ||
{ | ||
static int Main() | ||
{ | ||
Test(1234, default); | ||
return 100; | ||
} | ||
|
||
static int Test(int count, S16 s) | ||
{ | ||
object o = "1234"; | ||
if (count == 0 || o.GetHashCode() == 1234) | ||
return 42; | ||
|
||
return Test(count - 1, s); | ||
} | ||
|
||
struct S16 | ||
{ | ||
public object A, B; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/tests/JIT/Regression/JitBlue/Runtime_81081/Runtime_81081.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
<CLRTestEnvironmentVariable Include="DOTNET_JitNoInline" Value="1" /> | ||
</ItemGroup> | ||
</Project> |