diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3bff7a26fb1843..7fcec77f199e6e 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "9.0.0-prerelease.25375.3", + "version": "9.0.0-prerelease.25426.1", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 55068ae0f39632..2bdfb23f2ac007 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - 8651fab55b69849f0a4001949df126fea4d4b419 + 4ca307e1d07b3b76d1aa66c15d67de89bcca0cd8 https://github.com/dotnet/msquic @@ -54,14 +54,14 @@ 803d8598f98fb4efd94604b32627ee9407f246db - + https://github.com/dotnet/cecil - 788a8a7481c01a7d235110cdea2ca5bfb34210d4 + e5381291dd01d040b5b111f3a2ee8508ec990d78 - + https://github.com/dotnet/cecil - 788a8a7481c01a7d235110cdea2ca5bfb34210d4 + e5381291dd01d040b5b111f3a2ee8508ec990d78 @@ -79,9 +79,9 @@ - + https://github.com/dotnet/source-build-reference-packages - 9859d82ffce48f49b5e93fa46a38bdddc4ba26be + 745de7d839fdd3b5884d72e953badcfb15493d13 @@ -92,139 +92,139 @@ - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b https://github.com/dotnet/llvm-project @@ -320,21 +320,21 @@ https://github.com/dotnet/runtime b030c4dfdfa1bf287f10f96006619a06bc2000ae - + https://github.com/dotnet/xharness - 604c13925074041a51e4533959477c8b6888dcf5 + 7b6f58237ff2355392960408f4d9fd98dfe58f9b - + https://github.com/dotnet/xharness - 604c13925074041a51e4533959477c8b6888dcf5 + 7b6f58237ff2355392960408f4d9fd98dfe58f9b - + https://github.com/dotnet/xharness - 604c13925074041a51e4533959477c8b6888dcf5 + 7b6f58237ff2355392960408f4d9fd98dfe58f9b - + https://github.com/dotnet/arcade - 1a2e280a031aaed0dca606ec8c59c6fe0f9bfc7f + 024c562f73f21bfce3ab36f72c20aee30281e212 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -352,25 +352,25 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization 9d7532585ce71e30ab55f0364d3cecccaf0775d1 - + https://github.com/dotnet/hotreload-utils - 3eb23e965fcc8cf3f6bec6e3e2543a81e52b6d20 + 0334eb13c37ab4d8d1b405952e838fc8cad195be - + https://github.com/dotnet/runtime-assets - c77fd5058ea46e9d0b58f5c11b6808d6170e4e32 + 36490ea19fe9622e76fb3534069a6459ff56353b - + https://github.com/dotnet/roslyn - 5f78534e8ac55b615a3540e7c1ffedee9ced6e1e + dcf9af2b54e4469b94697b1b92d31354ce698f66 - + https://github.com/dotnet/roslyn - 5f78534e8ac55b615a3540e7c1ffedee9ced6e1e + dcf9af2b54e4469b94697b1b92d31354ce698f66 - + https://github.com/dotnet/roslyn - 5f78534e8ac55b615a3540e7c1ffedee9ced6e1e + dcf9af2b54e4469b94697b1b92d31354ce698f66 https://github.com/dotnet/roslyn-analyzers @@ -381,9 +381,9 @@ 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn - 5f78534e8ac55b615a3540e7c1ffedee9ced6e1e + dcf9af2b54e4469b94697b1b92d31354ce698f66 diff --git a/eng/Versions.props b/eng/Versions.props index 1f299061e56112..a826e5319d2428 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,9 +44,9 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 4.12.0-3.25377.4 - 4.12.0-3.25377.4 - 4.12.0-3.25377.4 + 4.12.0-3.25467.18 + 4.12.0-3.25467.18 + 4.12.0-3.25467.18 9.0.109 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 2.9.0-beta.25366.1 - 9.0.0-beta.25366.1 - 2.9.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 - 9.0.0-beta.25366.1 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 2.9.0-beta.25465.2 + 9.0.0-beta.25465.2 + 2.9.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 + 9.0.0-beta.25465.2 1.4.0 @@ -141,20 +141,20 @@ 8.0.0 8.0.0 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 - 9.0.0-beta.25313.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 + 9.0.0-beta.25462.1 1.0.0-prerelease.24462.2 1.0.0-prerelease.24462.2 @@ -184,10 +184,12 @@ 1.4.0 17.4.0-preview-20220707-01 - 9.0.0-prerelease.25375.3 - 9.0.0-prerelease.25375.3 - 9.0.0-prerelease.25375.3 - 9.0.0-alpha.0.25330.3 + + 9.0.0-prerelease.25426.1 + 9.0.0-prerelease.25426.1 + 9.0.0-prerelease.25426.1 + + 9.0.0-alpha.0.25462.1 3.12.0 4.5.0 6.0.0 @@ -215,11 +217,11 @@ 9.0.0-preview-20241010.1 - 0.11.5-alpha.25370.2 + 0.11.5-alpha.25464.3 9.0.0-rtm.24511.16 - 9.0.0-rtm.25371.1 + 9.0.0-rtm.25469.1 9.0.0-rtm.24466.4 2.4.8 @@ -263,7 +265,7 @@ 1.0.406601 - 9.0.107 + 9.0.110 9.0.0-alpha.1.24175.1 $(MicrosoftNETRuntimeEmscriptenVersion) $(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion) diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 5db4ad71ee2f3e..792b60b49d424d 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -10,8 +10,8 @@ # displayName: Setup Private Feeds Credentials # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) # diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 4604b61b0323ae..facb415ca6ff35 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -11,8 +11,8 @@ # - task: Bash@3 # displayName: Setup Internal Feeds # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(Build.SourcesDirectory)/NuGet.config +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh +# arguments: $(System.DefaultWorkingDirectory)/NuGet.config # condition: ne(variables['Agent.OS'], 'Windows_NT') # - task: NuGetAuthenticate@1 # diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index abe80a2a0e09c9..8da43d3b5837a1 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -19,6 +19,7 @@ parameters: # publishing defaults artifacts: '' enableMicrobuild: false + microbuildUseESRP: true enablePublishBuildArtifacts: false enablePublishBuildAssets: false enablePublishTestResults: false @@ -134,10 +135,11 @@ jobs: signType: $(_SignType) zipSources: false feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea - ${{ else }}: - ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca + ${{ if eq(parameters.microbuildUseESRP, true) }}: + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + ${{ else }}: + ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca env: TeamName: $(_TeamName) MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' @@ -164,7 +166,7 @@ jobs: inputs: languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'internal') }} - richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} continueOnError: true @@ -187,7 +189,7 @@ jobs: inputs: testResultsFormat: 'xUnit' testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -198,7 +200,7 @@ jobs: inputs: testResultsFormat: 'VSTest' testResultsFiles: '*.trx' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -242,7 +244,7 @@ jobs: - task: CopyFiles@2 displayName: Gather buildconfiguration for build retry inputs: - SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration' + SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration' continueOnError: true diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 00feec8ebbc3ab..edefa789d360f3 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -8,7 +8,7 @@ parameters: CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - SourcesDirectory: $(Build.SourcesDirectory) + SourcesDirectory: $(System.DefaultWorkingDirectory) CreatePr: true AutoCompletePr: false ReusePr: true @@ -68,7 +68,7 @@ jobs: - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - task: Powershell@2 inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 arguments: $(_GenerateLocProjectArguments) displayName: Generate LocProject.json condition: ${{ parameters.condition }} @@ -115,7 +115,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: displayName: Publish LocProject.json - pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' + pathToPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/' publishLocation: Container artifactName: Loc condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 3d3356e3196727..a58c8a418e8a99 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -32,6 +32,10 @@ parameters: is1ESPipeline: '' + repositoryAlias: self + + officialBuildId: '' + jobs: - job: Asset_Registry_Publish @@ -54,6 +58,11 @@ jobs: value: false # unconditional - needed for logs publishing (redactor tool version) - template: /eng/common/core-templates/post-build/common-variables.yml + - name: OfficialBuildId + ${{ if ne(parameters.officialBuildId, '') }}: + value: ${{ parameters.officialBuildId }} + ${{ else }}: + value: $(Build.BuildNumber) pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) @@ -72,7 +81,7 @@ jobs: - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - checkout: self + - checkout: ${{ parameters.repositoryAlias }} fetchDepth: 3 clean: true @@ -93,12 +102,12 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:OfficialBuildId=$(Build.BuildNumber) + /p:OfficialBuildId=$(OfficialBuildId) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} @@ -113,7 +122,7 @@ jobs: Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt" + $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" if (Test-Path -Path $symbolExclusionfile) { Write-Host "SymbolExclusionFile exists" @@ -142,7 +151,7 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion 3 diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml index d47f09d58fd9a8..5baedac1e03dd4 100644 --- a/eng/common/core-templates/job/source-build.yml +++ b/eng/common/core-templates/job/source-build.yml @@ -33,6 +33,9 @@ parameters: # container and pool. platform: {} + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: '' # If set to true and running on a non-public project, @@ -93,3 +96,4 @@ jobs: parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} platform: ${{ parameters.platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 8b833332b3ee96..662b9fcce154fc 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -66,7 +66,7 @@ jobs: - script: ${{ parameters.sourceIndexBuildCommand }} displayName: Build Repository - - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output + - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output displayName: Process Binlog into indexable sln - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml index f2144252cc65c8..4571a7864df6bf 100644 --- a/eng/common/core-templates/jobs/codeql-build.yml +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -25,7 +25,7 @@ jobs: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index ea69be4341c62f..bf33cdc2cc7787 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -43,6 +43,8 @@ parameters: artifacts: {} is1ESPipeline: '' + repositoryAlias: self + officialBuildId: '' # Internal resources (telemetry, microbuild) can only be accessed from non-public projects, # and some (Microbuild) should only be applied to non-PR cases for internal builds. @@ -117,3 +119,5 @@ jobs: enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} + repositoryAlias: ${{ parameters.repositoryAlias }} + officialBuildId: ${{ parameters.officialBuildId }} diff --git a/eng/common/core-templates/jobs/source-build.yml b/eng/common/core-templates/jobs/source-build.yml index a10ccfbee6de6e..0b408a67bd51cd 100644 --- a/eng/common/core-templates/jobs/source-build.yml +++ b/eng/common/core-templates/jobs/source-build.yml @@ -21,6 +21,9 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: '' # If set to true and running on a non-public project, @@ -47,6 +50,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: @@ -55,4 +59,5 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index a8c0bd3b9214e5..2ee8bbfff54553 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -149,7 +149,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - job: @@ -206,7 +206,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task SigningValidation -restore -msbuildEngine vs /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' ${{ parameters.signingValidationAdditionalParameters }} - template: /eng/common/core-templates/steps/publish-logs.yml @@ -256,7 +256,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Extract/ -GHRepoName $(Build.Repository.Name) @@ -311,7 +311,7 @@ stages: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml index f7602980dbe721..a7abd58c4bb609 100644 --- a/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -36,7 +36,7 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - . $(Build.SourcesDirectory)\eng\common\tools.ps1 + . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1 $darc = Get-Darc $buildInfo = & $darc get-build ` --id ${{ parameters.BARBuildId }} ` diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 64f881bffc3cf1..4085512b690910 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -17,8 +17,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token env: Token: ${{ parameters.legacyCredential }} # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. @@ -29,8 +29,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config - ${{ else }}: - template: /eng/common/templates/steps/get-federated-access-token.yml parameters: @@ -39,8 +39,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) # This is required in certain scenarios to install the ADO credential provider. # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others # (e.g. dotnet msbuild). diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index 56a090094824f4..7f5b84c4cb827f 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -6,7 +6,7 @@ parameters: PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom IgnoreDirectories: '' diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 80788c5231912f..0623ac6e112309 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -12,22 +12,22 @@ steps: inputs: targetType: inline script: | - New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ continueOnError: true condition: always() - task: PowerShell@2 displayName: Redact Logs inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1 # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml - # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' # If the file exists - sensitive data for redaction will be sourced from it # (single entry per line, lines starting with '# ' are considered comments and skipped) - arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs' + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' -BinlogToolVersion ${{parameters.BinlogToolVersion}} - -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' '$(publishing-dnceng-devdiv-code-r-build-re)' '$(MaestroAccessToken)' '$(dn-bot-all-orgs-artifact-feeds-rw)' @@ -42,7 +42,7 @@ steps: - task: CopyFiles@2 displayName: Gather post build logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs' + SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 37133b55b7541b..0718e4ba902e8f 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -11,6 +11,10 @@ parameters: # for details. The entire object is described in the 'job' template for simplicity, even though # the usage of the properties on this object is split between the 'job' and 'steps' templates. platform: {} + + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: false steps: @@ -97,7 +101,7 @@ steps: - task: CopyFiles@2 displayName: Prepare BuildLogs staging directory inputs: - SourceFolder: '$(Build.SourcesDirectory)' + SourceFolder: '$(System.DefaultWorkingDirectory)' Contents: | **/*.log **/*.binlog @@ -126,5 +130,8 @@ steps: parameters: displayName: Component Detection (Exclude upstream cache) is1ESPipeline: ${{ parameters.is1ESPipeline }} - componentGovernanceIgnoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ if eq(length(parameters.componentGovernanceIgnoreDirectories), 0) }}: + componentGovernanceIgnoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ else }}: + componentGovernanceIgnoreDirectories: ${{ join(',', parameters.componentGovernanceIgnoreDirectories) }} disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }} diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 98bbc1ded0ba88..4bf4cf41bd7c76 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -50,7 +50,7 @@ extends: - task: CopyFiles@2 displayName: Gather build output inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel' + SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' ``` diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 817555505aa602..81ea7a261f2d4a 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -3,7 +3,7 @@ parameters: enableSbom: true runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml index dbdd66d4a4b3a0..f1311bbb1b33d9 100644 --- a/eng/common/templates-official/variables/sdl-variables.yml +++ b/eng/common/templates-official/variables/sdl-variables.yml @@ -4,4 +4,4 @@ variables: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index d1aeb92fcea519..5bdd3dd85fd2be 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -6,7 +6,7 @@ parameters: enableSbom: true runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml @@ -75,7 +75,7 @@ jobs: parameters: is1ESPipeline: false args: - targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration' + targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration' artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' continueOnError: true diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index ebb4a427f2896f..109b947e4eb6fb 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -666,9 +666,21 @@ if (CLR_CMAKE_HOST_UNIX) # a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets # replaced with a default value, and always gets expanded to an OS version. # https://gitlab.kitware.com/cmake/cmake/-/issues/20132 - # We need to disable the warning that -tagret replaces -mmacosx-version-min - set(DISABLE_OVERRIDING_MIN_VERSION_ERROR -Wno-overriding-t-option) - add_link_options(-Wno-overriding-t-option) + # We need to disable the warning that -target replaces -mmacosx-version-min + # + # With https://github.com/llvm/llvm-project/commit/1c66d08b0137cef7761b8220d3b7cb7833f57cdb clang renamed the option so we need to check for both + check_c_compiler_flag("-Wno-overriding-option" COMPILER_SUPPORTS_W_NO_OVERRIDING_OPTION) + if (COMPILER_SUPPORTS_W_NO_OVERRIDING_OPTION) + set(DISABLE_OVERRIDING_MIN_VERSION_ERROR -Wno-overriding-option) + else() + check_c_compiler_flag("-Wno-overriding-t-option" COMPILER_SUPPORTS_W_NO_OVERRIDING_T_OPTION) + if (COMPILER_SUPPORTS_W_NO_OVERRIDING_T_OPTION) + set(DISABLE_OVERRIDING_MIN_VERSION_ERROR -Wno-overriding-t-option) + else() + message(FATAL_ERROR "Compiler does not support -Wno-overriding-option or -Wno-overriding-t-option, needed for Mac Catalyst builds.") + endif() + endif() + add_link_options(${DISABLE_OVERRIDING_MIN_VERSION_ERROR}) if(CLR_CMAKE_HOST_ARCH_ARM64) set(CLR_CMAKE_MACCATALYST_COMPILER_TARGET "arm64-apple-ios15.0-macabi") add_link_options(-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET}) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index fdfd004b96eb3e..9beb1e26c2fc2f 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -73,6 +73,7 @@ extends: export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/2.0" export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0" export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0" + docker-compose down docker-compose up --abort-on-container-exit --no-color displayName: Run HttpStress - HTTP 2.0 condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) @@ -83,6 +84,7 @@ extends: export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/1.1" export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1" export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1" + docker-compose down docker-compose up --abort-on-container-exit --no-color displayName: Run HttpStress - HTTP 1.1 condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) diff --git a/global.json b/global.json index fbcea3f120a495..13b3031d87d5cb 100644 --- a/global.json +++ b/global.json @@ -1,16 +1,16 @@ { "sdk": { - "version": "9.0.107", + "version": "9.0.110", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "9.0.107" + "dotnet": "9.0.110" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25366.1", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25366.1", - "Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.25366.1", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25465.2", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25465.2", + "Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.25465.2", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", "Microsoft.NET.Sdk.IL": "9.0.0-rtm.24511.16" diff --git a/src/coreclr/pal/src/thread/process.cpp b/src/coreclr/pal/src/thread/process.cpp index 9504e6995c5506..01f67342cc1a54 100644 --- a/src/coreclr/pal/src/thread/process.cpp +++ b/src/coreclr/pal/src/thread/process.cpp @@ -2444,8 +2444,11 @@ PROCCreateCrashDump( size_t previousThreadId = InterlockedCompareExchange(&g_crashingThreadId, currentThreadId, 0); if (previousThreadId != 0) { - // Should never reenter or recurse - _ASSERTE(previousThreadId != currentThreadId); + // Return error if reenter this code + if (previousThreadId == currentThreadId) + { + return false; + } // The first thread generates the crash info and any other threads are blocked while (true) diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index eb3a2d8015ccd5..50b44b6ff6761f 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -3746,10 +3746,19 @@ void SaveManagedCommandLine(LPCWSTR pwzAssemblyPath, int argc, LPCWSTR *argv) #endif } +static bool g_fIJWLoaded = false; + void Module::SetIsIJWFixedUp() { LIMITED_METHOD_CONTRACT; InterlockedOr((LONG*)&m_dwTransientFlags, IS_IJW_FIXED_UP); + g_fIJWLoaded = true; +} + +bool Module::HasAnyIJWBeenLoaded() +{ + LIMITED_METHOD_CONTRACT; + return g_fIJWLoaded; } #endif // !DACCESS_COMPILE diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index 5fee2e09f4bf79..0f9936e47f864c 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -1476,6 +1476,8 @@ class Module : public ModuleBase BOOL IsIJWFixedUp() { return m_dwTransientFlags & IS_IJW_FIXED_UP; } void SetIsIJWFixedUp(); + static bool HasAnyIJWBeenLoaded(); + BOOL IsBeingUnloaded() { return m_dwTransientFlags & IS_BEING_UNLOADED; } void SetBeingUnloaded(); void StartUnload(); diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index 3df24664ff2df5..a75353ec28f990 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -1815,7 +1815,17 @@ static void OsAttachThread(void* thread) if (t_flsState == FLS_STATE_INVOKED) { - _ASSERTE_ALL_BUILDS(!"Attempt to execute managed code after the .NET runtime thread state has been destroyed."); + // Managed C++ may run managed code in DllMain (e.g. during DLL_PROCESS_DETACH to run global destructors). This is + // not supported and unreliable. Historically, it happened to work most of the time. For backward compatibility, + // suppress this assert in release builds if we have encountered any mixed mode binaries. + if (Module::HasAnyIJWBeenLoaded()) + { + _ASSERTE(!"Attempt to execute managed code after the .NET runtime thread state has been destroyed."); + } + else + { + _ASSERTE_ALL_BUILDS(!"Attempt to execute managed code after the .NET runtime thread state has been destroyed."); + } } t_flsState = FLS_STATE_ARMED; diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs index db6f7b863a0891..0cca6d05c59143 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs @@ -44,6 +44,7 @@ public static partial class PlatformDetection public static bool IsNotMacOsAppleSilicon => !IsMacOsAppleSilicon; public static bool IsAppSandbox => Environment.GetEnvironmentVariable("APP_SANDBOX_CONTAINER_ID") != null; public static bool IsNotAppSandbox => !IsAppSandbox; + public static bool IsApplePlatform26OrLater => IsApplePlatform && Environment.OSVersion.Version.Major >= 26; public static Version OpenSslVersion => !IsApplePlatform && !IsWindows && !IsAndroid ? GetOpenSslVersion() : diff --git a/src/libraries/System.Data.OleDb/tests/AssemblyInfo.cs b/src/libraries/System.Data.OleDb/tests/AssemblyInfo.cs new file mode 100644 index 00000000000000..6349558b2d1c35 --- /dev/null +++ b/src/libraries/System.Data.OleDb/tests/AssemblyInfo.cs @@ -0,0 +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 Xunit; + +// The OleDB tests use the ACE driver, which has issues with concurrency. +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs index 358c1a0c7ff287..56a1159483f73d 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs @@ -780,7 +780,6 @@ public async Task Public_Interop_ExactVersion_Success(string uri) }; using HttpResponseMessage response = await client.SendAsync(request).WaitAsync(TimeSpan.FromSeconds(20)); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(3, response.Version.Major); } @@ -799,7 +798,6 @@ public async Task Public_Interop_ExactVersion_BufferContent_Success(string uri) }; using HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseContentRead).WaitAsync(TimeSpan.FromSeconds(20)); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(3, response.Version.Major); var content = await response.Content.ReadAsStringAsync(); diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs index 2d7139a05803cb..3cc68756604955 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -68,6 +68,7 @@ public void MulticastOption_CreateSocketSetGetOption_GroupAndInterfaceIndex_SetS [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoNorServerCore))] // Skip on Nano: https://github.com/dotnet/runtime/issues/26286 [ActiveIssue("https://github.com/dotnet/runtime/issues/104547", typeof(PlatformDetection), nameof(PlatformDetection.IsQemuLinux))] [ActiveIssue("https://github.com/dotnet/runtime/issues/113827", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile))] + [SkipOnPlatform(TestPlatforms.OSX, "Multicast interface selection fails on macOS 14+ due to changes in how the system handles network interface parameters")] public async Task MulticastInterface_Set_AnyInterface_Succeeds() { // On all platforms, index 0 means "any interface" diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.Shared.xml b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.Shared.xml index a6c2ad4619d923..eb94f795ab2dd6 100644 --- a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.Shared.xml +++ b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.Shared.xml @@ -72,6 +72,11 @@ + + + + + diff --git a/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs b/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs index 34ce9021b14b51..a9b209003ec496 100644 --- a/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs @@ -288,13 +288,13 @@ public static void SystemTrustCertificateWithCustomRootTrust(bool addCertificate // Check some known conditions. - if (PlatformDetection.UsesAppleCrypto) + if (OperatingSystem.IsLinux() || PlatformDetection.IsApplePlatform26OrLater) { - Assert.Equal(3, chain.ChainElements.Count); + Assert.Equal(2, chain.ChainElements.Count); } - else if (OperatingSystem.IsLinux()) + else if (PlatformDetection.IsApplePlatform) { - Assert.Equal(2, chain.ChainElements.Count); + Assert.Equal(3, chain.ChainElements.Count); } } } @@ -1179,12 +1179,12 @@ public static void BuildChainForCertificateSignedWithDisallowedKey() chain.ChainPolicy.ExtraStore.Add(intermediateCert); Assert.False(chain.Build(cert)); - if (PlatformDetection.IsAndroid) + if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater) { // Android always validates trust as part of building a path, // so violations comes back as PartialChain with no elements + // Apple 26 no longer block these SKIs since the roots are no longer trusted at all and are expired. Assert.Equal(X509ChainStatusFlags.PartialChain, chain.AllStatusFlags()); - Assert.Equal(0, chain.ChainElements.Count); } else { diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index fabeafa41e3e79..89597c85659fd8 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -552,6 +552,27 @@ if(GCC) set(WARNINGS "${WARNINGS} -Qunused-arguments -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand -Wno-zero-length-array -Wno-asm-operand-widths") endif() + if (HOST_MACCAT) + # Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass + # a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets + # replaced with a default value, and always gets expanded to an OS version. + # https://gitlab.kitware.com/cmake/cmake/-/issues/20132 + # We need to disable the warning that -target replaces -mmacosx-version-min + # + # With https://github.com/llvm/llvm-project/commit/1c66d08b0137cef7761b8220d3b7cb7833f57cdb clang renamed the option so we need to check for both + check_c_compiler_flag("-Wno-overriding-option" COMPILER_SUPPORTS_W_NO_OVERRIDING_OPTION) + if (COMPILER_SUPPORTS_W_NO_OVERRIDING_OPTION) + set(WARNINGS "${WARNINGS} -Wno-overriding-option") + else() + check_c_compiler_flag("-Wno-overriding-t-option" COMPILER_SUPPORTS_W_NO_OVERRIDING_T_OPTION) + if (COMPILER_SUPPORTS_W_NO_OVERRIDING_T_OPTION) + set(WARNINGS "${WARNINGS} -Wno-overriding-t-option") + else() + message(FATAL_ERROR "Compiler does not support -Wno-overriding-option or -Wno-overriding-t-option, needed for Mac Catalyst builds.") + endif() + endif() + endif() + check_c_compiler_flag("-Werror=incompatible-pointer-types" WERROR_INCOMPATIBLE_POINTER_TYPES) if(WERROR_INCOMPATIBLE_POINTER_TYPES) set(WERROR_C "${WERROR_C} -Werror=incompatible-pointer-types") diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 8bfbb710823937..d039812dfe45b0 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -540,8 +540,6 @@ JS_ENGINES = [NODE_JS] <_MonoCMakeArgs Include="-DCMAKE_SYSTEM_VARIANT=maccatalyst" /> - - <_MonoCPPFLAGS Include="-Wno-overriding-t-option" /> <_MonoCFlags Condition="'$(TargetArchitecture)' == 'arm64'" Include="-target arm64-apple-ios$(MacCatalystVersionMin)-macabi" /> <_MonoCFlags Condition="'$(TargetArchitecture)' == 'x64'" Include="-target x86_64-apple-ios$(MacCatalystVersionMin)-macabi" /> <_MonoCFLAGS Condition="'$(TargetArchitecture)' == 'arm64'" Include="-arch arm64" /> diff --git a/src/mono/mono/mini/mini-arm64.c b/src/mono/mono/mini/mini-arm64.c index c42684ce693527..8410f0939f85c5 100644 --- a/src/mono/mono/mini/mini-arm64.c +++ b/src/mono/mono/mini/mini-arm64.c @@ -4204,7 +4204,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) arm_ldrx (code, ARMREG_IP1, info_var->inst_basereg, GTMREG_TO_INT (info_var->inst_offset)); /* Add the bp_tramp_offset */ - val = ((bp_tramp_offset / 4) * sizeof (target_mgreg_t)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs); + val = (bp_tramp_offset * sizeof (target_mgreg_t)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs); /* Load the info->bp_addrs [bp_tramp_offset], which is either 0 or the address of the bp trampoline */ code = emit_ldrx (code, ARMREG_IP1, ARMREG_IP1, val); /* Skip the load if its 0 */ @@ -6873,9 +6873,7 @@ mono_arch_set_breakpoint (MonoJitInfo *ji, guint8 *ip) if (enable_ptrauth) NOT_IMPLEMENTED; - g_assert (native_offset % 4 == 0); - g_assert (info->bp_addrs [native_offset / 4] == 0); - info->bp_addrs [native_offset / 4] = (guint8*)mini_get_breakpoint_trampoline (); + info->bp_addrs [native_offset] = (guint8*)mini_get_breakpoint_trampoline (); } else { /* ip points to an ldrx */ code += 4; @@ -6898,8 +6896,7 @@ mono_arch_clear_breakpoint (MonoJitInfo *ji, guint8 *ip) if (enable_ptrauth) NOT_IMPLEMENTED; - g_assert (native_offset % 4 == 0); - info->bp_addrs [native_offset / 4] = NULL; + info->bp_addrs [native_offset] = NULL; } else { /* ip points to an ldrx */ code += 4; @@ -6967,7 +6964,7 @@ mono_arch_get_seq_point_info (guint8 *code) ji = mini_jit_info_table_find (code); g_assert (ji); - info = g_malloc0 (sizeof (SeqPointInfo) + (ji->code_size / 4) * sizeof(guint8*)); + info = g_malloc0 (sizeof (SeqPointInfo) + (ji->code_size) * sizeof(guint8*)); info->ss_tramp_addr = &ss_trampoline; diff --git a/src/mono/mono/mini/mini-wasm.c b/src/mono/mono/mini/mini-wasm.c index a0587570fe2bdf..55d9fceba4cbf2 100644 --- a/src/mono/mono/mini/mini-wasm.c +++ b/src/mono/mono/mini/mini-wasm.c @@ -798,7 +798,7 @@ mini_wasm_is_scalar_vtype (MonoType *type, MonoType **etype) } else if (MONO_TYPE_ISSTRUCT (t)) { if (!mini_wasm_is_scalar_vtype (t, etype)) return FALSE; - } else if (!((MONO_TYPE_IS_PRIMITIVE (t) || MONO_TYPE_IS_REFERENCE (t) || MONO_TYPE_IS_POINTER (t)))) { + } else if (!(MONO_TYPE_IS_PRIMITIVE (t) || MONO_TYPE_IS_REFERENCE (t) || MONO_TYPE_IS_POINTER (t))) { return FALSE; } else { if (etype) @@ -806,10 +806,12 @@ mini_wasm_is_scalar_vtype (MonoType *type, MonoType **etype) } } - if (etype) { - if (!(*etype)) - *etype = mono_get_int32_type (); + // empty struct + if (nfields == 0 && etype) { + *etype = m_class_get_byval_arg (mono_defaults.sbyte_class); } + g_assert (!etype || *etype); + return TRUE; } diff --git a/src/native/libs/System.Native/pal_process.c b/src/native/libs/System.Native/pal_process.c index fa5e522c36205e..ca982ebbf48a23 100644 --- a/src/native/libs/System.Native/pal_process.c +++ b/src/native/libs/System.Native/pal_process.c @@ -314,7 +314,11 @@ int32_t SystemNative_ForkAndExecProcess(const char* filename, sigfillset(&signal_set); pthread_sigmask(SIG_SETMASK, &signal_set, &old_signal_set); -#if HAVE_VFORK && !(defined(__APPLE__)) // We don't trust vfork on OS X right now. +// vfork on OS X is deprecated +// On Android, signal handlers between parent and child processes are shared with vfork, so when we reset +// the signal handlers during child startup, we end up incorrectly clearing also the ones for the parent. +#if HAVE_VFORK && !defined(__APPLE__) && !defined(TARGET_ANDROID) + // This platform has vfork(). vfork() is either a synonym for fork or provides shared memory // semantics. For a one gigabyte process, the expected performance gain of using shared memory // vfork() rather than fork() is 99.5% merely due to avoiding page faults as the kernel does not