From d10fe523a9e66b692991f4c459051a48ce227e4b Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Thu, 4 May 2017 20:55:26 -0700 Subject: [PATCH] Add new test for COMPlus_TailcallStress=1 bug, currently disabled (dotnet/coreclr#11410) Add new test for COMPlus_TailcallStress=1 bug, currently disabled Commit migrated from https://github.com/dotnet/coreclr/commit/4d12501d34d327d5cb7347f1b3af1c21f20a3c1c --- src/coreclr/tests/issues.targets | 3 ++ .../JitBlue/GitHub_11408/GitHub_11408.cs | 45 ++++++++++++++++++ .../JitBlue/GitHub_11408/GitHub_11408.csproj | 53 ++++++++++++++++++++++ src/coreclr/tests/testsFailingOutsideWindows.txt | 1 + 4 files changed, 102 insertions(+) create mode 100644 src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.cs create mode 100644 src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.csproj diff --git a/src/coreclr/tests/issues.targets b/src/coreclr/tests/issues.targets index a40c6ac..f947c3d 100644 --- a/src/coreclr/tests/issues.targets +++ b/src/coreclr/tests/issues.targets @@ -163,6 +163,9 @@ 2445 + + 11408 + 6707 diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.cs b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.cs new file mode 100644 index 0000000..715cd5f --- /dev/null +++ b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.cs @@ -0,0 +1,45 @@ +// 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.Runtime.CompilerServices; + +class GitHub_11408 +{ + const int Pass = 100; + const int Fail = -1; + + unsafe class Program + { + static int save = 7; + + static void foo(IntPtr x) + { + save = *(int*)x; + Console.WriteLine(*(int*)x); + } + + static void bar() + { + int x = 42; + foo((IntPtr)(&x)); + } + + public static int Main(string[] args) + { + bar(); + + if (save == 42) + { + Console.WriteLine("Pass"); + return Pass; + } + else + { + Console.WriteLine("Fail"); + return Fail; + } + } + } +} diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.csproj b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.csproj new file mode 100644 index 0000000..251856c --- /dev/null +++ b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + True + True + + + + + + + + + + + + + + + diff --git a/src/coreclr/tests/testsFailingOutsideWindows.txt b/src/coreclr/tests/testsFailingOutsideWindows.txt index f286b21..3b59343 100644 --- a/src/coreclr/tests/testsFailingOutsideWindows.txt +++ b/src/coreclr/tests/testsFailingOutsideWindows.txt @@ -57,6 +57,7 @@ JIT/Methodical/Boxing/xlang/_dbgsin_cs_il/_dbgsin_cs_il.sh JIT/Methodical/Boxing/xlang/_odbgsin_cs_il/_odbgsin_cs_il.sh JIT/Methodical/Boxing/xlang/_orelsin_cs_il/_orelsin_cs_il.sh JIT/Methodical/Boxing/xlang/_relsin_cs_il/_relsin_cs_il.sh +JIT/Regression/JitBlue/GitHub_11408/GitHub_11408/GitHub_11408.sh Interop/StructMarshalling/PInvoke/MarshalStructAsLayoutExp/MarshalStructAsLayoutExp.sh GC/LargeMemory/Allocation/finalizertest/finalizertest.sh GC/LargeMemory/API/gc/reregisterforfinalize/reregisterforfinalize.sh -- 2.7.4