From c102bea96ed4e07bb138c7815c7607ab56facdff Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Tue, 6 Jan 2026 11:14:28 -0800
Subject: [PATCH 01/10] Update branding to 8.0.24 (#122887)
---
eng/Versions.props | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index d7db36c5ca898e..b987467f9bb466 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -1,11 +1,11 @@
- 8.0.23
+ 8.0.24
8
0
- 23
+ 24
8.0.100
7.0.20
6.0.36
From 2042eb2a56112539bf9e0b9538972fdd84e381a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Cant=C3=BA?=
Date: Wed, 7 Jan 2026 09:36:58 -0800
Subject: [PATCH 02/10] Revert "[release/8.0] Update dependencies from
dotnet/arcade" (#122943)
Reverts dotnet/runtime#122558
Context
https://github.com/dotnet/runtime/pull/122558#issuecomment-3716001868.
---
eng/Version.Details.xml | 72 +++++++++----------
eng/Versions.props | 30 ++++----
eng/common/internal-feed-operations.ps1 | 2 +-
eng/common/post-build/nuget-verification.ps1 | 2 +-
eng/common/post-build/post-build-utils.ps1 | 10 +--
.../templates-official/job/source-build.yml | 2 +-
.../job/source-index-stage1.yml | 2 +-
.../post-build/setup-maestro-vars.yml | 2 +-
.../templates-official/steps/source-build.yml | 2 +-
eng/common/templates/steps/source-build.yml | 2 +-
eng/common/tools.ps1 | 6 +-
global.json | 6 +-
12 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index b0405bb5ac5992..c0e07a38b94f5c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -111,9 +111,9 @@
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
@@ -121,69 +121,69 @@
73f0850939d96131c28cf6ea6ee5aacb4da0083a
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
https://github.com/dotnet/runtime-assets
@@ -334,9 +334,9 @@
https://github.com/dotnet/xharness
402df9c4f5abe6ee8519181dfb5481e04099fab0
-
+
https://github.com/dotnet/arcade
- 4b01306353c43c151d713d152f48a4d523c41960
+ e8483fe03c7d3257c68f6013441da5d72eeb8392
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
diff --git a/eng/Versions.props b/eng/Versions.props
index b987467f9bb466..d0911f1eeeee9a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -89,21 +89,21 @@
8.0.100
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 2.5.1-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
- 8.0.0-beta.25611.2
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 2.5.1-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
+ 8.0.0-beta.25562.3
6.0.0-preview.1.102
diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1
index c282d3ae403a09..92b77347d9904e 100644
--- a/eng/common/internal-feed-operations.ps1
+++ b/eng/common/internal-feed-operations.ps1
@@ -26,7 +26,7 @@ function SetupCredProvider {
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
- Invoke-WebRequest $url -UseBasicParsing -OutFile installcredprovider.ps1
+ Invoke-WebRequest $url -OutFile installcredprovider.ps1
Write-Host 'Installing plugin...'
.\installcredprovider.ps1 -Force
diff --git a/eng/common/post-build/nuget-verification.ps1 b/eng/common/post-build/nuget-verification.ps1
index 6cbbcafade26bf..8467dbf8e7c218 100644
--- a/eng/common/post-build/nuget-verification.ps1
+++ b/eng/common/post-build/nuget-verification.ps1
@@ -65,7 +65,7 @@ if ($NuGetExePath) {
Write-Host "Downloading nuget.exe from $nugetExeUrl..."
$ProgressPreference = 'SilentlyContinue'
try {
- Invoke-WebRequest $nugetExeUrl -UseBasicParsing -OutFile $downloadedNuGetExe
+ Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe
$ProgressPreference = 'Continue'
} catch {
$ProgressPreference = 'Continue'
diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1
index 83f9efb0b364d6..534f6988d5b7fd 100644
--- a/eng/common/post-build/post-build-utils.ps1
+++ b/eng/common/post-build/post-build-utils.ps1
@@ -26,7 +26,7 @@ function Get-MaestroChannel([int]$ChannelId) {
$apiHeaders = Create-MaestroApiRequestHeaders
$apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}?api-version=$MaestroApiVersion"
- $result = try { Invoke-WebRequest -UseBasicParsing -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
return $result
}
@@ -36,7 +36,7 @@ function Get-MaestroBuild([int]$BuildId) {
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
$apiEndpoint = "$MaestroApiEndPoint/api/builds/${BuildId}?api-version=$MaestroApiVersion"
- $result = try { return Invoke-WebRequest -UseBasicParsing -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ $result = try { return Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
return $result
}
@@ -47,7 +47,7 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions?sourceRepository=$SourceRepository&channelId=$ChannelId&api-version=$MaestroApiVersion"
- $result = try { Invoke-WebRequest -UseBasicParsing -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
return $result
}
@@ -56,7 +56,7 @@ function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
$apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
- Invoke-WebRequest -UseBasicParsing -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
+ Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
}
function Trigger-Subscription([string]$SubscriptionId) {
@@ -64,7 +64,7 @@ function Trigger-Subscription([string]$SubscriptionId) {
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
- Invoke-WebRequest -UseBasicParsing -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
+ Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
}
function Validate-MaestroVars {
diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml
index f75400757d1ea5..7b9c58a90c5ef7 100644
--- a/eng/common/templates-official/job/source-build.yml
+++ b/eng/common/templates-official/job/source-build.yml
@@ -61,7 +61,7 @@ jobs:
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]
- image: 1es-azurelinux-3
+ image: 1es-mariner-2
os: linux
${{ if ne(parameters.platform.pool, '') }}:
diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml
index 8de0dfaf349434..0579e692fc8131 100644
--- a/eng/common/templates-official/job/source-index-stage1.yml
+++ b/eng/common/templates-official/job/source-index-stage1.yml
@@ -6,7 +6,7 @@ parameters:
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
preSteps: []
binlogPath: artifacts/log/Debug/Build.binlog
- condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
+ condition: ''
dependsOn: ''
pool: ''
diff --git a/eng/common/templates-official/post-build/setup-maestro-vars.yml b/eng/common/templates-official/post-build/setup-maestro-vars.yml
index 3a56abf8922ef3..0c87f149a4ad77 100644
--- a/eng/common/templates-official/post-build/setup-maestro-vars.yml
+++ b/eng/common/templates-official/post-build/setup-maestro-vars.yml
@@ -37,7 +37,7 @@ steps:
$apiHeaders.Add('Accept', 'application/json')
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
- $buildInfo = try { Invoke-WebRequest -UseBasicParsing -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
$BarId = $Env:BARBuildId
$Channels = $Env:PromoteToMaestroChannels -split ","
diff --git a/eng/common/templates-official/steps/source-build.yml b/eng/common/templates-official/steps/source-build.yml
index c307825c91222f..b63043da4b9f3f 100644
--- a/eng/common/templates-official/steps/source-build.yml
+++ b/eng/common/templates-official/steps/source-build.yml
@@ -47,7 +47,7 @@ steps:
# in the default public locations.
internalRuntimeDownloadArgs=
if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then
- internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
+ internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
fi
buildConfig=Release
diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml
index d08a0e92caa49e..ae06b26ea37340 100644
--- a/eng/common/templates/steps/source-build.yml
+++ b/eng/common/templates/steps/source-build.yml
@@ -47,7 +47,7 @@ steps:
# in the default public locations.
internalRuntimeDownloadArgs=
if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then
- internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
+ internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
fi
buildConfig=Release
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index b674a90618d76d..bb048ad125a8cf 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -267,7 +267,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
Retry({
Write-Host "GET $uri"
- Invoke-WebRequest $uri -UseBasicParsing -OutFile $installScript
+ Invoke-WebRequest $uri -OutFile $installScript
})
}
@@ -501,7 +501,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
Write-Host "Downloading $packageName $packageVersion"
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
Retry({
- Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -UseBasicParsing -OutFile $packagePath
+ Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath
})
Unzip $packagePath $packageDir
@@ -541,7 +541,7 @@ function LocateVisualStudio([object]$vsRequirements = $null){
Create-Directory $vsWhereDir
Write-Host 'Downloading vswhere'
Retry({
- Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -UseBasicParsing -OutFile $vswhereExe
+ Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
})
}
diff --git a/global.json b/global.json
index 075a43ef4c3126..eea4c3f60c15b8 100644
--- a/global.json
+++ b/global.json
@@ -8,9 +8,9 @@
"dotnet": "8.0.122"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25611.2",
- "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25611.2",
- "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.25611.2",
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25562.3",
+ "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25562.3",
+ "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.25562.3",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.NET.Sdk.IL": "8.0.0-rc.1.23406.6"
From 9e1f70e56f7d49f64c61b2a24984e4a0193a0229 Mon Sep 17 00:00:00 2001
From: Jeremy Barton
Date: Thu, 8 Jan 2026 20:32:50 +0000
Subject: [PATCH 03/10] Fix the type of exception thrown when decoding bad
headers
CoseMessage's Decode routines say that any failure is a CryptographicException,
but some of the validation failures leak out ArgumentException from the validation in CoseHeaderMap.
---
.../System.Security.Cryptography.Cose.csproj | 4 +-
.../Security/Cryptography/Cose/CoseMessage.cs | 56 ++++++--
.../tests/CoseMessageTests.DecodeMultiSign.cs | 126 ++++++++++++++++++
.../tests/CoseMessageTests.DecodeSign1.cs | 125 +++++++++++++++++
.../CoseMessageTests.Sign.CustomHeaderMaps.cs | 55 +++++---
5 files changed, 335 insertions(+), 31 deletions(-)
diff --git a/src/libraries/System.Security.Cryptography.Cose/src/System.Security.Cryptography.Cose.csproj b/src/libraries/System.Security.Cryptography.Cose/src/System.Security.Cryptography.Cose.csproj
index e8dc5ff2663a1a..1b411e3ce4f158 100644
--- a/src/libraries/System.Security.Cryptography.Cose/src/System.Security.Cryptography.Cose.csproj
+++ b/src/libraries/System.Security.Cryptography.Cose/src/System.Security.Cryptography.Cose.csproj
@@ -4,8 +4,8 @@
$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)
true
true
- 1
- false
+ 2
+ true
Provides support for CBOR Object Signing and Encryption (COSE).
diff --git a/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseMessage.cs b/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseMessage.cs
index 6395c966246ff1..39cb6a0a874f7d 100644
--- a/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseMessage.cs
+++ b/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseMessage.cs
@@ -295,10 +295,19 @@ private static void DecodeUnprotectedBucket(CborReader reader, CoseHeaderMap hea
private static void DecodeBucket(CborReader reader, CoseHeaderMap headerParameters)
{
- int? length = reader.ReadStartMap();
- for (int i = 0; i < length; i++)
+ reader.ReadStartMap();
+
+ while (true)
{
- CoseHeaderLabel label = reader.PeekState() switch
+ CborReaderState state = reader.PeekState();
+
+ if (state == CborReaderState.EndMap)
+ {
+ reader.ReadEndMap();
+ break;
+ }
+
+ CoseHeaderLabel label = state switch
{
CborReaderState.UnsignedInteger or CborReaderState.NegativeInteger => new CoseHeaderLabel(reader.ReadInt32()),
CborReaderState.TextString => new CoseHeaderLabel(reader.ReadTextString()),
@@ -306,9 +315,23 @@ private static void DecodeBucket(CborReader reader, CoseHeaderMap headerParamete
};
CoseHeaderValue value = CoseHeaderValue.FromEncodedValue(reader.ReadEncodedValue().Span);
- headerParameters.Add(label, value);
+
+ try
+ {
+ headerParameters.Add(label, value);
+ }
+ catch (ArgumentException e)
+ {
+ // Lift the well-known header value validation into a CryptographicException.
+ if (e.ParamName == "value")
+ {
+ throw new CryptographicException(e.Message);
+ }
+
+ Debug.Fail("Unexpected ArgumentException from CoseHeaderMap.Add");
+ throw new CryptographicException(SR.DecodeErrorWhileDecodingSeeInnerEx, e);
+ }
}
- reader.ReadEndMap();
}
private static byte[]? DecodePayload(CborReader reader)
@@ -563,13 +586,23 @@ internal static bool MissingCriticalHeaders(CoseHeaderMap? protectedHeders, out
return false;
}
+ bool empty = true;
+
var reader = new CborReader(critHeaderValue.EncodedValue);
- int length = reader.ReadStartArray().GetValueOrDefault();
- Debug.Assert(length > 0);
+ reader.ReadStartArray();
- for (int i = 0; i < length; i++)
+ while (true)
{
- CoseHeaderLabel label = reader.PeekState() switch
+ CborReaderState state = reader.PeekState();
+
+ if (state == CborReaderState.EndArray)
+ {
+ reader.ReadEndArray();
+ break;
+ }
+
+ empty = false;
+ CoseHeaderLabel label = state switch
{
CborReaderState.UnsignedInteger or CborReaderState.NegativeInteger => new CoseHeaderLabel(reader.ReadInt32()),
CborReaderState.TextString => new CoseHeaderLabel(reader.ReadTextString()),
@@ -583,6 +616,11 @@ internal static bool MissingCriticalHeaders(CoseHeaderMap? protectedHeders, out
}
}
+ if (empty)
+ {
+ throw new CryptographicException(SR.CriticalHeadersMustBeArrayOfAtLeastOne);
+ }
+
labelName = null;
return false;
}
diff --git a/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeMultiSign.cs b/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeMultiSign.cs
index 57fd753af4c011..229ef187377512 100644
--- a/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeMultiSign.cs
+++ b/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeMultiSign.cs
@@ -144,5 +144,131 @@ public void DecodeMultiSign_IndefiniteLengthArray_ShorterByOne(string hexCborPay
CryptographicException ex = Assert.Throws(() => CoseMessage.DecodeMultiSign(cborPayload));
Assert.Null(ex.InnerException);
}
+
+ [Theory]
+ [InlineData(true, true)]
+ [InlineData(true, false)]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ public void DecodeMultiSignThrowsIfCriticalHeaderIsMissing(bool detached, bool useIndefiniteLength)
+ {
+ const string AttachedDefiniteHex =
+ "D8628440A054546869732069732074686520636F6E74656E742E818347A20126" +
+ "0281182AA05840ECB8C39BE15156FB6567C33634C75396D7FE1042C84FE54B9C" +
+ "EFA51E674C0CB227A8C08E558B6047668BBE3311749776670D1583A14B3A2DD8" +
+ "7F63F0FA298452";
+
+ const string AttachedIndefiniteHex =
+ "D8628440A054546869732069732074686520636F6E74656E742E818348A20126" +
+ "029F182AFFA05840F62CB760AC27D393D88ED392D5D4D55A02B0BB75261E75FE" +
+ "9B346C280DA6B93BE7F5B1B66B74561513EA52CAA2C66FE7474010035C678DA6" +
+ "B3549D3E671166EB";
+
+ const string DetachedDefiniteHex =
+ "D8628440A0F6818347A201260281182AA05840F96CE3D0999F34BE0E3FC62AE2" +
+ "AB25DD8D88F7154E6FADD5FFFEAF78F89DB97AC3E599ADB555C8442BD520F3F4" +
+ "8CB6A320B864677E26D1FA79FEDD79C3BCA927";
+
+ const string DetachedIndefiniteHex =
+ "D8628440A0F6818348A20126029F182AFFA0584028E95F7F9267CED0061339A7" +
+ "6602D823774EDA3E8D53B0A4FA436B71B0DBCA6F03F561A67355374AF494648C" +
+ "941558146F9C22B17542EBAF23497D27635A1829";
+
+ string inputHex = (detached, useIndefiniteLength) switch
+ {
+ (false, false) => AttachedDefiniteHex,
+ (false, true) => AttachedIndefiniteHex,
+ (true, false) => DetachedDefiniteHex,
+ (true, true) => DetachedIndefiniteHex,
+ };
+
+ AssertExtensions.ThrowsContains(
+ () => CoseMessage.DecodeMultiSign(ByteUtils.HexToByteArray(inputHex)),
+ "Critical Header '42' missing from protected map.");
+ }
+
+ [Theory]
+ [InlineData(true, true)]
+ [InlineData(true, false)]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ public void DecodeMultiSignThrowsIfCriticalHeadersIsEmpty(bool detached, bool useIndefiniteLength)
+ {
+ const string AttachedDefiniteHex =
+ "D8628440A054546869732069732074686520636F6E74656E742E818345A20126" +
+ "0280A05840B5F9E21078643A74B181ED294AC72C71F20AC5CA7AD037F559C68E" +
+ "06148429396A4194133763AB6918D747ACEE820CC430C2E891E3E2D5EECF6126" +
+ "1CEA33C6D4";
+
+ const string AttachedIndefiniteHex =
+ "D8628440A054546869732069732074686520636F6E74656E742E818346A20126" +
+ "029FFFA05840DDF3C0B85415AD1628C0B50C0F3FEDE675C1003484687CDFA3FA" +
+ "09285D5A31D48ADF11744BE0AE87F0189408A9CF38F0572537E8A786D505B6A6" +
+ "EE2008B91C74";
+
+ const string DetachedDefiniteHex =
+ "D8628440A0F6818345A201260280A05840EB66EE9E064CAB2E2F50244661734D" +
+ "9AEBD959BD21278E8D4827870DFE10C27B52E3E21D29185FC64526DC3B80C108" +
+ "548E956E9DBDDC7B23D100C17715AEE163";
+
+ const string DetachedIndefiniteHex =
+ "D8628440A0F6818346A20126029FFFA05840FC954ABD1611F7C6EEDD7FE71C3F" +
+ "62821AD46ED1988500F3309D0C607F0F151A69D0FC7BC968B2C36AEE68AC2B9A" +
+ "9580DFE1244F6E5F834183497F21EA5900C1";
+
+ string inputHex = (detached, useIndefiniteLength) switch
+ {
+ (false, false) => AttachedDefiniteHex,
+ (false, true) => AttachedIndefiniteHex,
+ (true, false) => DetachedDefiniteHex,
+ (true, true) => DetachedIndefiniteHex,
+ };
+
+ AssertExtensions.ThrowsContains(
+ () => CoseMessage.DecodeMultiSign(ByteUtils.HexToByteArray(inputHex)),
+ "Critical Headers must be a CBOR array of at least one element.");
+ }
+
+ [Theory]
+ [InlineData(true, true)]
+ [InlineData(true, false)]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ public void DecodeMultiSignThrowsIfCriticalHeaderIsOfUnknownType(bool detached, bool useIndefiniteLength)
+ {
+ const string AttachedDefiniteHex =
+ "D8628440A054546869732069732074686520636F6E74656E742E818347A20126" +
+ "0281412AA05840FCAFEDBE41693C7BA43FB58E2CF06182BE1BF340122CC5AFD4" +
+ "F59172C7E95166FF8E98FE9A0C2BEFEA135FD800DE6CA9A281D49B141CB93B17" +
+ "D992E693540F8A";
+
+ const string AttachedIndefiniteHex =
+ "D8628440A054546869732069732074686520636F6E74656E742E818348A20126" +
+ "029F412AFFA058400D3F4426B26007D731677D99B542E524847FF3927BCA74E4" +
+ "1823B09D6CA57A0E107F93DFE5DB851F4CEE8C0E4AF83E3540848F026FCD761F" +
+ "91CA2ED8D5F98134";
+
+ const string DetachedDefiniteHex =
+ "D8628440A0F6818347A201260281412AA0584008E0EEF66622FEC926CB651E90" +
+ "13D8628AB72581533761EDE52972FE6DFBF2C4BADB6C218E8AD1E28F8192DFB2" +
+ "8A82A4444A74C370AEA6C63AC982EABCD52874";
+
+ const string DetachedIndefiniteHex =
+ "D8628440A0F6818348A20126029F412AFFA05840C6DDCA2F35B7B285AB594963" +
+ "E9DB43CBDC77842256A7D1D31704749C7446AD5A67BBC02F9DBAF8F394ECCCA7" +
+ "8E8B63E5BB746F0205EE5732DFB2E00EBA3D5F48";
+
+ string inputHex = (detached, useIndefiniteLength) switch
+ {
+ (false, false) => AttachedDefiniteHex,
+ (false, true) => AttachedIndefiniteHex,
+ (true, false) => DetachedDefiniteHex,
+ (true, true) => DetachedIndefiniteHex,
+ };
+
+ AssertExtensions.ThrowsContains(
+ () => CoseMessage.DecodeMultiSign(ByteUtils.HexToByteArray(inputHex)),
+ "Header '2' does not accept the specified value.");
+ }
}
}
diff --git a/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeSign1.cs b/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeSign1.cs
index 8d3fdb27ad5dea..f06db0413a97b2 100644
--- a/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeSign1.cs
+++ b/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeSign1.cs
@@ -102,5 +102,130 @@ public void DecodeSign1_IndefiniteLengthArray_ShorterByOne()
CryptographicException ex = Assert.Throws(() => CoseMessage.DecodeSign1(cborPayload));
Assert.Null(ex.InnerException);
}
+
+ [Theory]
+ [InlineData(true, true)]
+ [InlineData(true, false)]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ public void DecodeSign1ThrowsIfCriticalHeaderIsMissing(bool detached, bool useIndefiniteLength)
+ {
+ const string AttachedDefiniteHex =
+ "D28447A201260281182AA054546869732069732074686520636F6E74656E742E" +
+ "5840F78745BDFA8CDF90ED6EC130BC8D97F43C8A52899920221832A1E758A1E7" +
+ "590827148F6D1A76673E7E9615F628730B19F07707B6FB1C9CD7B6D4E2B3C3F0" +
+ "DEAD";
+
+ const string AttachedIndefiniteHex =
+ "D28448A20126029F182AFFA054546869732069732074686520636F6E74656E74" +
+ "2E58408B07F60298F64453356EAF005C630A4576AF4C66E0327579BB81B5D726" +
+ "3836AA9419B1312298DD47BC10BA22D6DEEE35F1526948BF098915816149B46A" +
+ "3C9981";
+
+ const string DetachedDefiniteHex =
+ "D28447A201260281182AA0F6584089B093A038B0636940F9273EF11214B64CC1" +
+ "BB862305EDEC9C772A3D5089A54A6CBBA00323FA59A593A828F157653DEE15B0" +
+ "EBBDC070D02CDFD13E8A9F2ECA1B";
+
+ const string DetachedIndefiniteHex =
+ "D28448A20126029F182AFFA0F658409B35B9FD294BDF36EEF7494D0EC9E19F6A2" +
+ "106638FD4A2A31B816FED80493772DCEA8B64F6618119E278379F83E1A62BA382" +
+ "21B9F1AC705FAD8612DC6B0478A0";
+
+ string inputHex = (detached, useIndefiniteLength) switch
+ {
+ (false, false) => AttachedDefiniteHex,
+ (false, true) => AttachedIndefiniteHex,
+ (true, false) => DetachedDefiniteHex,
+ (true, true) => DetachedIndefiniteHex,
+ };
+
+ AssertExtensions.ThrowsContains(
+ () => CoseMessage.DecodeSign1(ByteUtils.HexToByteArray(inputHex)),
+ "Critical Header '42' missing from protected map.");
+ }
+
+ [Theory]
+ [InlineData(true, true)]
+ [InlineData(true, false)]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ public void DecodeSign1ThrowsIfCriticalHeadersIsEmpty(bool detached, bool useIndefiniteLength)
+ {
+ const string AttachedDefiniteHex =
+ "D28445A201260280A054546869732069732074686520636F6E74656E742E5840" +
+ "57C7EE86AF06B1ABB002480CE148DFDA06C2CA4AFE83E9C7AE3493EA13E06E9B" +
+ "0A4C713F7FDCDD2F8731103CDA28B83313E411988B88AC7716E43307B5AF22FD";
+
+ const string AttachedIndefiniteHex =
+ "D28446A20126029FFFA054546869732069732074686520636F6E74656E742E58" +
+ "401B941A9C799270827BE5139EC5F3DE4E072913F6473C7278E691D6C58D407A" +
+ "23DB3176383E8429AA558418EE33CB7DFFD2CF251EEC93B6CFC300D0D9679CE5" +
+ "42";
+
+ const string DetachedDefiniteHex =
+ "D28445A201260280A0F658409B0EBC937A969A7D4BB2AA0B1004091EDAA00AE2" +
+ "BBCCBB994B7278C9E50C6C734B3A53CB5B87A99E75F63D16B73757CA23C99CF0" +
+ "8F8F909A1332DAC05D9DB1C0";
+
+ const string DetachedIndefiniteHex =
+ "D28446A20126029FFFA0F65840CA96F1292FEE2B787DC75D91553024E70DD62B" +
+ "EA0BFE284024385C6D9493EEF6F055825E79244B63E76F69A419C3A36B3B1F18" +
+ "34789A23983D685B7CDA231E86";
+
+ string inputHex = (detached, useIndefiniteLength) switch
+ {
+ (false, false) => AttachedDefiniteHex,
+ (false, true) => AttachedIndefiniteHex,
+ (true, false) => DetachedDefiniteHex,
+ (true, true) => DetachedIndefiniteHex,
+ };
+
+ AssertExtensions.ThrowsContains(
+ () => CoseMessage.DecodeSign1(ByteUtils.HexToByteArray(inputHex)),
+ "Critical Headers must be a CBOR array of at least one element.");
+ }
+
+ [Theory]
+ [InlineData(true, true)]
+ [InlineData(true, false)]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ public void DecodeSign1ThrowsIfCriticalHeaderIsOfUnknownType(bool detached, bool useIndefiniteLength)
+ {
+ const string AttachedDefiniteHex =
+ "D28447A201260281412AA054546869732069732074686520636F6E74656E742E" +
+ "58403529AC69F69A80B4055CFFCA88F010390509E0A9D4D0083F23DF46841144" +
+ "B7E9D7CC11E90D0D51103672083449B439B71EAF6B922C011CC471D8E1D577C6" +
+ "B954";
+
+ const string AttachedIndefiniteHex =
+ "D28448A20126029F412AFFA054546869732069732074686520636F6E74656E74" +
+ "2E5840FE8A2CBBBA2A154361BEF0892D11FF621A1DBDCBD1A955020DD7D85ED8" +
+ "15C43B3AB39A32561AAEF679D08FD561339AC9A4E537B2E91DC120A32F406455" +
+ "F3353F";
+
+ const string DetachedDefiniteHex =
+ "D28447A201260281412AA0F65840AB87DA5ABA5A470C7508F5F1724744458407" +
+ "897746890428F877AD593F9D90E5503A6D1B3369AF77952223D5C474CBB8EC62" +
+ "9726F967921A4AB91DC8F86DA1CF";
+
+ const string DetachedIndefiniteHex =
+ "D28448A20126029F412AFFA0F658409613065203B619BE9CEC1CC596F59C7395" +
+ "5AEE8BD492F16B72D2C0F443AE70E5E5B1D615A06A90145078B41A1CA12D4067" +
+ "D6C6CEEB2C19B3747A0926305EBA09";
+
+ string inputHex = (detached, useIndefiniteLength) switch
+ {
+ (false, false) => AttachedDefiniteHex,
+ (false, true) => AttachedIndefiniteHex,
+ (true, false) => DetachedDefiniteHex,
+ (true, true) => DetachedIndefiniteHex,
+ };
+
+ AssertExtensions.ThrowsContains(
+ () => CoseMessage.DecodeSign1(ByteUtils.HexToByteArray(inputHex)),
+ "Header '2' does not accept the specified value.");
+ }
}
}
diff --git a/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.Sign.CustomHeaderMaps.cs b/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.Sign.CustomHeaderMaps.cs
index e7e3fe1ca782b3..af02047626165c 100644
--- a/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.Sign.CustomHeaderMaps.cs
+++ b/src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.Sign.CustomHeaderMaps.cs
@@ -517,12 +517,14 @@ public void SignWithCborNegativeIntegerRepresentationAlgorithmHeaderValue(ulong
Assert.Throws(() => Sign(s_sampleContent, DefaultKey, DefaultHash, protectedHeaders));
}
- [Fact]
- public void SignWithCriticalHeaders()
+ [Theory]
+ [InlineData(false)]
+ [InlineData(true)]
+ public void SignWithCriticalHeaders(bool useIndefiniteLength)
{
CoseHeaderMap protectedHeaders = GetHeaderMapWithAlgorithm(DefaultAlgorithm);
List<(CoseHeaderLabel, ReadOnlyMemory)> expectedProtectedHeaders = GetExpectedProtectedHeaders(DefaultAlgorithm);
- AddCriticalHeaders(protectedHeaders, expectedProtectedHeaders, includeSpecifiedCritHeader: true);
+ AddCriticalHeaders(protectedHeaders, expectedProtectedHeaders, includeSpecifiedCritHeader: true, useIndefiniteLength);
CoseSigner signer = GetCoseSigner(DefaultKey, DefaultHash, protectedHeaders);
ReadOnlySpan encodedMessage = Sign(s_sampleContent, signer);
@@ -530,18 +532,22 @@ public void SignWithCriticalHeaders()
AssertCoseSignMessage(encodedMessage, s_sampleContent, DefaultKey, DefaultAlgorithm, expectedProtectedHeaders);
}
- [Fact]
- public void SignWithCriticalHeaders_NotTransportingTheSpecifiedCriticalHeaderThrows()
+ [Theory]
+ [InlineData(false)]
+ [InlineData(true)]
+ public void SignWithCriticalHeaders_NotTransportingTheSpecifiedCriticalHeaderThrows(bool useIndefiniteLength)
{
CoseHeaderMap protectedHeaders = GetHeaderMapWithAlgorithm(DefaultAlgorithm);
- AddCriticalHeaders(protectedHeaders, null, includeSpecifiedCritHeader: false);
+ AddCriticalHeaders(protectedHeaders, null, includeSpecifiedCritHeader: false, useIndefiniteLength);
CoseSigner signer = GetCoseSigner(DefaultKey, DefaultHash, protectedHeaders);
Assert.Throws("signer", () => Sign(s_sampleContent, signer));
}
- [Fact]
- public void MultiSign_SignWithCriticalHeaders_BodyHeaders()
+ [Theory]
+ [InlineData(false)]
+ [InlineData(true)]
+ public void MultiSign_SignWithCriticalHeaders_BodyHeaders(bool useIndefiniteLength)
{
if (MessageKind != CoseMessageKind.MultiSign)
{
@@ -550,7 +556,7 @@ public void MultiSign_SignWithCriticalHeaders_BodyHeaders()
CoseHeaderMap bodyProtectedHeaders = GetEmptyHeaderMap();
List<(CoseHeaderLabel, ReadOnlyMemory)> expectedBodyProtected = GetEmptyExpectedHeaders();
- AddCriticalHeaders(bodyProtectedHeaders, expectedBodyProtected, includeSpecifiedCritHeader: true);
+ AddCriticalHeaders(bodyProtectedHeaders, expectedBodyProtected, includeSpecifiedCritHeader: true, useIndefiniteLength);
CoseSigner signer = GetCoseSigner(DefaultKey, DefaultHash);
ReadOnlySpan encodedMessage = Sign(s_sampleContent, signer, bodyProtectedHeaders);
@@ -558,8 +564,10 @@ public void MultiSign_SignWithCriticalHeaders_BodyHeaders()
AssertCoseSignMessage(encodedMessage, s_sampleContent, DefaultKey, DefaultAlgorithm, expectedMultiSignBodyProtectedHeaders: expectedBodyProtected);
}
- [Fact]
- public void MultiSign_SignWithCriticalHeaders_NotTransportingTheSpecifiedCriticalHeaderThrows_BodyHeaders()
+ [Theory]
+ [InlineData(false)]
+ [InlineData(true)]
+ public void MultiSign_SignWithCriticalHeaders_NotTransportingTheSpecifiedCriticalHeaderThrows_BodyHeaders(bool useIndefiniteLength)
{
if (MessageKind != CoseMessageKind.MultiSign)
{
@@ -567,14 +575,16 @@ public void MultiSign_SignWithCriticalHeaders_NotTransportingTheSpecifiedCritica
}
CoseHeaderMap bodyProtectedHeaders = GetEmptyHeaderMap();
- AddCriticalHeaders(bodyProtectedHeaders, null, includeSpecifiedCritHeader: false);
+ AddCriticalHeaders(bodyProtectedHeaders, null, includeSpecifiedCritHeader: false, useIndefiniteLength);
CoseSigner signer = GetCoseSigner(DefaultKey, DefaultHash);
Assert.Throws("protectedHeaders", () => Sign(s_sampleContent, signer, bodyProtectedHeaders));
}
- [Fact]
- public void MultiSign_SignWithCriticalHeaders_AddSignature()
+ [Theory]
+ [InlineData(false)]
+ [InlineData(true)]
+ public void MultiSign_SignWithCriticalHeaders_AddSignature(bool useIndefiniteLength)
{
if (MessageKind != CoseMessageKind.MultiSign)
{
@@ -588,7 +598,7 @@ public void MultiSign_SignWithCriticalHeaders_AddSignature()
CoseHeaderMap signProtectedHeaders = GetHeaderMapWithAlgorithm(DefaultAlgorithm);
List<(CoseHeaderLabel, ReadOnlyMemory)> expectedSignProtected = GetExpectedProtectedHeaders(DefaultAlgorithm);
- AddCriticalHeaders(signProtectedHeaders, expectedSignProtected, includeSpecifiedCritHeader: true);
+ AddCriticalHeaders(signProtectedHeaders, expectedSignProtected, includeSpecifiedCritHeader: true, useIndefiniteLength);
CoseSigner signer = GetCoseSigner(DefaultKey, DefaultHash, signProtectedHeaders);
AddSignature(multiSignMsg, s_sampleContent, signer);
@@ -596,8 +606,10 @@ public void MultiSign_SignWithCriticalHeaders_AddSignature()
AssertCoseSignMessage(multiSignMsg.Encode(), s_sampleContent, DefaultKey, DefaultAlgorithm, expectedProtectedHeaders: expectedSignProtected);
}
- [Fact]
- public void MultiSign_SignWithCriticalHeaders_NotTransportingTheSpecifiedCriticalHeaderThrows_AddSignature()
+ [Theory]
+ [InlineData(false)]
+ [InlineData(true)]
+ public void MultiSign_SignWithCriticalHeaders_NotTransportingTheSpecifiedCriticalHeaderThrows_AddSignature(bool useIndefiniteLength)
{
if (MessageKind != CoseMessageKind.MultiSign)
{
@@ -610,18 +622,21 @@ public void MultiSign_SignWithCriticalHeaders_NotTransportingTheSpecifiedCritica
multiSignMsg.RemoveSignature(0);
CoseHeaderMap signProtectedHeaders = GetHeaderMapWithAlgorithm(DefaultAlgorithm);
- AddCriticalHeaders(signProtectedHeaders, null, includeSpecifiedCritHeader: false);
+ AddCriticalHeaders(signProtectedHeaders, null, includeSpecifiedCritHeader: false, useIndefiniteLength);
CoseSigner signer = GetCoseSigner(DefaultKey, DefaultHash, signProtectedHeaders);
Assert.Throws("signer", () => AddSignature(multiSignMsg, s_sampleContent, signer));
}
private static void AddCriticalHeaders(
- CoseHeaderMap protectedHeaders, List<(CoseHeaderLabel, ReadOnlyMemory)>? expectedHeaders, bool includeSpecifiedCritHeader)
+ CoseHeaderMap protectedHeaders,
+ List<(CoseHeaderLabel, ReadOnlyMemory)>? expectedHeaders,
+ bool includeSpecifiedCritHeader,
+ bool useIndefiniteLength)
{
Assert.Equal(expectedHeaders != null, includeSpecifiedCritHeader);
- CoseHeaderValue critValue = CoseHeaderValue.FromEncodedValue(GetDummyCritHeaderValue());
+ CoseHeaderValue critValue = CoseHeaderValue.FromEncodedValue(GetDummyCritHeaderValue(useIndefiniteLength));
protectedHeaders[CoseHeaderLabel.CriticalHeaders] = critValue;
expectedHeaders?.Add((CoseHeaderLabel.CriticalHeaders, critValue.EncodedValue));
From cb6dd00c21d6d8a373efbc7f5b5088caab5d8e22 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Tue, 13 Jan 2026 10:20:44 -0800
Subject: [PATCH 04/10] [release/8.0] Update dependencies from dotnet/emsdk
(#122746)
This pull request updates the following dependencies
[marker]: <> (Begin:4ebef09c-22a4-4345-9e95-08db9f47cad7)
## From https://github.com/dotnet/emsdk
- **Subscription**:
[4ebef09c-22a4-4345-9e95-08db9f47cad7](https://maestro.dot.net/subscriptions?search=4ebef09c-22a4-4345-9e95-08db9f47cad7)
- **Build**:
[20251226.3](https://dev.azure.com/dnceng/internal/_build/results?buildId=2867558)
([295617](https://maestro.dot.net/channel/3073/github:dotnet:emsdk/build/295617))
- **Date Produced**: December 26, 2025 5:58:02 PM UTC
- **Commit**:
[1898fd1eefc41432cc9f0bb849937b2adc24cc9d](https://github.com/dotnet/emsdk/commit/1898fd1eefc41432cc9f0bb849937b2adc24cc9d)
- **Branch**:
[release/8.0](https://github.com/dotnet/emsdk/tree/release/8.0)
[DependencyUpdate]: <> (Begin)
- **Dependency Updates**:
- From [8.0.23-servicing.25612.6 to 8.0.23-servicing.25626.3][1]
- Microsoft.SourceBuild.Intermediate.emsdk
- From [8.0.23 to 8.0.23][1]
- Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
[1]: https://github.com/dotnet/emsdk/compare/3cbd998b23...1898fd1eef
[DependencyUpdate]: <> (End)
[marker]: <> (End:4ebef09c-22a4-4345-9e95-08db9f47cad7)
Co-authored-by: dotnet-maestro[bot]
Co-authored-by: Jeff Handley
---
NuGet.config | 2 +-
eng/Version.Details.xml | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index d7ff98733a3537..878537be2c628f 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -9,7 +9,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index c0e07a38b94f5c..d691ca4b137265 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -92,11 +92,11 @@
https://github.com/dotnet/emsdk
- 3cbd998b237cdde910fd4c4964207a87dd04c837
+ 1898fd1eefc41432cc9f0bb849937b2adc24cc9d
-
+
https://github.com/dotnet/emsdk
- 3cbd998b237cdde910fd4c4964207a87dd04c837
+ 1898fd1eefc41432cc9f0bb849937b2adc24cc9d
From fb7ac0ff0437c5405458a2a953d29a6aeb5e76f0 Mon Sep 17 00:00:00 2001
From: Jeff Handley
Date: Tue, 13 Jan 2026 15:00:56 -0800
Subject: [PATCH 05/10] [manual] Merge release/8.0-staging into release/8.0
(#123114)
There were no OOB packages with `` set to
`true`, so none needed to be reset to `false`.
---------
Co-authored-by: Miha Zupan
Co-authored-by: Nikola Milosavljevic
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot]
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Co-authored-by: Elinor Fung
Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com>
Co-authored-by: Sven Boemer
Co-authored-by: Andy Gocke
Co-authored-by: Eric StJohn
Co-authored-by: Matous Kozak
Co-authored-by: Steve Pfister
Co-authored-by: Filip Navara
---
eng/Version.Details.xml | 64 +++---
eng/Versions.props | 39 ++--
eng/docker/build-docker-sdk.ps1 | 13 +-
eng/docker/build-docker-sdk.sh | 10 +-
eng/docker/libraries-sdk.linux.Dockerfile | 13 +-
eng/docker/libraries-sdk.windows.Dockerfile | 9 +-
eng/pipelines/common/evaluate-paths-job.yml | 1 +
eng/pipelines/common/global-build-job.yml | 1 +
.../common/templates/runtimes/xplat-job.yml | 1 +
eng/pipelines/common/xplat-setup.yml | 7 +-
.../coreclr/templates/helix-queues-setup.yml | 8 +-
eng/pipelines/installer/jobs/build-job.yml | 1 +
eng/pipelines/libraries/base-job.yml | 1 +
.../libraries/helix-queues-setup.yml | 8 +-
eng/pipelines/libraries/stress/http.yml | 72 +++----
eng/pipelines/libraries/stress/ssl.yml | 32 ++-
.../jobs/prepare-signed-artifacts.yml | 1 +
.../vm/amd64/jithelpers_fastwritebarriers.S | 172 ++++++++--------
.../dotnet-runtime-deps-opensuse.42.proj | 2 +-
.../dotnet-runtime-deps-sles.12.proj | 2 +-
.../System/Net/StressTests/build-local.ps1 | 79 ++++++++
.../System/Net/StressTests/build-local.sh | 83 ++++++++
.../Net/StressTests/run-docker-compose.ps1 | 90 +++++++++
.../Net/StressTests/run-docker-compose.sh | 118 +++++++++++
.../StressTests/HttpStress/Configuration.cs | 1 +
.../HttpStress/Directory.Build.props | 16 +-
.../HttpStress/Directory.Build.targets | 2 +-
.../tests/StressTests/HttpStress/Dockerfile | 36 ++--
.../StressTests/HttpStress/HttpStress.csproj | 4 +-
.../tests/StressTests/HttpStress/Program.cs | 190 +++++++++++-------
.../StressTests/HttpStress/StressClient.cs | 1 +
.../StressTests/HttpStress/StressServer.cs | 2 +-
.../StressTests/HttpStress/build-local.ps1 | 58 +-----
.../StressTests/HttpStress/build-local.sh | 77 ++-----
.../StressTests/HttpStress/docker-compose.yml | 14 +-
.../StressTests/HttpStress/entrypoint.ps1 | 21 ++
.../StressTests/HttpStress/entrypoint.sh | 25 +++
.../HttpStress/run-docker-compose.ps1 | 100 +--------
.../HttpStress/run-docker-compose.sh | 74 +------
.../StressTests/HttpStress/windows.Dockerfile | 14 +-
.../StressTests/SslStress/Build-Local.ps1 | 55 +----
.../SslStress/Directory.Build.props | 21 +-
.../SslStress/Directory.Build.targets | 2 +-
.../tests/StressTests/SslStress/Dockerfile | 9 +-
.../tests/StressTests/SslStress/Program.cs | 85 ++++----
.../StressTests/SslStress/SslClientBase.cs | 8 +-
.../StressTests/SslStress/SslStress.csproj | 6 +-
.../StressTests/SslStress/StressOperations.cs | 38 +++-
.../StressTests/SslStress/build-local.sh | 72 ++-----
.../StressTests/SslStress/docker-compose.yml | 12 +-
.../StressTests/SslStress/entrypoint.ps1 | 21 ++
.../tests/StressTests/SslStress/entrypoint.sh | 21 ++
.../SslStress/run-docker-compose.ps1 | 76 +------
.../SslStress/run-docker-compose.sh | 69 +------
.../StressTests/SslStress/windows.Dockerfile | 9 +-
src/mono/mono/metadata/icall-signatures.h | 8 +-
src/mono/mono/metadata/icall.c | 3 +-
src/mono/mono/mini/aot-compiler.c | 4 +-
src/mono/mono/mini/decompose.c | 2 +-
src/tests/issues.targets | 9 +
.../TrimAnalysis/MethodParameterValue.cs | 5 -
.../TrimAnalysis/ParameterProxy.cs | 6 +-
.../TrimAnalysis/TrimAnalysisVisitor.cs | 8 +-
.../DataFlowTests.cs | 6 +
.../DataFlow/ExtensionsDataFlow.cs | 66 ++++++
65 files changed, 1118 insertions(+), 965 deletions(-)
create mode 100644 src/libraries/Common/tests/System/Net/StressTests/build-local.ps1
create mode 100755 src/libraries/Common/tests/System/Net/StressTests/build-local.sh
create mode 100644 src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.ps1
create mode 100755 src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh
create mode 100644 src/libraries/System.Net.Http/tests/StressTests/HttpStress/entrypoint.ps1
create mode 100755 src/libraries/System.Net.Http/tests/StressTests/HttpStress/entrypoint.sh
create mode 100644 src/libraries/System.Net.Security/tests/StressTests/SslStress/entrypoint.ps1
create mode 100755 src/libraries/System.Net.Security/tests/StressTests/SslStress/entrypoint.sh
create mode 100644 src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/ExtensionsDataFlow.cs
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index d691ca4b137265..b4331ffbd8365a 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,8 +1,8 @@
-
+
https://github.com/dotnet/icu
- b565264ebc86c4444a7a5d411f69674393d61265
+ 7e1e01ce174204fc50e1b221c59cbd2c7a752441
https://github.com/dotnet/msquic
@@ -185,57 +185,57 @@
https://github.com/dotnet/arcade
e8483fe03c7d3257c68f6013441da5d72eeb8392
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
https://github.com/dotnet/llvm-project
@@ -354,13 +354,13 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
67613417f5e1af250e6ddfba79f8f2885d8e90fb
-
+
https://github.com/dotnet/hotreload-utils
- cf2f6ad655ebd5397042ea09d529ecc0c194a499
+ e7e99065bbd4a7b911d5cfa56b23d873d9675355
-
+
https://github.com/dotnet/runtime-assets
- 40ac8f2e43695322e5472fef7f3ad85cfdd83e1e
+ 98185bc6d28f41decb681555c343a62b3c6c165e
https://github.com/dotnet/roslyn
diff --git a/eng/Versions.props b/eng/Versions.props
index d0911f1eeeee9a..e9537b5206aa67 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -155,20 +155,20 @@
4.5.0
8.0.0-rc.1.23406.6
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
- 8.0.0-beta.25565.1
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
+ 8.0.0-beta.25625.3
1.0.0-prerelease.23566.3
1.0.0-prerelease.23566.3
@@ -184,10 +184,11 @@
2.0.3
1.0.4-preview6.19326.1
2.0.5
+
17.8.3
- $(MicrosoftBuildVersion)
- $(MicrosoftBuildVersion)
- $(MicrosoftBuildVersion)
+ 17.8.3
+ 17.8.3
+ 17.8.3
6.2.4
6.2.4
6.2.4
@@ -200,7 +201,7 @@
8.0.0-prerelease.25516.2
8.0.0-prerelease.25516.2
8.0.0-prerelease.25516.2
- 8.0.0-alpha.0.25574.3
+ 8.0.0-alpha.0.25625.3
2.4.2
1.0.0
2.4.5
@@ -231,7 +232,7 @@
8.0.0-rc.1.23406.6
- 8.0.0-rtm.25565.1
+ 8.0.0-rtm.25625.2
2.4.8
diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1
index 1a09343defbf6e..0e59796af4a37e 100755
--- a/eng/docker/build-docker-sdk.ps1
+++ b/eng/docker/build-docker-sdk.ps1
@@ -9,10 +9,11 @@ Param(
[switch][Alias('w')]$buildWindowsContainers
)
-$dotNetVersion="8.0"
$ErrorActionPreference = "Stop"
$REPO_ROOT_DIR=$(git -C "$PSScriptRoot" rev-parse --show-toplevel)
+[xml]$xml = Get-Content (Join-Path $REPO_ROOT_DIR "eng\Versions.props")
+$VERSION="$($xml.Project.PropertyGroup.MajorVersion[0]).$($xml.Project.PropertyGroup.MinorVersion[0])"
$dockerFilePrefix="$PSScriptRoot/libraries-sdk"
@@ -29,7 +30,7 @@ if ($buildWindowsContainers)
}
$dockerFile="$dockerFilePrefix.windows.Dockerfile"
-
+
# Collect the following artifacts to folder, that will be used as build context for the container,
# so projects can build and test against the live-built runtime:
# 1. Reference assembly pack (microsoft.netcore.app.ref)
@@ -54,15 +55,16 @@ if ($buildWindowsContainers)
-Destination $dockerContext\targetingpacks.targets
Copy-Item -Recurse -Path $REPO_ROOT_DIR\src\libraries\System.Net.Quic\src\System\Net\Quic\Interop `
-Destination $dockerContext\msquic-interop
-
+
# In case of non-CI builds, testhost may already contain Microsoft.AspNetCore.App (see build-local.ps1 in HttpStress):
- $testHostAspNetCorePath="$dockerContext\testhost\net$dotNetVersion-windows-$configuration-x64/shared/Microsoft.AspNetCore.App"
+ $testHostAspNetCorePath="$dockerContext\testhost\net$VERSION-windows-$configuration-x64/shared/Microsoft.AspNetCore.App"
if (Test-Path $testHostAspNetCorePath) {
Remove-Item -Recurse -Force $testHostAspNetCorePath
}
-
+
docker build --tag $imageName `
--build-arg CONFIGURATION=$configuration `
+ --build-arg VERSION=$VERSION `
--file $dockerFile `
$dockerContext
}
@@ -73,6 +75,7 @@ else
docker build --tag $imageName `
--build-arg CONFIGURATION=$configuration `
+ --build-arg "VERSION=$VERSION" `
--file $dockerFile `
$REPO_ROOT_DIR
}
diff --git a/eng/docker/build-docker-sdk.sh b/eng/docker/build-docker-sdk.sh
index 92fc632ec05e2a..54af435d35c16e 100755
--- a/eng/docker/build-docker-sdk.sh
+++ b/eng/docker/build-docker-sdk.sh
@@ -23,8 +23,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
imagename="dotnet-sdk-libs-current"
configuration="Release"
+repo_root=$(git -C "$scriptroot" rev-parse --show-toplevel)
+major_version=$(grep -oP '(?<=).*?(?=)' "$repo_root/eng/Versions.props")
+minor_version=$(grep -oP '(?<=).*?(?=)' "$repo_root/eng/Versions.props")
+version="$major_version.$minor_version"
-while [[ $# > 0 ]]; do
+while [[ $# -gt 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-imagename|-t)
@@ -41,12 +45,12 @@ while [[ $# > 0 ]]; do
esac
done
-repo_root=$(git rev-parse --show-toplevel)
docker_file="$scriptroot/libraries-sdk.linux.Dockerfile"
docker build --tag $imagename \
--build-arg CONFIGURATION=$configuration \
+ --build-arg VERSION=$version \
--file $docker_file \
$repo_root
-exit $?
\ No newline at end of file
+exit $?
diff --git a/eng/docker/libraries-sdk.linux.Dockerfile b/eng/docker/libraries-sdk.linux.Dockerfile
index 779c64f83c09a1..fcd48f2a568522 100644
--- a/eng/docker/libraries-sdk.linux.Dockerfile
+++ b/eng/docker/libraries-sdk.linux.Dockerfile
@@ -1,6 +1,6 @@
# Builds and copies library artifacts into target dotnet sdk image
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
-ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-bullseye-slim
+ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:latest
FROM $BUILD_BASE_IMAGE as corefxbuild
@@ -12,12 +12,15 @@ RUN ./build.sh clr+libs -runtimeconfiguration Release -configuration $CONFIGURAT
FROM $SDK_BASE_IMAGE as target
-ARG VERSION=8.0
+ARG VERSION
ARG CONFIGURATION=Release
ENV _DOTNET_INSTALL_CHANNEL=$VERSION
+# remove the existing SDK, we want to start from a clean slate with latest daily
+RUN rm -rf /usr/share/dotnet
+
# Install latest daily SDK:
-RUN wget https://dot.net/v1/dotnet-install.sh
+RUN wget https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh
RUN bash ./dotnet-install.sh --channel $_DOTNET_INSTALL_CHANNEL --quality daily --install-dir /usr/share/dotnet
# Collect the following artifacts under /live-runtime-artifacts,
@@ -48,8 +51,8 @@ COPY --from=corefxbuild \
/repo/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop \
/live-runtime-artifacts/msquic-interop
-# Add AspNetCore bits to testhost:
-ENV _ASPNETCORE_SOURCE="/usr/share/dotnet/shared/Microsoft.AspNetCore.App/$VERSION*"
+# Add AspNetCore bits to testhost, there should be only one version since we started from an image without existing SDK:
+ENV _ASPNETCORE_SOURCE="/usr/share/dotnet/shared/Microsoft.AspNetCore.App/*"
ENV _ASPNETCORE_DEST="/live-runtime-artifacts/testhost/net$VERSION-linux-$CONFIGURATION-x64/shared/Microsoft.AspNetCore.App"
RUN mkdir -p $_ASPNETCORE_DEST
RUN cp -r $_ASPNETCORE_SOURCE $_ASPNETCORE_DEST
diff --git a/eng/docker/libraries-sdk.windows.Dockerfile b/eng/docker/libraries-sdk.windows.Dockerfile
index 351d013468e699..f1713e76132d92 100644
--- a/eng/docker/libraries-sdk.windows.Dockerfile
+++ b/eng/docker/libraries-sdk.windows.Dockerfile
@@ -1,6 +1,6 @@
# escape=`
# Simple Dockerfile which copies clr and library build artifacts into target dotnet sdk image
-ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-nanoserver-ltsc2022
+ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
FROM $SDK_BASE_IMAGE as target
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
@@ -11,7 +11,10 @@ ARG CONFIGURATION=Release
USER ContainerAdministrator
-RUN Invoke-WebRequest -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile .\dotnet-install.ps1
+# remove the existing ASP.NET SDK, we want to keep only the latest one we download later
+RUN Remove-Item -Force -Recurse 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App/*'
+
+RUN Invoke-WebRequest -Uri https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1 -OutFile .\dotnet-install.ps1
RUN & .\dotnet-install.ps1 -Channel $env:_DOTNET_INSTALL_CHANNEL -Quality daily -InstallDir 'C:/Program Files/dotnet'
USER ContainerUser
@@ -19,7 +22,7 @@ USER ContainerUser
COPY . /live-runtime-artifacts
# Add AspNetCore bits to testhost:
-ENV _ASPNETCORE_SOURCE="C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App/$VERSION*"
+ENV _ASPNETCORE_SOURCE="C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App/*"
ENV _ASPNETCORE_DEST="C:/live-runtime-artifacts/testhost/net$VERSION-windows-$CONFIGURATION-x64/shared/Microsoft.AspNetCore.App"
RUN & New-Item -ItemType Directory -Path $env:_ASPNETCORE_DEST
RUN Copy-Item -Recurse -Path $env:_ASPNETCORE_SOURCE -Destination $env:_ASPNETCORE_DEST
diff --git a/eng/pipelines/common/evaluate-paths-job.yml b/eng/pipelines/common/evaluate-paths-job.yml
index 64c3a12584c27b..ebf3c930fb70ae 100644
--- a/eng/pipelines/common/evaluate-paths-job.yml
+++ b/eng/pipelines/common/evaluate-paths-job.yml
@@ -34,6 +34,7 @@ jobs:
- checkout: self
clean: true
fetchDepth: 2
+ fetchTags: false
- ${{ if ne(parameters.paths[0], '') }}:
- ${{ each path in parameters.paths }}:
diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml
index 86cea9fbd98a20..0eda6a6b7c1a6b 100644
--- a/eng/pipelines/common/global-build-job.yml
+++ b/eng/pipelines/common/global-build-job.yml
@@ -149,6 +149,7 @@ jobs:
- checkout: self
clean: true
+ fetchTags: false
# If running in source build mode, a git stash will be used for the inner clone. Avoid setting a fetch depth,
# as a stash of a shallow cloned repo is not currently supported.
${{ if ne(parameters.isSourceBuild, true) }}:
diff --git a/eng/pipelines/common/templates/runtimes/xplat-job.yml b/eng/pipelines/common/templates/runtimes/xplat-job.yml
index 625d88d63d3e97..1b8fdde3c000be 100644
--- a/eng/pipelines/common/templates/runtimes/xplat-job.yml
+++ b/eng/pipelines/common/templates/runtimes/xplat-job.yml
@@ -104,5 +104,6 @@ jobs:
- checkout: self
clean: true
fetchDepth: $(checkoutFetchDepth)
+ fetchTags: false
- ${{ parameters.steps }}
diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml
index b4014fcf7be804..5292eb6fc2bada 100644
--- a/eng/pipelines/common/xplat-setup.yml
+++ b/eng/pipelines/common/xplat-setup.yml
@@ -159,6 +159,9 @@ jobs:
container: ${{ parameters.container }}
${{ if eq(parameters.jobParameters.pool, '') }}:
+ # N.B.: We should always be building on the latest available version of our build platform.
+ # Each of these queues should be the latest version or have a tracking issue if the latest version
+ # does not work for some reason.
pool:
# Public Linux Build Pool
${{ if and(or(in(parameters.osGroup, 'linux', 'freebsd', 'android', 'tizen'), eq(parameters.jobParameters.hostedOs, 'linux')), eq(variables['System.TeamProject'], 'public')) }}:
@@ -173,12 +176,12 @@ jobs:
# OSX Public Build Pool (we don't have on-prem OSX BuildPool).
${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), eq(variables['System.TeamProject'], 'public')) }}:
- vmImage: 'macos-13'
+ vmImage: 'macos-15'
# OSX Internal Pool
${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), ne(variables['System.TeamProject'], 'public')) }}:
name: "Azure Pipelines"
- vmImage: 'macOS-13'
+ vmImage: 'macos-15'
os: macOS
# Official Build Windows Pool
diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
index 104418cbdd157f..3b678b14066879 100644
--- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml
+++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
@@ -107,16 +107,16 @@ jobs:
# OSX arm64
- ${{ if eq(parameters.platform, 'osx_arm64') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- - OSX.13.ARM64.Open
+ - OSX.14.ARM64.Open
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- - OSX.13.ARM64
+ - OSX.14.ARM64
# OSX x64
- ${{ if eq(parameters.platform, 'osx_x64') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- - OSX.13.Amd64.Open
+ - OSX.14.Amd64.Open
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- - OSX.13.Amd64
+ - OSX.14.Amd64
# windows x64
- ${{ if eq(parameters.platform, 'windows_x64') }}:
diff --git a/eng/pipelines/installer/jobs/build-job.yml b/eng/pipelines/installer/jobs/build-job.yml
index 43f19c69ccacfc..26338238551dd7 100644
--- a/eng/pipelines/installer/jobs/build-job.yml
+++ b/eng/pipelines/installer/jobs/build-job.yml
@@ -294,6 +294,7 @@ jobs:
- checkout: self
clean: true
fetchDepth: $(checkoutFetchDepth)
+ fetchTags: false
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- ${{ if ne(parameters.osGroup, 'windows') }}:
diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml
index 54fe98e7d85bbf..936a1462df22e0 100644
--- a/eng/pipelines/libraries/base-job.yml
+++ b/eng/pipelines/libraries/base-job.yml
@@ -127,6 +127,7 @@ jobs:
- checkout: self
clean: true
fetchDepth: $(checkoutFetchDepth)
+ fetchTags: false
- ${{ if and(ne(parameters.liveRuntimeBuildConfig, ''), eq(parameters.runTests, true)) }}:
- template: /eng/pipelines/common/download-artifact-step.yml
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index 9d5c4b8e3e52f2..22f7b0e5102ac5 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -36,7 +36,7 @@ jobs:
- (Ubuntu.2204.ArmArch.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (AzureLinux.3.ArmArch.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-helix-arm64v8
-
+
# Linux musl x64
- ${{ if eq(parameters.platform, 'linux_musl_x64') }}:
- (Alpine.323.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-amd64
@@ -45,7 +45,7 @@ jobs:
- ${{ if eq(parameters.platform, 'linux_musl_arm64') }}:
- ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (Alpine.323.Arm64.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-arm64v8
-
+
# Linux x64
- ${{ if eq(parameters.platform, 'linux_x64') }}:
- ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}:
@@ -76,11 +76,11 @@ jobs:
# OSX arm64
- ${{ if eq(parameters.platform, 'osx_arm64') }}:
- - OSX.13.ARM64.Open
+ - OSX.14.ARM64.Open
# OSX x64
- ${{ if eq(parameters.platform, 'osx_x64') }}:
- - OSX.13.Amd64.Open
+ - OSX.14.Amd64.Open
# Android
- ${{ if in(parameters.platform, 'android_x86', 'android_x64', 'linux_bionic_x64') }}:
diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml
index 0ffa778a44e857..665ac79db810c4 100644
--- a/eng/pipelines/libraries/stress/http.yml
+++ b/eng/pipelines/libraries/stress/http.yml
@@ -12,6 +12,7 @@ schedules:
branches:
include:
- main
+ - release/*.0
- release/*-staging
variables:
@@ -35,6 +36,7 @@ extends:
timeoutInMinutes: 240
variables:
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
+ DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
@@ -43,6 +45,7 @@ extends:
- checkout: self
clean: true
fetchDepth: 5
+ fetchTags: false
- bash: |
$(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) && \
@@ -58,10 +61,9 @@ extends:
- bash: |
cd '$(httpStressProject)'
- export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/3.0"
- export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/3.0"
- export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
- export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
+ export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
+ export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
+ mkdir -p $DUMPS_SHARE
docker-compose up --abort-on-container-exit --no-color
timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run
displayName: Run HttpStress - HTTP 3.0
@@ -69,10 +71,9 @@ extends:
- bash: |
cd '$(httpStressProject)'
- export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/2.0"
- 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"
+ export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0"
+ export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0"
+ mkdir -p $DUMPS_SHARE
docker-compose down
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 2.0
@@ -80,10 +81,9 @@ extends:
- bash: |
cd '$(httpStressProject)'
- export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/1.1"
- 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"
+ export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1"
+ export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1"
+ mkdir -p $DUMPS_SHARE
docker-compose down
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 1.1
@@ -103,12 +103,7 @@ extends:
timeoutInMinutes: 150
variables:
DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share"
-
- # The 1es-windows-2022-open image has an issue where the Chocolatey-installed V1 docker-compose takes precendence over the
- # V2 docker-compose required by the stress tests, see: https://github.com/actions/runner-images/issues/7080
- # This is worked around by handpicking the V2 executable.
- # The workaround should be removed when the official fix is propagated into 1es-windows-2022-open, or when we switch to another image.
- DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe"
+ DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2022-open
@@ -118,21 +113,15 @@ extends:
clean: true
fetchDepth: 5
lfs: false
+ fetchTags: false
- powershell: |
- # Workaround for https://github.com/microsoft/azure-pipelines-agent/issues/4554. Undo when the image bug is fixed.
- Remove-Item -Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt"
-
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildRuntime
displayName: Build CLR and Libraries
- powershell: |
- $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/"
- $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/"
- New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory
- New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStress
@@ -147,37 +136,28 @@ extends:
- powershell: |
cd '$(httpStressProject)'
- $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/3.0"
- $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/3.0"
- New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory
- New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory
- $env:HTTPSTRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0"
- $env:HTTPSTRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0"
- & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color
+ $env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0"
+ $env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0"
+ New-Item -Force $env:DUMPS_SHARE -ItemType Directory
+ docker compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 3.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
- powershell: |
cd '$(httpStressProject)'
- $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/2.0"
- $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/2.0"
- New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory
- New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory
- $env:HTTPSTRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0"
- $env:HTTPSTRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0"
- & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color
+ $env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0"
+ $env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0"
+ New-Item -Force $env:DUMPS_SHARE -ItemType Directory
+ 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'))
- powershell: |
cd '$(httpStressProject)'
- $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/1.1"
- $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/1.1"
- New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory
- New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory
- $env:HTTPSTRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1"
- $env:HTTPSTRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1"
- & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color
+ $env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1"
+ $env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1"
+ New-Item -Force $env:DUMPS_SHARE -ItemType Directory
+ 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/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml
index ed1306990e294b..cf84a63ba50ea6 100644
--- a/eng/pipelines/libraries/stress/ssl.yml
+++ b/eng/pipelines/libraries/stress/ssl.yml
@@ -12,6 +12,7 @@ schedules:
branches:
include:
- main
+ - release/*.0
- release/*-staging
variables:
@@ -34,6 +35,9 @@ extends:
- job: linux
displayName: Docker Linux
timeoutInMinutes: 120
+ variables:
+ DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
+ DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
@@ -42,6 +46,7 @@ extends:
- checkout: self
clean: true
fetchDepth: 5
+ fetchTags: false
- bash: |
$(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
@@ -53,9 +58,16 @@ extends:
- bash: |
cd '$(sslStressProject)'
+ export STRESS_CLIENT_ARGS=$SSLSTRESS_CLIENT_ARGS
+ export STRESS_SERVER_ARGS=$SSLSTRESS_SERVER_ARGS
+ mkdir -p $DUMPS_SHARE
docker-compose up --abort-on-container-exit --no-color
displayName: Run SslStress
+ - publish: $(Build.ArtifactStagingDirectory)/dumps
+ artifact: DumpsLinux
+ condition: failed()
+
- job: windows
displayName: Docker NanoServer
timeoutInMinutes: 120
@@ -63,21 +75,16 @@ extends:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2022-open
variables:
- # The 1es-windows-2022-open image has an issue where the Chocolatey-installed V1 docker-compose takes precendence over the
- # V2 docker-compose required by the stress tests, see: https://github.com/actions/runner-images/issues/7080
- # This is worked around by handpicking the V2 executable.
- # The workaround should be removed when the official fix is propagated into 1es-windows-2022-open, or when we switch to another image.
- DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe"
+ DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share"
+ DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
steps:
- checkout: self
clean: true
fetchDepth: 5
lfs: false
+ fetchTags: false
- powershell: |
- # Workaround for https://github.com/microsoft/azure-pipelines-agent/issues/4554. Undo when the image bug is fixed.
- Remove-Item -Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt"
-
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
displayName: Build CLR and Libraries
@@ -87,5 +94,12 @@ extends:
- powershell: |
cd '$(sslStressProject)'
- & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color
+ $env:STRESS_CLIENT_ARGS = $env:SSLSTRESS_CLIENT_ARGS
+ $env:STRESS_SERVER_ARGS = $env:SSLSTRESS_SERVER_ARGS
+ New-Item -Force $env:DUMPS_SHARE -ItemType Directory
+ docker compose up --abort-on-container-exit --no-color
displayName: Run SslStress
+
+ - publish: $(Build.ArtifactStagingDirectory)/dumps
+ artifact: DumpsWindows
+ condition: failed()
\ No newline at end of file
diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml
index 540f392e796389..d7ffff9985a734 100644
--- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml
+++ b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml
@@ -32,6 +32,7 @@ jobs:
- checkout: self
clean: true
fetchDepth: 20
+ fetchTags: false
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- task: NuGetAuthenticate@1
diff --git a/src/coreclr/vm/amd64/jithelpers_fastwritebarriers.S b/src/coreclr/vm/amd64/jithelpers_fastwritebarriers.S
index f987751bdcb358..cf9f149e374899 100644
--- a/src/coreclr/vm/amd64/jithelpers_fastwritebarriers.S
+++ b/src/coreclr/vm/amd64/jithelpers_fastwritebarriers.S
@@ -39,10 +39,10 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardTable
shr rdi, 0x0B
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_PreGrow64
+ // jne LOCAL_LABEL(UpdateCardTable_PreGrow64)
REPRET
- UpdateCardTable_PreGrow64:
+ LOCAL_LABEL(UpdateCardTable_PreGrow64):
mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -57,17 +57,17 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardBundleTable
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundle_PreGrow64
+ // jne LOCAL_LABEL(UpdateCardBundle_PreGrow64)
REPRET
- UpdateCardBundle_PreGrow64:
+ LOCAL_LABEL(UpdateCardBundle_PreGrow64):
mov byte ptr [rdi + rax], 0xFF
#endif
ret
.balign 16
- Exit_PreGrow64:
+PATCH_LABEL Exit_PreGrow64
REPRET
LEAF_END_MARKED JIT_WriteBarrier_PreGrow64, _TEXT
@@ -124,10 +124,10 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardTable
shr rdi, 0x0B
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_PostGrow64
+ // jne LOCAL_LABEL(UpdateCardTable_PostGrow64)
REPRET
- UpdateCardTable_PostGrow64:
+ LOCAL_LABEL(UpdateCardTable_PostGrow64):
mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -142,17 +142,17 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardBundleTable
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundle_PostGrow64
+ // jne LOCAL_LABEL(UpdateCardBundle_PostGrow64)
REPRET
- UpdateCardBundle_PostGrow64:
+ LOCAL_LABEL(UpdateCardBundle_PostGrow64):
mov byte ptr [rdi + rax], 0xFF
#endif
ret
.balign 16
- Exit_PostGrow64:
+PATCH_LABEL Exit_PostGrow64
REPRET
LEAF_END_MARKED JIT_WriteBarrier_PostGrow64, _TEXT
@@ -183,10 +183,10 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardTable
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_SVR64
+ // jne LOCAL_LABEL(UpdateCardTable_SVR64)
REPRET
- UpdateCardTable_SVR64:
+ LOCAL_LABEL(UpdateCardTable_SVR64):
mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -200,10 +200,10 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardBundleTable
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundle_SVR64
+ // jne LOCAL_LABEL(UpdateCardBundle_SVR64)
REPRET
- UpdateCardBundle_SVR64:
+ LOCAL_LABEL(UpdateCardBundle_SVR64):
mov byte ptr [rdi + rax], 0xFF
#endif
@@ -233,46 +233,46 @@ PATCH_LABEL JIT_WriteBarrier_Byte_Region64_Patch_Label_RegionShrDest
// Check whether the region we're storing into is gen 0 - nothing to do in this case
cmp byte ptr [rdi + rax], 0
.byte 0x75, 0x04
- //jne NotGen0_Byte_Region64
+ //jne LOCAL_LABEL(NotGen0_Byte_Region64)
REPRET
NOP_2_BYTE // padding for alignment of constant
- NotGen0_Byte_Region64:
+ LOCAL_LABEL(NotGen0_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_Byte_Region64_Patch_Label_Lower
movabs r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x73, 0x01
- // jae NotLow_Byte_Region64
+ // jae LOCAL_LABEL(NotLow_Byte_Region64)
ret
- NotLow_Byte_Region64:
+ LOCAL_LABEL(NotLow_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_Byte_Region64_Patch_Label_Upper
movabs r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x72, 0x02
- // jb NotHigh_Byte_Region64
+ // jb LOCAL_LABEL(NotHigh_Byte_Region64)
REPRET
- NotHigh_Byte_Region64:
+ LOCAL_LABEL(NotHigh_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_Byte_Region64_Patch_Label_RegionShrSrc
shr rsi, 0x16 // compute region index
mov dl, [rsi + rax]
cmp dl, [rdi + rax]
.byte 0x72, 0x03
- // jb IsOldToYoung_Byte_Region64
+ // jb LOCAL_LABEL(IsOldToYoung_Byte_Region64)
REPRET
nop
- IsOldToYoung_Byte_Region64:
+ LOCAL_LABEL(IsOldToYoung_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_Byte_Region64_Patch_Label_CardTable
movabs rax, 0xF0F0F0F0F0F0F0F0
shr r8, 0xB
cmp byte ptr [r8 + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_Byte_Region64
+ // jne LOCAL_LABEL(UpdateCardTable_Byte_Region64)
REPRET
- UpdateCardTable_Byte_Region64:
+ LOCAL_LABEL(UpdateCardTable_Byte_Region64):
mov byte ptr [r8 + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
shr r8, 0x0A
@@ -280,10 +280,10 @@ PATCH_LABEL JIT_WriteBarrier_Byte_Region64_Patch_Label_CardBundleTable
movabs rax, 0xF0F0F0F0F0F0F0F0
cmp byte ptr [r8 + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundleTable_Byte_Region64
+ // jne LOCAL_LABEL(UpdateCardBundleTable_Byte_Region64)
REPRET
- UpdateCardBundleTable_Byte_Region64:
+ LOCAL_LABEL(UpdateCardBundleTable_Byte_Region64):
mov byte ptr [r8 + rax], 0xFF
#endif
ret
@@ -308,36 +308,36 @@ PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_RegionShrDest
// Check whether the region we're storing into is gen 0 - nothing to do in this case
cmp byte ptr [rdi + rax], 0
.byte 0x75, 0x04
- //jne NotGen0_Bit_Region64
+ //jne LOCAL_LABEL(NotGen0_Bit_Region64)
REPRET
NOP_2_BYTE // padding for alignment of constant
- NotGen0_Bit_Region64:
+ LOCAL_LABEL(NotGen0_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_Lower
movabs r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x73, 0x01
- // jae NotLow_Bit_Region64
+ // jae LOCAL_LABEL(NotLow_Bit_Region64)
ret
- NotLow_Bit_Region64:
+ LOCAL_LABEL(NotLow_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_Upper
movabs r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x72, 0x02
- // jb NotHigh_Bit_Region64
+ // jb LOCAL_LABEL(NotHigh_Bit_Region64)
REPRET
- NotHigh_Bit_Region64:
+ LOCAL_LABEL(NotHigh_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_RegionShrSrc
shr rsi, 0x16 // compute region index
mov dl, [rsi + rax]
cmp dl, [rdi + rax]
.byte 0x72, 0x03
- // jb IsOldToYoung_Bit_Region64
+ // jb LOCAL_LABEL(IsOldToYoung_Bit_Region64)
REPRET
nop
- IsOldToYoung_Bit_Region64:
+ LOCAL_LABEL(IsOldToYoung_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_CardTable
movabs rax, 0xF0F0F0F0F0F0F0F0
@@ -349,10 +349,10 @@ PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_CardTable
shl dl, cl
test byte ptr [r8 + rax], dl
.byte 0x74, 0x02
- // je UpdateCardTable_Bit_Region64
+ // je LOCAL_LABEL(UpdateCardTable_Bit_Region64)
REPRET
- UpdateCardTable_Bit_Region64:
+ LOCAL_LABEL(UpdateCardTable_Bit_Region64):
lock or byte ptr [r8 + rax], dl
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_CardBundleTable
@@ -360,10 +360,10 @@ PATCH_LABEL JIT_WriteBarrier_Bit_Region64_Patch_Label_CardBundleTable
shr r8, 0x0A
cmp byte ptr [r8 + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundleTable_Bit_Region64
+ // jne LOCAL_LABEL(UpdateCardBundleTable_Bit_Region64)
REPRET
- UpdateCardBundleTable_Bit_Region64:
+ LOCAL_LABEL(UpdateCardBundleTable_Bit_Region64):
mov byte ptr [r8 + rax], 0xFF
#endif
ret
@@ -397,10 +397,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower
add rax, r10
cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
- // jne CheckCardTable_WriteWatch_PreGrow64
+ // jne LOCAL_LABEL(CheckCardTable_WriteWatch_PreGrow64)
mov byte ptr [rax], 0xFF
- CheckCardTable_WriteWatch_PreGrow64:
+ LOCAL_LABEL(CheckCardTable_WriteWatch_PreGrow64):
// Check the lower ephemeral region bound.
cmp rsi, r11
@@ -419,10 +419,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardTable
movabs rax, 0xF0F0F0F0F0F0F0F0
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_WriteWatch_PreGrow64
+ // jne LOCAL_LABEL(UpdateCardTable_WriteWatch_PreGrow64)
REPRET
- UpdateCardTable_WriteWatch_PreGrow64:
+ LOCAL_LABEL(UpdateCardTable_WriteWatch_PreGrow64):
mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -434,17 +434,17 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardBundleTable
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundle_WriteWatch_PreGrow64
+ // jne LOCAL_LABEL(UpdateCardBundle_WriteWatch_PreGrow64)
REPRET
- UpdateCardBundle_WriteWatch_PreGrow64:
+ LOCAL_LABEL(UpdateCardBundle_WriteWatch_PreGrow64):
mov byte ptr [rdi + rax], 0xFF
#endif
ret
.balign 16
- Exit_WriteWatch_PreGrow64:
+PATCH_LABEL Exit_WriteWatch_PreGrow64
REPRET
LEAF_END_MARKED JIT_WriteBarrier_WriteWatch_PreGrow64, _TEXT
@@ -475,13 +475,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_Lower
add rax, r10
cmp byte ptr [rax], 0x0
.byte 0x75, 0x06
- // jne CheckCardTable_WriteWatch_PostGrow64
+ // jne LOCAL_LABEL(CheckCardTable_WriteWatch_PostGrow64)
mov byte ptr [rax], 0xFF
NOP_3_BYTE // padding for alignment of constant
// Check the lower and upper ephemeral region bounds
- CheckCardTable_WriteWatch_PostGrow64:
+ LOCAL_LABEL(CheckCardTable_WriteWatch_PostGrow64):
cmp rsi, r11
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -514,10 +514,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable
shr rdi, 0x0B
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_WriteWatch_PostGrow64
+ // jne LOCAL_LABEL(UpdateCardTable_WriteWatch_PostGrow64)
REPRET
- UpdateCardTable_WriteWatch_PostGrow64:
+ LOCAL_LABEL(UpdateCardTable_WriteWatch_PostGrow64):
mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -529,16 +529,16 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardBundleTable
cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundle_WriteWatch_PostGrow64
+ // jne LOCAL_LABEL(UpdateCardBundle_WriteWatch_PostGrow64)
REPRET
- UpdateCardBundle_WriteWatch_PostGrow64:
+ LOCAL_LABEL(UpdateCardBundle_WriteWatch_PostGrow64):
mov byte ptr [rdi + rax], 0xFF
#endif
ret
.balign 16
- Exit_WriteWatch_PostGrow64:
+PATCH_LABEL Exit_WriteWatch_PostGrow64
REPRET
LEAF_END_MARKED JIT_WriteBarrier_WriteWatch_PostGrow64, _TEXT
@@ -578,17 +578,17 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardTable
add rax, r10
cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
- // jne CheckCardTable_WriteWatch_SVR64
+ // jne LOCAL_LABEL(CheckCardTable_WriteWatch_SVR64)
mov byte ptr [rax], 0xFF
- CheckCardTable_WriteWatch_SVR64:
+ LOCAL_LABEL(CheckCardTable_WriteWatch_SVR64):
shr rdi, 0x0B
cmp byte ptr [rdi + r11], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_WriteWatch_SVR64
+ // jne LOCAL_LABEL(UpdateCardTable_WriteWatch_SVR64)
REPRET
- UpdateCardTable_WriteWatch_SVR64:
+ LOCAL_LABEL(UpdateCardTable_WriteWatch_SVR64):
mov byte ptr [rdi + r11], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
@@ -600,10 +600,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardBundleTable
shr rdi, 0x0A
cmp byte ptr [rdi + r11], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundle_WriteWatch_SVR64
+ // jne LOCAL_LABEL(UpdateCardBundle_WriteWatch_SVR64)
REPRET
- UpdateCardBundle_WriteWatch_SVR64:
+ LOCAL_LABEL(UpdateCardBundle_WriteWatch_SVR64):
mov byte ptr [rdi + r11], 0xFF
#endif
@@ -632,57 +632,57 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_RegionShrDest
shr rdi, 0x16 // compute region index
cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
- // jne CheckGen0_WriteWatch_Byte_Region64
+ // jne LOCAL_LABEL(CheckGen0_WriteWatch_Byte_Region64)
mov byte ptr [rax], 0xFF
- CheckGen0_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(CheckGen0_WriteWatch_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_RegionToGeneration
mov rax, 0xF0F0F0F0F0F0F0F0
// Check whether the region we're storing into is gen 0 - nothing to do in this case
cmp byte ptr [rdi + rax], 0
.byte 0x75, 0x08
- // jne NotGen0_WriteWatch_Byte_Region64
+ // jne LOCAL_LABEL(NotGen0_WriteWatch_Byte_Region64)
REPRET
NOP_2_BYTE // padding for alignment of constant
NOP_2_BYTE // padding for alignment of constant
NOP_2_BYTE // padding for alignment of constant
- NotGen0_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(NotGen0_WriteWatch_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_Lower
movabs r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x73, 0x01
- // jae NotLow_WriteWatch_Byte_Region64
+ // jae LOCAL_LABEL(NotLow_WriteWatch_Byte_Region64)
ret
- NotLow_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(NotLow_WriteWatch_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_Upper
mov r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x72, 0x02
- // jb NotHigh_WriteWatch_Byte_Region64
+ // jb LOCAL_LABEL(NotHigh_WriteWatch_Byte_Region64)
REPRET
- NotHigh_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(NotHigh_WriteWatch_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_RegionShrSrc
shr rsi, 0x16 // compute region index
mov dl, [rsi + rax]
cmp dl, [rdi + rax]
.byte 0x72, 0x03
- // jb IsOldToYoung_WriteWatch_Byte_Region64
+ // jb LOCAL_LABEL(IsOldToYoung_WriteWatch_Byte_Region64)
REPRET
nop
- IsOldToYoung_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(IsOldToYoung_WriteWatch_Byte_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_CardTable
mov rax, 0xF0F0F0F0F0F0F0F0
shr r8, 0xB
cmp byte ptr [r8 + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardTable_WriteWatch_Byte_Region64
+ // jne LOCAL_LABEL(UpdateCardTable_WriteWatch_Byte_Region64)
REPRET
- UpdateCardTable_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(UpdateCardTable_WriteWatch_Byte_Region64):
mov byte ptr [r8 + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
shr r8, 0x0A
@@ -690,10 +690,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_Byte_Region64_Patch_Label_CardBundleTabl
mov rax, 0xF0F0F0F0F0F0F0F0
cmp byte ptr [r8 + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundleTable_WriteWatch_Byte_Region64
+ // jne LOCAL_LABEL(UpdateCardBundleTable_WriteWatch_Byte_Region64)
REPRET
- UpdateCardBundleTable_WriteWatch_Byte_Region64:
+ LOCAL_LABEL(UpdateCardBundleTable_WriteWatch_Byte_Region64):
mov byte ptr [r8 + rax], 0xFF
#endif
ret
@@ -718,47 +718,47 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_RegionShrDest
shr rdi, 0x16 // compute region index
cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
- // jne CheckGen0_WriteWatch_Bit_Region64
+ // jne LOCAL_LABEL(CheckGen0_WriteWatch_Bit_Region64)
mov byte ptr [rax], 0xFF
- CheckGen0_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(CheckGen0_WriteWatch_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_RegionToGeneration
mov rax, 0xF0F0F0F0F0F0F0F0
// Check whether the region we're storing into is gen 0 - nothing to do in this case
cmp byte ptr [rdi + rax], 0
.byte 0x75, 0x08
- // jne NotGen0_WriteWatch_Bit_Region64
+ // jne LOCAL_LABEL(NotGen0_WriteWatch_Bit_Region64)
REPRET
NOP_2_BYTE // padding for alignment of constant
NOP_2_BYTE // padding for alignment of constant
NOP_2_BYTE // padding for alignment of constant
- NotGen0_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(NotGen0_WriteWatch_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_Lower
movabs r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x73, 0x01
- // jae NotLow_WriteWatch_Bit_Region64
+ // jae LOCAL_LABEL(NotLow_WriteWatch_Bit_Region64)
ret
- NotLow_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(NotLow_WriteWatch_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_Upper
mov r9, 0xF0F0F0F0F0F0F0F0
cmp rsi, r9
.byte 0x72, 0x02
- // jb NotHigh_WriteWatch_Bit_Region64
+ // jb LOCAL_LABEL(NotHigh_WriteWatch_Bit_Region64)
REPRET
- NotHigh_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(NotHigh_WriteWatch_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_RegionShrSrc
shr rsi, 0x16 // compute region index
mov dl, [rsi + rax]
cmp dl, [rdi + rax]
.byte 0x72, 0x03
- // jb IsOldToYoung_WriteWatch_Bit_Region64
+ // jb LOCAL_LABEL(IsOldToYoung_WriteWatch_Bit_Region64)
REPRET
nop
- IsOldToYoung_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(IsOldToYoung_WriteWatch_Bit_Region64):
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_CardTable
mov rax, 0xF0F0F0F0F0F0F0F0
@@ -770,10 +770,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_CardTable
shl dl, cl
test byte ptr [r8 + rax], dl
.byte 0x74, 0x02
- // je UpdateCardTable_WriteWatch_Bit_Region64
+ // je LOCAL_LABEL(UpdateCardTable_WriteWatch_Bit_Region64)
REPRET
- UpdateCardTable_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(UpdateCardTable_WriteWatch_Bit_Region64):
lock or byte ptr [r8 + rax], dl
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_CardBundleTable
@@ -781,10 +781,10 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_Bit_Region64_Patch_Label_CardBundleTable
shr r8, 0x0A
cmp byte ptr [r8 + rax], 0xFF
.byte 0x75, 0x02
- // jne UpdateCardBundleTable_WriteWatch_Bit_Region64
+ // jne LOCAL_LABEL(UpdateCardBundleTable_WriteWatch_Bit_Region64)
REPRET
- UpdateCardBundleTable_WriteWatch_Bit_Region64:
+ LOCAL_LABEL(UpdateCardBundleTable_WriteWatch_Bit_Region64):
mov byte ptr [r8 + rax], 0xFF
#endif
ret
diff --git a/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-opensuse.42.proj b/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-opensuse.42.proj
index 6453d117728d4e..369bf7f7cabfcd 100644
--- a/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-opensuse.42.proj
+++ b/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-opensuse.42.proj
@@ -5,6 +5,6 @@
-
+
\ No newline at end of file
diff --git a/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-sles.12.proj b/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-sles.12.proj
index 912692f5d7f26f..f007b2acb63ee8 100644
--- a/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-sles.12.proj
+++ b/src/installer/pkg/sfx/installers/dotnet-runtime-deps/dotnet-runtime-deps-sles.12.proj
@@ -5,6 +5,6 @@
-
+
\ No newline at end of file
diff --git a/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1 b/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1
new file mode 100644
index 00000000000000..6aeba6c6b9d75e
--- /dev/null
+++ b/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1
@@ -0,0 +1,79 @@
+## This is a helper script for non-containerized local build and test execution.
+## It downloads and uses the daily SDK which contains the compatible AspNetCore bits.
+## Usage:
+## ./build-local.ps1 [TestProjectDir] [StressConfiguration] [LibrariesConfiguration]
+
+$RepoRoot="$(git rev-parse --show-toplevel)"
+[xml]$xml = Get-Content (Join-Path $RepoRoot "eng\Versions.props")
+$Version="$($xml.Project.PropertyGroup.MajorVersion[0]).$($xml.Project.PropertyGroup.MinorVersion[0])"
+
+function PrintUsageAndExit {
+ Write-Host "Usage:"
+ Write-Host "./build-local.ps1 [TestProjectDir] [StressConfiguration] [LibrariesConfiguration]"
+ Write-Host "StressConfiguration and LibrariesConfiguration default to Release!"
+ exit 1
+}
+
+if (-not ([string]::IsNullOrEmpty($args[0])) -and (Test-Path -Path $args[0])) {
+ $TestProjectDir = $args[0]
+} else {
+ Write-Host "Valid TestProjectDir is required!"
+ PrintUsageAndExit
+}
+
+$ProjectName = (Get-Item $TestProjectDir).Name
+
+$DailyDotnetRoot= Join-Path $TestProjectDir ".dotnet-daily"
+
+$StressConfiguration = "Release"
+if (-not ([string]::IsNullOrEmpty($args[1]))) {
+ $StressConfiguration = $args[1]
+}
+
+$LibrariesConfiguration = "Release"
+if (-not ([string]::IsNullOrEmpty($args[2]))) {
+ $LibrariesConfiguration = $args[2]
+}
+
+$TestHostRoot="$RepoRoot/artifacts/bin/testhost/net$Version-windows-$LibrariesConfiguration-x64"
+
+Write-Host "StressConfiguration: $StressConfiguration, LibrariesConfiguration: $LibrariesConfiguration, testhost: $TestHostRoot"
+
+if (-not (Test-Path -Path $TestHostRoot)) {
+ Write-Host "Cannot find testhost in: $TestHostRoot"
+ Write-Host "Make sure libraries with the requested configuration are built!"
+ PrintUsageAndExit
+ exit 1
+}
+
+if (-not (Test-Path -Path $DailyDotnetRoot)) {
+ Write-Host "Downloading daily SDK to: $DailyDotnetRoot"
+ New-Item -ItemType Directory -Path $DailyDotnetRoot
+ Invoke-WebRequest -Uri https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1 -OutFile "$DailyDotnetRoot\dotnet-install.ps1"
+ & "$DailyDotnetRoot\dotnet-install.ps1" -NoPath -Channel $Version -Quality daily -InstallDir $DailyDotnetRoot
+} else {
+ Write-Host "Daily SDK found in $DailyDotnetRoot"
+}
+
+$env:DOTNET_ROOT=$DailyDotnetRoot
+$env:PATH="$DailyDotnetRoot;$env:PATH"
+$env:DOTNET_MULTILEVEL_LOOKUP=0
+
+if (-not (Test-Path -Path "$TestHostRoot/shared/Microsoft.AspNetCore.App")) {
+ Write-Host "Copying Microsoft.AspNetCore.App bits from daily SDK to testhost: $TestHostRoot"
+ Copy-Item -Recurse -Path "$DailyDotnetRoot/shared/Microsoft.AspNetCore.App" -Destination "$TestHostRoot/shared"
+} else {
+ Write-Host "Microsoft.AspNetCore.App found in testhost: $TestHostRoot"
+}
+
+Write-Host "Building solution."
+dotnet build -c $StressConfiguration -f "net$Version"
+
+$Runscript=".\run-stress-$StressConfiguration-$LibrariesConfiguration.ps1"
+if (-not (Test-Path $Runscript)) {
+ Write-Host "Generating Runscript."
+ Add-Content -Path $Runscript -Value "& '$TestHostRoot/dotnet' exec --roll-forward Major ./bin/$StressConfiguration/net$Version/$ProjectName.dll `$args"
+}
+
+Write-Host "To run tests type:"
+Write-Host "$Runscript [stress test args]"
diff --git a/src/libraries/Common/tests/System/Net/StressTests/build-local.sh b/src/libraries/Common/tests/System/Net/StressTests/build-local.sh
new file mode 100755
index 00000000000000..cdaa86721b1db9
--- /dev/null
+++ b/src/libraries/Common/tests/System/Net/StressTests/build-local.sh
@@ -0,0 +1,83 @@
+#!/usr/bin/env bash
+
+## This is a helper script for non-containerized local build and test execution.
+## It downloads and uses the daily SDK which contains the compatible AspNetCore bits.
+## Usage:
+## ./build-local.sh [TestProjectDir] [StressConfiguration] [LibrariesConfiguration]
+
+if [ "$1" == "" ]; then
+ echo "Usage:"
+ echo "./build-local.sh [TestProjectDir] [StressConfiguration] [LibrariesConfiguration]"
+ echo "StressConfiguration and LibrariesConfiguration default to Release!"
+ exit 1
+fi
+
+projectdir=$1
+projectname=$(basename $1)
+daily_dotnet_root=$projectdir/.dotnet-daily
+
+repo_root=$(git -C "$projectdir" rev-parse --show-toplevel)
+major_version=$(grep -oP '(?<=).*?(?=)' "$repo_root/eng/Versions.props")
+minor_version=$(grep -oP '(?<=).*?(?=)' "$repo_root/eng/Versions.props")
+version="$major_version.$minor_version"
+
+stress_configuration="Release"
+if [ "$2" != "" ]; then
+ stress_configuration=${2,,} # Lowercase all characters in $1
+ stress_configuration=${stress_configuration^} # Uppercase first character
+fi
+
+libraries_configuration="Release"
+if [ "$3" != "" ]; then
+ libraries_configuration=${3,,} # Lowercase all characters in $1
+ libraries_configuration=${libraries_configuration^} # Uppercase first character
+fi
+
+testhost_root=$repo_root/artifacts/bin/testhost/net$version-linux-$libraries_configuration-x64
+echo "StressConfiguration: $stress_configuration, LibrariesConfiguration: $libraries_configuration, testhost: $testhost_root"
+
+if [[ ! -d $testhost_root ]]; then
+ echo "Cannot find testhost in: $testhost_root"
+ echo "Make sure libraries with the requested configuration are built!"
+ echo "Usage:"
+ echo "./build-local.sh [TestProjectDir] [StressConfiguration] [LibrariesConfiguration]"
+ echo "StressConfiguration and LibrariesConfiguration default to Release!"
+ exit 1
+fi
+
+if [[ ! -d $daily_dotnet_root ]]; then
+ echo "Downloading daily SDK to $daily_dotnet_root"
+ mkdir $daily_dotnet_root
+ wget https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh -O $daily_dotnet_root/dotnet-install.sh
+ bash $daily_dotnet_root/dotnet-install.sh --no-path --channel $version --quality daily --install-dir $daily_dotnet_root
+else
+ echo "Daily SDK found in $daily_dotnet_root"
+fi
+
+export DOTNET_ROOT=$daily_dotnet_root
+export PATH=$DOTNET_ROOT:$PATH
+export DOTNET_MULTILEVEL_LOOKUP=0
+
+if [[ ! -d "$testhost_root/shared/Microsoft.AspNetCore.App" ]]; then
+ echo "Copying Microsoft.AspNetCore.App bits from daily SDK to testhost: $testhost_root"
+ cp -r $daily_dotnet_root/shared/Microsoft.AspNetCore.App $testhost_root/shared/Microsoft.AspNetCore.App
+else
+ echo "Microsoft.AspNetCore.App found in testhost: $testhost_root"
+fi
+
+echo "Building solution."
+dotnet build -c $stress_configuration
+
+runscript=./run-stress-${stress_configuration,,}-${libraries_configuration,,}.sh
+if [[ ! -f $runscript ]]; then
+ echo "Generating runscript."
+ cat >$runscript <"
+ exit 1
+}
+
+if ($useWindowsContainers) {
+ $env:DOCKERFILE = "windows.Dockerfile"
+}
+
+if (!$noBuild) {
+ # Dockerize the stress app using docker-compose
+ $BuildArgs = @(
+ "--build-arg", "VERSION=$Version",
+ "--build-arg", "CONFIGURATION=$configuration"
+ )
+ if ($sdkImageName) {
+ $BuildArgs += "--build-arg", "SDK_BASE_IMAGE=$sdkImageName"
+ }
+ $originalErrorPreference = $ErrorActionPreference
+ $ErrorActionPreference = 'Continue'
+ try {
+ write-output "docker compose --file $COMPOSE_FILE build $buildArgs"
+ docker compose --file $COMPOSE_FILE build @buildArgs 2>&1
+ if ($LASTEXITCODE -ne 0) {
+ throw "docker compose exited with error code $LASTEXITCODE"
+ }
+ }
+ finally {
+ $ErrorActionPreference = $originalErrorPreference
+ }
+}
+
+# Run the stress app
+if (!$buildOnly) {
+ if ($useWindowsContainers) {
+ $env:DUMPS_SHARE_MOUNT_ROOT = "C:/dumps-share"
+ }
+ else {
+ $env:DUMPS_SHARE_MOUNT_ROOT = "/dumps-share"
+ }
+
+ $env:DUMPS_SHARE = $dumpsSharePath
+ New-Item -Force $env:DUMPS_SHARE -ItemType Directory
+
+ $env:STRESS_CLIENT_ARGS = $clientStressArgs
+ $env:STRESS_SERVER_ARGS = $serverStressArgs
+ docker compose --file "$COMPOSE_FILE" up --abort-on-container-exit
+}
diff --git a/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh b/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh
new file mode 100755
index 00000000000000..6b50a01f5d2ffa
--- /dev/null
+++ b/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh
@@ -0,0 +1,118 @@
+#!/usr/bin/env bash
+# Runs the stress test using docker-compose
+
+# Stop script if unbound variable found (use ${var:-} if intentional)
+set -u
+
+# Stop script if command returns non-zero exit code.
+# Prevents hidden errors caused by missing error code propagation.
+set -e
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+repo_root=$(git -C "$scriptroot" rev-parse --show-toplevel)
+major_version=$(grep -oP '(?<=).*?(?=)' "$repo_root/eng/Versions.props")
+minor_version=$(grep -oP '(?<=).*?(?=)' "$repo_root/eng/Versions.props")
+version="$major_version.$minor_version"
+imagename="dotnet-sdk-libs-current"
+configuration="Release"
+buildcurrentlibraries=0
+buildonly=0
+nobuild=0
+clientstressargs=""
+serverstressargs=""
+
+projectdir=$1
+shift 1
+if [[ ! -d "$projectdir" ]]; then
+ echo "First argument must be path to the stress project directory"
+ exit 1
+fi
+
+dumpssharepath="$projectdir/dumps"
+
+while [[ $# -gt 0 ]]; do
+ opt="$(printf "%s" "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ case "$opt" in
+ -dumpssharepath|-d)
+ dumpssharepath=$2
+ shift 2
+ ;;
+ -sdkimagename|-t)
+ imagename=$2
+ shift 2
+ ;;
+ -configuration|-c)
+ configuration=$2
+ shift 2
+ ;;
+ -buildcurrentlibraries|-b)
+ buildcurrentlibraries=1
+ shift 1
+ ;;
+ -buildonly|-o)
+ buildonly=1
+ shift 1
+ ;;
+ -nobuild|-n)
+ nobuild=1
+ shift 1
+ ;;
+ -clientstressargs)
+ clientstressargs=$2
+ shift 2
+ ;;
+ -serverstressargs)
+ serverstressargs=$2
+ shift 2
+ ;;
+ *)
+ shift 1
+ ;;
+ esac
+done
+
+repo_root=$(git -C "$scriptroot" rev-parse --show-toplevel)
+
+if [[ "$buildcurrentlibraries" -eq 1 ]]; then
+ libraries_args=" -t $imagename -c $configuration"
+
+ if ! "$repo_root"/eng/docker/build-docker-sdk.sh $libraries_args; then
+ exit 1
+ fi
+fi
+
+compose_file="$projectdir/docker-compose.yml"
+
+if [[ "$nobuild" -eq 0 ]]; then
+ build_args="--build-arg VERSION=$version --build-arg CONFIGURATION=$configuration"
+ if [[ -n "$imagename" ]]; then
+ build_args="$build_args --build-arg SDK_BASE_IMAGE=$imagename"
+ fi
+
+ if ! docker-compose --file "$compose_file" build $build_args; then
+ exit $?
+ fi
+fi
+
+if [[ "$buildonly" -eq 0 ]]; then
+ if [[ -n "$dumpssharepath" ]]; then
+ export DUMPS_SHARE="$dumpssharepath"
+ export DUMPS_SHARE_MOUNT_ROOT="/dumps-share"
+ fi
+
+ export STRESS_CLIENT_ARGS=$clientstressargs
+ export STRESS_SERVER_ARGS=$serverstressargs
+ docker-compose --file "$compose_file" up --abort-on-container-exit
+ exit $?
+fi
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Configuration.cs b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Configuration.cs
index baba7d94d919c5..e73e0704be164e 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Configuration.cs
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Configuration.cs
@@ -45,6 +45,7 @@ public class Configuration
public bool UseHttpSys { get; set; }
public bool LogAspNet { get; set; }
public bool Trace { get; set; }
+ public bool? TrackUnobservedExceptions { get; set; }
public int? ServerMaxConcurrentStreams { get; set; }
public int? ServerMaxFrameSize { get; set; }
public int? ServerInitialConnectionWindowSize { get; set; }
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props
index 3ee8cbfa7ae059..ab8595dbb5c92d 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props
@@ -1,18 +1,20 @@
- linux-x64
- win-x64
+ linux-x64
+ win-x64
$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/
-
+
+
+
$(RepositoryRoot)src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/*.cs
$(RepositoryRoot)eng/targetingpacks.targets
- 8.0.0
- net8.0
- 8.0
+ $(MajorVersion).$(MinorVersion)
+ net$(NetCoreAppCurrentVersion)
Microsoft.NETCore.App
$(RepositoryRoot)artifacts/bin/microsoft.netcore.app.ref/
- $(RepositoryRoot)artifacts/bin/microsoft.netcore.app.runtime.$(OutputRID)/$(Configuration)/
+ $(RepositoryRoot)artifacts/bin/microsoft.netcore.app.runtime.$(TargetRid)/$(Configuration)/
+ false
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets
index e3ebd0de328758..59c504befee957 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets
@@ -6,6 +6,6 @@
Define this here because the SDK resets it
unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.
-->
- 8.0
+ $(NetCoreAppCurrentVersion)
\ No newline at end of file
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile
index 6dc83bce1895eb..1fa0e953c6d364 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile
@@ -1,47 +1,49 @@
-ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-bullseye-slim
+ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:latest
FROM $SDK_BASE_IMAGE
-# Build latest msquic locally
+# Build latest msquic locally with ASAN enabled
WORKDIR /msquic
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y cmake clang ruby-dev gem lttng-tools libssl-dev && \
gem install fpm
-RUN git clone --recursive https://github.com/dotnet/msquic
-RUN cd msquic/src/msquic && \
+RUN git clone --depth 1 --single-branch --branch main --recursive https://github.com/microsoft/msquic
+RUN cd msquic/ && \
mkdir build && \
- cmake -B build -DCMAKE_BUILD_TYPE=Release -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off && \
+ cmake -B build -DCMAKE_BUILD_TYPE=Debug -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off -DQUIC_TLS_LIB=quictls -DQUIC_ENABLE_SANITIZERS=on && \
cd build && \
- cmake --build . --config Release
-RUN cd msquic/src/msquic/build/bin/Release && \
+ cmake --build . --config Debug
+RUN cd msquic/build/bin/Debug && \
rm libmsquic.so && \
fpm -f -s dir -t deb -n libmsquic -v $( find -type f | cut -d "." -f 4- ) \
--license MIT --url https://github.com/microsoft/msquic --log error \
$( ls ./* | cut -d "/" -f 2 | sed -r "s/(.*)/\1=\/usr\/lib\/\1/g" ) && \
dpkg -i libmsquic_*.deb
-ARG VERSION=8.0
-ARG CONFIGURATION=Release
+ARG VERSION
+ARG CONFIGURATION
# Build the stress server
WORKDIR /app
COPY . .
RUN dotnet build -c $CONFIGURATION \
+ -p:NetCoreAppCurrentVersion=$VERSION \
-p:MsQuicInteropIncludes="/live-runtime-artifacts/msquic-interop/*.cs" \
-p:TargetingPacksTargetsLocation=/live-runtime-artifacts/targetingpacks.targets \
-p:MicrosoftNetCoreAppRefPackDir=/live-runtime-artifacts/microsoft.netcore.app.ref/ \
-p:MicrosoftNetCoreAppRuntimePackDir=/live-runtime-artifacts/microsoft.netcore.app.runtime.linux-x64/$CONFIGURATION/
-# Enable dump collection
-ENV DOTNET_DbgEnableMiniDump=1
-ENV DOTNET_DbgMiniDumpType=MiniDumpWithFullMemory
-ENV DOTNET_DbgMiniDumpName="/dumps-share/coredump.%p"
-
EXPOSE 5001
ENV VERSION=$VERSION
ENV CONFIGURATION=$CONFIGURATION
-ENV HTTPSTRESS_ARGS=''
-CMD /live-runtime-artifacts/testhost/net$VERSION-linux-$CONFIGURATION-x64/dotnet exec --roll-forward Major \
- ./bin/$CONFIGURATION/net$VERSION/HttpStress.dll $HTTPSTRESS_ARGS
+ENV STRESS_ROLE=''
+ENV STRESS_ARGS=''
+
+# configure adress sanitizer
+# Make sure ASAN_OPTIONS are compatible with CoreCLR: https://github.com/dotnet/runtime/blob/300485de6f5bf52c28192da930e1aa79cfef46df/src/native/minipal/sansupport.c#L18
+ENV ASAN_OPTIONS='symbolize=1 use_sigaltstack=0 detect_leaks=0 handle_segv=0 allocator_may_return_null=1'
+ENV LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/13/libasan.so
+
+CMD ./entrypoint.sh
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj
index b98a4bd529c76a..e0b901b9f6224d 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj
@@ -6,6 +6,8 @@
True
CA2252
true
+
+ https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json
@@ -13,7 +15,7 @@
-
+
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs
index 0f47ae1b232fd9..c2e704b6bd8b00 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs
@@ -16,8 +16,8 @@
using System.Net.Quic;
using Microsoft.Quic;
-[assembly:SupportedOSPlatform("windows")]
-[assembly:SupportedOSPlatform("linux")]
+[assembly: SupportedOSPlatform("windows")]
+[assembly: SupportedOSPlatform("linux")]
namespace HttpStress
{
@@ -30,6 +30,8 @@ public enum ExitCode { Success = 0, StressError = 1, CliError = 2 };
public static readonly bool IsQuicSupported = QuicListener.IsSupported && QuicConnection.IsSupported;
+ private static readonly Dictionary s_unobservedExceptions = new Dictionary();
+
public static async Task Main(string[] args)
{
if (!TryParseCli(args, out Configuration? config))
@@ -43,76 +45,86 @@ public static async Task Main(string[] args)
private static bool TryParseCli(string[] args, [NotNullWhen(true)] out Configuration? config)
{
var cmd = new RootCommand();
- cmd.AddOption(new Option("-n", "Max number of requests to make concurrently.") { Argument = new Argument("numWorkers", Environment.ProcessorCount) });
- cmd.AddOption(new Option("-serverUri", "Stress suite server uri.") { Argument = new Argument("serverUri", "https://localhost:5001") });
- cmd.AddOption(new Option("-runMode", "Stress suite execution mode. Defaults to Both.") { Argument = new Argument("runMode", RunMode.both) });
- cmd.AddOption(new Option("-maxExecutionTime", "Maximum stress execution time, in minutes. Defaults to infinity.") { Argument = new Argument("minutes", null) });
- cmd.AddOption(new Option("-maxContentLength", "Max content length for request and response bodies.") { Argument = new Argument("numBytes", 1000) });
- cmd.AddOption(new Option("-maxRequestUriSize", "Max query string length support by the server.") { Argument = new Argument("numChars", 5000) });
- cmd.AddOption(new Option("-maxRequestHeaderCount", "Maximum number of headers to place in request") { Argument = new Argument("numHeaders", 90) });
- cmd.AddOption(new Option("-maxRequestHeaderTotalSize", "Max request header total size.") { Argument = new Argument("numBytes", 1000) });
- cmd.AddOption(new Option("-http", "HTTP version (1.1 or 2.0 or 3.0)") { Argument = new Argument("version", HttpVersion.Version20) });
- cmd.AddOption(new Option("-connectionLifetime", "Max connection lifetime length (milliseconds).") { Argument = new Argument("connectionLifetime", null) });
- cmd.AddOption(new Option("-ops", "Indices of the operations to use") { Argument = new Argument("space-delimited indices", null) });
- cmd.AddOption(new Option("-xops", "Indices of the operations to exclude") { Argument = new Argument("space-delimited indices", null) });
- cmd.AddOption(new Option("-trace", "Enable System.Net.Http.InternalDiagnostics (client) and/or ASP.NET dignostics (server) tracing.") { Argument = new Argument("enable", false) });
- cmd.AddOption(new Option("-aspnetlog", "Enable ASP.NET warning and error logging.") { Argument = new Argument("enable", false) });
- cmd.AddOption(new Option("-listOps", "List available options.") { Argument = new Argument("enable", false) });
- cmd.AddOption(new Option("-seed", "Seed for generating pseudo-random parameters for a given -n argument.") { Argument = new Argument("seed", null) });
- cmd.AddOption(new Option("-numParameters", "Max number of query parameters or form fields for a request.") { Argument = new Argument("queryParameters", 1) });
- cmd.AddOption(new Option("-cancelRate", "Number between 0 and 1 indicating rate of client-side request cancellation attempts. Defaults to 0.1.") { Argument = new Argument("probability", 0.1) });
- cmd.AddOption(new Option("-httpSys", "Use http.sys instead of Kestrel.") { Argument = new Argument("enable", false) });
- cmd.AddOption(new Option("-winHttp", "Use WinHttpHandler for the stress client.") { Argument = new Argument("enable", false) });
- cmd.AddOption(new Option("-displayInterval", "Client stats display interval in seconds. Defaults to 5 seconds.") { Argument = new Argument("seconds", 5) });
- cmd.AddOption(new Option("-clientTimeout", "Default HttpClient timeout in seconds. Defaults to 60 seconds.") { Argument = new Argument("seconds", 60) });
- cmd.AddOption(new Option("-serverMaxConcurrentStreams", "Overrides kestrel max concurrent streams per connection.") { Argument = new Argument("streams", null) });
- cmd.AddOption(new Option("-serverMaxFrameSize", "Overrides kestrel max frame size setting.") { Argument = new Argument("bytes", null) });
- cmd.AddOption(new Option("-serverInitialConnectionWindowSize", "Overrides kestrel initial connection window size setting.") { Argument = new Argument("bytes", null) });
- cmd.AddOption(new Option("-serverMaxRequestHeaderFieldSize", "Overrides kestrel max request header field size.") { Argument = new Argument("bytes", null) });
+ cmd.Options.Add(new Option("-n") { Description = "Max number of requests to make concurrently.", DefaultValueFactory = (_) => Environment.ProcessorCount });
+ cmd.Options.Add(new Option("-serverUri") { Description = "Stress suite server uri.", DefaultValueFactory = (_) => "https://localhost:5001" });
+ cmd.Options.Add(new Option("-runMode") { Description = "Stress suite execution mode. Defaults to Both.", DefaultValueFactory = (_) => RunMode.both });
+ cmd.Options.Add(new Option("-maxExecutionTime") { Description = "Maximum stress execution time, in minutes. Defaults to infinity." });
+ cmd.Options.Add(new Option("-maxContentLength") { Description = "Max content length for request and response bodies.", DefaultValueFactory = (_) => 1000 });
+ cmd.Options.Add(new Option("-maxRequestUriSize") { Description = "Max query string length support by the server.", DefaultValueFactory = (_) => 5000 });
+ cmd.Options.Add(new Option("-maxRequestHeaderCount") { Description = "Maximum number of headers to place in request", DefaultValueFactory = (_) => 90 });
+ cmd.Options.Add(new Option("-maxRequestHeaderTotalSize") { Description = "Max request header total size.", DefaultValueFactory = (_) => 1000 });
+ cmd.Options.Add(new Option("-http")
+ {
+ Description = "HTTP version (1.1 or 2.0 or 3.0)",
+ DefaultValueFactory = (_) => HttpVersion.Version20,
+ CustomParser = result =>
+ {
+ if (!Version.TryParse(result.Tokens.Single().Value, out Version? parsed))
+ {
+ result.AddError($"'{result.Tokens[0].Value}' is not a valid Version");
+ }
+
+ return parsed;
+ }
+ });
+ cmd.Options.Add(new Option("-connectionLifetime") { Description = "Max connection lifetime length (milliseconds)." });
+ cmd.Options.Add(new Option("-ops") { Description = "Indices of the operations to use" });
+ cmd.Options.Add(new Option("-xops") { Description = "Indices of the operations to exclude" });
+ cmd.Options.Add(new Option("-trace") { Description = "Enable System.Net.Http.InternalDiagnostics (client) and/or ASP.NET dignostics (server) tracing." });
+ cmd.Options.Add(new Option("-aspnetlog") { Description = "Enable ASP.NET warning and error logging." });
+ cmd.Options.Add(new Option("-listOps") { Description = "List available options." });
+ cmd.Options.Add(new Option("-seed") { Description = "Seed for generating pseudo-random parameters for a given -n argument." });
+ cmd.Options.Add(new Option("-numParameters") { Description = "Max number of query parameters or form fields for a request.", DefaultValueFactory = (_) => 1 });
+ cmd.Options.Add(new Option("-cancelRate") { Description = "Number between 0 and 1 indicating rate of client-side request cancellation attempts. Defaults to 0.1.", DefaultValueFactory = (_) => 0.1 });
+ cmd.Options.Add(new Option("-httpSys") { Description = "Use http.sys instead of Kestrel." });
+ cmd.Options.Add(new Option("-winHttp") { Description = "Use WinHttpHandler for the stress client." });
+ cmd.Options.Add(new Option("-displayInterval") { Description = "Client stats display interval in seconds. Defaults to 5 seconds.", DefaultValueFactory = (_) => 5 });
+ cmd.Options.Add(new Option("-clientTimeout") { Description = "Default HttpClient timeout in seconds. Defaults to 60 seconds.", DefaultValueFactory = (_) => 60 });
+ cmd.Options.Add(new Option("-serverMaxConcurrentStreams") { Description = "Overrides kestrel max concurrent streams per connection." });
+ cmd.Options.Add(new Option("-serverMaxFrameSize") { Description = "Overrides kestrel max frame size setting." });
+ cmd.Options.Add(new Option("-serverInitialConnectionWindowSize") { Description = "Overrides kestrel initial connection window size setting." });
+ cmd.Options.Add(new Option("-serverMaxRequestHeaderFieldSize") { Description = "Overrides kestrel max request header field size." });
+ cmd.Options.Add(new Option("-unobservedEx") { Description = "Enable tracking unobserved exceptions." });
ParseResult cmdline = cmd.Parse(args);
if (cmdline.Errors.Count > 0)
{
- foreach (ParseError error in cmdline.Errors)
- {
- Console.WriteLine(error);
- }
- Console.WriteLine();
- new HelpBuilder(new SystemConsole()).Write(cmd);
+ cmdline.Invoke(); // this is going to print all the errors and help
config = null;
return false;
}
config = new Configuration()
{
- RunMode = cmdline.ValueForOption("-runMode"),
- ServerUri = cmdline.ValueForOption("-serverUri"),
- ListOperations = cmdline.ValueForOption("-listOps"),
-
- HttpVersion = cmdline.ValueForOption("-http"),
- UseWinHttpHandler = cmdline.ValueForOption("-winHttp"),
- ConcurrentRequests = cmdline.ValueForOption("-n"),
- RandomSeed = cmdline.ValueForOption("-seed") ?? new Random().Next(),
- MaxContentLength = cmdline.ValueForOption("-maxContentLength"),
- MaxRequestUriSize = cmdline.ValueForOption("-maxRequestUriSize"),
- MaxRequestHeaderCount = cmdline.ValueForOption("-maxRequestHeaderCount"),
- MaxRequestHeaderTotalSize = cmdline.ValueForOption("-maxRequestHeaderTotalSize"),
- OpIndices = cmdline.ValueForOption("-ops"),
- ExcludedOpIndices = cmdline.ValueForOption("-xops"),
- MaxParameters = cmdline.ValueForOption("-numParameters"),
- DisplayInterval = TimeSpan.FromSeconds(cmdline.ValueForOption("-displayInterval")),
- DefaultTimeout = TimeSpan.FromSeconds(cmdline.ValueForOption("-clientTimeout")),
- ConnectionLifetime = cmdline.ValueForOption("-connectionLifetime").Select(TimeSpan.FromMilliseconds),
- CancellationProbability = Math.Max(0, Math.Min(1, cmdline.ValueForOption("-cancelRate"))),
- MaximumExecutionTime = cmdline.ValueForOption("-maxExecutionTime").Select(TimeSpan.FromMinutes),
-
- UseHttpSys = cmdline.ValueForOption("-httpSys"),
- LogAspNet = cmdline.ValueForOption("-aspnetlog"),
- Trace = cmdline.ValueForOption("-trace"),
- ServerMaxConcurrentStreams = cmdline.ValueForOption("-serverMaxConcurrentStreams"),
- ServerMaxFrameSize = cmdline.ValueForOption("-serverMaxFrameSize"),
- ServerInitialConnectionWindowSize = cmdline.ValueForOption("-serverInitialConnectionWindowSize"),
- ServerMaxRequestHeaderFieldSize = cmdline.ValueForOption("-serverMaxRequestHeaderFieldSize"),
+ RunMode = cmdline.GetValue("-runMode"),
+ ServerUri = cmdline.GetValue("-serverUri")!,
+ ListOperations = cmdline.GetValue("-listOps"),
+
+ HttpVersion = cmdline.GetValue("-http")!,
+ UseWinHttpHandler = cmdline.GetValue("-winHttp"),
+ ConcurrentRequests = cmdline.GetValue("-n"),
+ RandomSeed = cmdline.GetValue("-seed") ?? new Random().Next(),
+ MaxContentLength = cmdline.GetValue("-maxContentLength"),
+ MaxRequestUriSize = cmdline.GetValue("-maxRequestUriSize"),
+ MaxRequestHeaderCount = cmdline.GetValue("-maxRequestHeaderCount"),
+ MaxRequestHeaderTotalSize = cmdline.GetValue("-maxRequestHeaderTotalSize"),
+ OpIndices = cmdline.GetValue("-ops"),
+ ExcludedOpIndices = cmdline.GetValue("-xops"),
+ MaxParameters = cmdline.GetValue("-numParameters"),
+ DisplayInterval = TimeSpan.FromSeconds(cmdline.GetValue("-displayInterval")),
+ DefaultTimeout = TimeSpan.FromSeconds(cmdline.GetValue("-clientTimeout")),
+ ConnectionLifetime = cmdline.GetValue("-connectionLifetime").Select(TimeSpan.FromMilliseconds),
+ CancellationProbability = Math.Max(0, Math.Min(1, cmdline.GetValue("-cancelRate"))),
+ MaximumExecutionTime = cmdline.GetValue("-maxExecutionTime").Select(TimeSpan.FromMinutes),
+
+ UseHttpSys = cmdline.GetValue("-httpSys"),
+ LogAspNet = cmdline.GetValue("-aspnetlog"),
+ Trace = cmdline.GetValue("-trace"),
+ TrackUnobservedExceptions = cmdline.GetValue("-unobservedEx"),
+ ServerMaxConcurrentStreams = cmdline.GetValue("-serverMaxConcurrentStreams"),
+ ServerMaxFrameSize = cmdline.GetValue("-serverMaxFrameSize"),
+ ServerInitialConnectionWindowSize = cmdline.GetValue("-serverInitialConnectionWindowSize"),
+ ServerMaxRequestHeaderFieldSize = cmdline.GetValue("-serverMaxRequestHeaderFieldSize"),
};
return true;
@@ -162,8 +174,11 @@ private static async Task Run(Configuration config)
string GetAssemblyInfo(Assembly assembly) => $"{assembly.Location}, modified {new FileInfo(assembly.Location).LastWriteTime}";
- Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic");
- string msQuicLibraryVersion = (string)msQuicApiType.GetProperty("MsQuicLibraryVersion", BindingFlags.NonPublic | BindingFlags.Static).GetGetMethod(true).Invoke(null, Array.Empty