Skip to content

Commit 0b6cae3

Browse files
authored
Merge branch 'main' into copilot/improve-code-coverage-xml
2 parents 005943c + c507305 commit 0b6cae3

File tree

803 files changed

+13104
-22902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

803 files changed

+13104
-22902
lines changed

.github/copilot-instructions.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ excludeAgent: code-review-agent
44

55
**Any code you commit SHOULD compile, and new and existing tests related to the change SHOULD pass.**
66

7-
You MUST make your best effort to ensure your changes satisfy those criteria before committing. If for any reason you were unable to build or test the changes, you MUST report that. You MUST NOT claim success unless all builds and tests pass as described above.
7+
You MUST make your best effort to ensure any code changes satisfy those criteria before committing. If for any reason you were unable to build or test code changes, you MUST report that. You MUST NOT claim success unless all builds and tests pass as described above.
88

9-
Do not complete without checking the relevant code builds and relevant tests still pass after the last edits you make. Do not simply assume that your changes fix test failures you see, actually build and run those tests again to confirm.
10-
11-
You MUST refer to the [Building & Testing in dotnet/runtime](#building--testing-in-dotnetruntime) instructions and use the commands and approaches specified there before attempting your own suggestions.
9+
If you make code changes, do not complete without checking the relevant code builds and relevant tests still pass after the last edits you make. Do not simply assume that your changes fix test failures you see, actually build and run those tests again to confirm. You can avoid building if you only change comments or files that do not affect builds and tests (e.g. README.md).
1210

1311
You MUST follow all code-formatting and naming conventions defined in [`.editorconfig`](/.editorconfig).
1412

@@ -23,6 +21,7 @@ In addition to the rules enforced by `.editorconfig`, you SHOULD:
2321
- Prefer `?.` if applicable (e.g. `scope?.Dispose()`).
2422
- Use `ObjectDisposedException.ThrowIf` where applicable.
2523
- When adding new unit tests, strongly prefer to add them to existing test code files rather than creating new code files.
24+
- When adding new unit tests, avoid adding a regression comment citing a GitHub issue or PR number unless explicitly asked to include such information.
2625
- If you add new code files, ensure they are listed in the csproj file (if other files in that folder are listed there) so they build.
2726
- When running tests, if possible use filters and check test run counts, or look at test logs, to ensure they actually ran.
2827
- Do not finish work with any tests commented out or disabled that were not previously commented out or disabled.
@@ -53,7 +52,7 @@ In addition to the rules enforced by `.editorconfig`, you SHOULD:
5352

5453
## 1. Prerequisites
5554

56-
These steps need to be done **before** applying any changes.
55+
These steps need to be done **before** applying any code changes.
5756

5857
### 1.1. Determine Affected Components
5958

@@ -87,6 +86,7 @@ Before applying any changes, ensure you have a full successful build of the need
8786
- **Libraries:** `./build.sh clr+libs -rc release`
8887
- **WASM/WASI Libraries:** `./build.sh mono+libs -os browser`
8988
- **Host:** `./build.sh clr+libs+host -rc release -lc release`
89+
If changes are being made in the System.Private.CoreLib library, you can follow the Libraries steps, but you may want to use "-rc checked" instead of "-rc release"; that will result in asserts being included in the build rather than excluded.
9090

9191
3. Verify the build completed without error.
9292
- _If the baseline build failed, report the failure and don't proceed with the changes._
@@ -234,6 +234,8 @@ If only one library is affected:
234234

235235
- `dotnet build /t:test` is generally preferred over `dotnet test`
236236

237+
System.Private.CoreLib is special. To rebuild CoreLib and prepare to run tests with the changes, `cd` into the root of the repo and run:
238+
`./build.sh clr.corelib+clr.nativecorelib+libs.pretest -rc release`
237239
---
238240

239241
## 6. WebAssembly (WASM) Libraries Workflow

.github/workflows/copilot-setup-steps.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,3 @@ jobs:
4242

4343
- name: Run dotnet info
4444
run: dotnet --info
45-
46-
- name: Build clr+libs
47-
run: ./build.sh clr+libs -rc release

docs/design/coreclr/botr/clr-abi.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,10 @@ The extra state created by the JIT for synchronized methods (lock taken flag) mu
537537

538538
EnC is supported for adding and editing generic methods and methods on generic types and generic methods on non-generic types.
539539

540+
## Async methods
541+
542+
The JIT saves the current `ExecutionContext` and `SynchronizationContext` in runtime async methods and these must be preserved during remap. The new GC encoder includes the state in the EnC frame header size, while for JIT32 the EE expects this state to exist when `CORINFO_ASYNC_SAVE_CONTEXTS` was reported to the JIT from `getMethodInfo`.
543+
540544
# Portable entrypoints
541545

542546
On platforms that allow dynamic code generation, the runtime abstracts away execution strategies for dynamically loaded methods by allocating [`Precode`](method-descriptor.md#precode)s. The `Precode` is a small code fragment that is used as a temporary method entrypoint until the actual method code is acquired. `Precode`s are also used as part of the execution for methods that do not have regular JITed or AOT-compiled code, for example stubs or interpreted methods. `Precode`s allow native code to use the same native code calling convention irrespective of the execution strategy used by the target method.
@@ -693,4 +697,4 @@ The stack elements are always aligned to at least `INTERP_STACK_SLOT_SIZE` and n
693697

694698
Primitive types smaller than 4 bytes are always zero or sign extended to 4 bytes when on the stack.
695699

696-
When a function is async it will have a continuation return. This return is not done using the data stack, but instead is done by setting the Continuation field in the `InterpreterFrame`. Thunks are responsible for setting/resetting this value as we enter/leave code compiled by the JIT.
700+
When a function is async it will have a continuation return. This return is not done using the data stack, but instead is done by setting the Continuation field in the `InterpreterFrame`. Thunks are responsible for setting/resetting this value as we enter/leave code compiled by the JIT.

docs/design/coreclr/botr/readytorun-platform-native-envelope.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ The tentative high-level design is outlined below. As we implement this support,
1313
## crossgen2: producing Mach-O object files
1414

1515
Mach‑O support will only be supported for composite ReadyToRun when the target OS is macOS. It will be opt-in via a new `crossgen2` flag:
16+
1617
- `--obj-format macho`
1718

1819
`crossgen2` will:
20+
1921
- Produce a Mach-O object file as the composite R2R image with the `RTR_HEADER` export for the `READYTORUN_HEADER`.
2022
- Mark each input IL assembly as a component R2R assembly: `READYTORUN_FLAG_COMPONENT`.
2123
- Mark each input IL assembly with a new flag indicating that the associated composite image is in the platform-native format: `READYTORUN_FLAG_PLATFORM_NATIVE_IMAGE`
@@ -28,20 +30,14 @@ There's a few cases in the R2R format that are not natively represented in the M
2830

2931
#### Sections
3032

31-
Sections folded into `__TEXT,__text` that is in other sections in the PE envelope:
32-
33-
- CLR metadata: In the PE format, put in .cormeta, corresponds to the PE Header's "COR Header directory"
34-
- Win32 Resources: In the PE format, put in .rsrc, corresponds to the PE Header's "Win32 Resources Header directory"
35-
- Managed Unwind Info: In the Mach-O format, this section is expected to be in the Mach-O unwind format. The unwind info used by the runtime must be in the Windows unwind format.
36-
- GC Info: Entries correspond to the unwind info.
3733

3834
Data moved out of `__TEXT,__text`:
3935

4036
- Precompiled managed code has been moved into `__TEXT,__managedcode`. `__TEXT,__text` gets special treatment by the linker and `__TEXT,__managedcode` matches NativeAOT.
37+
- Read-only data such as jump tables, CLR metadata, Win32 Resources, managed unwind info, gc info, and the R2R headers are moved to `__TEXT,__const`
4138

4239
Data that stays in the corresponding locations as the PE envelope:
4340

44-
- Read-only data such as jump tables and the R2R headers: `__TEXT,__const`
4541
- Read-write data, such as fixup tables: `__DATA,__data`
4642
- Import thunks: `__TEXT,__text`
4743

docs/design/datacontracts/data_descriptor.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ The baseline is given in the "regular" format.
335335
}
336336
],
337337
"globals": [
338-
{ "name": "FEATURE_EH_FUNCLETS", "type": "uint8", "value": "0" }, // baseline defaults value to 0
339338
{ "name": "FEATURE_COMINTEROP", "type": "uint8", "value": "1"},
340339
{ "name": "s_pThreadStore", "type": "pointer" } // no baseline value
341340
]
@@ -383,12 +382,10 @@ And the globals will be:
383382
| Name | Type | Value |
384383
| ------------------- | ------- | ---------- |
385384
| FEATURE_COMINTEROP | uint8 | 0 |
386-
| FEATURE_EH_FUNCLETS | uint8 | 0 |
387385
| s_pThreadStore | pointer | 0x0100ffe0 |
388386
| RuntimeID | string |"windows-x64"|
389387

390-
The `FEATURE_EH_FUNCLETS` global's value comes from the baseline - not the in-memory data
391-
descriptor. By contrast, `FEATURE_COMINTEROP` comes from the in-memory data descriptor - with the
392-
value embedded directly in the json since it is known at build time and does not vary. Finally the
388+
The `FEATURE_COMINTEROP` comes from the in-memory data descriptor - with the
389+
value embedded directly in the json since it is known at build time and does not vary. The
393390
value of the pointer `s_pThreadStore` comes from the auxiliary vector's offset 0 since it is an
394391
execution-time value that is only known to the running process.

docs/workflow/building/coreclr/wasm.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ cd ./artifacts/bin/coreclr/browser.wasm.Debug/corehost
8181
node ./main.mjs
8282
```
8383

84-
Note that paths to assemblies are in the `src/native/corehost/browserhost/sample/dotnet.boot.js`
85-
8684
## Debugging
8785

8886
### Chrome DevTools with DWARF Support

docs/workflow/editing-and-debugging.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ The repository has a number of Visual Studio Solutions files (`*.slnx`) that are
2424
* `coreclr` - This is the main runtime DLL (the GC, class loader, interop are all here)
2525
* `corjit` - This is the Just In Time (JIT) compiler that compiles .NET Intermediate language to native code.
2626
* `corerun` - This is the simple host program that can run a .NET application
27-
* `crossgen` - This is the host program that runs the JIT compiler and produces .NET Native images (`*.ni.dll`)
28-
for C# code.
2927
* This project can be automatically generated and opened in Visual Studio by running `./build.cmd -vs CoreCLR.slnx -a <Arch> -c <BuildType>` from the root of the repository.
3028
* `artifacts\obj\win-<Arch>.<BuildType>\corehost\ide\corehost.slnx` - this solution contains the native (C++) projects for the [host components](../design/features/host-components.md)
3129
* This project can be automatically generated and opened in Visual Studio by running `./build.cmd -vs corehost.slnx -a <Arch> -c <BuildType>` from the root of the repository.

eng/Version.Details.props

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props
66
<Project>
77
<PropertyGroup>
88
<!-- dotnet/icu dependencies -->
9-
<MicrosoftNETCoreRuntimeICUTransportPackageVersion>11.0.0-alpha.1.25613.1</MicrosoftNETCoreRuntimeICUTransportPackageVersion>
9+
<MicrosoftNETCoreRuntimeICUTransportPackageVersion>11.0.0-alpha.1.25631.1</MicrosoftNETCoreRuntimeICUTransportPackageVersion>
1010
<!-- dotnet/wcf dependencies -->
1111
<SystemServiceModelPrimitivesPackageVersion>4.9.0-rc2.21473.1</SystemServiceModelPrimitivesPackageVersion>
1212
<!-- dotnet/llvm-project dependencies -->
@@ -80,22 +80,22 @@ This file should be imported by eng/Versions.props
8080
<SystemReflectionMetadataLoadContextPackageVersion>11.0.0-alpha.1.25619.109</SystemReflectionMetadataLoadContextPackageVersion>
8181
<SystemTextJsonPackageVersion>11.0.0-alpha.1.25619.109</SystemTextJsonPackageVersion>
8282
<!-- dotnet/runtime-assets dependencies -->
83-
<MicrosoftDotNetCilStripSourcesPackageVersion>11.0.0-beta.25574.4</MicrosoftDotNetCilStripSourcesPackageVersion>
84-
<MicrosoftDotnetFuzzingTestDataPackageVersion>11.0.0-beta.25574.4</MicrosoftDotnetFuzzingTestDataPackageVersion>
85-
<MicrosoftNETHostModelTestDataPackageVersion>11.0.0-beta.25574.4</MicrosoftNETHostModelTestDataPackageVersion>
86-
<SystemComponentModelTypeConverterTestDataPackageVersion>11.0.0-beta.25574.4</SystemComponentModelTypeConverterTestDataPackageVersion>
87-
<SystemDataCommonTestDataPackageVersion>11.0.0-beta.25574.4</SystemDataCommonTestDataPackageVersion>
88-
<SystemDrawingCommonTestDataPackageVersion>11.0.0-beta.25574.4</SystemDrawingCommonTestDataPackageVersion>
89-
<SystemFormatsTarTestDataPackageVersion>11.0.0-beta.25574.4</SystemFormatsTarTestDataPackageVersion>
90-
<SystemIOCompressionTestDataPackageVersion>11.0.0-beta.25574.4</SystemIOCompressionTestDataPackageVersion>
91-
<SystemIOPackagingTestDataPackageVersion>11.0.0-beta.25574.4</SystemIOPackagingTestDataPackageVersion>
92-
<SystemNetTestDataPackageVersion>11.0.0-beta.25574.4</SystemNetTestDataPackageVersion>
93-
<SystemPrivateRuntimeUnicodeDataPackageVersion>11.0.0-beta.25574.4</SystemPrivateRuntimeUnicodeDataPackageVersion>
94-
<SystemRuntimeNumericsTestDataPackageVersion>11.0.0-beta.25574.4</SystemRuntimeNumericsTestDataPackageVersion>
95-
<SystemRuntimeTimeZoneDataPackageVersion>11.0.0-beta.25574.4</SystemRuntimeTimeZoneDataPackageVersion>
96-
<SystemSecurityCryptographyX509CertificatesTestDataPackageVersion>11.0.0-beta.25574.4</SystemSecurityCryptographyX509CertificatesTestDataPackageVersion>
97-
<SystemTextRegularExpressionsTestDataPackageVersion>11.0.0-beta.25574.4</SystemTextRegularExpressionsTestDataPackageVersion>
98-
<SystemWindowsExtensionsTestDataPackageVersion>11.0.0-beta.25574.4</SystemWindowsExtensionsTestDataPackageVersion>
83+
<MicrosoftDotNetCilStripSourcesPackageVersion>11.0.0-beta.25626.1</MicrosoftDotNetCilStripSourcesPackageVersion>
84+
<MicrosoftDotnetFuzzingTestDataPackageVersion>11.0.0-beta.25626.1</MicrosoftDotnetFuzzingTestDataPackageVersion>
85+
<MicrosoftNETHostModelTestDataPackageVersion>11.0.0-beta.25626.1</MicrosoftNETHostModelTestDataPackageVersion>
86+
<SystemComponentModelTypeConverterTestDataPackageVersion>11.0.0-beta.25626.1</SystemComponentModelTypeConverterTestDataPackageVersion>
87+
<SystemDataCommonTestDataPackageVersion>11.0.0-beta.25626.1</SystemDataCommonTestDataPackageVersion>
88+
<SystemDrawingCommonTestDataPackageVersion>11.0.0-beta.25626.1</SystemDrawingCommonTestDataPackageVersion>
89+
<SystemFormatsTarTestDataPackageVersion>11.0.0-beta.25626.1</SystemFormatsTarTestDataPackageVersion>
90+
<SystemIOCompressionTestDataPackageVersion>11.0.0-beta.25626.1</SystemIOCompressionTestDataPackageVersion>
91+
<SystemIOPackagingTestDataPackageVersion>11.0.0-beta.25626.1</SystemIOPackagingTestDataPackageVersion>
92+
<SystemNetTestDataPackageVersion>11.0.0-beta.25626.1</SystemNetTestDataPackageVersion>
93+
<SystemPrivateRuntimeUnicodeDataPackageVersion>11.0.0-beta.25626.1</SystemPrivateRuntimeUnicodeDataPackageVersion>
94+
<SystemRuntimeNumericsTestDataPackageVersion>11.0.0-beta.25626.1</SystemRuntimeNumericsTestDataPackageVersion>
95+
<SystemRuntimeTimeZoneDataPackageVersion>11.0.0-beta.25626.1</SystemRuntimeTimeZoneDataPackageVersion>
96+
<SystemSecurityCryptographyX509CertificatesTestDataPackageVersion>11.0.0-beta.25626.1</SystemSecurityCryptographyX509CertificatesTestDataPackageVersion>
97+
<SystemTextRegularExpressionsTestDataPackageVersion>11.0.0-beta.25626.1</SystemTextRegularExpressionsTestDataPackageVersion>
98+
<SystemWindowsExtensionsTestDataPackageVersion>11.0.0-beta.25626.1</SystemWindowsExtensionsTestDataPackageVersion>
9999
<!-- dotnet/xharness dependencies -->
100100
<MicrosoftDotNetXHarnessCLIPackageVersion>11.0.0-prerelease.25603.1</MicrosoftDotNetXHarnessCLIPackageVersion>
101101
<MicrosoftDotNetXHarnessTestRunnersCommonPackageVersion>11.0.0-prerelease.25603.1</MicrosoftDotNetXHarnessTestRunnersCommonPackageVersion>
@@ -108,7 +108,7 @@ This file should be imported by eng/Versions.props
108108
<optimizationwindows_ntx64MIBCRuntimePackageVersion>1.0.0-prerelease.25502.1</optimizationwindows_ntx64MIBCRuntimePackageVersion>
109109
<optimizationwindows_ntx86MIBCRuntimePackageVersion>1.0.0-prerelease.25502.1</optimizationwindows_ntx86MIBCRuntimePackageVersion>
110110
<!-- dotnet/hotreload-utils dependencies -->
111-
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolPackageVersion>11.0.0-alpha.0.25574.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolPackageVersion>
111+
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolPackageVersion>11.0.0-alpha.0.25625.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolPackageVersion>
112112
<!-- dotnet/node dependencies -->
113113
<runtimelinuxarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion>11.0.0-alpha.1.25607.1</runtimelinuxarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion>
114114
<runtimelinuxmuslarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion>11.0.0-alpha.1.25607.1</runtimelinuxmuslarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion>

0 commit comments

Comments
 (0)