mono.git
7 years agoMerge pull request #4716 from Unity-Technologies/eglib-msvc-targets
Johan Lorensson [Thu, 27 Apr 2017 12:50:30 +0000 (14:50 +0200)]
Merge pull request #4716 from Unity-Technologies/eglib-msvc-targets

Separate the eglib source and build instructions

7 years ago[simd] Add support for Vector.IsHardwareAccelerated in the System.Numerics.Vectors...
Zoltan Varga [Thu, 27 Apr 2017 12:19:46 +0000 (08:19 -0400)]
[simd] Add support for Vector.IsHardwareAccelerated in the System.Numerics.Vectors assembly as well. Fixes #55577. (#4762)

7 years ago[runtime] Add a variant of mono_string_new_wrapper () and use it from marshalling...
Zoltan Varga [Thu, 27 Apr 2017 08:46:48 +0000 (04:46 -0400)]
[runtime] Add a variant of mono_string_new_wrapper () and use it from marshalling code to avoid asserting when encountering invalid strings. (#4753)

7 years agoFixes build
Marek Safar [Thu, 27 Apr 2017 08:23:16 +0000 (10:23 +0200)]
Fixes build

7 years ago[Facades] Move more asseblies to Facades to support implicit reference for _._ like...
Marek Safar [Tue, 25 Apr 2017 21:07:57 +0000 (23:07 +0200)]
[Facades] Move more asseblies to Facades to support implicit reference for _._ like nugets and ignore version mismatch

7 years ago[System]: Fix bug #52508 in HttpListener when doing multiple Https request.
Martin Baulig [Wed, 26 Apr 2017 22:30:17 +0000 (18:30 -0400)]
[System]: Fix bug #52508 in HttpListener when doing multiple Https request.

Move the call to SslStream.AuthenticateAsServer() into the constructor because
we don't want to call it again when Init() is called from Close().

7 years agoRevert changes that I accidentally pushed on top of PR #4756.
Martin Baulig [Wed, 26 Apr 2017 21:20:49 +0000 (17:20 -0400)]
Revert changes that I accidentally pushed on top of PR #4756.

7 years ago[Mono.Security.Interface]: Improve synergy between `SslStream` and `IMonoSslStream...
Martin Baulig [Wed, 26 Apr 2017 21:15:37 +0000 (17:15 -0400)]
[Mono.Security.Interface]: Improve synergy between `SslStream` and `IMonoSslStream` (#4756)

* [Mono.Security.Interface]: Improve synergy between `MonoTlsProvider`, `SslStream` and `IMonoSslStream`.

* Add `IMonoSslStream.SslStream` property; the `IMonoSslStream` is now only created my the `SslStream`
  constructor, so `SslStream` "owns" the `IMonoSslStream`.

* Add internal `MonoTlsProvider.CreateSslStreamInternal()`.

* `SslStream` does not need to implement any additional interfaces; we can do without after
   getting rid of the wrapper classes.

* Add internal `SslStream.CreateMonoSslStream(Stream,bool,MonoTlsProvider,MonoTlsSettings)`.

* `MonoTlsProvider.CreateSslStream()` implementations should use this new method.

* Remove ancient obsolete MonoTlsProviderFactory APIs.

* `HttpListener` and `HttpConnection` now use `SslStream` instead of `IMonoSslStream`.

* [System]: Cleanup internal TLS Provider registration.

* Make it build.

7 years agoDefine HAVE_STRUCT_SOCKADDR_IN6 on Windows (#4755)
Joshua Peterson [Wed, 26 Apr 2017 18:25:53 +0000 (14:25 -0400)]
Define HAVE_STRUCT_SOCKADDR_IN6 on Windows (#4755)

This enables IPv6 support on Windows.

7 years ago[Mono.Security.Interface]: Add MonoTlsProviderFactory.GetMonoSslStream(HttpListenerCo...
Martin Baulig [Wed, 26 Apr 2017 14:29:36 +0000 (10:29 -0400)]
[Mono.Security.Interface]: Add MonoTlsProviderFactory.GetMonoSslStream(HttpListenerContext). (#4749)

* [System]: Cleanup 'SECURITY_DEP' conditionals in the internal TLS code.

* [System]: Remove 'Mono.Net.Security.IMonoSslStream'; use 'Mono.Security.Interface.IMonoSslStream' instead.

* [System]: Remove 'Mono.Net.Security.IMonoTlsProvider'; use 'Mono.Security.Interface.MonoTlsProvider' instead.

* [System]: Cleanup internal TLS code.

* [Mono.Security]: Add MonoTlsProviderFactory.GetSslStream(HttpListenerContext).

* [System]: `SslStream' should not implement any additional interfaces.

7 years agoMake changes as per review to make the code more thread safe.
Manuel de la Pena [Mon, 24 Apr 2017 20:46:14 +0000 (22:46 +0200)]
Make changes as per review to make the code more thread safe.

7 years agoEnsure that when an async read is performed on a response content the
Manuel de la Pena [Mon, 24 Apr 2017 11:22:05 +0000 (13:22 +0200)]
Ensure that when an async read is performed on a response content the
errors are correctly dealt with.

Some network errors in iOS are exposed as Stream errors, specially those
related with the lost of the connection. This patch ensures that if such
an issue happens an exception is raised in the async read task.

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

7 years agoMerge pull request #4730 from lambdageek/facades-and-bug-580
Aleksey Kliger (λgeek) [Tue, 25 Apr 2017 22:15:50 +0000 (18:15 -0400)]
Merge pull request #4730 from lambdageek/facades-and-bug-580

* Check strong names on a couple more codepaths during assembly loading.  Fixes [bugzilla #580](https://bugzilla.xamarin.com/show_bug.cgi?id=580) and [bugzilla #55436](https://bugzilla.xamarin.com/show_bug.cgi?id=55436)
* Add `--apply-bindings=FILE` option.  Allows us to specify a configuration file for assembly binding redirections when AOTing.
* Use the above flag when AOTing `System.ReflectionMetadata.dll` to pick up `csc.exe.config`
* Add all the Facades to the `framework_assemblies` list in the runtime.  Facade and non-Facade framework assemblies behave differently:
  * for Facades, don't do any version remapping, and any version is okay.
  * for non-Facades, consult the version map to remap depdending on the --runtime used.

7 years agoMerge pull request #4745 from xmcclure/ipv6-cleanup
Andi McClure [Tue, 25 Apr 2017 20:52:46 +0000 (16:52 -0400)]
Merge pull request #4745 from xmcclure/ipv6-cleanup

Fix some style issues introduced by PR#4720

7 years ago[man] Document --apply-bindings=FILE option
Aleksey Kliger [Tue, 25 Apr 2017 19:24:33 +0000 (15:24 -0400)]
[man] Document --apply-bindings=FILE option

7 years ago[assembly] Add Facades dir to default_path on all runtimes
Aleksey Kliger [Mon, 24 Apr 2017 17:48:38 +0000 (13:48 -0400)]
[assembly] Add Facades dir to default_path on all runtimes

Previous it was just the desktop runtime, but now that we have special handling
for framework facade assemblies in the loader, we should do it on other
runtimes, too.

7 years ago[roslyn] Pass --apply-bindings=$(csc_exe).config when AOT-ing System.Reflection.Metadata
Aleksey Kliger [Fri, 21 Apr 2017 20:10:04 +0000 (16:10 -0400)]
[roslyn] Pass --apply-bindings=$(csc_exe).config when AOT-ing System.Reflection.Metadata

To pick up assembly binding redirections from csc.exe.config

7 years ago[assembly] Add Facades to framework_assemblies list
Aleksey Kliger [Fri, 21 Apr 2017 20:09:32 +0000 (16:09 -0400)]
[assembly] Add Facades to framework_assemblies list

7 years ago[assembly] When loading framework facade assemblies, any version is ok in mono_assemb...
Aleksey Kliger [Fri, 21 Apr 2017 20:07:04 +0000 (16:07 -0400)]
[assembly] When loading framework facade assemblies, any version is ok in mono_assembly_candidate_predicate_sn_same_name

As long as the name and public key token matches.

This is different from the non-facade framework assemblies for which the
name and version must match but the public key token is ignored.

7 years ago[assembly] add ANAME_EQ_IGNORE_VERSION flag to assembly_names_equal_flags()
Aleksey Kliger [Fri, 21 Apr 2017 20:06:23 +0000 (16:06 -0400)]
[assembly] add ANAME_EQ_IGNORE_VERSION flag to assembly_names_equal_flags()

7 years ago[aot] Add --apply-bindings=FILE option
Aleksey Kliger [Fri, 21 Apr 2017 20:04:34 +0000 (16:04 -0400)]
[aot] Add --apply-bindings=FILE option

Apply bindings from configuration file FILE when running the AOT compiler.

This is useful if you need to AOT a module bar.dll that is loaded when the main
assembly foo.exe has a configuration file foo.exe.config that specifies
assembly bindings that bar.dll should respect.

7 years ago[domain] Factor out mono_domain_parse_assembly_bindings
Aleksey Kliger [Tue, 25 Apr 2017 18:03:03 +0000 (14:03 -0400)]
[domain] Factor out mono_domain_parse_assembly_bindings

Move to a separate function the code that parses assembly bindings from a configuration file.

7 years ago[msvc] Update csproj files
monojenkins [Tue, 25 Apr 2017 16:18:02 +0000 (16:18 +0000)]
[msvc] Update csproj files

7 years agoRemove unused facade
Marek Safar [Tue, 25 Apr 2017 16:00:41 +0000 (18:00 +0200)]
Remove unused facade

7 years agoMake the filters file match the targets files
Josh Peterson [Tue, 25 Apr 2017 15:58:23 +0000 (11:58 -0400)]
Make the filters file match the targets files

* Create one filters file for each targets file
* Import each filters file into the project-level filters file
* Add folders for Common, Win32, and Posix targets files

7 years ago[loader] Pass sn_same_name predicate when loading from basedir and from default_path...
Aleksey Kliger [Thu, 13 Apr 2017 18:40:34 +0000 (14:40 -0400)]
[loader] Pass sn_same_name predicate when loading from basedir and from default_path, too.

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

7 years ago[System.Diagnostics.Tracing] Don't generate empty debyg symbols
Marek Safar [Tue, 25 Apr 2017 11:41:01 +0000 (13:41 +0200)]
[System.Diagnostics.Tracing] Don't generate empty debyg symbols

7 years ago[System.Data.Common] Add IDbColumnSchemaGenerator
Marek Safar [Tue, 25 Apr 2017 11:40:28 +0000 (13:40 +0200)]
[System.Data.Common] Add IDbColumnSchemaGenerator

7 years ago[Facades] Don't build debug symbols for System.Net.Sockets
Marek Safar [Tue, 25 Apr 2017 11:33:29 +0000 (13:33 +0200)]
[Facades] Don't build debug symbols for System.Net.Sockets

7 years agoFix some style issues introduced by PR#4720
Andi McClure [Tue, 25 Apr 2017 14:31:07 +0000 (10:31 -0400)]
Fix some style issues introduced by PR#4720

Existing code in this file mixing ifdefs with if {} else {} places the ifdef after the } but before the else.

7 years agoMerge pull request #4720 from Unity-Technologies/config-checks-ipv6
Andi McClure [Tue, 25 Apr 2017 14:20:18 +0000 (10:20 -0400)]
Merge pull request #4720 from Unity-Technologies/config-checks-ipv6

Add autoconf checks for platforms without IPv6

7 years agoMerge branch 'master' into config-checks-ipv6
Joshua Peterson [Tue, 25 Apr 2017 13:28:15 +0000 (09:28 -0400)]
Merge branch 'master' into config-checks-ipv6

7 years ago[jit] Remove some debug spew.
Zoltan Varga [Tue, 25 Apr 2017 09:10:08 +0000 (05:10 -0400)]
[jit] Remove some debug spew.

7 years agoBump corefx
Marek Safar [Mon, 24 Apr 2017 14:46:13 +0000 (16:46 +0200)]
Bump corefx

7 years ago[runtime] Add explicit (float) casts to test_0_float_precision () to make the test...
Zoltan Varga [Mon, 24 Apr 2017 23:13:04 +0000 (19:13 -0400)]
[runtime] Add explicit (float) casts to test_0_float_precision () to make the test work when compiled with csc /O.

7 years agoMerge pull request #4710 from Unity-Technologies/additional-config-checks
Andi McClure [Mon, 24 Apr 2017 20:23:52 +0000 (16:23 -0400)]
Merge pull request #4710 from Unity-Technologies/additional-config-checks

Add #ifdef checks for code that might not exist

7 years ago[build] Fixes setup for libraries without sources
Marek Safar [Mon, 24 Apr 2017 13:05:01 +0000 (15:05 +0200)]
[build] Fixes setup for libraries without sources

7 years ago[msvc] Update csproj files (#4740)
monojenkins [Mon, 24 Apr 2017 16:31:11 +0000 (18:31 +0200)]
[msvc] Update csproj files (#4740)

7 years ago[cil-stripper] Mark stripped methods as noinline to prevent the JIT from trying to...
Zoltan Varga [Mon, 24 Apr 2017 16:21:27 +0000 (12:21 -0400)]
[cil-stripper] Mark stripped methods as noinline to prevent the JIT from trying to inline them. Fixes #55041. (#4732)

7 years agoMerge pull request #4727 from BrzVlad/fix-xamarin-studio
Vlad Brezae [Mon, 24 Apr 2017 15:37:00 +0000 (18:37 +0300)]
Merge pull request #4727 from BrzVlad/fix-xamarin-studio

[metadata] Fix special static field access

7 years ago[Facades] Use Open.snk for netstandard.dll
Alexander Köplinger [Mon, 24 Apr 2017 14:24:49 +0000 (16:24 +0200)]
[Facades] Use Open.snk for netstandard.dll

We were using the wrong key since dotnet/standard switched to using the new Open key.

7 years agoSeparate the eglib source and build instructions
Josh Peterson [Tue, 18 Apr 2017 18:17:10 +0000 (14:17 -0400)]
Separate the eglib source and build instructions

This change extracts the eglib source files from the build instuctions
for builds via MSVC on Windows. It also separates the source files into
platform-specific and common .targets files. This provides more
flexibility for builds from MSVC in a few important ways:

1. We can do MSVC-based builds for platforms that will not be pushed to
public repos by checking out the Mono code externally and importing the
.targets files into a custom .vcxproj for the platform.
2. We can replace the platform specific .targets files with a custom set
of source files to implement a different platform abstraction layer
that will not be public without the need to merge changes to the
.vcxproj from the public repo.

This allows for ease of synchronizing changes to the public Mono
repo with private forks, while _not_ changing the behavior of the code
in the public repo.

7 years ago[System] UriBuilder from corefx
Marek Safar [Fri, 21 Apr 2017 12:08:22 +0000 (14:08 +0200)]
[System] UriBuilder from corefx

7 years agoBump Roslyn to 2.1
Marek Safar [Mon, 24 Apr 2017 07:29:01 +0000 (09:29 +0200)]
Bump Roslyn to 2.1

7 years ago[corlib] Use AppContextSwitches implementation from RS. Fixes #54448 (#4682)
Rodrigo Kumpera [Mon, 24 Apr 2017 08:20:20 +0000 (01:20 -0700)]
[corlib] Use AppContextSwitches implementation from RS. Fixes #54448 (#4682)

7 years agoMake the loading of llvm EH info async safe. (#4725)
Zoltan Varga [Sun, 23 Apr 2017 23:16:49 +0000 (19:16 -0400)]
Make the loading of llvm EH info async safe. (#4725)

* [aot] Emit class references in EH info in such as way that they can be skipped when reading them in async context.

* [aot] Rewrite the LLVM EH info loading code by moving allocations to callers so the lower level code is async safe.

* [aot] Make the memory allocation in the loading of llvm EH info async safe. Remove fields from MonoLLVMFDEInfo which are passed as parameters.

* [runtime] Add the ability to store the unwind info address/length in the MonoJitInfo structure instead of referencing it using the 'unwind_info' field.

* [aot] Make the loading of llvm EH information async safe.

7 years ago[mdoc] Integrate api-doc-tools version
Marek Safar [Sat, 22 Apr 2017 08:25:38 +0000 (10:25 +0200)]
[mdoc] Integrate api-doc-tools version

7 years ago[runtime] Disable some tests in full-aot mode which cannot be AOTed because of type...
Zoltan Varga [Sat, 22 Apr 2017 23:06:36 +0000 (19:06 -0400)]
[runtime] Disable some tests in full-aot mode which cannot be AOTed because of type loading errors.

7 years ago[metadata] Lock around special static fields hash access
Vlad Brezae [Thu, 20 Apr 2017 12:01:30 +0000 (15:01 +0300)]
[metadata] Lock around special static fields hash access

If a type is loaded in another thread, the fields hash can get resized, leading to failure.

7 years ago[amd64] Make inline function in header static
Vlad Brezae [Thu, 20 Apr 2017 11:22:41 +0000 (14:22 +0300)]
[amd64] Make inline function in header static

This was actually failing the osx build for me, probably due to symbol conflicts.

7 years ago[metadata] Don't use static_data_array
Vlad Brezae [Thu, 20 Apr 2017 11:19:47 +0000 (14:19 +0300)]
[metadata] Don't use static_data_array

Memory allocated with mono_gc_alloc_fixed is uncollectable both on sgen and boehm. This array serves no other purpose. It should probably be killed entirely, but it's part of the API.

7 years agoMerge pull request #4701 from kumpera/jit_improvements
Rodrigo Kumpera [Fri, 21 Apr 2017 21:03:35 +0000 (17:03 -0400)]
Merge pull request #4701 from kumpera/jit_improvements

[JIT] Last two optimizations to Roslyn.

7 years agoMerge pull request #4723 from lambdageek/bug-54485
Aleksey Kliger (λgeek) [Fri, 21 Apr 2017 20:26:39 +0000 (16:26 -0400)]
Merge pull request #4723 from lambdageek/bug-54485

[metadata] expand uninstantiated generic type definitions used as generic type args

7 years ago[metadata] If a GTD appears uninstantiated in a generic instantiation argument,
Aleksey Kliger [Thu, 20 Apr 2017 22:54:40 +0000 (18:54 -0400)]
[metadata] If a GTD appears uninstantiated in a generic instantiation argument,
replace it by its canonical open instantiation.

If we have
```
  class Foo<A,B,C> { ... }
  class Bar<T,U> { ... }
```

Then if someone tries to construct `Bar<Foo, int>` (or more precisely, the
MonoGenericInst corresponding to `<Foo, int>` instead return `Bar< Foo<A,B,C>, int >`.

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

7 years ago[metadata] Add a canonical_inst MonoType to MonoClassGtd
Aleksey Kliger [Thu, 20 Apr 2017 22:52:40 +0000 (18:52 -0400)]
[metadata] Add a canonical_inst MonoType to MonoClassGtd

The canonical instantiation of a generic type definition is the open
instantiation where the GTD is applied to its own generic parameters in order.

Suppose we have `class T<A,B> { ... }` then the canonical instantiation is just "T<A,B>".

7 years ago[Mono.Options] CommandSet and PCL/NetStandard Support (#4719)
Matthew Leibowitz [Thu, 20 Apr 2017 20:28:05 +0000 (22:28 +0200)]
[Mono.Options] CommandSet and PCL/NetStandard Support (#4719)

When `PCL` is defined, the intent is that the resulting
`Mono.Options.dll` assembly will be usable on all PCL profiles.
This includes "silly" profiles such as Profile259, which lacks the
`System.Console` type, meaning e.g. `Console.Out` doesn't exist.

Unfortunately, the
`CommandSet(string, Converter<string, string, TextWriter, TextWriter)`
constructor would use `Console.Out` and `Console.Error` when the
`TextWriter` parameters were `null`, meaning this constructor can't
be provided for all PCL profiles.

Altering the constructor to instead use `TextWriter.Null` would allow
the constructor to be provided, but would be a *worse* experience,
IMHO: anybody (everybody!) expecting the default values to
"do something useful" will be sorely disappointed, as output and
error messages would instead be dropped. :-(

Instead, remove this constructor:

public CommandSet (string suite, MessageLocalizerConverter localizer = null, TextWriter output = null, TextWriter error = null);

and replace it with these *two* constructors:

public CommandSet (string suite, MessageLocalizerConverter localizer = null)
public CommandSet (string suite, TextWriter output, TextWriter error, MessageLocalizerConverter localizer = null)

The first constructor, which accepts no `TextWriter` parameters, is
only provided in non-PCL builds, allowing it to use `Console.Out`.

The second constructor is available in PCL profiles, and *requires*
that `output` and `error` be non-`null`.

Documentation has been updated accordingly.

7 years ago[tests] System.Type.MakeGenericType with a GTD as argument
Aleksey Kliger [Wed, 19 Apr 2017 20:20:20 +0000 (16:20 -0400)]
[tests] System.Type.MakeGenericType with a GTD as argument

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=54485

7 years agoMerge pull request #4722 from alexanderkyte/checked_after
Alexander Kyte [Wed, 19 Apr 2017 19:47:14 +0000 (15:47 -0400)]
Merge pull request #4722 from alexanderkyte/checked_after

[scripts] Don't build in checked mode

7 years agoFix README.md to show correct values for --with-libgc
Alexander Köplinger [Wed, 19 Apr 2017 19:18:43 +0000 (21:18 +0200)]
Fix README.md to show correct values for --with-libgc

External boehm is no longer supported.

7 years ago[corlib/System.Data] Test fixes for xammac 4.5 and watchos
Alexander Köplinger [Wed, 19 Apr 2017 19:04:47 +0000 (21:04 +0200)]
[corlib/System.Data] Test fixes for xammac 4.5 and watchos

The TrimSpecial() method and Windows-specific code was removed from
xammac 4.5 so reflection can't find it anymore, handle this case.

Also add a workaround for SqlParameterCollectionTest.CopyToTest()
which fails on watchos since the SqlCommand would throw a PNSE.
It's a workaround because it just makes the test ignored since we don't
set the env var that ConnectionManager.Instance.Sql reads in XI tests,
but it makes the test consistent with the other tests in the suite.
We should fix this properly later on.

7 years agoAdd #ifdef checks for code that might not exist
Josh Peterson [Tue, 18 Apr 2017 15:14:00 +0000 (11:14 -0400)]
Add #ifdef checks for code that might not exist

* Some platforms don't support these features, so guard them.
* For platforms that do support them, no changes should occur.

7 years ago[msvc] Update csproj files
monojenkins [Wed, 19 Apr 2017 16:22:02 +0000 (16:22 +0000)]
[msvc] Update csproj files

7 years ago[scripts] Don't build in checked mode
Alexander Kyte [Wed, 19 Apr 2017 16:57:51 +0000 (12:57 -0400)]
[scripts] Don't build in checked mode

7 years agoAdd autoconf checks for platforms without IPv6
Josh Peterson [Wed, 19 Apr 2017 15:11:21 +0000 (11:11 -0400)]
Add autoconf checks for platforms without IPv6

* There is an existing check for the `sockaddr_in6` struct.
* Use it to wrap code that implements IPv6.
* This makes porting to platforms that don't support IPv6 easier.
* It should have no impact on platforms that do support IPv6.

7 years ago[System.Data] Call SqlConnection.ClearAllPools() only when we had a connection
Alexander Köplinger [Wed, 19 Apr 2017 12:40:10 +0000 (14:40 +0200)]
[System.Data] Call SqlConnection.ClearAllPools() only when we had a connection

When ConnectionManager.Instance.Sql.ConnectionString throws in
SetUp() we'd still call SqlConnection.ClearAllPools() in the TearDown()
which happens for example when the connection string environment
variable is not set.

This is a problem on WatchOS since SqlConnection.ClearAllPools()
throws PlatformNotSupportedException there, making the tests fail.
Instead we now check whether the connectionString is set and only
call the method in that case.

7 years agoBump cecil
Marek Safar [Wed, 19 Apr 2017 09:59:07 +0000 (11:59 +0200)]
Bump cecil

7 years agoFix RemoteEndpoint with async+DualMode (#4717)
Mikayla Hutchinson [Wed, 19 Apr 2017 09:48:41 +0000 (05:48 -0400)]
Fix RemoteEndpoint with async+DualMode (#4717)

7 years ago[Mono.CSharp] Fixes parallel build
Marek Safar [Tue, 18 Apr 2017 18:08:41 +0000 (20:08 +0200)]
[Mono.CSharp] Fixes parallel build

7 years ago[runtime] Shadow copy the .pdb files as well. Fixes #55095. (#4715)
Zoltan Varga [Wed, 19 Apr 2017 02:31:14 +0000 (22:31 -0400)]
[runtime] Shadow copy the .pdb files as well. Fixes #55095. (#4715)

7 years ago[System] Don't include AlsaDevice on xammac_net_4_5
Alexander Köplinger [Tue, 18 Apr 2017 21:09:42 +0000 (23:09 +0200)]
[System] Don't include AlsaDevice on xammac_net_4_5

(cherry picked from commit 79ad720d5d6a595672012535116246920d32fba1)

7 years ago[runtime] Forgot to update strelemref_wrapper_name with the new wrapper type.
Rodrigo Kumpera [Tue, 18 Apr 2017 20:05:22 +0000 (13:05 -0700)]
[runtime] Forgot to update strelemref_wrapper_name with the new wrapper type.

7 years ago[Mono.CSharp] Fixes parallel build
Marek Safar [Tue, 18 Apr 2017 15:49:53 +0000 (17:49 +0200)]
[Mono.CSharp] Fixes parallel build

7 years agoMerge pull request #4708 from xmcclure/orbis-system-net
Andi McClure [Tue, 18 Apr 2017 18:05:16 +0000 (14:05 -0400)]
Merge pull request #4708 from xmcclure/orbis-system-net

Minor orbis fix in System.Net

7 years ago[jit] Disable handler block trampolines+aot support on ios, it does an async stack...
Zoltan Varga [Tue, 18 Apr 2017 18:03:55 +0000 (14:03 -0400)]
[jit] Disable handler block trampolines+aot support on ios, it does an async stack walk, and the eh info for llvm compiled methods cannot be loaded in async context currently. Works around #54658. (#4713)

7 years ago[configure] Fix docs for --with-libgc option (#4707)
Alexander Köplinger [Tue, 18 Apr 2017 17:41:13 +0000 (19:41 +0200)]
[configure] Fix docs for --with-libgc option (#4707)

It was renamed from --with-gc to --with-libgc in 66ca91f10b0fdd61824e318f659b807cbf45aef3,
but a few places were missed.

7 years ago[msvc] Update csproj files (#4711)
monojenkins [Tue, 18 Apr 2017 17:20:51 +0000 (19:20 +0200)]
[msvc] Update csproj files (#4711)

7 years agoMerge pull request #4712 from alexanderkyte/master-circular-fix
Alexander Kyte [Tue, 18 Apr 2017 17:01:27 +0000 (13:01 -0400)]
Merge pull request #4712 from alexanderkyte/master-circular-fix

[runtime] Fix circular types in SRE

7 years ago[runtime] Handle circular references in SRE types
Alexander Kyte [Wed, 12 Apr 2017 16:25:18 +0000 (12:25 -0400)]
[runtime] Handle circular references in SRE types

We previously recursed through the entire directed cyclic graph
of the type passed to SRE. When given a (legal) circular type reference,
we encountered stack overflows. This was particularly easy to trigger
with fsharpi and with FAKE.

By creating everything about the type before searching for the parent,
and by defering all type hierarchy establishment until the type must be
surfaced to manage code, we tease out the data dependencies caught up in
the cycle.

Note the bounded lifetime of the unmanaged object hidden in the SRE
module, which acts as a global reference for all types reachable from
the TypeBuilder passed to the runtime through the icall.

7 years ago[runtime] Test circular references in SRE
Alexander Kyte [Thu, 13 Apr 2017 17:03:19 +0000 (13:03 -0400)]
[runtime] Test circular references in SRE

7 years agoMinor orbis fix in System.Net
Andi McClure [Mon, 17 Apr 2017 21:50:56 +0000 (17:50 -0400)]
Minor orbis fix in System.Net

7 years agoBump nuget-buildtasks
Alexander Köplinger [Tue, 18 Apr 2017 11:51:39 +0000 (13:51 +0200)]
Bump nuget-buildtasks

7 years ago[runtime] Blacklist System.Threading.Overlapped nugets
Marek Safar [Tue, 18 Apr 2017 11:48:31 +0000 (13:48 +0200)]
[runtime] Blacklist System.Threading.Overlapped nugets

7 years agoUpdate nuget-buildtasks from upstream's `dev15.1` branch (#4703)
Ankit Jain [Tue, 18 Apr 2017 11:17:07 +0000 (07:17 -0400)]
Update nuget-buildtasks from upstream's `dev15.1` branch (#4703)

* Update nuget-buildtasks from upstream's `dev15.1` branch

dev15.1 branch + fixup import paths

This was prompted by needing to support nuget restore for projects with
`PackageReference`.

* [nuget] Bump reference to NuGet.BuildTasks to pick up a build fix

7 years agoRemove the use of ExpectedException in Mono.Posix Tests (#4698)
Bill Holmes [Tue, 18 Apr 2017 10:59:56 +0000 (06:59 -0400)]
Remove the use of ExpectedException in Mono.Posix Tests (#4698)

* Remove the use of ExpectedException in Mono.Posix Tests

ExpectedException is not available in later versions of
NUnit.  To test the NetCore 2.0 version of Mono.Posix I
need a newer version of NUnit that does not contain ExpectedException.

Using Assert.Throws should be equivalent.

* Mono.Posix Tests move CanUseRealTimeSignals checks

Moving the CanUseRealTimeSignals check outside of the
Assert.Throws callback function.

This is a change in test behavior requested by @akoeplinger
in the PR review.

* Fixing Mono.Posix.UnixSignalTest.TestSignumPropertyThrows

This test throws InvalidOperationException and we need to check
for that in the Assert.Throws type.

7 years agoAdd System.Net.Http 4.3.1 to blacklist
Mikayla Hutchinson [Tue, 18 Apr 2017 02:05:04 +0000 (22:05 -0400)]
Add System.Net.Http 4.3.1 to blacklist

7 years ago[corlib] Fixes static builds (#4687)
Marek Safar [Tue, 18 Apr 2017 08:03:29 +0000 (10:03 +0200)]
[corlib] Fixes static builds (#4687)

* [corlib] Fixes static builds

7 years agoPlace break inside if block
Julius Vitkauskas [Fri, 14 Apr 2017 20:44:05 +0000 (23:44 +0300)]
Place break inside if block

7 years agoBug 55148 - Debugger checks type which is possibly never used (#4690)
David Karlaš [Tue, 18 Apr 2017 05:35:23 +0000 (07:35 +0200)]
Bug 55148 - Debugger checks type which is possibly never used (#4690)

7 years ago[JIT/GC] Optimize mono_gc_wbarrier_value_copy_bitmap.
Rodrigo Kumpera [Mon, 17 Apr 2017 22:51:33 +0000 (15:51 -0700)]
[JIT/GC] Optimize mono_gc_wbarrier_value_copy_bitmap.

mono_gc_wbarrier_value_copy_bitmap shown up when profiling Roslyn and this PR applies the following set of optimizations to it:

- Drop the bitmap, the extra branch in the loop costs more than the extra cardtable store itself
- Rename it to mono_gc_wbarrier_range_copy to reflect its new meaning
- Remove the JIT wrapper, this function doesn't need it
- Use mono_gc_get_range_copy_func as a way to punch through all layers and get the actual implementation
- Move the implementation to sgen-cardtable.c where everything can be inlined
- Exploit the fact we only need to mark the first card of a given range and thus we can hoist the address calculation outside of the loop

All of this speeds up a microbenchmark by 2x and Roslyn wallclock by around 2%.

7 years ago[runtime] Optimize virtual_stelemref for classes even further.
Rodrigo Kumpera [Thu, 13 Apr 2017 18:59:12 +0000 (11:59 -0700)]
[runtime] Optimize virtual_stelemref for classes even further.

This optimization exploits the fact that if the element type idepth is <= MONO_DEFAULT_SUPERTABLE_SIZE we can skip the idepth check.

This improves an array store only benchmark by 11%.

On Roslyn, all arrays falls into this case.

7 years ago[w32error] Fix g_error args in mono_w32error_unix_to_win32
Aleksey Kliger [Mon, 17 Apr 2017 14:53:36 +0000 (10:53 -0400)]
[w32error] Fix g_error args in mono_w32error_unix_to_win32

7 years agoEmpty commit to force a wrench build
Ankit Jain [Sat, 15 Apr 2017 01:48:02 +0000 (21:48 -0400)]
Empty commit to force a wrench build

7 years agoMerge pull request #4569 from lambdageek/dev-coop-handles-march
Aleksey Kliger (λgeek) [Fri, 14 Apr 2017 19:30:53 +0000 (15:30 -0400)]
Merge pull request #4569 from lambdageek/dev-coop-handles-march

Misc coop handles work

7 years ago[appletls]: Disable the new keychain code on XI. (#4695)
Martin Baulig [Fri, 14 Apr 2017 18:50:36 +0000 (14:50 -0400)]
[appletls]: Disable the new keychain code on XI. (#4695)

(cherry picked from commit b6255d35cd224bc2ed63e52689fc336c31e63a34)

7 years ago[WebConnection] Fix race condition between Close and BeginWrite (#4693)
Ludovic Henry [Fri, 14 Apr 2017 18:51:42 +0000 (14:51 -0400)]
[WebConnection] Fix race condition between Close and BeginWrite (#4693)

* [WebConnection] Make ReadDone and InitRead instance methods to avoid passing cnc around

* [WebConnection] Inline only call to InitConnection

* [WebConnection] Fix race condition between Close and BeginWrite

7 years ago[msvc] Update csproj files (#4696)
monojenkins [Fri, 14 Apr 2017 17:12:35 +0000 (19:12 +0200)]
[msvc] Update csproj files (#4696)

7 years ago[custom-attrs] Use coop handles for mono_reflection_get_custom_attrs_info_checked
Aleksey Kliger [Thu, 23 Mar 2017 21:36:19 +0000 (17:36 -0400)]
[custom-attrs] Use coop handles for mono_reflection_get_custom_attrs_info_checked

* use handles in icalls
  - ves_icall_MonoCustomAttrs_GetCustomAttributesDataInternal
  - ves_icall_MonoCustomAttrs_GetCustomAttributesInternal

7 years ago[reflection] Move mono_reflection_type_get_handle to sre-internals.h
Aleksey Kliger [Thu, 23 Mar 2017 20:09:59 +0000 (16:09 -0400)]
[reflection] Move mono_reflection_type_get_handle to sre-internals.h

It's basically deprecated and only use in reflection until reflection is
converted to use handles.

7 years ago[custom-attrs] Rename custom_attrs_defined_internal to ves_icall_MonoCustomAttrs_IsDe...
Aleksey Kliger [Thu, 23 Mar 2017 19:35:57 +0000 (15:35 -0400)]
[custom-attrs] Rename custom_attrs_defined_internal to ves_icall_MonoCustomAttrs_IsDefinedInternal

and use coop handles.

7 years ago[remoting] Use coop handles for S.R.Remoting.Contexts.Context.{Register,Release}Context
Aleksey Kliger [Wed, 22 Mar 2017 15:54:26 +0000 (11:54 -0400)]
[remoting] Use coop handles for S.R.Remoting.Contexts.Context.{Register,Release}Context

* ves_icall_System_Runtime_Remoting_Contexts_Context_RegisterContext
* ves_icall_System_Runtime_Remoting_Contexts_Context_ReleaseContext

Added new mono_threads_{register,release}_app_context to be used internally in
the runtime.