diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2019-01-07 19:21:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-07 19:21:40 +0100 |
commit | b3d8246ed6618dd5b291acc9347b07c0ed3a27da (patch) | |
tree | 80c6aa586fec7967ec0d80ae443b45d283b84bd8 /tests | |
parent | 364ea875bbfb9065b15b1496e710c1baca03c1e8 (diff) | |
download | coreclr-b3d8246ed6618dd5b291acc9347b07c0ed3a27da.tar.gz coreclr-b3d8246ed6618dd5b291acc9347b07c0ed3a27da.tar.bz2 coreclr-b3d8246ed6618dd5b291acc9347b07c0ed3a27da.zip |
Remove invalid test b21296 (#21507)
This test was doing in-place modification of a managed string using
unsafe code which breaks string interning.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/b21296.csproj | 40 | ||||
-rw-r--r-- | tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/ptr.cs | 162 |
2 files changed, 0 insertions, 202 deletions
diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/b21296.csproj b/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/b21296.csproj deleted file mode 100644 index c7160bfc74..0000000000 --- a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/b21296.csproj +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <AssemblyName>$(MSBuildProjectName)</AssemblyName> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> - <OutputType>Exe</OutputType> - <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> - <CLRTestPriority>1</CLRTestPriority> - </PropertyGroup> - <!-- Default configurations to help VS understand the configurations --> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup> - <ItemGroup> - <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> - <Visible>False</Visible> - </CodeAnalysisDependentAssemblyPaths> - </ItemGroup> - <PropertyGroup> - <!-- Set to 'Full' if the Debug? column is marked in the spreadsheet. Leave blank otherwise. --> - <DebugType>PdbOnly</DebugType> - <NoLogo>True</NoLogo> - <NoStandardLib>True</NoStandardLib> - <Noconfig>True</Noconfig> - <AllowUnsafeBlocks>True</AllowUnsafeBlocks> - <DefineConstants>$(DefineConstants);CORECLR</DefineConstants> - </PropertyGroup> - <ItemGroup> - <Compile Include="ptr.cs" /> - </ItemGroup> - <ItemGroup> - <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> - </ItemGroup> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> - <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup> -</Project>
\ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/ptr.cs b/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/ptr.cs deleted file mode 100644 index 46310d7a08..0000000000 --- a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b21296/ptr.cs +++ /dev/null @@ -1,162 +0,0 @@ -// 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; - -internal class CTest -{ - private static volatile int s_sx = 0; - - private static unsafe void wstrcpy(char* dmem, char* smem, int charCount) - { - if (charCount > 0) - { - if ((((int)dmem ^ (int)smem) & 3) == 0) - { - while (((int)dmem & 3) != 0 && charCount > 0) - { - dmem[0] = smem[0]; - dmem += 1; - smem += 1; - charCount -= 1; - } - if (charCount >= 8) - { - charCount -= 8; - do - { - ((uint*)dmem)[0] = ((uint*)smem)[0]; - ((uint*)dmem)[1] = ((uint*)smem)[1]; - ((uint*)dmem)[2] = ((uint*)smem)[2]; - ((uint*)dmem)[3] = ((uint*)smem)[3]; - dmem += 8; - smem += 8; - charCount -= 8; - } while (charCount >= 0); - } - if ((charCount & 4) != 0) - { - ((uint*)dmem)[0] = ((uint*)smem)[0]; - ((uint*)dmem)[1] = ((uint*)smem)[1]; - dmem += 4; - smem += 4; - } - if ((charCount & 2) != 0) - { - ((uint*)dmem)[0] = ((uint*)smem)[0]; - dmem += 2; - smem += 2; - } - } - else - { - if (charCount >= 8) - { - charCount -= 8; - do - { - dmem[0] = smem[0]; - dmem[1] = smem[1]; - dmem[2] = smem[2]; - dmem[3] = smem[3]; - dmem[4] = smem[4]; - dmem[5] = smem[5]; - dmem[6] = smem[6]; - dmem[7] = smem[7]; - dmem += 8; - smem += 8; - charCount -= 8; - } - while (charCount >= 0); - } - if ((charCount & 4) != 0) - { - dmem[0] = smem[0]; - dmem[1] = smem[1]; - dmem[2] = smem[2]; - dmem[3] = smem[3]; - dmem += 4; - smem += 4; - } - if ((charCount & 2) != 0) - { - dmem[0] = smem[0]; - dmem[1] = smem[1]; - dmem += 2; - smem += 2; - } - } - - if ((charCount & 1) != 0) - { - dmem[0] = smem[0]; - } - } - } - - public static unsafe String CtorCharPtr(IntPtr p) - { - char* ptr = (char*)p; - if (ptr >= (char*)64000) - { - try - { - char* end = ptr; - - - while (((uint)end & 3) != 0 && *end != 0) - end++; - if (*end != 0) - { - while ((end[0] & end[1]) != 0 || (end[0] != 0 && end[1] != 0)) - { - end += 2; - } - } - for (; *end != 0; end++) - ; - - int count = (int)(end - ptr); - String result = "abcdef"; - fixed (char* dest = result) - wstrcpy(dest, ptr, count); - - for (int j = 0; j < 2000; j++) - { - if ((j & 5) != 0) - s_sx++; - else if ((j & 10) == 8) - s_sx--; - - s_sx = (s_sx + j) / 541; - } - - return result; - } - catch (NullReferenceException) - { - throw new Exception(); - } - } - else if (ptr == null) - return ""; - else - throw new Exception(); - } - - private static unsafe String Test() - { - String s = "Hello!"; - fixed (char* p = s) - { - return CtorCharPtr((IntPtr)p); - } - } - - public static int Main() - { - System.Console.WriteLine(Test()); - return 100; - } -} |