From d8e84363082681b59d9c9c2777af9dc5eac5c287 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 13:25:48 -0700 Subject: [PATCH 01/14] [release/7.0-rc1] Fix leak caused by not disposing the scoped parent service provider (#74362) * Fix leaks caused by not disposing the parent scoped ServiceProvider * Address the feedback Co-authored-by: Tarek Mahmoud Sayed --- .../ServiceLookup/ServiceProviderEngineScope.cs | 16 ++++++++++++---- .../src/ServiceProvider.cs | 2 ++ .../DI.Tests/ServiceProviderEngineScopeTests.cs | 12 ++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs index 0cddf30f2a719c..d1af024a3e38e1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs @@ -187,12 +187,20 @@ static async ValueTask Await(int i, ValueTask vt, List toDispose) // No further changes to _state.Disposables, are allowed. _disposed = true; - // ResolvedServices is never cleared for singletons because there might be a compilation running in background - // trying to get a cached singleton service. If it doesn't find it - // it will try to create a new one which will result in an ObjectDisposedException. + } - return _disposables; + if (IsRootScope && !RootProvider.IsDisposed()) + { + // If this ServiceProviderEngineScope instance is a root scope, disposing this instance will need to dispose the RootProvider too. + // Otherwise the RootProvider will never get disposed and will leak. + // Note, if the RootProvider get disposed first, it will automatically dispose all attached ServiceProviderEngineScope objects. + RootProvider.Dispose(); } + + // ResolvedServices is never cleared for singletons because there might be a compilation running in background + // trying to get a cached singleton service. If it doesn't find it + // it will try to create a new one which will result in an ObjectDisposedException. + return _disposables; } } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs index f66f36b3cf6ed2..dd9b1af11a55a0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs @@ -89,6 +89,8 @@ internal ServiceProvider(ICollection serviceDescriptors, Serv /// The service that was produced. public object? GetService(Type serviceType) => GetService(serviceType, Root); + internal bool IsDisposed() => _disposed; + /// public void Dispose() { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs index d43752db21eba7..e801497236f0b9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs @@ -1,6 +1,7 @@ // 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 Microsoft.Extensions.DependencyInjection.Specification.Fakes; using Xunit; @@ -17,5 +18,16 @@ public void DoubleDisposeWorks() serviceProviderEngineScope.Dispose(); serviceProviderEngineScope.Dispose(); } + + [Fact] + public void RootEngineScopeDisposeTest() + { + var services = new ServiceCollection(); + ServiceProvider sp = services.BuildServiceProvider(); + var s = sp.GetRequiredService(); + ((IDisposable)s).Dispose(); + + Assert.Throws(() => sp.GetRequiredService()); + } } } From e69c9d07ab06c606c4e494ab7f41a880a1dcb122 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:19:44 -0700 Subject: [PATCH 02/14] [release/7.0-rc1] Change signature for diagnostic binaries (#74323) * Add DAC signature infrastructure * Use a .NET 6 SDK to enable signing * Add signature verification Co-authored-by: Juan Sebastian Hoyos Ayala --- eng/Signing.props | 41 ++-------- eng/pipelines/coreclr/templates/build-job.yml | 24 ++---- .../coreclr/templates/crossdac-build.yml | 7 ++ .../coreclr/templates/crossdac-pack.yml | 23 ------ .../templates/sign-diagnostic-files.yml | 80 +++++++++++++++++++ 5 files changed, 101 insertions(+), 74 deletions(-) create mode 100644 eng/pipelines/coreclr/templates/sign-diagnostic-files.yml diff --git a/eng/Signing.props b/eng/Signing.props index b4fb10e90e4a8f..f76a7aa22c2481 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -1,5 +1,4 @@ - - + + + + + @@ -31,8 +37,6 @@ - - @@ -61,33 +65,4 @@ - - - - - false - - - - - - - - - - - - - - - - diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index a226e0fd35e759..930580eae47391 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -261,25 +261,12 @@ jobs: targetFolder: $(buildProductRootFolderPath)/sharedFramework overWrite: true - # Sign diagnostic files on Windows - ${{ if and(eq(parameters.osGroup, 'windows'), eq(parameters.signBinaries, true)) }}: - - powershell: >- - eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 $(officialBuildIdArg) - /p:DiagnosticsFilesRoot="$(buildProductRootFolderPath)" - /p:SignDiagnostics=true - /p:DotNetSignType=$(SignType) - -noBl - /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfig)/SignDiagnostics.binlog - -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Sign Diagnostic Binaries - - - task: PublishPipelineArtifact@1 - displayName: Publish Signing Logs - inputs: - targetPath: '$(Build.SourcesDirectory)/artifacts/log/' - artifactName: ${{ format('SignLogs_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} - continueOnError: true - condition: always() + - template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml + parameters: + basePath: $(buildProductRootFolderPath) + isOfficialBuild: ${{ parameters.signBinaries }} + timeoutInMinutes: 30 # Builds using gcc are not tested, and clrTools unitests do not publish the build artifacts - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools'), ne(parameters.disableClrTest, true)) }}: @@ -300,6 +287,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + isOfficialBuild: ${{ parameters.signBinaries }} ${{ if eq(parameters.archType, 'arm') }}: hostArchType: x86 ${{ else }}: diff --git a/eng/pipelines/coreclr/templates/crossdac-build.yml b/eng/pipelines/coreclr/templates/crossdac-build.yml index 9bc3125f6a050b..31154ec5487986 100644 --- a/eng/pipelines/coreclr/templates/crossdac-build.yml +++ b/eng/pipelines/coreclr/templates/crossdac-build.yml @@ -1,5 +1,6 @@ parameters: archType: '' + isOfficialBuild: false osGroup: '' osSubgroup: '' hostArchType: '' @@ -52,6 +53,12 @@ steps: displayName: Gather CrossDac Artifacts + - template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml + parameters: + basePath: $(crossDacArtifactPath) + isOfficialBuild: ${{ parameters.isOfficialBuild }} + timeoutInMinutes: 30 + - ${{ if eq(parameters.osGroup, 'Linux') }}: - task: CopyFiles@2 displayName: Gather runtime for CrossDac diff --git a/eng/pipelines/coreclr/templates/crossdac-pack.yml b/eng/pipelines/coreclr/templates/crossdac-pack.yml index 40e375bb9375c4..fc3ef404c171a9 100644 --- a/eng/pipelines/coreclr/templates/crossdac-pack.yml +++ b/eng/pipelines/coreclr/templates/crossdac-pack.yml @@ -54,19 +54,6 @@ jobs: - ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.buildConfig }} steps: - # Install MicroBuild for signing the package - - ${{ if eq(parameters.isOfficialBuild, true) }}: - - template: /eng/pipelines/common/restore-internal-tools.yml - - - task: MicroBuildSigningPlugin@2 - displayName: Install MicroBuild plugin for Signing - inputs: - signType: $(SignType) - zipSources: false - feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - continueOnError: false - condition: and(succeeded(), in(variables['SignType'], 'real', 'test')) - - task: DownloadBuildArtifacts@0 displayName: Download CrossDac artifacts inputs: @@ -77,16 +64,6 @@ jobs: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset crossdacpack -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) $(crossDacArgs) -ci displayName: Build crossdac packaging - # Sign diagnostic files - - ${{ if eq(parameters.isOfficialBuild, true) }}: - - powershell: >- - eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 $(officialBuildIdArg) - /p:PackagesFolder="$(Build.SourcesDirectory)/artifacts/packages/$(buildConfig)" - /p:SignDiagnosticsPackages=true - /p:DotNetSignType=$(SignType) - -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Sign CrossDac package and contents - # Save packages using the prepare-signed-artifacts format. - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: diff --git a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml new file mode 100644 index 00000000000000..7b020552ad5cb4 --- /dev/null +++ b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml @@ -0,0 +1,80 @@ +parameters: + basePath: '' + isOfficialBuild: '' + timeoutInMinutes: '' + +steps: +- ${{ if and(eq(parameters.isOfficialBuild, true), ne(variables['Build.Reason'], 'PullRequest')) }}: + - task: UseDotNet@2 + displayName: Install .NET 6 SDK for signing. + inputs: + packageType: 'sdk' + version: '6.0.x' + installationPath: '$(Agent.TempDirectory)/dotnet' + + - task: EsrpCodeSigning@1 + displayName: Sign Diagnostic Binaries + inputs: + ConnectedServiceName: 'dotnetesrp-diagnostics-dnceng' + FolderPath: ${{ parameters.basePath }} + Pattern: | + **/mscordaccore*.dll + **/mscordbi*.dll + UseMinimatch: true + signConfigType: 'inlineSignParams' + inlineOperation: >- + [ + { + "keyCode": "CP-471322", + "operationCode": "SigntoolSign", + "parameters": { + "OpusName": "Microsoft", + "OpusInfo": "http://www.microsoft.com", + "PageHash": "/NPH", + "FileDigest": "/fd sha256", + "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" + }, + "toolName": "sign", + "toolVersion": "1.0" + }, + { + "KeyCode": "CP-471322", + "OperationCode": "SigntoolVerify", + "Parameters": {}, + "ToolName": "sign", + "ToolVersion": "1.0" + } + ] + SessionTimeout: ${{ parameters.timeoutInMinutes }} + MaxConcurrency: '50' + MaxRetryAttempts: '5' + env: + DOTNET_MULTILEVEL_LOOKUP: 0 + DOTNET_ROOT: '$(Agent.TempDirectory)/dotnet' + DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR: '$(Agent.TempDirectory)/dotnet' + + - powershell: | + $filesToSign = $(Get-ChildItem -Recurse ${{ parameters.basePath }} -Include mscordaccore*.dll, mscordbi*.dll) + foreach ($file in $filesToSign) { + $signingCert = $(Get-AuthenticodeSignature $file).SignerCertificate + if ($signingCert -eq $null) + { + throw "File $file does not contain a signature." + } + + if ($signingCert.Subject -ne "CN=.NET DAC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" ` + -or $signingCert.Issuer -ne "CN=Microsoft Code Signing PCA 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US") + { + throw "File $file not in expected trust chain." + } + + $certEKU = $signingCert.Extensions.Where({ $_.Oid.FriendlyName -eq "Enhanced Key Usage" }) | Select -First 1 + + if ($certEKU.EnhancedKeyUsages.Where({ $_.Value -eq "1.3.6.1.4.1.311.84.4.1" }).Count -ne 1) + { + throw "Signature for $file does not contain expected EKU." + } + + Write-Host "$file is correctly signed." + } + displayName: Validate diagnostic signatures From d42d9fe1ef041fd7103a09dae248fe46fbb501dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 15:23:50 -0700 Subject: [PATCH 03/14] [release/7.0-rc1] [Mono] Only enable Arm intrinsics for full aot mode (#74357) * Only enable Arm intrinsics for full aot * Make sure AOT doesn't fall back to interpreter Co-authored-by: Fan Yang --- src/mono/mono/mini/simd-intrinsics.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c index 4ce3b622a47679..376f2b69386ceb 100644 --- a/src/mono/mono/mini/simd-intrinsics.c +++ b/src/mono/mono/mini/simd-intrinsics.c @@ -718,6 +718,13 @@ emit_hardware_intrinsics ( if (!info) goto support_probe_complete; id = info->id; + +#ifdef TARGET_ARM64 + if (!(cfg->compile_aot && cfg->full_aot && !cfg->interp) && !intrin_group->jit_supported) { + goto support_probe_complete; + } +#endif + // Hardware intrinsics are LLVM-only. if (!COMPILE_LLVM (cfg) && !intrin_group->jit_supported) goto support_probe_complete; @@ -986,7 +993,7 @@ is_element_type_primitive (MonoType *vector_type) static MonoInst* emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) -{ +{ if (!COMPILE_LLVM (cfg)) return NULL; From 0df231c6d50bd59e72c9dc9b1d3b5983f0042584 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 22 Aug 2022 17:26:07 -0500 Subject: [PATCH 04/14] [release/7.0-rc1] Roll forward to the latest 6.0.x builds (#74288) * Roll forward to the latest 6.0.x builds * Remove workaround for version emsdk import * Fix incorrect pack names * Fix unaliased packs * Alias the experimental packs in WorkloadManifest.targets too * Fix quoting * Download manifests for workloads leg Co-authored-by: Juan Sebastian Hoyos Ayala --- eng/Version.Details.xml | 8 +- eng/Versions.props | 6 +- .../mono/templates/workloads-build.yml | 3 +- eng/testing/tests.wasm.targets | 3 + .../WorkloadManifest.json.in | 64 ++++++++-------- .../WorkloadManifest.targets.in | 7 -- .../WorkloadManifest.json.in | 75 +++++++++++-------- .../WorkloadManifest.targets.in | 11 +-- 8 files changed, 88 insertions(+), 89 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 63a0603175e9ba..e13b807313b38b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -48,13 +48,13 @@ https://github.com/dotnet/command-line-api 5618b2d243ccdeb5c7e50a298b33b13036b4351b - + https://github.com/dotnet/emsdk - eb3232eb90aac35a31134464fc498a5f1ddb239f + 745113281de08619474a5e1c704290a4ed30a65d - + https://github.com/dotnet/emsdk - eb3232eb90aac35a31134464fc498a5f1ddb239f + 745113281de08619474a5e1c704290a4ed30a65d diff --git a/eng/Versions.props b/eng/Versions.props index acd5e60464981a..d6deb8b7c43f1e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,7 +7,7 @@ 0 0 7.0.100 - 6.0.8 + 6.0.9 rc 1 + diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in index b5f29300b4db94..716cd56d9a607f 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in @@ -30,10 +30,10 @@ "abstract": true, "description": "Android Mono AOT Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64" + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64" ], "extends": [ "microsoft-net-runtime-android-net6" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -90,8 +90,8 @@ "packs": [ "Microsoft.NETCore.App.Runtime.Mono.net6.osx-arm64", "Microsoft.NETCore.App.Runtime.Mono.net6.osx-x64", - "Microsoft.NETCore.App.Runtime.osx-arm64", - "Microsoft.NETCore.App.Runtime.osx-x64" + "Microsoft.NETCore.App.Runtime.net6.osx-arm64", + "Microsoft.NETCore.App.Runtime.net6.osx-x64" ], "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], "platforms": [ "osx-arm64", "osx-x64" ] @@ -141,49 +141,49 @@ "kind": "Sdk", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" + "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" } }, "Microsoft.NET.Runtime.MonoTargets.Sdk.net6": { "kind": "Sdk", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" + "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" } }, "Microsoft.NET.Runtime.WebAssembly.Sdk.net6": { "kind": "Sdk", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" + "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-x86": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86": { @@ -230,77 +230,77 @@ "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.maccatalyst-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.osx-arm64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.osx-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" } }, "Microsoft.NETCore.App.Runtime.net6.osx-arm64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.net6.osx-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.osx-x64" + "any": "Microsoft.NETCore.App.Runtime.osx-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x86" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvos-arm64": { @@ -315,21 +315,21 @@ "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-x64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-arm64": { @@ -418,35 +418,35 @@ "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" + "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" } }, "Microsoft.NETCore.App.Runtime.net6.win-x64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x64" + "any": "Microsoft.NETCore.App.Runtime.win-x64" } }, "Microsoft.NETCore.App.Runtime.net6.win-x86" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x86" + "any": "Microsoft.NETCore.App.Runtime.win-x86" } }, "Microsoft.NETCore.App.Runtime.net6.win-arm" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm" + "any": "Microsoft.NETCore.App.Runtime.win-arm" } }, "Microsoft.NETCore.App.Runtime.net6.win-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm64" + "any": "Microsoft.NETCore.App.Runtime.win-arm64" } } } diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in index 2a6fb0ae431349..ed240a9ced181b 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in @@ -97,13 +97,6 @@ - - - - - - - <_MonoWorkloadTargetsMobile>true <_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion6) diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in index 5575ebc9f4eda1..cbd3cacb453e55 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in @@ -17,9 +17,9 @@ "wasm-experimental": { "description": ".NET WebAssembly experimental tooling", "packs": [ - "Microsoft.NET.Runtime.WebAssembly.Templates", - "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm", - "Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" + "Microsoft.NET.Runtime.WebAssembly.Templates.net7", + "Microsoft.NETCore.App.Runtime.Mono.multithread.net7.browser-wasm", + "Microsoft.NETCore.App.Runtime.Mono.perftrace.net7.browser-wasm" ], "extends": [ "wasm-tools" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -151,53 +151,56 @@ "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" + "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" } }, "Microsoft.NET.Runtime.MonoTargets.Sdk.net7": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" + "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" } }, "Microsoft.NET.Runtime.WebAssembly.Sdk.net7": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" + "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" } }, - "Microsoft.NET.Runtime.WebAssembly.Templates": { + "Microsoft.NET.Runtime.WebAssembly.Templates.net7": { "kind": "template", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NET.Runtime.WebAssembly.Templates" + } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-x64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-x86": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86": { @@ -244,35 +247,35 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.maccatalyst-x64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.osx-arm64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.osx-x64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" } }, "Microsoft.NETCore.App.Runtime.net7.osx-arm64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.net7.osx-x64": { @@ -286,21 +289,21 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.ios-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-x64" : { @@ -314,7 +317,7 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvos-arm64": { @@ -329,21 +332,21 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-x64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-arm64": { @@ -432,43 +435,49 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" + "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" } }, - "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm" : { + "Microsoft.NETCore.App.Runtime.Mono.multithread.net7.browser-wasm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm" + } }, - "Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" : { + "Microsoft.NETCore.App.Runtime.Mono.perftrace.net7.browser-wasm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" + } }, "Microsoft.NETCore.App.Runtime.net7.win-x64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x64" + "any": "Microsoft.NETCore.App.Runtime.win-x64" } }, "Microsoft.NETCore.App.Runtime.net7.win-x86" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x86" + "any": "Microsoft.NETCore.App.Runtime.win-x86" } }, "Microsoft.NETCore.App.Runtime.net7.win-arm" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm" + "any": "Microsoft.NETCore.App.Runtime.win-arm" } }, "Microsoft.NETCore.App.Runtime.net7.win-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm64" + "any": "Microsoft.NETCore.App.Runtime.win-arm64" } } } diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in index fd8e9cbe658e39..8063ce6554016e 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in @@ -94,13 +94,6 @@ - - - - - - - <_MonoWorkloadTargetsMobile>true <_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion7) @@ -110,8 +103,8 @@ $(_MonoWorkloadRuntimePackPackageVersion) - Microsoft.NETCore.App.Runtime.Mono.multithread.**RID** - Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID** + Microsoft.NETCore.App.Runtime.Mono.multithread.net7.**RID** + Microsoft.NETCore.App.Runtime.Mono.perftrace.net7.**RID** From 9272ca37430dc010618283f6770de9443a8c6a20 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 22 Aug 2022 17:54:16 -0500 Subject: [PATCH 05/14] Update ComponentResources versions and list (#74365) --- src/workloads/workloads.csproj | 52 +++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/workloads/workloads.csproj b/src/workloads/workloads.csproj index c2250ab18ecbb1..93df927b5a346a 100644 --- a/src/workloads/workloads.csproj +++ b/src/workloads/workloads.csproj @@ -37,38 +37,56 @@ - - - - - - - - - - - - - - - - + <_ComponentResources Include="microsoft-net-runtime-mono-tooling-net6" Title=".NET 6.0 Shared Mobile Build Tools" + Description="Shared build tasks for mobile platform development."/> + <_ComponentResources Include="wasm-tools-net6" Title=".NET 6.0 WebAssembly Build Tools" + Description="Build tools for net6.0 WebAssembly ahead-of-time (AoT) compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-android-net6" Title=".NET 6.0 Android Build Tools" + Description="Build tools for net6.0 Android compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-android-aot-net6" Title=".NET 6.0 Android Build Tools (AoT)" + Description="Build tools for net6.0 Android ahead-of-time (AoT) compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-ios-net6" Title=".NET 6.0 iOS Build Tools" + Description="Build tools for net6.0 iOS compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-tvos-net" Title=".NET 6.0 tvOS Build Tools" + Description="Build tools for net6.0 tvOS compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-maccatalyst-net6" Title=".NET 6.0 Mac Catalyst Build Tools" + Description="Build tools for net6.0 Mac Catalyst compilation and native linking."/> + <_ComponentResources Include="runtimes-ios-net6" Title=".NET 6.0 iOS Runtimes" + Description=".NET 6.0 runtime components for iOS execution."/> + <_ComponentResources Include="runtimes-tvos-net6" Title=".NET 6.0 tvOS Build Tools" + Description=".NET 6.0 runtime components for tvOS execution."/> + <_ComponentResources Include="runtimes-maccatalyst-net6" Title=".NET 6.0 Mac Catalyst Build Tools" + Description=".NET 6.0 runtime components for Mac Catalyst execution."/> + <_ComponentResources Include="runtimes-windows-net6" Title=".NET 6.0 Windows Runtimes" + Description=".NET 6.0 runtime components for Windows execution."/> + + From 5ddbb7c482ac0079607222f19479bdf08200b53a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:11:35 -0700 Subject: [PATCH 06/14] Bump intellisense package version to Preview7 (#74356) Co-authored-by: carlossanlop --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index d6deb8b7c43f1e..7f2865829d81d3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,7 +174,7 @@ 1.1.2-beta1.22403.2 - 7.0.0-preview-20220721.1 + 7.0.0-preview-20220822.1 7.0.100-1.22412.4 $(MicrosoftNETILLinkTasksVersion) From 40dc0573d23e0446d6c25d4f159a47db90c59436 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 17:07:33 -0700 Subject: [PATCH 07/14] [release/7.0-rc1] Fix mono package versions during stabilization (#74368) * Fix mono package versions during stabilization The issues that are being fixed via this PR happened and were fixed during the 7.0 stabilization release exercise. * Update Directory.Build.targets Co-authored-by: Viktor Hofer --- src/mono/nuget/Directory.Build.props | 4 ---- src/mono/nuget/Directory.Build.targets | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mono/nuget/Directory.Build.props b/src/mono/nuget/Directory.Build.props index c37b14a0dfd3fa..5b2f04660da82c 100644 --- a/src/mono/nuget/Directory.Build.props +++ b/src/mono/nuget/Directory.Build.props @@ -12,10 +12,6 @@ true - - - 7.0.0 - $(PackageVersion) diff --git a/src/mono/nuget/Directory.Build.targets b/src/mono/nuget/Directory.Build.targets index 32e2e4251e792f..c3af51a7f58b05 100644 --- a/src/mono/nuget/Directory.Build.targets +++ b/src/mono/nuget/Directory.Build.targets @@ -1,5 +1,13 @@ + + + + $(ProductVersion) + $(PackageVersion) + + + From 12cc3d419d3774edb46ceefa130ab514de563f14 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 22 Aug 2022 21:00:57 -0500 Subject: [PATCH 08/14] Update workload manifest paths (#74364) --- eng/pipelines/common/evaluate-default-paths.yml | 3 ++- src/installer/prepare-artifacts.proj | 12 ++++++------ src/mono/wasm/README.md | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index 7198ecd5540c1e..358027fe7152b6 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -113,7 +113,8 @@ jobs: - src/mono/wasm/host/* - src/mono/wasm/runtime/* - src/mono/wasm/templates/* - - src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/* + - src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/* + - src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/* - src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/* - src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/* - src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/* diff --git a/src/installer/prepare-artifacts.proj b/src/installer/prepare-artifacts.proj index 3eed860616f28a..f2b108bf4217a9 100644 --- a/src/installer/prepare-artifacts.proj +++ b/src/installer/prepare-artifacts.proj @@ -12,7 +12,7 @@ - + $(ArtifactsObjDir)TempWorkingDir\$([System.Guid]::NewGuid())\ - + $(ProductionVersion) $(ProductVersion) @@ -101,14 +101,14 @@ Lines="$(ProductVersionTxtContents)" Overwrite="true" Encoding="ASCII" /> - + - + @@ -247,7 +247,7 @@ --> @@ -278,7 +278,7 @@ - + .Node.win-x64` package name, version and sha hash in https://github.com/dotnet/runtime/blob/main/eng/Version.Details.xml and in https://github.com/dotnet/runtime/blob/main/eng/Versions.props. the sha is the commit hash in https://github.com/dotnet/emsdk and the package version can be found at https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet6 -* update packages in the workload manifest https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in +* update packages in the workload manifest https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in ## Upgrading NPM packages In folder `src\mono\wasm\runtime\` From 7193b9098794406cca52bb044c528efd47a23c22 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 19:01:18 -0700 Subject: [PATCH 09/14] [release/7.0-rc1] hold reference to SslContextHandle to prevent crashes (#74367) * fold reference to SslContextHandle to prevent crashes * Update src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs Co-authored-by: Stephen Toub Co-authored-by: wfurt Co-authored-by: Dan Moseley Co-authored-by: Stephen Toub --- .../System.Security.Cryptography.Native/Interop.OpenSsl.cs | 3 +++ .../Unix/System.Security.Cryptography.Native/Interop.Ssl.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs index 826d39abc09e1f..f22665ebc260fc 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs @@ -394,6 +394,9 @@ internal static SafeSslHandle AllocateSslHandle(SslAuthenticationOptions sslAuth if (cacheSslContext && !string.IsNullOrEmpty(punyCode)) { sslCtxHandle.TrySetSession(sslHandle, punyCode); + bool ignored = false; + sslCtxHandle.DangerousAddRef(ref ignored); + sslHandle.SslContextHandle = sslCtxHandle; } // relevant to TLS 1.3 only: if user supplied a client cert or cert callback, diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs index bea9f4625a4ac0..419805223510b3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs @@ -335,6 +335,7 @@ internal sealed class SafeSslHandle : SafeDeleteSslContext private bool _handshakeCompleted; public GCHandle AlpnHandle; + public SafeSslContextHandle? SslContextHandle; public bool IsServer { @@ -432,6 +433,8 @@ protected override bool ReleaseHandle() Disconnect(); } + SslContextHandle?.DangerousRelease(); + IntPtr h = handle; SetHandle(IntPtr.Zero); Interop.Ssl.SslDestroy(h); // will free the handles underlying _readBio and _writeBio From 516f061b83daa17416a99cdef982cad7ef1ab0db Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Tue, 23 Aug 2022 19:39:57 +0200 Subject: [PATCH 10/14] [release/7.0-rc1] Improve DOTNET_JitDisasm and introduce DOTNET_JitDisasmSummary (#74392) * [release/7.0-rc1] Improve DOTNET_JitDisasm and introduce DOTNET_JitDisasmSummary * Update jitconfig.cpp --- .../design/features/OsrDetailsAndDebugging.md | 2 +- src/coreclr/jit/codegencommon.cpp | 28 +----- src/coreclr/jit/compiler.cpp | 82 +++++++++++------ src/coreclr/jit/compiler.h | 3 +- src/coreclr/jit/jitconfig.cpp | 88 +++++++++++++------ src/coreclr/jit/jitconfig.h | 1 + src/coreclr/jit/jitconfigvalues.h | 19 ++-- 7 files changed, 133 insertions(+), 90 deletions(-) diff --git a/docs/design/features/OsrDetailsAndDebugging.md b/docs/design/features/OsrDetailsAndDebugging.md index 1b1303eccb402d..60d697473c147b 100644 --- a/docs/design/features/OsrDetailsAndDebugging.md +++ b/docs/design/features/OsrDetailsAndDebugging.md @@ -338,7 +338,7 @@ Note if a Tier0 method is recursive and has loops there can be some interesting ### Seeing which OSR methods are created -* `DOTNET_DumpJittedMethods=1` will specially mark OSR methods with the inspiring IL offsets. +* `DOTNET_JitDisasmSummary=1` will specially mark OSR methods with the inspiring IL offsets. For example, running a libraries test with some stressful OSR settings, there ended up being 699 OSR methods jitted out of 160675 total methods. Grepping for OSR in the dump output, the last few lines were: diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index f4c0a37ce224bb..45cbd8ac6c0737 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -1887,31 +1887,9 @@ void CodeGen::genGenerateMachineCode() if (compiler->fgHaveProfileData()) { - const char* pgoKind; - switch (compiler->fgPgoSource) - { - case ICorJitInfo::PgoSource::Static: - pgoKind = "Static"; - break; - case ICorJitInfo::PgoSource::Dynamic: - pgoKind = "Dynamic"; - break; - case ICorJitInfo::PgoSource::Blend: - pgoKind = "Blend"; - break; - case ICorJitInfo::PgoSource::Text: - pgoKind = "Textual"; - break; - case ICorJitInfo::PgoSource::Sampling: - pgoKind = "Sample-based"; - break; - default: - pgoKind = "Unknown"; - break; - } - - printf("; with %s PGO: edge weights are %s, and fgCalledCount is " FMT_WT "\n", pgoKind, - compiler->fgHaveValidEdgeWeights ? "valid" : "invalid", compiler->fgCalledCount); + printf("; with %s: edge weights are %s, and fgCalledCount is " FMT_WT "\n", + compiler->compGetPgoSourceName(), compiler->fgHaveValidEdgeWeights ? "valid" : "invalid", + compiler->fgCalledCount); } if (compiler->fgPgoFailReason != nullptr) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index e73052a780f60f..dd0e41fe9852da 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -34,9 +34,7 @@ extern ICorJitHost* g_jitHost; #define COLUMN_FLAGS (COLUMN_KINDS + 32) #endif -#if defined(DEBUG) unsigned Compiler::jitTotalMethodCompiled = 0; -#endif // defined(DEBUG) #if defined(DEBUG) LONG Compiler::jitNestingLevel = 0; @@ -4082,8 +4080,9 @@ bool Compiler::compRsvdRegCheck(FrameLayoutState curState) // const char* Compiler::compGetTieringName(bool wantShortName) const { - const bool tier0 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0); - const bool tier1 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1); + const bool tier0 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0); + const bool tier1 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1); + const bool instrumenting = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_BBINSTR); if (!opts.compMinOptsIsSet) { @@ -4097,13 +4096,13 @@ const char* Compiler::compGetTieringName(bool wantShortName) const if (tier0) { - return "Tier0"; + return instrumenting ? "Instrumented Tier0" : "Tier0"; } else if (tier1) { if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_OSR)) { - return "Tier1-OSR"; + return instrumenting ? "Instrumented Tier1-OSR" : "Tier1-OSR"; } else { @@ -4149,6 +4148,31 @@ const char* Compiler::compGetTieringName(bool wantShortName) const } } +//------------------------------------------------------------------------ +// compGetPgoSourceName: get a string describing PGO source +// +// Returns: +// String describing describing PGO source (e.g. Dynamic, Static, etc) +// +const char* Compiler::compGetPgoSourceName() const +{ + switch (fgPgoSource) + { + case ICorJitInfo::PgoSource::Static: + return "Static PGO"; + case ICorJitInfo::PgoSource::Dynamic: + return "Dynamic PGO"; + case ICorJitInfo::PgoSource::Blend: + return "Blend PGO"; + case ICorJitInfo::PgoSource::Text: + return "Textual PGO"; + case ICorJitInfo::PgoSource::Sampling: + return "Sample-based PGO"; + default: + return ""; + } +} + //------------------------------------------------------------------------ // compGetStressMessage: get a string describing jitstress capability // for this method @@ -5106,9 +5130,31 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl compJitTelemetry.NotifyEndOfCompilation(); #endif -#if defined(DEBUG) - ++Compiler::jitTotalMethodCompiled; -#endif // defined(DEBUG) + unsigned methodsCompiled = (unsigned)InterlockedIncrement((LONG*)&Compiler::jitTotalMethodCompiled); + + if (JitConfig.JitDisasmSummary() && !compIsForInlining()) + { + char osrBuffer[20] = {0}; + if (opts.IsOSR()) + { + // Tiering name already includes "OSR", we just want the IL offset + sprintf_s(osrBuffer, 20, " @0x%x", info.compILEntry); + } + +#ifdef DEBUG + const char* fullName = info.compFullName; +#else + const char* fullName = eeGetMethodFullName(info.compMethodHnd); +#endif + + char debugPart[128] = {0}; + INDEBUG(sprintf_s(debugPart, 128, ", hash=0x%08x%s", info.compMethodHash(), compGetStressMessage())); + + const bool hasProf = fgHaveProfileData(); + printf("%4d: JIT compiled %s [%s%s%s%s, IL size=%u, code size=%u%s]\n", methodsCompiled, fullName, + compGetTieringName(), osrBuffer, hasProf ? " with " : "", hasProf ? compGetPgoSourceName() : "", + info.compILCodeSize, *methodCodeSize, debugPart); + } compFunctionTraceEnd(*methodCodePtr, *methodCodeSize, false); JITDUMP("Method code size: %d\n", (unsigned)(*methodCodeSize)); @@ -6710,24 +6756,6 @@ int Compiler::compCompileHelper(CORINFO_MODULE_HANDLE classPtr, } #ifdef DEBUG - if ((JitConfig.DumpJittedMethods() == 1) && !compIsForInlining()) - { - enum - { - BUFSIZE = 20 - }; - char osrBuffer[BUFSIZE] = {0}; - if (opts.IsOSR()) - { - // Tiering name already includes "OSR", we just want the IL offset - // - sprintf_s(osrBuffer, BUFSIZE, " @0x%x", info.compILEntry); - } - - printf("Compiling %4d %s::%s, IL size = %u, hash=0x%08x %s%s%s\n", Compiler::jitTotalMethodCompiled, - info.compClassName, info.compMethodName, info.compILCodeSize, info.compMethodHash(), - compGetTieringName(), osrBuffer, compGetStressMessage()); - } if (compIsForInlining()) { compGenTreeID = impInlineInfo->InlinerCompiler->compGenTreeID; diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 3291aca767c382..d1b52ab79e9474 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -4145,9 +4145,7 @@ class Compiler regNumber getCallArgIntRegister(regNumber floatReg); regNumber getCallArgFloatRegister(regNumber intReg); -#if defined(DEBUG) static unsigned jitTotalMethodCompiled; -#endif #ifdef DEBUG static LONG jitNestingLevel; @@ -9472,6 +9470,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } const char* compGetTieringName(bool wantShortName = false) const; + const char* compGetPgoSourceName() const; const char* compGetStressMessage() const; codeOptimize compCodeOpt() const diff --git a/src/coreclr/jit/jitconfig.cpp b/src/coreclr/jit/jitconfig.cpp index 6fdbad427fe8a4..cd65af36f106e9 100644 --- a/src/coreclr/jit/jitconfig.cpp +++ b/src/coreclr/jit/jitconfig.cpp @@ -44,14 +44,15 @@ void JitConfigValues::MethodSet::initialize(const WCHAR* list, ICorJitHost* host bool isQuoted = false; // true while parsing inside a quote "this-is-a-quoted-region" MethodName currentName; // Buffer used while parsing the current entry - currentName.m_next = nullptr; - currentName.m_methodNameStart = -1; - currentName.m_methodNameLen = -1; - currentName.m_methodNameWildcardAtEnd = false; - currentName.m_classNameStart = -1; - currentName.m_classNameLen = -1; - currentName.m_classNameWildcardAtEnd = false; - currentName.m_numArgs = -1; + currentName.m_next = nullptr; + currentName.m_methodNameStart = -1; + currentName.m_methodNameLen = -1; + currentName.m_methodNameWildcardAtStart = false; + currentName.m_methodNameWildcardAtEnd = false; + currentName.m_classNameStart = -1; + currentName.m_classNameLen = -1; + currentName.m_classNameWildcardAtEnd = false; + currentName.m_numArgs = -1; enum State { @@ -202,21 +203,31 @@ void JitConfigValues::MethodSet::initialize(const WCHAR* list, ICorJitHost* host } // Is the first character a wildcard? - if (m_list[currentName.m_methodNameStart] == WILD_CHAR) + if (m_list[currentName.m_methodNameStart] == WILD_CHAR && currentName.m_methodNameLen == 1) { // The method name is a full wildcard; mark it as such. currentName.m_methodNameStart = -1; currentName.m_methodNameLen = -1; } - // Is there a wildcard at the end of the method name? - // - else if (m_list[currentName.m_methodNameStart + currentName.m_methodNameLen - 1] == WILD_CHAR) + else { - // i.e. class:foo*, will match any method that starts with "foo" - - // Remove the trailing WILD_CHAR from method name - currentName.m_methodNameLen--; // backup for WILD_CHAR - currentName.m_methodNameWildcardAtEnd = true; + // Is there a wildcard at the start of the method name? + if (m_list[currentName.m_methodNameStart] == WILD_CHAR) + { + // i.e. class:*foo, will match any method that ends with "foo" + // Remove the leading WILD_CHAR from method name + currentName.m_methodNameStart++; + currentName.m_methodNameLen--; + currentName.m_methodNameWildcardAtStart = true; + } + // Is there a wildcard at the end of the method name? + if (m_list[currentName.m_methodNameStart + currentName.m_methodNameLen - 1] == WILD_CHAR) + { + // i.e. class:foo*, will match any method that starts with "foo" + // Remove the trailing WILD_CHAR from method name + currentName.m_methodNameLen--; // backup for WILD_CHAR + currentName.m_methodNameWildcardAtEnd = true; + } } // should we expect an ARG_LIST? @@ -309,11 +320,35 @@ void JitConfigValues::MethodSet::destroy(ICorJitHost* host) m_names = nullptr; } -static bool matchesName(const char* const name, int nameLen, bool wildcardAtEnd, const char* const s2) +// strstr that is length-limited, this implementation is not intended to be used on hot paths +static size_t strnstr(const char* pSrc, size_t srcSize, const char* needle, size_t needleSize) +{ + if (srcSize < needleSize) + { + return -1; + } + + for (size_t srcPos = 0; srcPos <= srcSize - needleSize; srcPos++) + { + if (strncmp(pSrc + srcPos, needle, needleSize) == 0) + { + return srcPos; + } + } + return -1; +} + +static bool matchesName( + const char* const name, int nameLen, bool wildcardAtStart, bool wildcardAtEnd, const char* const s2) { - // 's2' must start with 'nameLen' characters of 'name' - if (strncmp(name, s2, nameLen) != 0) + if (wildcardAtStart && (int)strnstr(s2, strlen(s2), name, nameLen) == -1) + { + return false; + } + + if (!wildcardAtStart && strncmp(name, s2, nameLen) != 0) { + // 's2' must start with 'nameLen' characters of 'name' return false; } @@ -346,12 +381,14 @@ bool JitConfigValues::MethodSet::contains(const char* methodName, if (name->m_methodNameStart != -1) { const char* expectedMethodName = &m_list[name->m_methodNameStart]; - if (!matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtEnd, methodName)) + if (!matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtStart, + name->m_methodNameWildcardAtEnd, methodName)) { // C++ embeds the class name into the method name; deal with that here. const char* colon = strchr(methodName, ':'); if (colon != nullptr && colon[1] == ':' && - matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtEnd, methodName)) + matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtStart, + name->m_methodNameWildcardAtEnd, methodName)) { int classLen = (int)(colon - methodName); if (name->m_classNameStart == -1 || @@ -367,8 +404,7 @@ bool JitConfigValues::MethodSet::contains(const char* methodName, // If m_classNameStart is valid, check for a mismatch if (className == nullptr || name->m_classNameStart == -1 || - matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, name->m_classNameWildcardAtEnd, - className)) + matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, false, false, className)) { return true; } @@ -379,8 +415,8 @@ bool JitConfigValues::MethodSet::contains(const char* methodName, if (nsSep != nullptr && nsSep != className) { const char* onlyClass = nsSep[-1] == '.' ? nsSep : &nsSep[1]; - if (matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, name->m_classNameWildcardAtEnd, - onlyClass)) + if (matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, false, + name->m_classNameWildcardAtEnd, onlyClass)) { return true; } diff --git a/src/coreclr/jit/jitconfig.h b/src/coreclr/jit/jitconfig.h index 12d327d292b399..90f3daf9f63174 100644 --- a/src/coreclr/jit/jitconfig.h +++ b/src/coreclr/jit/jitconfig.h @@ -20,6 +20,7 @@ class JitConfigValues MethodName* m_next; int m_methodNameStart; int m_methodNameLen; + bool m_methodNameWildcardAtStart; bool m_methodNameWildcardAtEnd; int m_classNameStart; int m_classNameLen; diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index 3e6df61b1f71fd..efd5adf017c7d3 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -26,15 +26,14 @@ CONFIG_INTEGER(DiffableDasm, W("JitDiffableDasm"), 0) // Make the disas CONFIG_INTEGER(JitDasmWithAddress, W("JitDasmWithAddress"), 0) // Print the process address next to each instruction of // the disassembly CONFIG_INTEGER(DisplayLoopHoistStats, W("JitLoopHoistStats"), 0) // Display JIT loop hoisting statistics -CONFIG_INTEGER(DisplayLsraStats, W("JitLsraStats"), 0) // Display JIT Linear Scan Register Allocator statistics - // If set to "1", display the stats in textual format. - // If set to "2", display the stats in csv format. - // If set to "3", display the stats in summarize format. - // Recommended to use with JitStdOutFile flag. -CONFIG_STRING(JitLsraOrdering, W("JitLsraOrdering")) // LSRA heuristics ordering -CONFIG_INTEGER(DumpJittedMethods, W("DumpJittedMethods"), 0) // Prints all jitted methods to the console -CONFIG_INTEGER(EnablePCRelAddr, W("JitEnablePCRelAddr"), 1) // Whether absolute addr be encoded as PC-rel offset by - // RyuJIT where possible +CONFIG_INTEGER(DisplayLsraStats, W("JitLsraStats"), 0) // Display JIT Linear Scan Register Allocator statistics + // If set to "1", display the stats in textual format. + // If set to "2", display the stats in csv format. + // If set to "3", display the stats in summarize format. + // Recommended to use with JitStdOutFile flag. +CONFIG_STRING(JitLsraOrdering, W("JitLsraOrdering")) // LSRA heuristics ordering +CONFIG_INTEGER(EnablePCRelAddr, W("JitEnablePCRelAddr"), 1) // Whether absolute addr be encoded as PC-rel offset by + // RyuJIT where possible CONFIG_INTEGER(JitAssertOnMaxRAPasses, W("JitAssertOnMaxRAPasses"), 0) CONFIG_INTEGER(JitBreakEmitOutputInstr, W("JitBreakEmitOutputInstr"), -1) CONFIG_INTEGER(JitBreakMorphTree, W("JitBreakMorphTree"), 0xffffffff) @@ -257,6 +256,8 @@ CONFIG_INTEGER(EnableIncompleteISAClass, W("EnableIncompleteISAClass"), 0) // En CONFIG_METHODSET(JitDisasm, W("JitDisasm")) #endif // !defined(DEBUG) +CONFIG_INTEGER(JitDisasmSummary, W("JitDisasmSummary"), 0) // Prints all jitted methods to the console + CONFIG_INTEGER(RichDebugInfo, W("RichDebugInfo"), 0) // If 1, keep rich debug info and report it back to the EE #ifdef DEBUG From 1356e444be5758c565f97bf6b3da532855adf3c8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:21:42 -0700 Subject: [PATCH 11/14] Update dependencies from https://github.com/dotnet/emsdk build 20220823.3 (#74456) Microsoft.NET.Workload.Emscripten.net6.Manifest-7.0.100 , Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100 From Version 7.0.0-rc.1.22418.9 -> To Version 7.0.0-rc.1.22423.3 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e13b807313b38b..5b483cef7a71a8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -48,13 +48,13 @@ https://github.com/dotnet/command-line-api 5618b2d243ccdeb5c7e50a298b33b13036b4351b - + https://github.com/dotnet/emsdk - 745113281de08619474a5e1c704290a4ed30a65d + 321399ab3ab4853fbf861b2eaed2113447a6d7e4 - + https://github.com/dotnet/emsdk - 745113281de08619474a5e1c704290a4ed30a65d + 321399ab3ab4853fbf861b2eaed2113447a6d7e4 diff --git a/eng/Versions.props b/eng/Versions.props index 7f2865829d81d3..0df6c62cf53668 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -22,8 +22,8 @@ false $(AssemblyVersion) true - 7.0.0-rc.1.22418.9 - 7.0.0-rc.1.22418.9 + 7.0.0-rc.1.22423.3 + 7.0.0-rc.1.22423.3