Skip to content

Commit fe8bfd5

Browse files
authored
Port Fix AwaitableSocketAsyncEventArgs reorderings on weaker memory m… (#5343)
* Port Fix AwaitableSocketAsyncEventArgs reorderings on weaker memory models * Remove dotnet-blob-feed
1 parent 66845f0 commit fe8bfd5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

azure-pipelines-arcade.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,12 @@ stages:
8080
# Internal/Official Build Variables
8181
- ${{ if eq(variables._RunAsInternal, True) }}:
8282
# Only enable publishing in non-public, non PR scenarios.
83-
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
8483
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
8584
# DotNet-HelixApi-Access provides: HelixApiAccessToken
86-
- group: DotNet-Blob-Feed
8785
- group: Publish-Build-Assets
8886
- group: DotNet-HelixApi-Access
8987
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
9088
- _InternalBuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
91-
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
92-
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
9389
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
9490
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
9591
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)

src/System.ServiceModel.NetTcp/src/System/ServiceModel/Channels/SocketAwaitableEventArgs.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, IValueTaskSource
2020
{
2121
private static readonly Action<object> _continuationCompleted = _ => { };
2222

23-
private Action<object> _continuation;
23+
// There are places where we read the _continuation field and then read some other state which we assume to be consistent
24+
// with the value we read in _continuation. Without a fence, those secondary reads could be reordered with respect to the first.
25+
// https://github.com/dotnet/runtime/pull/84432
26+
// https://github.com/dotnet/aspnetcore/issues/50623
27+
private volatile Action<object> _continuation;
2428

2529
public SocketAwaitableEventArgs() : base(unsafeSuppressExecutionContextFlow: true) { }
2630

src/System.ServiceModel.UnixDomainSocket/src/System/ServiceModel/Channels/SocketAwaitableEventArgs.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, IValueTaskSource
2020
{
2121
private static readonly Action<object> _continuationCompleted = _ => { };
2222

23-
private Action<object> _continuation;
23+
// There are places where we read the _continuation field and then read some other state which we assume to be consistent
24+
// with the value we read in _continuation. Without a fence, those secondary reads could be reordered with respect to the first.
25+
// https://github.com/dotnet/runtime/pull/84432
26+
// https://github.com/dotnet/aspnetcore/issues/50623
27+
private volatile Action<object> _continuation;
2428

2529
public SocketAwaitableEventArgs() : base(unsafeSuppressExecutionContextFlow: true) { }
2630

0 commit comments

Comments
 (0)