From f9ccb537b057d1b0eb08924495d1058d12fa46456641fbcb916662b24ecc770c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sat, 21 Oct 2017 07:33:50 +0000 Subject: [PATCH] Accepting request 535603 from home:Warhammer40k:Mono:Factory Fix bxc#57918 - System.Net.Sockets.EndSend returns incorrect value OBS-URL: https://build.opensuse.org/request/show/535603 OBS-URL: https://build.opensuse.org/package/show/Mono:Factory/mono-core?expand=0&rev=189 --- bug-57918.patch | 33 +++++++++++++++++++++++++++++++++ mono-core.changes | 6 ++++++ mono-core.spec | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 bug-57918.patch diff --git a/bug-57918.patch b/bug-57918.patch new file mode 100644 index 0000000..d683cef --- /dev/null +++ b/bug-57918.patch @@ -0,0 +1,33 @@ +From b2250d8ecf56f71ea4c2c7271ac138d1f0196136 Mon Sep 17 00:00:00 2001 +From: Katelyn Gadd +Date: Mon, 11 Sep 2017 17:26:04 -0700 +Subject: [PATCH] Fix bug 57918: Async Socket reads that need to perform + multiple underlying read operations fail to return a correct total # of bytes + read + +--- + mcs/class/System/System.Net.Sockets/Socket.cs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs +index d19756b6c300..3821602fbbda 100644 +--- a/mcs/class/System/System.Net.Sockets/Socket.cs ++++ b/mcs/class/System/System.Net.Sockets/Socket.cs +@@ -1902,7 +1902,7 @@ static void BeginSendCallback (SocketAsyncResult sockares, int sent_so_far) + sockares.Size -= total; + + if (sockares.socket.CleanedUp) { +- sockares.Complete (total); ++ sockares.Complete (sent_so_far); + return; + } + +@@ -1914,7 +1914,7 @@ static void BeginSendCallback (SocketAsyncResult sockares, int sent_so_far) + sockares.Total = sent_so_far; + } + +- sockares.Complete (total); ++ sockares.Complete (sent_so_far); + } + + [CLSCompliant (false)] diff --git a/mono-core.changes b/mono-core.changes index 795af0e..4c640a3 100644 --- a/mono-core.changes +++ b/mono-core.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 20 00:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net + +- Add bug-57918.patch: + * Fix bxc#57918 - System.Net.Sockets.EndSend returns incorrect value + ------------------------------------------------------------------- Tue Oct 17 00:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net diff --git a/mono-core.spec b/mono-core.spec index 0a1546c..32eb5d5 100644 --- a/mono-core.spec +++ b/mono-core.spec @@ -56,6 +56,8 @@ ExcludeArch: ppc Patch1: ucontext.patch # PATCH-FIX-UPSTREAM search provides (for RPM-packaging) not only for GAC dir, but also for "Facades" and "4.5" mono-libdirs Patch2: provides-facades.patch +# PATCH-FIX-UPSTREAM System.Net.Sockets.EndSend returns incorrect value. See https://bugzilla.xamarin.com/show_bug.cgi?id=57918 for more information +Patch3: bug-57918.patch # PATCH-FIX-OPENSUSE remove checks for libmono in mono-find-provides and mono-find-requires scripts Patch14: find-deps-fix.patch # PATCH-FIX-OPENSUSE revert Microsoft.Build.Tasks library to use old mcs compiler. This will make xbuild to use old mcs instead of csc - patch is used when roslyn is unavailable for current platform (big-endian systems). @@ -205,6 +207,7 @@ technologies that have been submitted to the ECMA for standardization. %setup -q -n mono-%{version}.%{version_suffix} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch14 -p1 %patch16 -p1 %if %roslyn == no