mono.git
7 years ago[msvc] Update csproj files
monojenkins [Wed, 19 Oct 2016 10:17:15 +0000 (10:17 +0000)]
[msvc] Update csproj files

7 years ago[tools] Fix casing of sqlsharp
Alexander Köplinger [Tue, 18 Oct 2016 18:53:28 +0000 (20:53 +0200)]
[tools] Fix casing of sqlsharp

The directory is lowercase on disk.

7 years agoBump boringssl submodule
Alexander Köplinger [Tue, 18 Oct 2016 17:32:52 +0000 (19:32 +0200)]
Bump boringssl submodule

7 years agoFixes System build
Marek Safar [Tue, 18 Oct 2016 15:20:30 +0000 (17:20 +0200)]
Fixes System build

7 years ago[System] Implements Socket::ConnectAsync. Fixes #44406
Marek Safar [Tue, 18 Oct 2016 15:12:54 +0000 (17:12 +0200)]
[System] Implements Socket::ConnectAsync. Fixes #44406

7 years ago[mcs] Add new test
Marek Safar [Tue, 18 Oct 2016 13:11:08 +0000 (15:11 +0200)]
[mcs] Add new test

7 years ago[ci] Add option to not run tests via CI_TAGS
Alexander Köplinger [Tue, 18 Oct 2016 14:00:49 +0000 (16:00 +0200)]
[ci] Add option to not run tests via CI_TAGS

7 years agoMerge pull request #3780 from akoeplinger/mcs-error-constant-invariant
Marek Safar [Tue, 18 Oct 2016 12:58:46 +0000 (14:58 +0200)]
Merge pull request #3780 from akoeplinger/mcs-error-constant-invariant

[mcs] Use InvariantCulture for GetValueAsLiteral() in constant.cs

7 years agoBump cecil to get recent fixes
Marek Safar [Tue, 18 Oct 2016 12:09:43 +0000 (14:09 +0200)]
Bump cecil to get recent fixes

7 years agoMerge pull request #3781 from grendello/networkinfo
Marek Safar [Mon, 17 Oct 2016 21:30:34 +0000 (23:30 +0200)]
Merge pull request #3781 from grendello/networkinfo

With Android 7.0 (Nougat) it is no longer possible to read some

7 years ago[runtime] Fix a regression introduced by 1be62d5e2a325d45159485629a9ef6158aac0984...
Zoltan Varga [Mon, 17 Oct 2016 21:19:44 +0000 (17:19 -0400)]
[runtime] Fix a regression introduced by 1be62d5e2a325d45159485629a9ef6158aac0984 (field loading rewrite). Static field offsets were overwritten with 0 if the mono_class_setup_fields () function was called in parallel.

7 years agoWith Android 7.0 (Nougat) it is no longer possible to read some
Marek Habersack [Mon, 17 Oct 2016 17:40:21 +0000 (19:40 +0200)]
With Android 7.0 (Nougat) it is no longer possible to read some

information about network interfaces from the /sys filesystem. Google
placed restrictions on two files used by the Mono BCL to read
information about the interface:

      /sys/class/net/[DEVICE]/flags
      /sys/class/net/[DEVICE]/operstate

The information we used to read from `flags` let us determine whether
the interface supports multicast and the `operstate` file provided us
with detailed information on the current device state.

Additionally, it is now impossible to read the hardware MAC address used
by any interface. This bit of information is also unavailable when using
the Java APIs and therefore applications running on devices with API
24 (and possibly newer) will not be able to access this information.

More details about the issue are available from the upstream Android
bug:

      https://code.google.com/p/android/issues/detail?id=205565

In order to obtain the required information, we now need to use the Java
APIs on devices with API 24+ and this commit implements the backend to
retrieve this information. It is done in C in order to avoid overhead of
creating mirror .NET objects when calling Java, thus saving time and
memory during an operation which may be performed by some applications
quite frequently.

This patch implements code that calls into the Xamarin.Android
runtime when runnin under API24 or newer to obtain the information.

Part of fix for https://bugzilla.xamarin.com/show_bug.cgi?id=44296

7 years ago[mcs] Use InvariantCulture for GetValueAsLiteral() in constant.cs
Alexander Köplinger [Tue, 10 Nov 2015 14:01:43 +0000 (15:01 +0100)]
[mcs] Use InvariantCulture for GetValueAsLiteral() in constant.cs

Without it mcs would've printed the following error for code like `const int val = 1.42f`
on a system where the decimal separator is not the dot, e.g. German:

```
test.cs(3,18): error CS0031: Constant value `1,42' cannot be converted to a `int'
```

7 years agoMerge pull request #3779 from akoeplinger/fix-aot-only-reference
Alexander Köplinger [Mon, 17 Oct 2016 15:56:03 +0000 (17:56 +0200)]
Merge pull request #3779 from akoeplinger/fix-aot-only-reference

[mini] Fix mention of --aot-only option, it no longer exists

7 years agoImplement some missing methods in RSACryptoServiceProvider
Lluis Sanchez [Fri, 14 Oct 2016 13:27:31 +0000 (15:27 +0200)]
Implement some missing methods in RSACryptoServiceProvider

(cherry picked from commit d4e09f5c35c9c5944e2c1e60e017d3ecddc52616)

7 years agoImplemented System.Security.Cryptography.X509Certificates.RSACertificateExtensions
Lluis Sanchez [Fri, 14 Oct 2016 07:27:08 +0000 (09:27 +0200)]
Implemented System.Security.Cryptography.X509Certificates.RSACertificateExtensions

(cherry picked from commit 04a376b2ab038fc8ebc786185695893456d541c9)

7 years ago[mini] Fix mention of --aot-only option, it no longer exists
Alexander Köplinger [Mon, 17 Oct 2016 15:15:27 +0000 (17:15 +0200)]
[mini] Fix mention of --aot-only option, it no longer exists

It was replaced with --full-aot in ba99fd833400666f574c571cc1981e846d09a610,
but there were still two places left that talked about the old option which leads to confusion.

Also updated the link to Xamarin docs to the current URL.

7 years ago[build] Regenerate .csproj files
Alexander Köplinger [Mon, 17 Oct 2016 14:34:15 +0000 (16:34 +0200)]
[build] Regenerate .csproj files

Note: DISABLE_CAS_USE was removed in ed989a8e9e5c170b6d19edc60bb80e8a4e6d5cc0

7 years ago[System] More Socket methods from referencesource
Marek Safar [Mon, 17 Oct 2016 13:04:01 +0000 (15:04 +0200)]
[System] More Socket methods from referencesource

7 years ago[WP] [runtime] Rewrite field loading and layout (#3722)
Zoltan Varga [Sun, 16 Oct 2016 04:35:16 +0000 (00:35 -0400)]
[WP] [runtime] Rewrite field loading and layout (#3722)

* [runtime] Improve the locking in mono_class_setup_basic_field_info ().

Compute all the required information outside the lock and install it inside the lock. Remove mono_class_setup_basic_field_info_locking () function which is no longer needed.

* [runtime] Move the special case of no fields from mono_class_setup_fields () to mono_class_layout_fields ().

* [runtime] Move the computation of klass->blittable and klass->element_class/cast_class for enums to mono_class_layout_fields () so it can be used for dynamic types as well.

* [runtime] Make typebuilder_setup_fields () initilize the same data as mono_class_setup_fields ().

* [runtime] Move more common code into mono_class_layout_fields () from mono_class_setup_fields () and typebuilder_setup_fields ().

* [runtime] Avoid infinite recursion in mono_class_setup_fields () by storing the classes under initialization in a TLS list instead of using the racy klass->setup_fields_called flag.

* [runtime] Reduce the amount of locking in mono_class_setup_fields () to the call to mono_class_layout_fields (). Remove mono_class_setup_fields_locking ().

* [runtime] Remove a special case for no fields from mono_class_layout_fields (), the normal code can handle it.

* [runtime] Reorganize mono_class_layout_fields () so it makes all modifications to the MonoClass instance in one place.

* [runtime] Reduce the amounrt of locking in mono_class_layout_fields ().

* [runtime] Remove some compiler context code.

7 years ago[corlib] Don't emit symbol information in ModuleBuilderTest.GetType()
Alexander Köplinger [Sat, 15 Oct 2016 01:13:59 +0000 (03:13 +0200)]
[corlib] Don't emit symbol information in ModuleBuilderTest.GetType()

It doesn't work on Android and the test doesn't need it.

7 years ago[System] Fix expected default value in test for ServicePointManager.ConnectionLimit...
Alexander Köplinger [Fri, 14 Oct 2016 23:09:10 +0000 (01:09 +0200)]
[System] Fix expected default value in test for ServicePointManager.ConnectionLimit on XA

The default was aligned with XI on https://github.com/mono/mono/commit/d06354174070d01394f5e75ffcfc9c1110a1e7db

7 years agoMerge pull request #3775 from alexrp/main-thread-name
Alex Rønne Petersen [Fri, 14 Oct 2016 21:16:15 +0000 (23:16 +0200)]
Merge pull request #3775 from alexrp/main-thread-name

[runtime] Don't change the native name of the main thread.

7 years agoRevert "UTF8, with build fixed"
Miguel de Icaza [Fri, 14 Oct 2016 18:39:22 +0000 (14:39 -0400)]
Revert "UTF8, with build fixed"

This reverts commit 50d119be5d5ba52e0c935ea53907cf2b061a3cd8.

7 years agoRevert "Revert "UTF8 Marshaling APIs (#3736)""
Miguel de Icaza [Fri, 14 Oct 2016 18:36:17 +0000 (14:36 -0400)]
Revert "Revert "UTF8 Marshaling APIs  (#3736)""

This reverts commit 2a01bde545a47e287977637a4a08f8f965ca45dc.t push
:

7 years agoUTF8, with build fixed
Miguel de Icaza [Fri, 14 Oct 2016 18:35:46 +0000 (14:35 -0400)]
UTF8, with build fixed

7 years agoRevert "UTF8 Marshaling APIs (#3736)"
Miguel de Icaza [Fri, 14 Oct 2016 18:26:40 +0000 (14:26 -0400)]
Revert "UTF8 Marshaling APIs  (#3736)"

This reverts commit 4056e80006ee934ec024215cf998baf66aa8d6ae.

7 years agoUTF8 Marshaling APIs (#3736)
Miguel de Icaza [Fri, 14 Oct 2016 18:23:23 +0000 (14:23 -0400)]
UTF8 Marshaling APIs  (#3736)

Adds support for the new UTF8 marshaling functionality in .NET, there is support for the new MarshalAs(UnmanagedType.LPUTF8St) as well as a handful of convenience methods in Marshal.cs

In Mono, this is mostly a pass-through as we have historically only done
UTF8, so this merely adds the constant processing to the runtime.

This fixes a few bugs that the new test suite exhibited: when we marshaled UTF8 strings, we assumed Chars() == Bytes() and we would end up chopping when marshaling out, and marshaling in.

There is also an additional behavioral bug that was fixed in Marshal.cs, unlike the rest of the runtime that treated Ansi as Utf8, StringToCoTaskMemAnsi behaved as ascii. This brings the API in line with the rest of the runtime.

The equivalent CoreCLR changes were:

dotnet/coreclr#4793
dotnet/coreclr#6561

This has also surfaced two limitations in Mono's marshaling code, which is why two sets of tests are disabled: StringBuilder return types are not handled specially (char * needs to be turned into a new StringBuilder when present) and StringBuilders with an Out attribute should update the StringBuilder in place, not make a new copy of it.

7 years ago[runtime] Don't change the native name of the main thread.
Alex Rønne Petersen [Fri, 14 Oct 2016 16:18:57 +0000 (18:18 +0200)]
[runtime] Don't change the native name of the main thread.

This makes it hard to differentiate multiple Mono processes in `top`.

We still report the name of the main thread as "Main" to the profiler.

7 years ago[System.ServiceModel] Hide only relevant exceptions in TcpChannelListener.cs
Marek Safar [Fri, 14 Oct 2016 14:23:44 +0000 (16:23 +0200)]
[System.ServiceModel] Hide only relevant exceptions in TcpChannelListener.cs

7 years ago[System] Use mono specific payload type for EndAccept of TCPListener
Marek Safar [Fri, 14 Oct 2016 14:21:23 +0000 (16:21 +0200)]
[System] Use mono specific payload type for EndAccept of TCPListener

7 years agoMerge pull request #3763 from akoeplinger/move-type
Alexander Köplinger [Fri, 14 Oct 2016 14:17:39 +0000 (16:17 +0200)]
Merge pull request #3763 from akoeplinger/move-type

[System.ServiceModel] Move a few types into System.IdentityModel

7 years agoMerge pull request #3771 from henricm/enable-system-tests-on-windows
Niklas Therning [Fri, 14 Oct 2016 12:29:31 +0000 (14:29 +0200)]
Merge pull request #3771 from henricm/enable-system-tests-on-windows

Enable System tests for PR builds on Windows

7 years agoEnable System tests for PR builds on Windows
Henric Müller [Fri, 14 Oct 2016 08:09:25 +0000 (10:09 +0200)]
Enable System tests for PR builds on Windows

7 years ago[System.Xml] Update supported time formats for mobile version of XML deserializer...
Marek Safar [Thu, 13 Oct 2016 21:58:18 +0000 (23:58 +0200)]
[System.Xml] Update supported time formats for mobile version of XML deserializer. Fixes #42843

7 years ago[System.Xml] Enable more tests
Marek Safar [Thu, 13 Oct 2016 21:53:32 +0000 (23:53 +0200)]
[System.Xml] Enable more tests

7 years agoMerge pull request #3756 from henricm/named-pipe-alertable-on-windows
Henric Müller [Fri, 14 Oct 2016 06:48:39 +0000 (08:48 +0200)]
Merge pull request #3756 from henricm/named-pipe-alertable-on-windows

Making named pipe connects alertable on Windows

7 years agoMerge pull request #3766 from BrzVlad/feature-default-conc
Vlad Brezae [Thu, 13 Oct 2016 22:35:49 +0000 (01:35 +0300)]
Merge pull request #3766 from BrzVlad/feature-default-conc

[sgen] Switch to default concurrent on desktop

7 years agoMerge pull request #3761 from kumpera/fix-maccore-linking-regression
Rodrigo Kumpera [Thu, 13 Oct 2016 18:24:48 +0000 (14:24 -0400)]
Merge pull request #3761 from kumpera/fix-maccore-linking-regression

[icalls] Change get_bundled_machine_config to ICALL_EXPORT so maccore can link it.

7 years agoMerge pull request #3716 from vargaz/unbox-stobj-null
Rodrigo Kumpera [Thu, 13 Oct 2016 18:00:58 +0000 (14:00 -0400)]
Merge pull request #3716 from vargaz/unbox-stobj-null

[jit] Add a small optimization for unbox.any+stobj called with a null…

7 years ago[System] SocketAsyncEventArgs::Dispose does not free any managed resources. Fixes...
Marek Safar [Thu, 13 Oct 2016 14:43:38 +0000 (16:43 +0200)]
[System] SocketAsyncEventArgs::Dispose does not free any managed resources. Fixes #44757

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 ago[tests] Select sgen major explicitly in tests
Vlad Brezae [Thu, 13 Oct 2016 14:06:59 +0000 (17:06 +0300)]
[tests] Select sgen major explicitly in tests

On configurations where we were only testing serial (using the default collector), we now explicitly test concurrent to put emphasis on it.

7 years ago[sgen] Enable concurrent gc by default on desktop
Vlad Brezae [Thu, 13 Oct 2016 13:53:02 +0000 (16:53 +0300)]
[sgen] Enable concurrent gc by default on desktop

Linux (except android), MacOS and Windows.

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 ago[icalls] Multiple fixes to get_bundled_machine_config.
Rodrigo Kumpera [Wed, 12 Oct 2016 15:50:19 +0000 (08:50 -0700)]
[icalls] Multiple fixes to get_bundled_machine_config.

Enviroment::get_bundled_machine_config icall should be ves_icall_System_Environment_get_bundled_machine_config.

Mark all icalls doing get_bundled_machine_config as ICALL_EXPORT so maccore can link them in/out.

7 years ago[System.ServiceModel] Move a few types into System.IdentityModel
Alexander Köplinger [Wed, 12 Oct 2016 21:18:30 +0000 (23:18 +0200)]
[System.ServiceModel] Move a few types into System.IdentityModel

They were moved there in MS.NET 4.5. Added typeforwards so existing references continue to work.

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

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 agoEnable System.Runtime.Remoting tests on Windows
Henric Müller [Wed, 12 Oct 2016 13:18:08 +0000 (15:18 +0200)]
Enable System.Runtime.Remoting tests on Windows

7 years agoMaking named pipe connects alertable on Windows
Henric Müller [Wed, 12 Oct 2016 13:04:10 +0000 (15:04 +0200)]
Making named pipe connects alertable on Windows

This fix makes sure that an aborted thread will wake up
a blocking named pipe connect.

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