-
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.
Use canonical method in TransitionFrames whenever we parse signatures (…
…#33733) * Canonicalize arguments before loading instantiation when dropGenericArgumentLevel is TRUE * Fix casing in COMPlus_GCStress env variable and remove COMPlus_gcServer Also changing a bunch of assert() calls to _ASSERTE. Usually when _ASSERTE fails in CI lab runs, we tend to get crash dumps associated with test results, unlike assert() which shows a GUI dialog that DHandler dismisses by clicking on the Abort button. * Remove gcstress switch. The test will run with gcstress as part of the gcstress lab runs
- Loading branch information
Showing
4 changed files
with
105 additions
and
16 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
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
75 changes: 75 additions & 0 deletions
75
src/coreclr/tests/src/GC/Regressions/Github/runtime_32848/runtime_32848.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,75 @@ | ||
// 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. | ||
|
||
using System; | ||
using System.Diagnostics; | ||
using System.Runtime.CompilerServices; | ||
|
||
public struct MyStruct<TRequest, TResponse> | ||
{ | ||
int _id; | ||
public MyStruct(int id) { _id = id; } | ||
public override string ToString() => this.GetType().ToString() + " = " + _id; | ||
} | ||
|
||
public struct GenStruct<T> { } | ||
|
||
public sealed class MyStructWrapper<TRequest, TResponse> | ||
{ | ||
public MyStruct<TRequest, TResponse> _field; | ||
|
||
public MyStructWrapper(MyStruct<TRequest, TResponse> value) | ||
{ | ||
_field = value; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public override string ToString() => _field.ToString(); | ||
} | ||
|
||
public abstract class BaseStructCreator | ||
{ | ||
public abstract MyStructWrapper<TRequest, TResponse> GetMyStructWrapper<TRequest, TResponse>() where TRequest : class; | ||
} | ||
|
||
public class StructCreator : BaseStructCreator | ||
{ | ||
public override MyStructWrapper<TRequest, TResponse> GetMyStructWrapper<TRequest, TResponse>() | ||
{ | ||
return new MyStructWrapper<TRequest, TResponse>(CreateCall<TRequest, TResponse>()); | ||
} | ||
protected virtual MyStruct<TRequest, TResponse> CreateCall<TRequest, TResponse>() where TRequest : class | ||
{ | ||
return new MyStruct<TRequest, TResponse>(123); | ||
} | ||
} | ||
|
||
class DerivedCreator : StructCreator | ||
{ | ||
protected override MyStruct<TRequest, TResponse> CreateCall<TRequest, TResponse>() | ||
{ | ||
return new MyStruct<TRequest, TResponse>(456); | ||
} | ||
} | ||
|
||
public class Test | ||
{ | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static string RunTest() | ||
{ | ||
var creator = new DerivedCreator(); | ||
var wrapper = creator.GetMyStructWrapper<Exception, GenStruct<string>>(); | ||
return wrapper.ToString(); | ||
} | ||
public static int Main() | ||
{ | ||
Console.WriteLine("Expected: MyStruct`2[System.Exception,GenStruct`1[System.String]] = 456"); | ||
|
||
string result = RunTest(); | ||
Console.WriteLine("Actual : " + result); | ||
|
||
string expected = "MyStruct`2[System.Exception,GenStruct`1[System.String]] = 456"; | ||
return result == expected ? 100 : -1; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/coreclr/tests/src/GC/Regressions/Github/runtime_32848/runtime_32848.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,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<CLRTestKind>BuildAndRun</CLRTestKind> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |