Fix Interop.Sys.Write signature (#35505)
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 27 Apr 2020 12:49:42 +0000 (15:49 +0300)
committerGitHub <noreply@github.com>
Mon, 27 Apr 2020 12:49:42 +0000 (08:49 -0400)
commit1cfa461bbf071fbc71ceb5e105e1d39d0c077f25
tree06c8e5cad7d9438b0a2f0b0b322b47b0de951f6a
parentbff02deb3b19f84462728c1b1d1a3dce560eddb2
Fix Interop.Sys.Write signature (#35505)

SystemNative_Write expects fd passed as intptr, while the original sigature was using int. This crashed on mono interpreter because we didn't zero extend the int argument to an intptr, passing in an invalid descriptor.
src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.cs
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/DebugProvider.Unix.cs