Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-bot <dotnet-bot@microsoft.com>2022-01-08 01:06:36 +0300
committerdotnet-bot <dotnet-bot@microsoft.com>2022-01-08 01:06:36 +0300
commitd5b56c6327f380de399a2f95ca6045f03c92a66d (patch)
tree1601469991bb70c926e31172a31d72d97b9e6fa3
parent85e316c7ca6edace30049c783cf1cdf2df5138c9 (diff)
parent6d975f9a52fadd67b8f64fc3771a4920bc310e5e (diff)
Merge in 'release/5.0' changesv5.0.14
-rw-r--r--src/libraries/System.IO.Pipelines/Directory.Build.props2
-rw-r--r--src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs2
-rw-r--r--src/libraries/System.IO.Pipelines/tests/PipeLengthTests.cs14
-rw-r--r--src/libraries/libraries-packages.proj1
4 files changed, 17 insertions, 2 deletions
diff --git a/src/libraries/System.IO.Pipelines/Directory.Build.props b/src/libraries/System.IO.Pipelines/Directory.Build.props
index 0daa67b02c9..81ab65eae17 100644
--- a/src/libraries/System.IO.Pipelines/Directory.Build.props
+++ b/src/libraries/System.IO.Pipelines/Directory.Build.props
@@ -2,7 +2,7 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
- <ServicingVersion>1</ServicingVersion>
+ <ServicingVersion>2</ServicingVersion>
<!-- This should be pinned to 5.0.0.1 for non-netfx assets as it is part of aspnetcore ref pack.-->
<AssemblyVersion>5.0.0.1</AssemblyVersion>
</PropertyGroup>
diff --git a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
index f90ac5b8a9b..0149c04051d 100644
--- a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
+++ b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
@@ -1011,7 +1011,7 @@ namespace System.IO.Pipelines
}
// We filled the segment
- _writingHead.End += writable;
+ _writingHead.End += _writingHeadBytesBuffered;
_writingHeadBytesBuffered = 0;
// This is optimized to use pooled memory. That's why we pass 0 instead of
diff --git a/src/libraries/System.IO.Pipelines/tests/PipeLengthTests.cs b/src/libraries/System.IO.Pipelines/tests/PipeLengthTests.cs
index fcf9d7af55b..fd9fc83833a 100644
--- a/src/libraries/System.IO.Pipelines/tests/PipeLengthTests.cs
+++ b/src/libraries/System.IO.Pipelines/tests/PipeLengthTests.cs
@@ -277,5 +277,19 @@ namespace System.IO.Pipelines.Tests
ReadResult result = await _pipe.Reader.ReadAsync();
_pipe.Reader.AdvanceTo(default, default);
}
+
+ [Fact]
+ public async Task AdvanceFollowedByWriteAsyncTest()
+ {
+ Memory<byte> buffer = new byte[26];
+ Pipe pipe = new(new PipeOptions(minimumSegmentSize: 1));
+
+ var mem = pipe.Writer.GetMemory(14)[..14];
+ buffer[..14].CopyTo(mem);
+ pipe.Writer.Advance(14);
+ await pipe.Writer.WriteAsync(buffer[14..]);
+ ReadResult res = await pipe.Reader.ReadAsync();
+ Assert.Equal(res.Buffer.Length, buffer.Length);
+ }
}
}
diff --git a/src/libraries/libraries-packages.proj b/src/libraries/libraries-packages.proj
index 87660e3c248..00d67ec9881 100644
--- a/src/libraries/libraries-packages.proj
+++ b/src/libraries/libraries-packages.proj
@@ -18,6 +18,7 @@
<ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" Condition="'$(BuildAllOOBPackages)' == 'true'" />
<ProjectReference Include="$(MSBuildThisFileDirectory)*\pkg\**\*.pkgproj" Condition="('$(BuildAllConfigurations)' == 'true' or '$(DotNetBuildFromSource)' == 'true') And '$(BuildAllOOBPackages)' == 'true'" />
<!-- If setting BuildAllOOBPackages to false, add bellow the individual OOB packages you want to continue to build -->
+ <ProjectReference Include="$(MSBuildThisFileDirectory)System.IO.Pipelines\pkg\System.IO.Pipelines.pkgproj" Condition="('$(BuildAllConfigurations)' == 'true' or '$(DotNetBuildFromSource)' == 'true') And '$(BuildAllOOBPackages)' == 'true'" />
<!-- This is merge marker 1 to help automerge -->
<!-- This is merge marker 2 to help automerge -->
<!-- This is merge marker 3 to help automerge -->