mono.git
7 years agoMerge pull request #3591 from directhex/mono_libdir_fallback
Bernhard Urban [Thu, 13 Oct 2016 14:39:38 +0000 (16:39 +0200)]
Merge pull request #3591 from directhex/mono_libdir_fallback

Handle relocatable libMonoPosixHelper.so when --libdir= isn't lib/

7 years ago[System]: Move MonoBtlsProvider.IsSupported() -> MonoTlsProviderFactory.IsBtlsSupport...
Martin Baulig [Thu, 13 Oct 2016 14:26:40 +0000 (16:26 +0200)]
[System]: Move MonoBtlsProvider.IsSupported() -> MonoTlsProviderFactory.IsBtlsSupported() (#3760)

* [System]: Move MonoBtlsProvider.IsSupported() -> MonoTlsProviderFactory.IsBtlsSupported().

Move the intern-call which is used to determine whether we're using BTLS out of MonoBtlsProvider
to allow the managed linker to eliminate the Mono.Btls.* classes when it's not supported.

* Fix Android build.

(cherry picked from commit 90699022b6fed7fd273ba3379a2e3696bbd8956f)

7 years agoMerge pull request #3762 from akoeplinger/fix-ftp-ipv6
Alexander Köplinger [Thu, 13 Oct 2016 11:48:40 +0000 (13:48 +0200)]
Merge pull request #3762 from akoeplinger/fix-ftp-ipv6

[System] Add IPv6 support to FtpWebRequest

7 years agoMerge pull request #3738 from lateralusX/jlorenss/win-api-family-support-libmonoruntime
Johan Lorensson [Thu, 13 Oct 2016 10:47:29 +0000 (12:47 +0200)]
Merge pull request #3738 from lateralusX/jlorenss/win-api-family-support-libmonoruntime

Build libmonoruntime under none desktop Windows API family.

7 years agoBuild libmonoruntime under none desktop Windows API family.
lateralusX [Thu, 13 Oct 2016 07:41:12 +0000 (09:41 +0200)]
Build libmonoruntime under none desktop Windows API family.

Initial work to build libmonoruntime under none desktop Windows API families.

7 years agoMerge pull request #3755 from kumpera/async-reader-hardering-2
Rodrigo Kumpera [Wed, 12 Oct 2016 16:46:46 +0000 (12:46 -0400)]
Merge pull request #3755 from kumpera/async-reader-hardering-2

[System] Another round of hardening around disposal of Process while doing async reads.

7 years ago[System] Add tests for IPv6-enabled FtpWebRequest
Alexander Köplinger [Wed, 12 Oct 2016 16:32:32 +0000 (18:32 +0200)]
[System] Add tests for IPv6-enabled FtpWebRequest

7 years ago[System] Add IPv6 support to FtpWebRequest
Alexander Köplinger [Wed, 12 Oct 2016 13:49:13 +0000 (15:49 +0200)]
[System] Add IPv6 support to FtpWebRequest

When connecting to an FTP server we weren't handling the RFC2428
extension to the FTP protocol which allows connections over IPv6
for the data channel.

We'd try to connect via IPv4 and the server would return an error
saying that this protocol is not supported.

The fix is to add handling for the protocol extension, namely
to use EPSV (for passive FTP) or EPRT (for active FTP) when opening
the data channel and send/parse the IPv6 addresses.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44025

Note: we're now using the IP address of the the control channel we connected to for the
data channel instead of the address that is returned by the server in the FTP response message.
The reason is that for EPSV there's no IP returned by the server, and it should be
more reliable for normal PASV as well since the server might not know the
correct external address. This is also what MS does in referencesource.

7 years ago[mcs] Handle interpolated strings with escaped quotes. Fixes #45286
Marek Safar [Wed, 12 Oct 2016 15:31:47 +0000 (17:31 +0200)]
[mcs] Handle interpolated strings with escaped quotes. Fixes #45286

7 years ago[System] Make sure FtpWebRequest processing happens in a background thread
Alexander Köplinger [Wed, 12 Oct 2016 14:16:06 +0000 (16:16 +0200)]
[System] Make sure FtpWebRequest processing happens in a background thread

We don't want it to block app shutdown.

7 years agoBump ikvm for mcs fixes
Marek Safar [Wed, 12 Oct 2016 13:29:33 +0000 (15:29 +0200)]
Bump ikvm for mcs fixes

7 years agoMerge pull request #3754 from marek-safar/rs-sockets
Marek Safar [Wed, 12 Oct 2016 12:53:16 +0000 (14:53 +0200)]
Merge pull request #3754 from marek-safar/rs-sockets

[System] More Socket types from referencesource

7 years ago[Mono.Data.Sqlite] Regression introduced by 04162ffbbdfed88ba298341f0384a35949b3c0f9...
Marek Safar [Wed, 12 Oct 2016 10:04:19 +0000 (12:04 +0200)]
[Mono.Data.Sqlite] Regression introduced by 04162ffbbdfed88ba298341f0384a35949b3c0f9 which changed _datetimeFormats order. Fixes #40603

7 years ago[Mono.Data.Sqlite] Enable more tests
Marek Safar [Wed, 12 Oct 2016 09:55:36 +0000 (11:55 +0200)]
[Mono.Data.Sqlite] Enable more tests

7 years agoMerge pull request #3749 from BrzVlad/fix-mips-fix
Vlad Brezae [Wed, 12 Oct 2016 08:56:10 +0000 (11:56 +0300)]
Merge pull request #3749 from BrzVlad/fix-mips-fix

[mips] Fix mips

7 years agoMerge pull request #3753 from henricm/enable-windowsbase-tests-on-windows
Niklas Therning [Wed, 12 Oct 2016 08:40:09 +0000 (10:40 +0200)]
Merge pull request #3753 from henricm/enable-windowsbase-tests-on-windows

Enable WinowsBase tests on Windows

7 years ago[System] Warnings cleanup
Marek Safar [Wed, 12 Oct 2016 08:18:43 +0000 (10:18 +0200)]
[System] Warnings cleanup

7 years ago[System] More Socket types from referencesource
Marek Safar [Tue, 11 Oct 2016 16:27:03 +0000 (18:27 +0200)]
[System] More Socket types from referencesource

7 years agoMerge pull request #3750 from marek-safar/socket
Marek Safar [Wed, 12 Oct 2016 08:09:18 +0000 (10:09 +0200)]
Merge pull request #3750 from marek-safar/socket

[System] More Socket pieces from referencesource

7 years ago[mips] Disable div with mul on 32bit mips
Vlad Brezae [Mon, 10 Oct 2016 20:40:59 +0000 (23:40 +0300)]
[mips] Disable div with mul on 32bit mips

7 years ago[llvm] Avoid generating invalid IL for valuetypes+vphi+volatile variables in gsharedv...
Zoltan Varga [Tue, 11 Oct 2016 20:03:55 +0000 (16:03 -0400)]
[llvm] Avoid generating invalid IL for valuetypes+vphi+volatile variables in gsharedvt methods. Fixes part of #45270.

7 years ago[corlib] Fix UdpClient tests on watchos
Alexander Köplinger [Tue, 11 Oct 2016 19:25:50 +0000 (21:25 +0200)]
[corlib] Fix UdpClient tests on watchos

They were reenabled in 1fa85ad4afb4139e607876121a080a3be122a7a9,
but UdpClient throws PlatformNotSupportedException on watchos.

7 years agoMerge pull request #3715 from kumpera/fix-44707
Rodrigo Kumpera [Tue, 11 Oct 2016 18:31:04 +0000 (14:31 -0400)]
Merge pull request #3715 from kumpera/fix-44707

[corlib] Don't load the machine config file if it's missing. Fixes #44707

7 years ago[System] Another round of hardening around disposal of Process while doing async...
Rodrigo Kumpera [Tue, 11 Oct 2016 18:25:51 +0000 (11:25 -0700)]
[System] Another round of hardening around disposal of Process while doing async reads.

This round ensures stream and decoder are protected from dispose and that we properly
bail out to the EOS case.

7 years ago[cert-sync]: Change back to using the '--btls' argument.
Martin Baulig [Tue, 11 Oct 2016 16:12:06 +0000 (18:12 +0200)]
[cert-sync]: Change back to using the '--btls' argument.

Without arguments, 'cert-sync' now operates on the old certificate store
again, like it was before.  To test BTLS, you need to explicitly run it
with '--btls'.

(cherry picked from commit 46379bda6d13e6e216ca3fc35654eb910c891c41)

7 years agoMerge pull request #3745 from akoeplinger/fix-bug44937
Alexander Köplinger [Tue, 11 Oct 2016 15:28:08 +0000 (17:28 +0200)]
Merge pull request #3745 from akoeplinger/fix-bug44937

[io-layer] Correctly detect a PE32+ assembly as managed when starting process

7 years ago[System.ServiceModel] Split unreliable tests
Marek Safar [Tue, 11 Oct 2016 14:56:16 +0000 (16:56 +0200)]
[System.ServiceModel] Split unreliable tests

7 years ago[System] Set more error details on failed https proxy connect. Fixes #45108
Marek Safar [Tue, 11 Oct 2016 12:23:55 +0000 (14:23 +0200)]
[System] Set more error details on failed https proxy connect. Fixes #45108

7 years ago[mono] Fixes hardcoded stack limit in EnsureSufficientExecutionStack check
Marek Safar [Tue, 4 Oct 2016 16:57:55 +0000 (18:57 +0200)]
[mono] Fixes hardcoded stack limit in EnsureSufficientExecutionStack check

7 years ago[System] More Socket pieces from referencesource
Marek Safar [Tue, 11 Oct 2016 08:44:34 +0000 (10:44 +0200)]
[System] More Socket pieces from referencesource

7 years agoEnable WinowsBase tests on Windows
Henric Müller [Tue, 11 Oct 2016 12:37:14 +0000 (14:37 +0200)]
Enable WinowsBase tests on Windows

7 years agoMerge pull request #3662 from henricm/fix-windowsbase-on-win
Henric Müller [Tue, 11 Oct 2016 12:02:10 +0000 (14:02 +0200)]
Merge pull request #3662 from henricm/fix-windowsbase-on-win

WindowsBase zlib, ZipSharp and Package fixes for Windows

7 years agoMaking sure stream is closed when exception is thrown
Henric Müller [Wed, 5 Oct 2016 12:43:06 +0000 (14:43 +0200)]
Making sure stream is closed when exception is thrown

Stream will never be closed if we throw exception in Open
which leads to file being locked in Windows and that we
leak file handles.

7 years agoSetting Culture to en-us for ToStringTest
Henric Müller [Wed, 5 Oct 2016 12:38:08 +0000 (14:38 +0200)]
Setting Culture to en-us for ToStringTest

7 years agoMake ZipSharp work on Windows
Henric Müller [Wed, 5 Oct 2016 12:35:25 +0000 (14:35 +0200)]
Make ZipSharp work on Windows

This patch adds the zlib functions needed by ZipSharp to the VS
MonoPosixHelper.def export file.

This patch also changes the ZipSharp code to use different code paths
depending on the size of the C long type on the underlying platform. On
gcc/clang the C long type follows the bitness of the targeted architecture,
it's 32-bit on 32-bit systems and 64-bit on 64-bit systems. With the VS
compiler however, the C long type is always 32-bit regardless of the target
architecture. zlib and minizip uses C long in a number of different function
signatures and structs.

7 years agoMerge pull request #3746 from ntherning/fix-SocketResponder-on-windows
Alexander Köplinger [Tue, 11 Oct 2016 10:22:37 +0000 (12:22 +0200)]
Merge pull request #3746 from ntherning/fix-SocketResponder-on-windows

Fix SocketResponder on Windows

7 years agoMerge pull request #3747 from marek-safar/updclient
Marek Safar [Tue, 11 Oct 2016 09:23:58 +0000 (11:23 +0200)]
Merge pull request #3747 from marek-safar/updclient

UpdClient from referencesource

7 years ago[mips] Add missing define
Vlad Brezae [Mon, 10 Oct 2016 20:27:52 +0000 (23:27 +0300)]
[mips] Add missing define

7 years ago[mips] Don't assert when decomposing longs
Vlad Brezae [Mon, 10 Oct 2016 20:20:15 +0000 (23:20 +0300)]
[mips] Don't assert when decomposing longs

There is no point in asserting if we encounter an unhandled long op. These ops may still get removed, if emulated later on, or maybe from other passes. Asserting happens as a last resort when emitting the native code for the method.

7 years ago[corlib] Add missing constructors to RNGCryptoServiceProvider on monotouch
Alexander Köplinger [Mon, 10 Oct 2016 18:13:55 +0000 (20:13 +0200)]
[corlib] Add missing constructors to RNGCryptoServiceProvider on monotouch

Those were missed in cb46f78eef5263ce24ba12c583e4c72ac64734c1 because there's a separate
implementation for monotouch in an unrelated file.

7 years ago[System]: Fix a typo in X500DistinguishedName.AreEqual().
Martin Baulig [Mon, 10 Oct 2016 16:29:27 +0000 (18:29 +0200)]
[System]: Fix a typo in X500DistinguishedName.AreEqual().

(cherry picked from commit 1ac809aad7a2ca1d69c6d26e7ac18b36d5c90610)

7 years ago[btls] Use UTC for the Unix epoch in the managed BTLS code (#3702)
Alexander Köplinger [Mon, 10 Oct 2016 16:03:39 +0000 (18:03 +0200)]
[btls] Use UTC for the Unix epoch in the managed BTLS code (#3702)

The epoch is specified as being in UTC, but the DateTime(int, int, int) constructor
creates a DateTime with an 'Unspecified' timezone, which could lead to problems later on.

7 years ago[BTLS]: Correctly handle certificates with negative serial numbers. (#3719)
Martin Baulig [Mon, 10 Oct 2016 16:02:26 +0000 (18:02 +0200)]
[BTLS]: Correctly handle certificates with negative serial numbers. (#3719)

In mono_btls_x509_get_serial_number(), first call i2c_ASN1_INTEGER()
which takes care of padding and computing the 2s complement for negative
numbers, then reverse the buffer.
(cherry picked from commit 1a55680bfaffa3fa00881889133e5313a6cd9ab4)

7 years ago[System.Core] Remove unused files
Marek Safar [Mon, 10 Oct 2016 15:39:33 +0000 (17:39 +0200)]
[System.Core] Remove unused files

7 years agoFix SocketResponder on Windows
Niklas Therning [Mon, 10 Oct 2016 14:04:49 +0000 (16:04 +0200)]
Fix SocketResponder on Windows

There seems to be a race in some tests in the System test suite that use
SocketResponder on Windows. Some tests fail with an exception that the socket
has been closed before they get a chance to see the response sent by the
SocketResponder. The same happens occasionally when using SocketResponder on
.NET. This patch changes the order of the Socket.Shutdown() calls and adds a
Socket.Receive() before Shutdown() is called to give the sender a chance to
actually send any data before the responder shuts down and closes its side of
the connection.

7 years ago[System] Enable more tests
Marek Safar [Mon, 10 Oct 2016 15:04:31 +0000 (17:04 +0200)]
[System] Enable more tests

7 years ago[System] UdpClient from referencesource
Marek Safar [Mon, 10 Oct 2016 14:52:03 +0000 (16:52 +0200)]
[System] UdpClient from referencesource

7 years ago[System.Data] Use same socket family for data receiver as it has its client. Fixes...
Marek Safar [Mon, 10 Oct 2016 14:21:17 +0000 (16:21 +0200)]
[System.Data] Use same socket family for data receiver as it has its client. Fixes #44624

7 years agoMerge pull request #3740 from Unity-Technologies/gc-options-command-line
Vlad Brezae [Mon, 10 Oct 2016 13:43:54 +0000 (16:43 +0300)]
Merge pull request #3740 from Unity-Technologies/gc-options-command-line

GC debug and params command line options

7 years ago[io-layer] Correctly detect a PE32+ assembly as managed when starting process
Alexander Köplinger [Mon, 10 Oct 2016 11:28:43 +0000 (13:28 +0200)]
[io-layer] Correctly detect a PE32+ assembly as managed when starting process

We weren't checking whether a PE file is in PE32 or PE32+ format,
causing us to use the PE32 offsets on the newer format as well.

This means that using Process.Start() on a managed assembly didn't
always work when a PE32+ file was in play. Such a file is created
when targeting x64 e.g. via the -platform:x64 csc.exe/mcs option.

The reason why we probably didn't notice until now is that in an
assembly produced by mcs there happens to be some data at the PE32
CLR header offset even in a PE32+ file, causing the check to "work".

This doesn't apply to csc.exe/roslyn though and so we couldn't
execute those assemblies via Process.Start() even though they're
perfectly managed. Since the .NET Core project.json toolchain
produces x64-targeted assemblies by default more people ran into
the issue trying to run those on Mono: https://github.com/cake-build/cake/issues/1247

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44937

PE/COFF spec at https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx

7 years agoMerge pull request #3739 from akoeplinger/add-more-netstandard-api
Alexander Köplinger [Mon, 10 Oct 2016 11:39:06 +0000 (13:39 +0200)]
Merge pull request #3739 from akoeplinger/add-more-netstandard-api

[bcl] Expose a few more APIs on mobile to match with netstandard

7 years ago[bcl] Expose a few more APIs on mobile to match with netstandard
Alexander Köplinger [Fri, 7 Oct 2016 15:08:20 +0000 (17:08 +0200)]
[bcl] Expose a few more APIs on mobile to match with netstandard

See https://github.com/dotnet/standard/issues/47.

7 years agoMerge pull request #3653 from ntherning/alertable-socket-wait
Niklas Therning [Mon, 10 Oct 2016 11:30:31 +0000 (13:30 +0200)]
Merge pull request #3653 from ntherning/alertable-socket-wait

Make blocking socket calls on Windows interruptible

7 years agoMerge pull request #3744 from ntherning/enable-system-security-tests-in-pr-builds...
Niklas Therning [Mon, 10 Oct 2016 11:20:35 +0000 (13:20 +0200)]
Merge pull request #3744 from ntherning/enable-system-security-tests-in-pr-builds-on-windows

Enable System.Security tests in PR builds on Windows

7 years agoEnable System.Security tests in PR builds on Windows
Niklas Therning [Mon, 10 Oct 2016 08:27:41 +0000 (10:27 +0200)]
Enable System.Security tests in PR builds on Windows

7 years agoMerge pull request #3742 from alexrp/profiler-c9-fixes
Alex Rønne Petersen [Sat, 8 Oct 2016 11:23:10 +0000 (13:23 +0200)]
Merge pull request #3742 from alexrp/profiler-c9-fixes

[profiler] Start the helper thread before the writer thread.

7 years ago[profiler] Start the helper thread before the writer thread.
Alex Rønne Petersen [Sat, 8 Oct 2016 09:55:07 +0000 (11:55 +0200)]
[profiler] Start the helper thread before the writer thread.

This fixes a regression introduced in 0db428169a42373a73cd5c502bd40033629f3f8d
which caused the profiler to not report the correct command port in the file
header on startup.

7 years ago[SRE] Set the wastypebuilder flag on completed generic param builder … (#3712)
Zoltan Varga [Sat, 8 Oct 2016 00:43:04 +0000 (20:43 -0400)]
[SRE] Set the wastypebuilder flag on completed generic param builder … (#3712)

* [SRE] Set the wastypebuilder flag on completed generic param builder classes to remove a workaround from mono_type_get_object_checked ().

* [SRE] Remove unused verify_safe_for_managed_space () function.

7 years ago[llvm] Make sure the initlocals_bb is not treated as part of a try block if one start...
Zoltan Varga [Sat, 8 Oct 2016 00:42:32 +0000 (20:42 -0400)]
[llvm] Make sure the initlocals_bb is not treated as part of a try block if one starts at IL offset 0, since it could mess up the control flow if it contains calls. (#3718)

7 years agoMerge pull request #3741 from akoeplinger/fix-aot-DoAssemblyResolve
Alexander Köplinger [Fri, 7 Oct 2016 22:17:22 +0000 (00:17 +0200)]
Merge pull request #3741 from akoeplinger/fix-aot-DoAssemblyResolve

[aot] Fix AppDomain.DoAssemblyResolve runtime invoke wrapper

7 years ago[aot] Fix AppDomain.DoAssemblyResolve runtime invoke wrapper
Alexander Köplinger [Fri, 7 Oct 2016 20:04:52 +0000 (22:04 +0200)]
[aot] Fix AppDomain.DoAssemblyResolve runtime invoke wrapper

In https://github.com/mono/mono/pull/1528 the DoAssemblyResolve method was changed
from two parameters to three, but the code in aot-compiler.c was not updated to match.

7 years agoDocument --gc-debug and --gc-params command line options
Jonathan Chambers [Fri, 7 Oct 2016 17:54:00 +0000 (13:54 -0400)]
Document --gc-debug and --gc-params command line options

7 years agoAdd --gc-params and --gc-debug command line options
Jonathan Chambers [Fri, 7 Oct 2016 17:31:58 +0000 (13:31 -0400)]
Add --gc-params and --gc-debug command line options

7 years agoMerge pull request #3731 from lambdageek/dev-handles-gbmc
Aleksey Kliger (λgeek) [Fri, 7 Oct 2016 17:13:44 +0000 (13:13 -0400)]
Merge pull request #3731 from lambdageek/dev-handles-gbmc

[runtime] System.Configuration.InternalConfigurationHost:get_bundled_machine_config  needs HANDLES

7 years agoMerge pull request #3729 from ntherning/fix-failures-in-msbuild-tests-on-windows
Niklas Therning [Fri, 7 Oct 2016 17:08:01 +0000 (19:08 +0200)]
Merge pull request #3729 from ntherning/fix-failures-in-msbuild-tests-on-windows

Fix failures in MSBuild tests on Windows

7 years ago[runtime] Fix the blittable flag and the instance size for pointer types. Fixes ...
Zoltan Varga [Fri, 7 Oct 2016 15:37:19 +0000 (11:37 -0400)]
[runtime] Fix the blittable flag and the instance size for pointer types. Fixes #45131. (#3735)

7 years agoMerge pull request #3737 from akoeplinger/fix-babysitter
Alexander Köplinger [Fri, 7 Oct 2016 13:30:19 +0000 (15:30 +0200)]
Merge pull request #3737 from akoeplinger/fix-babysitter

[ci] Set the env var in a new subshell to fix babysitter processing

7 years agoFix failures in MSBuild tests on Windows
Niklas Therning [Thu, 6 Oct 2016 17:58:32 +0000 (19:58 +0200)]
Fix failures in MSBuild tests on Windows

7 years agoMerge pull request #3727 from henricm/fix-system-web-on-windows
Marek Safar [Fri, 7 Oct 2016 13:03:34 +0000 (15:03 +0200)]
Merge pull request #3727 from henricm/fix-system-web-on-windows

Fixes for System.Web to work on windows

7 years agoEnabling System.Web tests on Windows
Henric Müller [Fri, 7 Oct 2016 12:45:11 +0000 (14:45 +0200)]
Enabling System.Web tests on Windows

7 years agoMake blocking socket calls on Windows interruptible
Niklas Therning [Wed, 28 Sep 2016 14:54:45 +0000 (16:54 +0200)]
Make blocking socket calls on Windows interruptible

This second commit adds functions to socket-io.c which uses
WSAEventSelect()/WSAWaitForMultipleEvents() or overlapped I/O to make
potentielly blocking socket calls interruptible (alertable).

7 years agoCalling directly into Win API to get current process exe
Henric Müller [Thu, 6 Oct 2016 12:46:53 +0000 (14:46 +0200)]
Calling directly into Win API to get current process exe

On Windows the MonoToolsLocator tries to determine which mono.exe
to use by looking at the current process. Due to problems with
AppDomains and shadow copying (which happens in System.Web) we
could not use this approach. Instead we now call GetModuleFileName
directly using p-invoke to get the exe file of the running process.
This is only used when running on Windows.

7 years ago[System] Use default parsing rules for Uri.IsWellFormedUriString. Fixes #45129
Marek Safar [Fri, 7 Oct 2016 11:55:50 +0000 (13:55 +0200)]
[System] Use default parsing rules for Uri.IsWellFormedUriString. Fixes #45129

7 years agoMake blocking socket calls on Windows interruptible
Niklas Therning [Tue, 27 Sep 2016 14:16:17 +0000 (16:16 +0200)]
Make blocking socket calls on Windows interruptible

This first commit changes the signatures of the icalls for blocking socket
calls in Socket to propagate whether the socket call should block or not. This
is required since it's not possible on Windows through any native API to
determine whether a socket is in blocking or non-blocking mode.

This commit also adds the necessary RegisterForBlockingSyscall() guards to the
Socket.SendFile_internal() method which takes a WSABUF array. Without this
calls to this method won't be signaled when the Socket is closed.

This commit also fixes the error handling in the Socket.SendFile() method to
not rely on WSAGetLastError(). It's likely to have been overwritten between
when the error is generated and the WSAGetLastError() call from managed code.

7 years ago[ci] Set the env var in a new subshell to fix babysitter processing
Alexander Köplinger [Fri, 7 Oct 2016 09:07:39 +0000 (11:07 +0200)]
[ci] Set the env var in a new subshell to fix babysitter processing

Setting the MONO_TLS_PROVIDER env var in the testing script makes it opaque to the
babysitter and other processing scripts. By setting it in a new subshell we can
ensure that the scripts see the whole invocation.

7 years agoMerge pull request #3730 from kumpera/async-reader-dispose-hardening
Rodrigo Kumpera [Thu, 6 Oct 2016 22:53:15 +0000 (18:53 -0400)]
Merge pull request #3730 from kumpera/async-reader-dispose-hardening

[System] Add some hardening when disposing a AsyncStreamReader as it will have things happening concurrently.

7 years ago[corlib] RemotingConfiguration now try to use the bundled machine.config first.
Rodrigo Kumpera [Thu, 6 Oct 2016 22:04:48 +0000 (15:04 -0700)]
[corlib] RemotingConfiguration now try to use the bundled machine.config first.

7 years agoMerge pull request #3660 from lambdageek/bug-42271
Aleksey Kliger (λgeek) [Thu, 6 Oct 2016 21:53:33 +0000 (17:53 -0400)]
Merge pull request #3660 from lambdageek/bug-42271

[coop] Switch to GC SAFE for backtrace() and backtrace_symbols()

7 years ago[runtime] give get_bundled_machine_config ves_icall_Class_Method-style names
Aleksey Kliger [Thu, 6 Oct 2016 20:58:46 +0000 (16:58 -0400)]
[runtime] give get_bundled_machine_config ves_icall_Class_Method-style names

7 years ago[runtime] System.Configuration.InternalConfigurationHost:get_bundled_machine_config
Aleksey Kliger [Thu, 6 Oct 2016 20:35:55 +0000 (16:35 -0400)]
[runtime] System.Configuration.InternalConfigurationHost:get_bundled_machine_config
needs HANDLES

The method (which also goes by
System.Configuration.DefaultConfig:get_bundled_machine_config) was
converted to use coop handles earlier, but we missed this declaration.

7 years ago[System] Add some hardening when disposing a AsyncStreamReader as it will have things...
Rodrigo Kumpera [Thu, 6 Oct 2016 20:19:59 +0000 (13:19 -0700)]
[System] Add some hardening when disposing a AsyncStreamReader as it will have things happening concurrently.

7 years ago[SRE] Fixup the tokens in subtypes too. (#3721)
Zoltan Varga [Thu, 6 Oct 2016 20:12:23 +0000 (16:12 -0400)]
[SRE] Fixup the tokens in subtypes too. (#3721)

7 years agoMerge pull request #3725 from ntherning/fix-symbolicate-tests-stack-trace-diff-on...
Niklas Therning [Thu, 6 Oct 2016 18:04:32 +0000 (20:04 +0200)]
Merge pull request #3725 from ntherning/fix-symbolicate-tests-stack-trace-diff-on-windows

Fix symbolicate tests stack trace diff on Windows

7 years ago[mempool] Fix indentation in mono_backtrace ()
Aleksey Kliger [Wed, 28 Sep 2016 15:45:18 +0000 (11:45 -0400)]
[mempool] Fix indentation in mono_backtrace ()

7 years ago[coop] Switch to GC SAFE for backtrace() and backtrace_symbols()
Aleksey Kliger [Tue, 27 Sep 2016 21:42:46 +0000 (17:42 -0400)]
[coop] Switch to GC SAFE for backtrace() and backtrace_symbols()

Fixes [#42271](https://bugzilla.xamarin.com/show_bug.cgi?id=42271)

7 years ago[corlib] Add ValueTuple
Marek Safar [Thu, 6 Oct 2016 13:10:09 +0000 (15:10 +0200)]
[corlib] Add ValueTuple

7 years agoFix symbolicate tests stack trace diff on Windows
Niklas Therning [Thu, 6 Oct 2016 12:22:49 +0000 (14:22 +0200)]
Fix symbolicate tests stack trace diff on Windows

The symbolicate tests compare stack traces generated by the mono-symbolicate
tool against expected stack traces. The expected stack trace files have been
preprocessed to remove absolute paths and the Makefile does the same with the
output from the tool. However, the preprocessing doesn't take different
directory separator characters into account. This patch adds a 'tr' command to
the Makefile which converts \ -> / before the absolute paths are filtered out
from the actual output from the tool to make the comparison succeed on Windows
as well.

7 years agoIgnoring CR in WebControls tests
Henric Müller [Thu, 6 Oct 2016 09:20:28 +0000 (11:20 +0200)]
Ignoring CR in WebControls tests

7 years agoMerge pull request #3707 from lateralusX/jlorenss/win-api-family-support-libmonoutils
Johan Lorensson [Thu, 6 Oct 2016 07:07:41 +0000 (09:07 +0200)]
Merge pull request #3707 from lateralusX/jlorenss/win-api-family-support-libmonoutils

Build libmonoutils under none desktop Windows API family.

7 years agoMerge pull request #3720 from ntherning/fix-monodoc-tests-on-windows
Niklas Therning [Thu, 6 Oct 2016 06:40:30 +0000 (08:40 +0200)]
Merge pull request #3720 from ntherning/fix-monodoc-tests-on-windows

Fix monodoc tests on Windows

7 years agoFix a typo.
Zoltan Varga [Wed, 5 Oct 2016 21:59:17 +0000 (17:59 -0400)]
Fix a typo.

7 years agoMerge pull request #3714 from kumpera/fix_process_stream_dispose
Rodrigo Kumpera [Wed, 5 Oct 2016 21:54:41 +0000 (14:54 -0700)]
Merge pull request #3714 from kumpera/fix_process_stream_dispose

[System] Fix Process::Dispose resource leak due to RS import.

7 years ago[System] Dispose all streams in Process::Close if they were not exposed to the user...
Rodrigo Kumpera [Wed, 5 Oct 2016 21:51:01 +0000 (14:51 -0700)]
[System] Dispose all streams in Process::Close if they were not exposed to the user. Fixes a RS import regression.

RS takes the stance that redirected streams should not be closed by the Process class because they might
be referenced from the outside.

That would be ok if it was true. If you use Process::BeginOutputReadLine, the output stream becomes inaccessible
with no way to dispose them by any mean but GC.Collect. You get an exception when accessing Process::StandardOutput
once async reading starts.

This change addresses the case where the streams are not accessible. This is tracked by the *StreamReadMode variables
that are set on stream getters or Begin*ReadLine.

7 years ago[System.Net.Http] Wrap certain exceptions into HttpRequestException. Fixes #44978
Marek Safar [Wed, 5 Oct 2016 15:55:33 +0000 (17:55 +0200)]
[System.Net.Http] Wrap certain exceptions into HttpRequestException. Fixes #44978

7 years agoMerge pull request #3684 from lambdageek/dev-monoerror-poolbox
Aleksey Kliger (λgeek) [Wed, 5 Oct 2016 15:09:49 +0000 (11:09 -0400)]
Merge pull request #3684 from lambdageek/dev-monoerror-poolbox

[runtime] Use boxed MonoError for class failure.

7 years agoFix monodoc tests on Windows
Niklas Therning [Wed, 5 Oct 2016 14:36:48 +0000 (16:36 +0200)]
Fix monodoc tests on Windows

These tests are sensitive to differences in line endings between Windows and
other platforms. This patch changes the diff commands used on Windows to
ignore changes in whitespaces at end of lines.

7 years agoMerge pull request #3692 from lateralusX/jlorenss/win-api-family-support-libmono
Johan Lorensson [Wed, 5 Oct 2016 14:10:10 +0000 (16:10 +0200)]
Merge pull request #3692 from lateralusX/jlorenss/win-api-family-support-libmono

Build libmono under none desktop Windows API family.

7 years ago[mcs] Don't report version mismatch error for FX assemblies
Marek Safar [Wed, 5 Oct 2016 13:02:14 +0000 (15:02 +0200)]
[mcs] Don't report version mismatch error for FX assemblies

7 years agoMerge pull request #3709 from rolfbjarne/linker-mark-nested-types
Alexander Köplinger [Wed, 5 Oct 2016 11:51:00 +0000 (13:51 +0200)]
Merge pull request #3709 from rolfbjarne/linker-mark-nested-types

[linker] We need to mark nested types even if the declaring type isn't marked.

7 years ago[ci] Test System.dll with both the legacy and btls TLS provider
Alexander Köplinger [Wed, 5 Oct 2016 11:19:06 +0000 (13:19 +0200)]
[ci] Test System.dll with both the legacy and btls TLS provider