Skip to content

Commit

Permalink
Merge pull request #97065 from carlossanlop/release/8.0-staging
Browse files Browse the repository at this point in the history
[Manual] Merge release/8.0-staging into release/8.0
  • Loading branch information
carlossanlop committed Jan 17, 2024
2 parents 074d301 + c2d2bb3 commit c93800e
Show file tree
Hide file tree
Showing 162 changed files with 5,665 additions and 4,150 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Expand Up @@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "8.0.0-prerelease.23407.2",
"version": "8.0.0-prerelease.24060.1",
"commands": [
"xharness"
]
Expand Down
1 change: 1 addition & 0 deletions NuGet.config
Expand Up @@ -9,6 +9,7 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<add key="darc-pub-dotnet-emsdk-2fc2ffd" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-2fc2ffd9/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-201f4da" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-201f4dae/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-201f4da-3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-201f4dae-3/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-201f4da-2" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-201f4dae-2/nuget/v3/index.json" />
Expand Down
44 changes: 35 additions & 9 deletions docs/design/coreclr/botr/clr-abi.md
Expand Up @@ -205,7 +205,7 @@ For non-rude thread abort, the VM walks the stack, running any catch handler tha

For example:

```
```cs
try { // try 1
try { // try 2
System.Threading.Thread.CurrentThread.Abort();
Expand All @@ -221,7 +221,7 @@ L:

In this case, if the address returned in catch 2 corresponding to label L is outside try 1, then the ThreadAbortException re-raised by the VM will not be caught by catch 1, as is expected. The JIT needs to insert a block such that this is the effective code generation:

```
```cs
try { // try 1
try { // try 2
System.Threading.Thread.CurrentThread.Abort();
Expand All @@ -238,7 +238,7 @@ L:

Similarly, the automatic re-raise address for a ThreadAbortException can't be within a finally handler, or the VM will abort the re-raise and swallow the exception. This can happen due to call-to-finally thunks marked as "cloned finally", as described above. For example (this is pseudo-assembly-code, not C#):

```
```cs
try { // try 1
try { // try 2
System.Threading.Thread.CurrentThread.Abort();
Expand All @@ -254,7 +254,7 @@ L:

This would generate something like:

```
```asm
// beginning of 'try 1'
// beginning of 'try 2'
System.Threading.Thread.CurrentThread.Abort();
Expand All @@ -279,7 +279,7 @@ Finally1:

Note that the JIT must already insert a "step" block so the finally will be called. However, this isn't sufficient to support ThreadAbortException processing, because "L1" is marked as "cloned finally". In this case, the JIT must insert another step block that is within "try 1" but outside the cloned finally block, that will allow for correct re-raise semantics. For example:

```
```asm
// beginning of 'try 1'
// beginning of 'try 2'
System.Threading.Thread.CurrentThread.Abort();
Expand Down Expand Up @@ -397,7 +397,7 @@ To implement this requirement, for any function with EH, we create a frame-local

Note that the since a slot on x86 is 4 bytes, the minimum size is 16 bytes. The idea is to have 1 slot for each handler that could be possibly be invoked at the same time. For example, for:

```
```cs
try {
...
} catch {
Expand All @@ -417,7 +417,7 @@ When calling a finally, we set the appropriate level to 0xFC (aka "finally call"

Thus, calling a finally from JIT generated code looks like:

```
```asm
mov dword ptr [L_02+0x4 ebp-10H], 0 // This must happen before the 0xFC is written
mov dword ptr [L_02+0x8 ebp-0CH], 252 // 0xFC
push G_M52300_IG07
Expand All @@ -428,7 +428,7 @@ In this case, `G_M52300_IG07` is not the address after the 'jmp', so a simple 'c

The code this finally returns to looks like this:

```
```asm
mov dword ptr [L_02+0x8 ebp-0CH], 0
jmp SHORT G_M52300_IG05
```
Expand Down Expand Up @@ -477,7 +477,7 @@ Because a main function body will **always** be on the stack when one of its fun

There is one "corner case" in the VM implementation of WantsReportOnlyLeaf model that has implications for the code the JIT is allowed to generate. Consider this function with nested exception handling:

```
```cs
public void runtest() {
try {
try {
Expand Down Expand Up @@ -804,3 +804,29 @@ In addition to the usual registers it also preserves all float registers and `rc
`CORINFO_HELP_DISPATCH_INDIRECT_CALL` takes the call address in `rax` and it reserves the right to use and trash `r10` and `r11`.
The JIT uses the dispatch helper on x64 whenever possible as it is expected that the code size benefits outweighs the less accurate branch prediction.
However, note that the use of `r11` in the dispatcher makes it incompatible with VSD calls where the JIT must fall back to the validator and a manual call.

# Notes on Memset/Memcpy

Generally, `memset` and `memcpy` do not provide any guarantees of atomicity. This implies that they should only be used when the memory being modified by `memset`/`memcpy` is not observable by any other thread (including GC), or when there are no atomicity requirements according to our [Memory Model](../../specs/Memory-model.md). It's especially important when we modify heap containing managed pointers - those must be updated atomically, e.g. using pointer-sized `mov` instruction (managed pointers are always aligned) - see [Atomic Memory Access](../../specs/Memory-model.md#Atomic-memory-accesses). It's worth noting that by "update" it's implied "set to zero", otherwise, we need a write barrier.

Examples:

```cs
struct MyStruct
{
long a;
string b;
}

void Test1(ref MyStruct m)
{
// We're not allowed to use memset here
m = default;
}

MyStruct Test2()
{
// We can use memset here
return default;
}
```
96 changes: 48 additions & 48 deletions eng/Version.Details.xml
Expand Up @@ -90,23 +90,23 @@
<Sha>45dd3a73dd5b64b010c4251303b3664bb30df029</Sha>
<SourceBuild RepoName="cecil" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100" Version="8.0.1">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100" Version="8.0.2">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>201f4dae9d1a1e105d8ba86d7ece61eed1f665e0</Sha>
<Sha>2fc2ffd960930318f33fcaa690cbdbc55d72f52d</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="8.0.1-servicing.23571.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="8.0.2-servicing.24062.1">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>201f4dae9d1a1e105d8ba86d7ece61eed1f665e0</Sha>
<Sha>2fc2ffd960930318f33fcaa690cbdbc55d72f52d</Sha>
<SourceBuild RepoName="emsdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23565.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.24061.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>95f83e27806330fec09edd96e06bba3acabe3f35</Sha>
<Sha>453a37ef7ae6c335cd49b3b9ab7713c87faeb265</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23570.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.24065.1">
<Uri>https://github.com/dotnet/source-build-externals</Uri>
<Sha>e844aa02a05b90d8cbe499676ec6ee0f19ec4980</Sha>
<Sha>83274d94c7e2ff21081b0d75ecbec2da2241f831</Sha>
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
Expand Down Expand Up @@ -185,57 +185,57 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>61ae141d2bf3534619265c8f691fd55dc3e75147</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Data.Common.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Data.Common.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Drawing.Common.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Formats.Tar.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Formats.Tar.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.IO.Compression.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.IO.Compression.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.IO.Packaging.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.IO.Packaging.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Net.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Net.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Private.Runtime.UnicodeData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Private.Runtime.UnicodeData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Runtime.TimeZoneData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Runtime.TimeZoneData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Text.RegularExpressions.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Text.RegularExpressions.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Windows.Extensions.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CilStrip.Sources" Version="8.0.0-beta.23566.1">
<Dependency Name="Microsoft.DotNet.CilStrip.Sources" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="16.0.5-alpha.1.23566.1" CoherentParentDependency="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100">
<Uri>https://github.com/dotnet/llvm-project</Uri>
Expand Down Expand Up @@ -322,17 +322,17 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>edbd5c769a19798b6955050baccf99e6797d3208</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="8.0.0-prerelease.23407.2">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="8.0.0-prerelease.24060.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>480b9159eb7e69b182a87581d5a336e97e0b6dae</Sha>
<Sha>a417169d3ba558fd6daa522f04e686574bbce520</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="8.0.0-prerelease.23407.2">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="8.0.0-prerelease.24060.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>480b9159eb7e69b182a87581d5a336e97e0b6dae</Sha>
<Sha>a417169d3ba558fd6daa522f04e686574bbce520</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="8.0.0-prerelease.23407.2">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="8.0.0-prerelease.24060.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>480b9159eb7e69b182a87581d5a336e97e0b6dae</Sha>
<Sha>a417169d3ba558fd6daa522f04e686574bbce520</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="8.0.0-beta.24059.4">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand All @@ -354,13 +354,13 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>67613417f5e1af250e6ddfba79f8f2885d8e90fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="8.0.0-alpha.0.23570.2">
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="8.0.0-alpha.0.24060.1">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
<Sha>5524f726f92ef862b415793758cebbd2a1950b70</Sha>
<Sha>3b7da338c73b31b943c5512dcf0e2f6dd75f601c</Sha>
</Dependency>
<Dependency Name="System.Runtime.Numerics.TestData" Version="8.0.0-beta.23566.1">
<Dependency Name="System.Runtime.Numerics.TestData" Version="8.0.0-beta.24060.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>57ca3048e3bf7c0755add6569809270290040f5d</Sha>
<Sha>3b165c269b12cc194f48fde6a1a7694bece8931b</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.8.0-7.23566.2">
<Uri>https://github.com/dotnet/roslyn</Uri>
Expand All @@ -375,13 +375,13 @@
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.23525.2">
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.23614.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>b4d9a1334d5189172977ba8fddd00bda70161e4a</Sha>
<Sha>abef8ced132657943b7150f01a308e2199a17d5d</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23525.2">
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23614.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>b4d9a1334d5189172977ba8fddd00bda70161e4a</Sha>
<Sha>abef8ced132657943b7150f01a308e2199a17d5d</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat.Task" Version="8.0.100">
<Uri>https://github.com/dotnet/sdk</Uri>
Expand Down

0 comments on commit c93800e

Please sign in to comment.