-
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.
- Loading branch information
1 parent
6708fd9
commit 010dec1
Showing
11 changed files
with
72 additions
and
3,450 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,34 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Reflection; | ||
|
||
class TlsStaticsAreNotSupported | ||
{ | ||
public static int Main() | ||
{ | ||
if (typeof(TlsStaticsAreNotSupported).Assembly.Location is "") | ||
{ | ||
Console.WriteLine("Skipping the test: Assembly.Location returned empty string, assuming dynamic loading is problematic"); | ||
return 100; | ||
} | ||
|
||
Exception exception = null; | ||
try | ||
{ | ||
Assembly.LoadFrom("data-tls.dll"); | ||
} | ||
catch (System.BadImageFormatException e) | ||
{ | ||
return 100; | ||
} | ||
catch (Exception e) | ||
{ | ||
exception = e; | ||
} | ||
|
||
Console.WriteLine($"Expected: BadImageFormatException, actual: {exception?.GetType().ToString() ?? "none"}"); | ||
return 101; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/tests/JIT/Directed/tls/TlsStaticsAreNotSupported.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,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DebugType>PdbOnly</DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="data-tls.ilproj" /> | ||
</ItemGroup> | ||
</Project> |
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,20 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
.assembly extern System.Runtime { auto } | ||
.assembly DataTls | ||
{ | ||
} | ||
|
||
.data tls FieldData = int32(51966) | ||
|
||
.class public ClassWithTlsStatic extends [System.Runtime]System.Object | ||
{ | ||
.field public static int32 TLSFieldData at FieldData | ||
.method public static int32 GetTlsStaticValue() | ||
{ | ||
ldsfld int32 ClassWithTlsStatic::TLSFieldData | ||
ldc.i4 100 | ||
ret | ||
} | ||
} |
6 changes: 2 additions & 4 deletions
6
.../CLR-x86-EJIT/v1-m10/b07847/b07847.ilproj → src/tests/JIT/Directed/tls/data-tls.ilproj
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.il
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/test-tls.il
This file was deleted.
Oops, something went wrong.