From 345224e2bc05a5a137127ef35a2e521779b36991 Mon Sep 17 00:00:00 2001 From: "Xamarin Public Jenkins (auto-signing)" Date: Fri, 2 Aug 2019 08:37:10 +0000 Subject: [PATCH] Imported Upstream version 6.4.0.150 Former-commit-id: 2cf3acd45014a53dda66c13f7378a88695d3c93e --- configure.REMOVED.git-id | 2 +- configure.ac.REMOVED.git-id | 2 +- .../Unix/System.Native/Interop.Symlink.cs | 16 ++++ .../src/CoreLib/System/TimeZoneInfo.Unix.cs | 28 +++++- .../Common/src/CoreLib/System/TimeZoneInfo.cs | 89 +++++++++++++++--- .../src/Native/Unix/System.Native/pal_io.c | 5 + .../src/Native/Unix/System.Native/pal_io.h | 7 ++ .../src/System/IO/FileSystem.Unix.cs | 32 +++++++ .../System.IO.FileSystem/tests/File/Copy.cs | 17 ++++ .../System.IO.FileSystem/tests/File/Move.cs | 17 ++++ mcs/build/common/Consts.cs | 2 +- mcs/class/System/System.Net.Sockets/Socket.cs | 76 ++++++++++++--- .../System.Net.Sockets/SocketAsyncResult.cs | 2 +- .../SocketTest.cs.REMOVED.git-id | 2 +- .../corlib/unix_build_corlib.dll.sources | 2 + .../Mono.Security.dll.REMOVED.git-id | 2 +- .../System.Configuration.dll.REMOVED.git-id | 2 +- .../System.Core.dll.REMOVED.git-id | 2 +- .../System.IO.Compression.dll.REMOVED.git-id | 2 +- .../System.Numerics.dll.REMOVED.git-id | 2 +- .../System.Xml.dll.REMOVED.git-id | 2 +- .../System.dll.REMOVED.git-id | 2 +- .../mscorlib.dll.REMOVED.git-id | 2 +- .../Mono.Security.dll.REMOVED.git-id | 2 +- .../System.Configuration.dll.REMOVED.git-id | 2 +- .../System.Core.dll.REMOVED.git-id | 2 +- .../System.IO.Compression.dll.REMOVED.git-id | 2 +- .../System.Numerics.dll.REMOVED.git-id | 2 +- .../System.Xml.dll.REMOVED.git-id | 2 +- .../System.dll.REMOVED.git-id | 2 +- .../mcs.exe.REMOVED.git-id | 2 +- .../mscorlib.dll.REMOVED.git-id | 2 +- .../Mono.Security.dll.REMOVED.git-id | 2 +- .../System.Configuration.dll.REMOVED.git-id | 2 +- .../System.Core.dll.REMOVED.git-id | 2 +- .../System.IO.Compression.dll.REMOVED.git-id | 2 +- .../System.Numerics.dll.REMOVED.git-id | 2 +- .../System.Xml.dll.REMOVED.git-id | 2 +- .../System.dll.REMOVED.git-id | 2 +- .../mcs.exe.REMOVED.git-id | 2 +- .../mscorlib.dll.REMOVED.git-id | 2 +- .../Mono.Security.dll.REMOVED.git-id | 2 +- .../System.Configuration.dll.REMOVED.git-id | 2 +- .../System.Core.dll.REMOVED.git-id | 2 +- .../System.IO.Compression.dll.REMOVED.git-id | 2 +- .../System.Numerics.dll.REMOVED.git-id | 2 +- .../System.Xml.dll.REMOVED.git-id | 2 +- .../System.dll.REMOVED.git-id | 2 +- .../mcs.exe.REMOVED.git-id | 2 +- .../mscorlib.dll.REMOVED.git-id | 2 +- .../Net/Sockets/_MultipleConnectAsync.cs | 36 +++++-- mono/metadata/jit-info.c | 2 + mono/metadata/marshal.c.REMOVED.git-id | 2 +- mono/metadata/mono-conc-hash.c | 2 + mono/mini/version.h | 2 +- mono/unit-tests/Makefile.in | 4 +- mono/utils/mono-threads.c | 12 ++- msvc/Makefile.in | 2 +- po/mcs/de.gmo | Bin 5406 -> 5406 bytes po/mcs/de.po.REMOVED.git-id | 2 +- po/mcs/es.gmo | Bin 16329 -> 16329 bytes po/mcs/es.po.REMOVED.git-id | 2 +- po/mcs/ja.gmo | Bin 20863 -> 20863 bytes po/mcs/ja.po.REMOVED.git-id | 2 +- po/mcs/mcs.pot | 4 +- po/mcs/pt_BR.gmo | Bin 72806 -> 72806 bytes po/mcs/pt_BR.po.REMOVED.git-id | 2 +- 67 files changed, 352 insertions(+), 91 deletions(-) create mode 100644 external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Symlink.cs diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index ef2eccc928..c34a8a38ff 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -6b782468257356a024fa287b984ac64d02824294 \ No newline at end of file +4eeeb3ab453806bf94a1e3f92727c3a5b3ffebdc \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index c3afdb58e7..9ec9f8e95b 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -e7a612645939d0597ce0ed619f196c34d946f19e \ No newline at end of file +5a41cd4d1bea5ebec3323c0a8dbeba933276a231 \ No newline at end of file diff --git a/external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Symlink.cs b/external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Symlink.cs new file mode 100644 index 0000000000..68bebb152c --- /dev/null +++ b/external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Symlink.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.Win32.SafeHandles; +using System; +using System.Runtime.InteropServices; + +internal static partial class Interop +{ + internal static partial class Sys + { + [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_Symlink", SetLastError = true)] + internal static extern int Symlink(string target, string linkPath); + } +} diff --git a/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs b/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs index 4f3cca55ad..145a91a93c 100644 --- a/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs +++ b/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs @@ -637,6 +637,7 @@ namespace System } catch (ArgumentException) { } catch (InvalidTimeZoneException) { } + try { return new TimeZoneInfo(rawData, id, dstDisabled: true); // create a TimeZoneInfo instance from the TZif data w/o DST support @@ -644,7 +645,6 @@ namespace System catch (ArgumentException) { } catch (InvalidTimeZoneException) { } } - return null; } @@ -912,7 +912,7 @@ namespace System index++; } - if (index == 0) + if (rulesList.Count == 0 && index < dts.Length) { TZifType transitionType = TZif_GetEarlyDateTransitionType(transitionTypes); DateTime endTransitionDate = dts[index]; @@ -929,6 +929,12 @@ namespace System default(TransitionTime), baseUtcDelta, noDaylightTransitions: true); + + if (!IsValidAdjustmentRuleOffest(timeZoneBaseUtcOffset, r)) + { + NormalizeAdjustmentRuleOffset(timeZoneBaseUtcOffset, ref r); + } + rulesList.Add(r); } else if (index < dts.Length) @@ -966,6 +972,12 @@ namespace System default(TransitionTime), baseUtcDelta, noDaylightTransitions: true); + + if (!IsValidAdjustmentRuleOffest(timeZoneBaseUtcOffset, r)) + { + NormalizeAdjustmentRuleOffset(timeZoneBaseUtcOffset, ref r); + } + rulesList.Add(r); } else @@ -978,8 +990,14 @@ namespace System if (!string.IsNullOrEmpty(futureTransitionsPosixFormat)) { AdjustmentRule r = TZif_CreateAdjustmentRuleForPosixFormat(futureTransitionsPosixFormat, startTransitionDate, timeZoneBaseUtcOffset); + if (r != null) { + if (!IsValidAdjustmentRuleOffest(timeZoneBaseUtcOffset, r)) + { + NormalizeAdjustmentRuleOffset(timeZoneBaseUtcOffset, ref r); + } + rulesList.Add(r); } } @@ -1000,6 +1018,12 @@ namespace System default(TransitionTime), baseUtcDelta, noDaylightTransitions: true); + + if (!IsValidAdjustmentRuleOffest(timeZoneBaseUtcOffset, r)) + { + NormalizeAdjustmentRuleOffset(timeZoneBaseUtcOffset, ref r); + } + rulesList.Add(r); } } diff --git a/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.cs b/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.cs index 930c43fe0f..306306442c 100644 --- a/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.cs +++ b/external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.cs @@ -1921,12 +1921,6 @@ namespace System return result; } - /// - /// Helper function that validates the TimeSpan is within +/- 14.0 hours - /// - internal static bool UtcOffsetOutOfRange(TimeSpan offset) => - offset.TotalHours < -14.0 || offset.TotalHours > 14.0; - /// /// Helper function that performs all of the validation checks for the /// factory methods and deserialization callback. @@ -1976,11 +1970,7 @@ namespace System throw new InvalidTimeZoneException(SR.Argument_AdjustmentRulesNoNulls); } - // FUTURE: check to see if this rule supports Daylight Saving Time - // adjustmentRulesSupportDst = adjustmentRulesSupportDst || current.SupportsDaylightSavingTime; - // FUTURE: test baseUtcOffset + current.StandardDelta - - if (UtcOffsetOutOfRange(baseUtcOffset + current.DaylightDelta)) + if (!IsValidAdjustmentRuleOffest(baseUtcOffset, current)) { throw new InvalidTimeZoneException(SR.ArgumentOutOfRange_UtcOffsetAndDaylightDelta); } @@ -1993,5 +1983,82 @@ namespace System } } } + + private static readonly TimeSpan MaxOffset = TimeSpan.FromHours(14.0); + private static readonly TimeSpan MinOffset = -MaxOffset; + + /// + /// Helper function that validates the TimeSpan is within +/- 14.0 hours + /// + internal static bool UtcOffsetOutOfRange(TimeSpan offset) => + offset < MinOffset || offset > MaxOffset; + + private static TimeSpan GetUtcOffset(TimeSpan baseUtcOffset, AdjustmentRule adjustmentRule) + { + return baseUtcOffset + + adjustmentRule.BaseUtcOffsetDelta + + (adjustmentRule.HasDaylightSaving ? adjustmentRule.DaylightDelta : TimeSpan.Zero); + } + + /// + /// Helper function that performs adjustment rule validation + /// + private static bool IsValidAdjustmentRuleOffest(TimeSpan baseUtcOffset, AdjustmentRule adjustmentRule) + { + TimeSpan utcOffset = GetUtcOffset(baseUtcOffset, adjustmentRule); + return !UtcOffsetOutOfRange(utcOffset); + } + + /// + /// Normalize adjustment rule offset so that it is within valid range + /// This method should not be called at all but is here in case something changes in the future + /// or if really old time zones are present on the OS (no combination is known at the moment) + /// + private static void NormalizeAdjustmentRuleOffset(TimeSpan baseUtcOffset, ref AdjustmentRule adjustmentRule) + { + // Certain time zones such as: + // Time Zone start date end date offset + // ----------------------------------------------------- + // America/Yakutat 0001-01-01 1867-10-18 14:41:00 + // America/Yakutat 1867-10-18 1900-08-20 14:41:00 + // America/Sitka 0001-01-01 1867-10-18 14:58:00 + // America/Sitka 1867-10-18 1900-08-20 14:58:00 + // Asia/Manila 0001-01-01 1844-12-31 -15:56:00 + // Pacific/Guam 0001-01-01 1845-01-01 -14:21:00 + // Pacific/Saipan 0001-01-01 1845-01-01 -14:21:00 + // + // have larger offset than currently supported by framework. + // If for whatever reason we find that time zone exceeding max + // offset of 14h this function will truncate it to the max valid offset. + // Updating max offset may cause problems with interacting with SQL server + // which uses SQL DATETIMEOFFSET field type which was originally designed to be + // bit-for-bit compatible with DateTimeOffset. + + TimeSpan utcOffset = GetUtcOffset(baseUtcOffset, adjustmentRule); + + // utc base offset delta increment + TimeSpan adjustment = TimeSpan.Zero; + + if (utcOffset > MaxOffset) + { + adjustment = MaxOffset - utcOffset; + } + else if (utcOffset < MinOffset) + { + adjustment = MinOffset - utcOffset; + } + + if (adjustment != TimeSpan.Zero) + { + adjustmentRule = AdjustmentRule.CreateAdjustmentRule( + adjustmentRule.DateStart, + adjustmentRule.DateEnd, + adjustmentRule.DaylightDelta, + adjustmentRule.DaylightTransitionStart, + adjustmentRule.DaylightTransitionEnd, + adjustmentRule.BaseUtcOffsetDelta + adjustment, + adjustmentRule.NoDaylightTransitions); + } + } } } diff --git a/external/corefx/src/Native/Unix/System.Native/pal_io.c b/external/corefx/src/Native/Unix/System.Native/pal_io.c index d68eb4b583..f2011d61c4 100644 --- a/external/corefx/src/Native/Unix/System.Native/pal_io.c +++ b/external/corefx/src/Native/Unix/System.Native/pal_io.c @@ -1451,3 +1451,8 @@ int32_t SystemNative_LockFileRegion(intptr_t fd, int64_t offset, int64_t length, while ((ret = fcntl (ToFileDescriptor(fd), F_SETLK, &lockArgs)) < 0 && errno == EINTR); return ret; } + +int32_t SystemNative_Symlink(const char* target, const char* linkPath) +{ + return symlink(target, linkPath); +} diff --git a/external/corefx/src/Native/Unix/System.Native/pal_io.h b/external/corefx/src/Native/Unix/System.Native/pal_io.h index 9f80c8b00c..aab12e6ed3 100644 --- a/external/corefx/src/Native/Unix/System.Native/pal_io.h +++ b/external/corefx/src/Native/Unix/System.Native/pal_io.h @@ -750,4 +750,11 @@ DLLEXPORT int32_t SystemNative_GetPeerID(intptr_t socket, uid_t* euid); */ DLLEXPORT int32_t SystemNative_LockFileRegion(intptr_t fd, int64_t offset, int64_t length, int16_t lockType); +/** +* Creates a symbolic link at "linkPath", pointing at "target". +* "target" may or may not exist (dangling symbolic links are valid filesystem objects) +* Returns 0 on success; otherwise, returns -1 and errno is set. +*/ +DLLEXPORT int32_t SystemNative_Symlink(const char* target, const char* linkPath); + END_EXTERN_C diff --git a/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs b/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs index daddcedb3d..b2007ca32d 100644 --- a/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs +++ b/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs @@ -12,6 +12,32 @@ namespace System.IO { internal const int DefaultBufferSize = 4096; + private static bool CopyDanglingSymlink(string sourceFullPath, string destFullPath) + { + // Check if the source is a dangling symlink. In those cases, we just want to copy the link + Interop.Sys.FileStatus ignored; + if (! (Interop.Sys.Stat(sourceFullPath, out ignored) < 0 && + Interop.Sys.LStat(sourceFullPath, out ignored) == 0)) + { + return false; + } + + Interop.ErrorInfo errorInfo; + // get the target of the symlink + string linkTarget = Interop.Sys.ReadLink(sourceFullPath); + if (linkTarget == null) + { + errorInfo = Interop.Sys.GetLastErrorInfo(); + throw Interop.GetExceptionForIoErrno(errorInfo, sourceFullPath); + } + + if (Interop.Sys.Symlink(linkTarget, destFullPath) == 0) + return true; + + errorInfo = Interop.Sys.GetLastErrorInfo(); + throw Interop.GetExceptionForIoErrno(errorInfo, destFullPath); + } + public static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite) { // The destination path may just be a directory into which the file should be copied. @@ -21,6 +47,9 @@ namespace System.IO destFullPath = Path.Combine(destFullPath, Path.GetFileName(sourceFullPath)); } + if (CopyDanglingSymlink(sourceFullPath, destFullPath)) + return; + // Copy the contents of the file from the source to the destination, creating the destination in the process using (var src = new FileStream(sourceFullPath, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultBufferSize, FileOptions.None)) using (var dst = new FileStream(destFullPath, overwrite ? FileMode.Create : FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None, DefaultBufferSize, FileOptions.None)) @@ -31,6 +60,9 @@ namespace System.IO private static void LinkOrCopyFile (string sourceFullPath, string destFullPath) { + if (CopyDanglingSymlink(sourceFullPath, destFullPath)) + return; + if (Interop.Sys.Link(sourceFullPath, destFullPath) >= 0) return; diff --git a/external/corefx/src/System.IO.FileSystem/tests/File/Copy.cs b/external/corefx/src/System.IO.FileSystem/tests/File/Copy.cs index 81338ceb91..2cf108e8db 100644 --- a/external/corefx/src/System.IO.FileSystem/tests/File/Copy.cs +++ b/external/corefx/src/System.IO.FileSystem/tests/File/Copy.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Xunit; +using System.Runtime.InteropServices; namespace System.IO.Tests { @@ -48,6 +49,22 @@ namespace System.IO.Tests Assert.Throws(() => Copy(testFile, testFile)); } + [DllImport("libc", SetLastError = true)] + private static extern int symlink(string target, string linkpath); + + [Fact] + [PlatformSpecific(TestPlatforms.AnyUnix)] + public void DanglingSymlinkCopy() + { + string dangling_symlink = GetTestFileName(); + string missing_target = GetTestFileName(); + string dangling_symlink_new_location = GetTestFileName(); + Assert.False(File.Exists(missing_target)); + Assert.Equal(symlink(missing_target, dangling_symlink), 0); + Copy(dangling_symlink, dangling_symlink_new_location); + Assert.True(File.Exists(dangling_symlink_new_location)); // File.Exists returns true for dangling symlinks + } + [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "CoreFX FileStream not yet imported")] public void NonExistentPath() diff --git a/external/corefx/src/System.IO.FileSystem/tests/File/Move.cs b/external/corefx/src/System.IO.FileSystem/tests/File/Move.cs index e9da920edd..6548b4f564 100644 --- a/external/corefx/src/System.IO.FileSystem/tests/File/Move.cs +++ b/external/corefx/src/System.IO.FileSystem/tests/File/Move.cs @@ -4,6 +4,7 @@ using Xunit; using System.Linq; +using System.Runtime.InteropServices; namespace System.IO.Tests { @@ -174,6 +175,22 @@ namespace System.IO.Tests Assert.False(File.Exists(testFileSource.FullName)); } + [DllImport("libc", SetLastError = true)] + private static extern int symlink(string target, string linkpath); + + [Fact] + [PlatformSpecific(TestPlatforms.AnyUnix)] + public void DanglingSymlinkMove() + { + string dangling_symlink = GetTestFileName(); + string missing_target = GetTestFileName(); + string dangling_symlink_new_location = GetTestFileName(); + Assert.False(File.Exists(missing_target)); + Assert.Equal(symlink(missing_target, dangling_symlink), 0); + Move(dangling_symlink, dangling_symlink_new_location); + Assert.True(File.Exists(dangling_symlink_new_location)); // File.Exists returns true for dangling symlinks + } + [Fact] public void FileNameWithSignificantWhitespace() { diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 226effded7..bf008c9f48 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -41,7 +41,7 @@ static partial class Consts // Use these assembly version constants to make code more maintainable. // - public const string MonoVersion = "6.4.0.146"; + public const string MonoVersion = "6.4.0.150"; public const string MonoCompany = "Mono development team"; public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoCopyright = "(c) Various Mono authors"; diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs index 39b001337b..00fb630343 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs +++ b/mcs/class/System/System.Net.Sockets/Socket.cs @@ -912,20 +912,61 @@ namespace System.Net.Sockets try { IPAddress [] addresses; SocketAsyncResult ares; + bool pending; + + /* + * Both BeginSConnect() and BeginMConnect() now return a `bool` indicating whether or + * not an async operation is pending. + */ if (!GetCheckedIPs (e, out addresses)) { //NOTE: DualMode may cause Socket's RemoteEndpoint to differ in AddressFamily from the // SocketAsyncEventArgs, but the SocketAsyncEventArgs itself is not changed - ares = (SocketAsyncResult) BeginConnect (e.RemoteEndPoint, ConnectAsyncCallback, e); + + ares = new SocketAsyncResult (this, ConnectAsyncCallback, e, SocketOperation.Connect) { + EndPoint = e.RemoteEndPoint + }; + + pending = BeginSConnect (ares); } else { DnsEndPoint dep = (DnsEndPoint)e.RemoteEndPoint; - ares = (SocketAsyncResult) BeginConnect (addresses, dep.Port, ConnectAsyncCallback, e); + + if (addresses == null) + throw new ArgumentNullException ("addresses"); + if (addresses.Length == 0) + throw new ArgumentException ("Empty addresses list"); + if (this.AddressFamily != AddressFamily.InterNetwork && this.AddressFamily != AddressFamily.InterNetworkV6) + throw new NotSupportedException ("This method is only valid for addresses in the InterNetwork or InterNetworkV6 families"); + if (dep.Port <= 0 || dep.Port > 65535) + throw new ArgumentOutOfRangeException ("port", "Must be > 0 and < 65536"); + + ares = new SocketAsyncResult (this, ConnectAsyncCallback, e, SocketOperation.Connect) { + Addresses = addresses, + Port = dep.Port, + }; + + is_connected = false; + + pending = BeginMConnect (ares); } - if (ares.IsCompleted && ares.CompletedSynchronously) { - ares.CheckIfThrowDelayedException (); - return false; + if (!pending) { + /* + * On synchronous completion, the async callback will not be invoked. + * + * We need to call `EndConnect ()` here to close the socket and make sure + * that any pending exceptions are properly propagated. + * + * Note that we're not calling `e.Complete ()` (or resetting `e.in_progress`) here. + */ + e.current_socket.EndConnect (ares); } + + return pending; + } catch (SocketException exc) { + e.SocketError = exc.SocketErrorCode; + e.socket_async_result.Complete (exc, true); + return false; } catch (Exception exc) { e.socket_async_result.Complete (exc, true); return false; @@ -1044,7 +1085,7 @@ namespace System.Net.Sockets return sockares; } - static void BeginMConnect (SocketAsyncResult sockares) + static bool BeginMConnect (SocketAsyncResult sockares) { Exception exc = null; @@ -1053,17 +1094,18 @@ namespace System.Net.Sockets sockares.CurrentAddress++; sockares.EndPoint = new IPEndPoint (sockares.Addresses [i], sockares.Port); - BeginSConnect (sockares); - return; + return BeginSConnect (sockares); } catch (Exception e) { exc = e; } } + sockares.Complete (exc, true); + return false; throw exc; } - static void BeginSConnect (SocketAsyncResult sockares) + static bool BeginSConnect (SocketAsyncResult sockares) { EndPoint remoteEP = sockares.EndPoint; // Bug #75154: Connect() should not succeed for .Any addresses. @@ -1071,14 +1113,15 @@ namespace System.Net.Sockets IPEndPoint ep = (IPEndPoint) remoteEP; if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)) { sockares.Complete (new SocketException ((int) SocketError.AddressNotAvailable), true); - return; + return false; } sockares.EndPoint = remoteEP = sockares.socket.RemapIPEndPoint (ep); } if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily)) { - throw new ArgumentException(SR.net_invalidAddressList); + sockares.Complete (new ArgumentException(SR.net_invalidAddressList), true); + return false; } int error = 0; @@ -1090,8 +1133,10 @@ namespace System.Net.Sockets sockares.socket.connect_in_progress = false; sockares.socket.m_Handle.Dispose (); sockares.socket.m_Handle = new SafeSocketHandle (sockares.socket.Socket_internal (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true); - if (error != 0) - throw new SocketException (error); + if (error != 0) { + sockares.Complete (new SocketException (error), true); + return false; + } } bool blk = sockares.socket.is_blocking; @@ -1106,7 +1151,7 @@ namespace System.Net.Sockets sockares.socket.is_connected = true; sockares.socket.is_bound = true; sockares.Complete (true); - return; + return false; } if (error != (int) SocketError.InProgress && error != (int) SocketError.WouldBlock) { @@ -1114,7 +1159,7 @@ namespace System.Net.Sockets sockares.socket.is_connected = false; sockares.socket.is_bound = false; sockares.Complete (new SocketException (error), true); - return; + return false; } // continue asynch @@ -1123,6 +1168,7 @@ namespace System.Net.Sockets sockares.socket.connect_in_progress = true; IOSelector.Add (sockares.Handle, new IOSelectorJob (IOOperation.Write, BeginConnectCallback, sockares)); + return true; } static IOAsyncCallback BeginConnectCallback = new IOAsyncCallback (ares => { diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs index 3f5faef9bd..4004e47585 100644 --- a/mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs +++ b/mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs @@ -153,7 +153,7 @@ namespace System.Net.Sockets Socket completedSocket = socket; SocketOperation completedOperation = operation; - if (this.AsyncCallback != null) { + if (!CompletedSynchronously && AsyncCallback != null) { ThreadPool.UnsafeQueueUserWorkItem(state => ((SocketAsyncResult)state).AsyncCallback((SocketAsyncResult)state), this); } diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id index ba58757c1e..0b763743c1 100644 --- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id +++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id @@ -1 +1 @@ -3dc69374874d14e90b24abf706902b0dacb2d02d \ No newline at end of file +32adec28b202ea43ee62e2376d833b1422dcfe04 \ No newline at end of file diff --git a/mcs/class/corlib/unix_build_corlib.dll.sources b/mcs/class/corlib/unix_build_corlib.dll.sources index 11e7caf938..e33ba79c14 100644 --- a/mcs/class/corlib/unix_build_corlib.dll.sources +++ b/mcs/class/corlib/unix_build_corlib.dll.sources @@ -29,3 +29,5 @@ corefx/DriveInfoInternal.Unix.cs ../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs ../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs +../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Symlink.cs +../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id index 019e98458b..5e1d32da4c 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -b88932559eb4f2da6bd050f46d3adceee254994a \ No newline at end of file +78e840ae40e63ee229d424842c1b198599479976 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id index fb9d9f5b44..dba4b32c8a 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -7dc811cb2910173ccf4673904dd7e5460c5d6f18 \ No newline at end of file +bd341c852711b054c75b8b8a5bc12abb7c7a2ce7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id index 857570f2fa..13d374e8e7 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -ef14e03c57fe631cdd5684164cf97d5109e4969b \ No newline at end of file +ff3aff6636cde78c4a8c955d75cd54b44ab80af7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id index 6079acf5fe..b299f7d2f7 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -6781a46f68736ca9d37bd0cffd26461ed7693ee6 \ No newline at end of file +c7e807fcdf92a15876a9a6af5b8b0a5fc9ad846c \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id index 10f13e61dd..7118432a6a 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -437080e5d51f177624a994a15c91f97091eabddd \ No newline at end of file +c8de5b2048f45959a30c316a582f09a8eea17336 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id index b1d2918045..ae4078c7ff 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -594b0c18dbce55d3526ce440912e326927bc1f56 \ No newline at end of file +ded1cacbead68b6c90b00225d6cd0116f86b9fd2 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id index d3adb39266..ee73f4e8da 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id @@ -1 +1 @@ -b73c6edff435f9860ae4ea9d298d759229f18cef \ No newline at end of file +ace51ee45521f0d46d823c686c14e4cb4a032435 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id index b3f2dc7043..fe28227475 100644 --- a/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -27961e3ae25cdd54e2f8f0f06044ed9301af9f6e \ No newline at end of file +37133050404f7178b0319551cf43e14c5aa3ab52 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id index 019e98458b..5e1d32da4c 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -b88932559eb4f2da6bd050f46d3adceee254994a \ No newline at end of file +78e840ae40e63ee229d424842c1b198599479976 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id index fb9d9f5b44..dba4b32c8a 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -7dc811cb2910173ccf4673904dd7e5460c5d6f18 \ No newline at end of file +bd341c852711b054c75b8b8a5bc12abb7c7a2ce7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id index 857570f2fa..13d374e8e7 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -ef14e03c57fe631cdd5684164cf97d5109e4969b \ No newline at end of file +ff3aff6636cde78c4a8c955d75cd54b44ab80af7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id index 6079acf5fe..b299f7d2f7 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -6781a46f68736ca9d37bd0cffd26461ed7693ee6 \ No newline at end of file +c7e807fcdf92a15876a9a6af5b8b0a5fc9ad846c \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id index 10f13e61dd..7118432a6a 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -437080e5d51f177624a994a15c91f97091eabddd \ No newline at end of file +c8de5b2048f45959a30c316a582f09a8eea17336 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id index b1d2918045..ae4078c7ff 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -594b0c18dbce55d3526ce440912e326927bc1f56 \ No newline at end of file +ded1cacbead68b6c90b00225d6cd0116f86b9fd2 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id index d3adb39266..ee73f4e8da 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id @@ -1 +1 @@ -b73c6edff435f9860ae4ea9d298d759229f18cef \ No newline at end of file +ace51ee45521f0d46d823c686c14e4cb4a032435 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id index c89fe663ca..edc39ee2a8 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -75a67974bb09a6a4128e91635aa266484d2fd0b3 \ No newline at end of file +07148b6591fb66cbee7fa8d5ac507561b8f13568 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id index b3f2dc7043..fe28227475 100644 --- a/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -27961e3ae25cdd54e2f8f0f06044ed9301af9f6e \ No newline at end of file +37133050404f7178b0319551cf43e14c5aa3ab52 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id index 019e98458b..5e1d32da4c 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -b88932559eb4f2da6bd050f46d3adceee254994a \ No newline at end of file +78e840ae40e63ee229d424842c1b198599479976 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id index fb9d9f5b44..dba4b32c8a 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -7dc811cb2910173ccf4673904dd7e5460c5d6f18 \ No newline at end of file +bd341c852711b054c75b8b8a5bc12abb7c7a2ce7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id index 857570f2fa..13d374e8e7 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -ef14e03c57fe631cdd5684164cf97d5109e4969b \ No newline at end of file +ff3aff6636cde78c4a8c955d75cd54b44ab80af7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id index 6079acf5fe..b299f7d2f7 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -6781a46f68736ca9d37bd0cffd26461ed7693ee6 \ No newline at end of file +c7e807fcdf92a15876a9a6af5b8b0a5fc9ad846c \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id index 10f13e61dd..7118432a6a 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -437080e5d51f177624a994a15c91f97091eabddd \ No newline at end of file +c8de5b2048f45959a30c316a582f09a8eea17336 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id index b1d2918045..ae4078c7ff 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -594b0c18dbce55d3526ce440912e326927bc1f56 \ No newline at end of file +ded1cacbead68b6c90b00225d6cd0116f86b9fd2 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id index d3adb39266..ee73f4e8da 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id @@ -1 +1 @@ -b73c6edff435f9860ae4ea9d298d759229f18cef \ No newline at end of file +ace51ee45521f0d46d823c686c14e4cb4a032435 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id index c89fe663ca..edc39ee2a8 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -75a67974bb09a6a4128e91635aa266484d2fd0b3 \ No newline at end of file +07148b6591fb66cbee7fa8d5ac507561b8f13568 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id index b3f2dc7043..fe28227475 100644 --- a/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -27961e3ae25cdd54e2f8f0f06044ed9301af9f6e \ No newline at end of file +37133050404f7178b0319551cf43e14c5aa3ab52 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id index 019e98458b..5e1d32da4c 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -b88932559eb4f2da6bd050f46d3adceee254994a \ No newline at end of file +78e840ae40e63ee229d424842c1b198599479976 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id index fb9d9f5b44..dba4b32c8a 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -7dc811cb2910173ccf4673904dd7e5460c5d6f18 \ No newline at end of file +bd341c852711b054c75b8b8a5bc12abb7c7a2ce7 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id index a7d214d2e3..d5e2123ca1 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -0035e46939d63d33de477ce9ba078b5073cb94f1 \ No newline at end of file +07f7039f37e950a113fe04856a6fab04bad79d6b \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id index 6079acf5fe..b299f7d2f7 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -6781a46f68736ca9d37bd0cffd26461ed7693ee6 \ No newline at end of file +c7e807fcdf92a15876a9a6af5b8b0a5fc9ad846c \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id index 10f13e61dd..7118432a6a 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -437080e5d51f177624a994a15c91f97091eabddd \ No newline at end of file +c8de5b2048f45959a30c316a582f09a8eea17336 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id index b1d2918045..ae4078c7ff 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -594b0c18dbce55d3526ce440912e326927bc1f56 \ No newline at end of file +ded1cacbead68b6c90b00225d6cd0116f86b9fd2 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id index d3adb39266..ee73f4e8da 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/System.dll.REMOVED.git-id @@ -1 +1 @@ -b73c6edff435f9860ae4ea9d298d759229f18cef \ No newline at end of file +ace51ee45521f0d46d823c686c14e4cb4a032435 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id index c89fe663ca..edc39ee2a8 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -75a67974bb09a6a4128e91635aa266484d2fd0b3 \ No newline at end of file +07148b6591fb66cbee7fa8d5ac507561b8f13568 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id index 83419e3678..aa8db7df61 100644 --- a/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/62731146-81CF-4D61-826D-9A8DDED14432/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -3066fdf968cc2edf734e56e4958c596b83586882 \ No newline at end of file +635c53d2cc59d9399e170a459bc548126bafd7c4 \ No newline at end of file diff --git a/mcs/class/referencesource/System/net/System/Net/Sockets/_MultipleConnectAsync.cs b/mcs/class/referencesource/System/net/System/Net/Sockets/_MultipleConnectAsync.cs index b8a4275b4e..3d623fac59 100644 --- a/mcs/class/referencesource/System/net/System/Net/Sockets/_MultipleConnectAsync.cs +++ b/mcs/class/referencesource/System/net/System/Net/Sockets/_MultipleConnectAsync.cs @@ -219,28 +219,48 @@ namespace System.Net.Sockets { try { - Socket attemptSocket = null; + Socket attemptSocket; IPAddress attemptAddress = GetNextAddress(out attemptSocket); if (attemptAddress == null) { - return new SocketException(SocketError.NoData); + return new SocketException((int)SocketError.NoData); } - GlobalLog.Assert(attemptSocket != null, "MultipleConnectAsync.AttemptConnection: attemptSocket is null!"); - internalArgs.RemoteEndPoint = new IPEndPoint(attemptAddress, endPoint.Port); - if (!attemptSocket.ConnectAsync(internalArgs)) + return AttemptConnection(attemptSocket, internalArgs); + } + catch (Exception e) + { + if (e is ObjectDisposedException) { - return new SocketException(internalArgs.SocketError); + NetEventSource.Fail(this, "unexpected ObjectDisposedException"); + } + return e; + } + } + + private Exception AttemptConnection(Socket attemptSocket, SocketAsyncEventArgs args) + { + try + { + if (attemptSocket == null) + { + NetEventSource.Fail(null, "attemptSocket is null!"); + } + + bool pending = attemptSocket.ConnectAsync(args); + if (!pending) + { + InternalConnectCallback(null, args); } } catch (ObjectDisposedException) { - // This can happen if the user closes the socket, and is equivalent to a call + // This can happen if the user closes the socket, and is equivalent to a call // to CancelConnectAsync - return new SocketException(SocketError.OperationAborted); + return new SocketException((int)SocketError.OperationAborted); } catch (Exception e) { diff --git a/mono/metadata/jit-info.c b/mono/metadata/jit-info.c index 2ad7d2c9f4..8cc4f1e5f0 100644 --- a/mono/metadata/jit-info.c +++ b/mono/metadata/jit-info.c @@ -91,6 +91,8 @@ mono_jit_info_table_new (MonoDomain *domain) static void jit_info_table_free (MonoJitInfoTable *table, gboolean duplicate) { + MONO_REQ_GC_UNSAFE_MODE; + int i; int num_chunks = table->num_chunks; MonoDomain *domain = table->domain; diff --git a/mono/metadata/marshal.c.REMOVED.git-id b/mono/metadata/marshal.c.REMOVED.git-id index cf24a4673a..1ea8d33209 100644 --- a/mono/metadata/marshal.c.REMOVED.git-id +++ b/mono/metadata/marshal.c.REMOVED.git-id @@ -1 +1 @@ -006852d8be418bcd92b991ad05eff431fe206fe5 \ No newline at end of file +186cf8c4065c20b4655cf1d9d1e30fa514321858 \ No newline at end of file diff --git a/mono/metadata/mono-conc-hash.c b/mono/metadata/mono-conc-hash.c index 4f660181b5..cd13110d31 100644 --- a/mono/metadata/mono-conc-hash.c +++ b/mono/metadata/mono-conc-hash.c @@ -65,6 +65,8 @@ conc_table_new (MonoConcGHashTable *hash, int size) static void conc_table_free (gpointer ptr) { + MONO_REQ_GC_UNSAFE_MODE; + conc_table *table = (conc_table *)ptr; if (table->gc_type & MONO_HASH_KEY_GC) mono_gc_deregister_root ((char*)table->keys); diff --git a/mono/mini/version.h b/mono/mini/version.h index 757bbbc105..320bffe312 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "explicit/a5e772c" +#define FULL_VERSION "explicit/5dc37d7" diff --git a/mono/unit-tests/Makefile.in b/mono/unit-tests/Makefile.in index 3dd91b5c86..a0d210942d 100644 --- a/mono/unit-tests/Makefile.in +++ b/mono/unit-tests/Makefile.in @@ -1491,10 +1491,10 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@CROSS_COMPILE_TRUE@test-local: -@HOST_WIN32_TRUE@test-local: @CROSS_COMPILE_TRUE@clean-local: @HOST_WIN32_TRUE@clean-local: +@CROSS_COMPILE_TRUE@test-local: +@HOST_WIN32_TRUE@test-local: clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index a19976055c..bb42051826 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -516,15 +516,19 @@ unregister_thread (void *arg) g_assert (mono_thread_info_is_current (info)); g_assert (mono_thread_info_is_live (info)); + /* We only enter the GC unsafe region, as when exiting this function, the thread + * will be detached, and the current MonoThreadInfo* will be destroyed. */ + mono_threads_enter_gc_unsafe_region_unbalanced_with_info (info, &gc_unsafe_stackdata); + + /* Need to be in GC Unsafe to pump the HP queue - some of the cleanup + * methods need to use coop-aware locks. For example: jit_info_table_free_duplicate. + */ + /* Pump the HP queue while the thread is alive.*/ mono_thread_hazardous_try_free_some (); small_id = info->small_id; - /* We only enter the GC unsafe region, as when exiting this function, the thread - * will be detached, and the current MonoThreadInfo* will be destroyed. */ - mono_threads_enter_gc_unsafe_region_unbalanced_with_info (info, &gc_unsafe_stackdata); - THREADS_DEBUG ("unregistering info %p\n", info); mono_native_tls_set_value (thread_exited_key, GUINT_TO_POINTER (1)); diff --git a/msvc/Makefile.in b/msvc/Makefile.in index 8a179171f5..6f7912324c 100644 --- a/msvc/Makefile.in +++ b/msvc/Makefile.in @@ -520,8 +520,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_MSVC_FALSE@clean-local: @ENABLE_MSVC_FALSE@install-exec-local: +@ENABLE_MSVC_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 909e7d5e0ef9e558fffbfcb97db438733f8dfaa0..0c15e947cc42c0876febe03414d837511a07b614 100644 GIT binary patch delta 20 bcmbQIHBW29Q!aKR1p^B!1JliKxQw^}N^1sn delta 20 bcmbQIHBW29Q!aKx1p^B!Bje3)xQw^}N?`_c diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index d804b56708..875efa9623 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -07d14bd323acf209a1a45de4a4ad473c1cb74ce8 \ No newline at end of file +862c6498b2beab244f051a268c2b85bc52aa064f \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index 7cedd7b44ca7434539f4e6ed5f152e0dcf5e6abc..422f267b67d6a88899746f69f2c9deea139f2c7b 100644 GIT binary patch delta 20 bcmX?Ef3kjqo+7)Ef`NsVf$3&b#VK+CQHutv delta 20 bcmX?Ef3kjqo+7)Uf`NsVk@03z#VK+CQGo`k diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 1f78495e1e..015e89d455 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -a903e959db468775a6acf517f30e7aaaa6cd6281 \ No newline at end of file +a77bd6f1e7ead8fccf6f1700ce64e182b9529a11 \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index dded6d8fbe70b7e3129a6bc2870e93084355b52c..98bb79b4abf18bde02b80f5c0233844156256d26 100644 GIT binary patch delta 22 dcmeyri1Gg-#tj_m>_!R(7FGtPoB7oXv;bh;2L}KE delta 22 dcmeyri1Gg-#tj_m?1l;k7FI^aoB7oXv;bh!2L=ED diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index a0565fe200..7ed0767cd9 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -62f4aff1f40f5482d912d170f74ec5c54544beec \ No newline at end of file +92b467e21b608386d85efb3a1564795d252f8a4a \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index 04f3cb11e0..93c5d0181c 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 6.4.0.146\n" +"Project-Id-Version: mono 6.4.0.150\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2019-08-01 08:23+0000\n" +"POT-Creation-Date: 2019-08-02 08:05+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index c4a19eaf0d318da659692d9fea1b748050163e3c..5d7521b3d72c52dadf852f7a6804aa33fad91c9b 100644 GIT binary patch delta 22 ecmaF1gXP%{mJM-J*^LwoEUXMnH>XZzYzF{s)Che5 delta 22 ecmaF1gXP%{mJM-J*$ov8EUb)-H>XZzYzF{s$_RV_ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 589999fdb8..793c921213 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -893525c512da2479353b529d2ab88458d99c2089 \ No newline at end of file +e516442cd3a79d2a6387c79117f0292ee17c9e02 \ No newline at end of file