Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
32e5265
Merge commit '3b39d749062ab2d58c6a7c5b0bcbcdf76d98dcd1'
Mar 3, 2026
3c24b93
Merge commit '39a233467f8824345ff5890a166d61dfb8fe2949'
Mar 3, 2026
1f7bd19
Merged PR 58446: [release/8.0] Apply mitigations to System.Security.C…
eiriktsarpalis Mar 4, 2026
1ec2f9a
Merged PR 58779: [release/8.0] Enable Nuget servicing release for Sys…
eiriktsarpalis Mar 6, 2026
bf7e708
Merge commit 'adb7b4789454b36c3b58c530ae9d78571375560d'
Mar 11, 2026
8db0a8f
Merge commit 'c0c2ac6b14d1ebfe176d191778b6e2c9c8fed5e6'
Mar 11, 2026
430d284
Merged PR 58738: [internal/release/8.0] Reject mail addresses contain…
liveans Mar 12, 2026
9558ac7
Merge commit 'aa5bfadfee0222c0465f9899f3a87e0432956372'
Mar 13, 2026
9c9d200
Updated xplat-setup.yml
vseanreesermsft Mar 13, 2026
45ca398
Updated xplat-setup.yml
vseanreesermsft Mar 14, 2026
d6db71e
Merged PR 59058: use AZL3 instead of Ubuntu for builds
vseanreesermsft Mar 14, 2026
513464b
Merge commit 'bad2fdc2e39bf6c3350413f644fd8214dfee745f'
Mar 16, 2026
396bdb9
Update MsQuic version
wfurt Mar 17, 2026
bc60965
Merged PR 59173: [release/8.0] Update MsQuic version
Mar 18, 2026
e6eae4c
Merge commit '2675a6e7f83c0804fb7fec91a8f9fcf888bb064c'
Mar 19, 2026
e117bee
Merge commit '4032ba81669e534f16922179a767abc575a758d7'
Mar 19, 2026
ace9703
Merge commit 'fcdfb09f932c592f5f69e2ca8f1bd54165796b04'
Mar 19, 2026
008036e
[release/8.0] Remove EOL armv6 raspbian build container and pipeline …
richlander Mar 24, 2026
bda68e6
[release/8.0] Fix OOM in BigInteger OuterLoop tests causing SIGKILL o…
Copilot Mar 26, 2026
305d962
[release/8.0] Disable flaky ETW manifest generation tests in release/…
Copilot Apr 1, 2026
11a922e
[release/8.0] Update WebAssembly Helix image versions (#126528)
richlander Apr 6, 2026
e484d8e
[release/8.0] Update markdownlint workflow to Node LTS (#126573)
richlander Apr 6, 2026
f5b5ad4
[release/8.0] Update branding to 8.0.27 (#126615)
vseanreesermsft Apr 9, 2026
b6cd90b
Merge commit 'ace9703c57db8596ccc3e3efdc7e65b6975c0b2d' into internal…
vseanreesermsft Apr 14, 2026
67fdcfd
Merging internal commits for release/8.0 (#126898)
wfurt Apr 15, 2026
82d87cf
[release/8.0] Enhance createdump to detect alt stack execution (#127066)
hoyosjs Apr 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: 16.x
node-version: '22.x'
- name: Run Markdownlint
run: |
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/building/coreclr/cross-building.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ docker run --rm \
-v <RUNTIME_REPO_PATH>:/runtime \
-w /runtime \
-e ROOTFS_DIR=/crossrootfs/arm64 \
mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64 \
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64 \
./build.sh --subset clr --cross --arch arm64
```

Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/building/coreclr/linux-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To do cross-building using Docker, you need to use either specific images design
This table of images might often become stale as we change our images as our requirements change. The images used for our official builds can be found in [the pipeline resources](/eng/pipelines/common/templates/pipeline-with-resources.yml) of our Azure DevOps builds under the `container` key of the platform you plan to build. These image tags don't include version numbers, and our build infrastructure will automatically use the latest version of the image. You can ensure you are using the latest version by using `docker pull`, for example:

```
docker pull mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64
docker pull mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64
```

All official builds are cross-builds with a rootfs for the target OS, and will use the clang version available on the container.
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project>
<PropertyGroup>
<!-- The .NET product branding version -->
<ProductVersion>8.0.26</ProductVersion>
<ProductVersion>8.0.27</ProductVersion>
<!-- File version numbers -->
<MajorVersion>8</MajorVersion>
<MinorVersion>0</MinorVersion>
<PatchVersion>26</PatchVersion>
<PatchVersion>27</PatchVersion>
<SdkBandVersion>8.0.100</SdkBandVersion>
<PackageVersionNet7>7.0.20</PackageVersionNet7>
<PackageVersionNet6>6.0.36</PackageVersionNet6>
Expand Down Expand Up @@ -233,7 +233,7 @@
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>8.0.0-rtm.25625.2</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
<MicrosoftNativeQuicMsQuicSchannelVersion>2.4.16</MicrosoftNativeQuicMsQuicSchannelVersion>
<MicrosoftNativeQuicMsQuicSchannelVersion>2.4.17</MicrosoftNativeQuicMsQuicSchannelVersion>
<!-- Mono LLVM -->
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>16.0.5-alpha.1.25311.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>16.0.5-alpha.1.25311.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
Expand Down
20 changes: 0 additions & 20 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,6 @@ jobs:
crossBuild: true
${{ insert }}: ${{ parameters.jobParameters }}

# Linux armv6
- ${{ if containsValue(parameters.platforms, 'linux_armv6') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: linux
archType: armv6
targetRid: linux-armv6
platform: linux_armv6
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: linux_armv6
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
${{ insert }}: ${{ parameters.jobParameters }}

# Linux arm64

- ${{ if or(containsValue(parameters.platforms, 'linux_arm64'), in(parameters.platformGroup, 'all', 'gcstress')) }}:
Expand Down
5 changes: 0 additions & 5 deletions eng/pipelines/common/templates/pipeline-with-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ extends:
env:
ROOTFS_DIR: /crossrootfs/arm

linux_armv6:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-armv6-raspbian-10
env:
ROOTFS_DIR: /crossrootfs/armv6

linux_arm64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64
env:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
# Official Build Linux Pool
${{ if and(or(in(parameters.osGroup, 'linux', 'freebsd', 'android', 'tizen'), eq(parameters.jobParameters.hostedOs, 'linux')), ne(variables['System.TeamProject'], 'public')) }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204
demands: ImageOverride -equals build.azurelinux.3.amd64
os: linux

# OSX Public Build Pool (we don't have on-prem OSX BuildPool).
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

# Browser wasm
- ${{ if eq(parameters.platform, 'browser_wasm') }}:
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
- (Ubuntu.2604.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-helix-webassembly-amd64

# iOS devices
- ${{ if in(parameters.platform, 'ios_arm64') }}:
Expand Down
7 changes: 3 additions & 4 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
# extra-platforms CoreCLR (inner loop only)
- AzureLinux.3.Amd64.Open
- (Debian.12.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
- (Mariner.2.0.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64

- ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}:
# outerloop only CoreCLR
Expand Down Expand Up @@ -154,15 +153,15 @@ jobs:

# WASI
- ${{ if eq(parameters.platform, 'wasi_wasm') }}:
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly-amd64
- (Ubuntu.2604.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-helix-webassembly-amd64

# Browser WebAssembly
- ${{ if eq(parameters.platform, 'browser_wasm') }}:
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
- (Ubuntu.2604.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-helix-webassembly-amd64

# Browser WebAssembly Firefox
- ${{ if eq(parameters.platform, 'browser_wasm_firefox') }}:
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
- (Ubuntu.2604.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-helix-webassembly-amd64

# Browser WebAssembly windows
- ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}:
Expand Down
35 changes: 1 addition & 34 deletions eng/pipelines/runtime-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,37 +99,4 @@ extends:
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))

#
# Build the whole product using Mono and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- linux_armv6
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ]
jobParameters:
testScope: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+clr.iltools+clr.packages+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
timeoutInMinutes: 120
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))
${{ if eq(variables['isRollingBuild'], true) }}:
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

8 changes: 5 additions & 3 deletions src/coreclr/debug/createdump/createdumppal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ typedef BOOL (*PFN_PAL_VirtualUnwindOutOfProc)(
KNONVOLATILE_CONTEXT_POINTERS *contextPointers,
PULONG64 functionStart,
SIZE_T baseAddress,
UnwindReadMemoryCallback readMemoryCallback);
UnwindReadMemoryCallback readMemoryCallback,
bool *isSignalFrame);

typedef BOOL (*PFN_PAL_GetUnwindInfoSize)(
SIZE_T baseAddress,
Expand Down Expand Up @@ -177,13 +178,14 @@ PAL_VirtualUnwindOutOfProc(
KNONVOLATILE_CONTEXT_POINTERS *contextPointers,
PULONG64 functionStart,
SIZE_T baseAddress,
UnwindReadMemoryCallback readMemoryCallback)
UnwindReadMemoryCallback readMemoryCallback,
bool *isSignalFrame)
{
if (!InitializePAL() || g_PAL_VirtualUnwindOutOfProc == nullptr)
{
return FALSE;
}
return g_PAL_VirtualUnwindOutOfProc(context, contextPointers, functionStart, baseAddress, readMemoryCallback);
return g_PAL_VirtualUnwindOutOfProc(context, contextPointers, functionStart, baseAddress, readMemoryCallback, isSignalFrame);
}

BOOL
Expand Down
20 changes: 16 additions & 4 deletions src/coreclr/debug/createdump/threadinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ ThreadInfo::UnwindNativeFrames(CONTEXT* pContext)
uint64_t previousSp = 0;
uint64_t previousIp = 0;
int ipMatchCount = 0;
bool isSignalFrame = false;
bool crossedSignalTrampoline = false;

// For each native frame, add a page around the IP and any unwind info not already
// added in VisitProgramHeader (Linux) and VisitSection (MacOS) to the dump.
Expand All @@ -63,10 +65,19 @@ ThreadInfo::UnwindNativeFrames(CONTEXT* pContext)
sp++;
}
#endif
if (ip == 0 || sp <= previousSp) {
TRACE_VERBOSE("Unwind: sp not increasing or ip == 0 sp %p ip %p\n", (void*)sp, (void*)ip);
// When a signal handler uses SA_ONSTACK (alternate signal stack), the SP can legitimately
// decrease when unwinding crosses the signal trampoline back to the original thread stack.
// Allow the SP decrease if the current frame is a signal trampoline (detected by the
// previous unwind call) and we haven't already crossed one (limit to one crossing to
// bound corruption damage).
if (ip == 0 || sp == 0 || (sp <= previousSp && (!isSignalFrame || crossedSignalTrampoline))) {
TRACE("Unwind: STOPPED sp not increasing or ip == 0 sp %p ip %p prev_sp %p\n", (void*)sp, (void*)ip, (void*)previousSp);
break;
}
if (sp < previousSp)
{
crossedSignalTrampoline = true;
}
// Break out of the endless loop if the IP matches over a 1000 times. This is a fallback
// behavior of libunwind when the module the IP is in doesn't have unwind info and for
// simple stack overflows. The stack memory is added to the dump in GetThreadStack and
Expand Down Expand Up @@ -98,8 +109,9 @@ ThreadInfo::UnwindNativeFrames(CONTEXT* pContext)

// Unwind the native frame adding all the memory accessed to the core dump via the read memory adapter.
ULONG64 functionStart;
if (!PAL_VirtualUnwindOutOfProc(pContext, nullptr, &functionStart, baseAddress, ReadMemoryAdapter)) {
TRACE("Unwind: PAL_VirtualUnwindOutOfProc returned false\n");
isSignalFrame = false;
if (!PAL_VirtualUnwindOutOfProc(pContext, nullptr, &functionStart, baseAddress, ReadMemoryAdapter, &isSignalFrame)) {
TRACE("Unwind: PAL_VirtualUnwindOutOfProc returned false ip %p base %p sp %p\n", (void*)ip, (void*)baseAddress, (void*)sp);
break;
}

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/debug/daccess/dacfn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ typedef BOOL(*UnwindReadMemoryCallback)(PVOID address, PVOID buffer, SIZE_T size

extern
BOOL
PAL_VirtualUnwindOutOfProc(PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_POINTERS contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback);
PAL_VirtualUnwindOutOfProc(PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_POINTERS contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback, bool *isSignalFrame);
#endif

HRESULT
Expand Down Expand Up @@ -282,7 +282,7 @@ DacVirtualUnwind(ULONG32 threadId, PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_P
hr = S_OK;

SIZE_T baseAddress = DacGlobalBase();
if (baseAddress == 0 || !PAL_VirtualUnwindOutOfProc(context, contextPointers, nullptr, baseAddress, DacReadAllAdapter))
if (baseAddress == 0 || !PAL_VirtualUnwindOutOfProc(context, contextPointers, nullptr, baseAddress, DacReadAllAdapter, nullptr))
{
hr = E_FAIL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2689,7 +2689,7 @@ typedef BOOL(*UnwindReadMemoryCallback)(PVOID address, PVOID buffer, SIZE_T size

PALIMPORT BOOL PALAPI PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers);

PALIMPORT BOOL PALAPI PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback);
PALIMPORT BOOL PALAPI PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback, bool *isSignalFrame);

PALIMPORT BOOL PALAPI PAL_GetUnwindInfoSize(SIZE_T baseAddress, ULONG64 ehFrameHdrAddr, UnwindReadMemoryCallback readMemoryCallback, PULONG64 ehFrameStart, PULONG64 ehFrameSize);

Expand Down
18 changes: 16 additions & 2 deletions src/coreclr/pal/src/exception/remote-unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2460,17 +2460,23 @@ static unw_accessors_t unwind_accessors = init_unwind_accessors();
functionStart - the pointer to return the starting address of the function or nullptr
baseAddress - base address of the module to find the unwind info
readMemoryCallback - reads memory from the target
isSignalFrame - output parameter: set to true if the unwound-to frame is a signal trampoline
--*/
BOOL
PALAPI
PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback)
PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback, bool *isSignalFrame)
{
unw_addr_space_t addrSpace = 0;
unw_cursor_t cursor;
libunwindInfo info;
BOOL result = FALSE;
int st;

if (isSignalFrame)
{
*isSignalFrame = false;
}

info.BaseAddress = baseAddress;
info.Context = context;
info.FunctionStart = 0;
Expand Down Expand Up @@ -2542,6 +2548,14 @@ PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *cont
goto exit;
}

// Check if the frame we landed on is a signal trampoline. When a signal handler uses
// SA_ONSTACK, stepping from a signal frame crosses from the alternate signal stack to the
// original thread stack, which can cause the SP to decrease.
if (isSignalFrame && unw_is_signal_frame(&cursor) > 0)
{
*isSignalFrame = true;
}

UnwindContextToContext(&cursor, context);

if (contextPointers != NULL)
Expand Down Expand Up @@ -2708,7 +2722,7 @@ PAL_GetUnwindInfoSize(SIZE_T baseAddress, ULONG64 ehFrameHdrAddr, UnwindReadMemo

BOOL
PALAPI
PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback)
PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback, bool *isSignalFrame)
{
return FALSE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ namespace System.ComponentModel.DataAnnotations
AllowMultiple = false)]
public sealed class EmailAddressAttribute : DataTypeAttribute
{
private static bool EnableFullDomainLiterals { get; } =
AppContext.TryGetSwitch("System.Net.AllowFullDomainLiterals", out bool enable) ? enable : false;

public EmailAddressAttribute()
: base(DataType.EmailAddress)
{
Expand All @@ -30,7 +27,7 @@ public override bool IsValid(object? value)
return false;
}

if (!EnableFullDomainLiterals && (valueAsString.Contains('\r') || valueAsString.Contains('\n')))
if (valueAsString.Contains('\r') || valueAsString.Contains('\n'))
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public partial class TestsManifestGeneration

/// ETW only works with elevated process
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServerAndRemoteExecutorSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/88027")]
public void Test_EventSource_EtwManifestGeneration()
{
RemoteInvokeOptions options = new RemoteInvokeOptions { TimeOut = 300_000 /* ms */ };
Expand Down Expand Up @@ -76,6 +77,7 @@ public void Test_EventSource_EtwManifestGeneration()
}

[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServerAndRemoteExecutorSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/88027")]
public void Test_EventSource_EtwManifestGenerationRollover()
{
RemoteExecutor.Invoke(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ namespace System.Net.Mail
//
public partial class MailAddress
{
private static bool EnableFullDomainLiterals { get; } =
AppContext.TryGetSwitch("System.Net.AllowFullDomainLiterals", out bool enable) ? enable : false;

// These components form an e-mail address when assembled as follows:
// "EncodedDisplayname" <userName@host>
private readonly Encoding _displayNameEncoding;
Expand Down Expand Up @@ -220,7 +217,7 @@ private string GetHost(bool allowUnicode)
}
}

if (!EnableFullDomainLiterals && domain.AsSpan().IndexOfAny('\r', '\n') >= 0)
if (domain.AsSpan().IndexOfAny('\r', '\n') >= 0)
{
throw new SmtpException(SR.Format(SR.SmtpInvalidHostName, Address));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ private static bool TryParseAddress(string data, bool expectMultipleAddresses, r
Debug.Assert(!string.IsNullOrEmpty(data));
Debug.Assert(index >= 0 && index < data.Length, $"Index out of range: {index}, {data.Length}");

// Check for CR or LF characters which are not allowed in mail addresses.
// Only scan on the first call (index == data.Length - 1) to avoid repeated O(n) scans
// when parsing multiple addresses from the same string.
if (index == data.Length - 1 && MailBnfHelper.HasCROrLF(data))
{
if (throwExceptionIfFail)
{
throw new FormatException(SR.MailAddressInvalidFormat);
}

parseAddressInfo = default;
return false;
}

// Parsed components to be assembled as a MailAddress later
string? displayName;

Expand Down
Loading
Loading