mono.git
7 years ago[BTLS]: Add the native BTLS sources.
Martin Baulig [Fri, 30 Sep 2016 09:46:46 +0000 (11:46 +0200)]
[BTLS]: Add the native BTLS sources.

7 years agoMerge pull request #3663 from lateralusX/jlorenss/win-api-family-support-libgcmonosgen
Johan Lorensson [Fri, 30 Sep 2016 09:40:53 +0000 (11:40 +0200)]
Merge pull request #3663 from lateralusX/jlorenss/win-api-family-support-libgcmonosgen

Build libgcmonosgen under none desktop Windows API family.

7 years agoBuild libgcmonosgen under none desktop Windows API family.
lateralusX [Fri, 30 Sep 2016 06:48:00 +0000 (08:48 +0200)]
Build libgcmonosgen under none desktop Windows API family.

Initial work to build libgcmonosgen under none desktop Windows API families.
Changes are mainly related to header files included by libgcmonosgen sources and shared
by other libraries.

7 years agoSre cleanup9 (#3661)
Zoltan Varga [Fri, 30 Sep 2016 03:53:22 +0000 (23:53 -0400)]
Sre cleanup9 (#3661)

* [SRE] Assign pseudo tokens to SRE objects in the BCL instead of doing it in the runtime.

Real tokens are assigned after the dynamic types they depend on have been created, by creating the corresponding finished reflection object
(i.e. a MonoMethod for a MethodOnTypeBuilderInst etc.) and obtaining its token.
In Save mode, this is done in ModuleBuilder.Save ().
In Run mode, this is done on-demand when the JIT tries to resolve a token into its corresponding metadata object, by the runtime calling
the RuntimeResolve () method on the builder object.

* [SRE] Remove dead code.

* [SRE] Remove the MonoGenericMethod/MonoGenericCMethod classes, they have not needed.

* [SRE] Delay the creation of MonoClass-es for MonoGenericClass/GenericTypeParameterBuilder/SymbolType until its needed.

* [SRE] Small code cleanup.

* [SRE] Remove the TypeBuilder.IsGenericParameter () icall, it should return false.

* [SRE] Unify the calling of the various RuntimeResolve () methods by adding a RuntimeResolve () method to ModuleBuilder, and calling that from native code.

* [SRE] Remove unused TypeBuilder::get_event_info () icall.

* [SRE] Remove more unused/empty icalls.

7 years ago[Mono.Security]: Cleanup the MonoTlsProvider's certificate validation code. (#3674)
Martin Baulig [Thu, 29 Sep 2016 20:47:28 +0000 (22:47 +0200)]
[Mono.Security]: Cleanup the MonoTlsProvider's certificate validation code. (#3674)

* [Mono.Security]: Remove Mono.Security.Interface.IMonoTlsContext.

This interface is not actually used anywhere anymore, so we can also
just get rid of it.

* [System]: Removed unused private TLS classes.

* [Mono.Security]: Cleanup the MonoTlsProvider's certificate validation code.

Each TLS Provider now has its own certificate validator and there is no
automatic fallback anymore.  We only have three different TLS Providers,
"legacy", "appletls" and "btls" - and legacy is the only one which used
the managed validator.  Both AppleTls and BTLS provider their own validator,
which invokes some native API.

All of the following were internal APIs.

* MonoTlsProvider.HasCustomSystemCertificateValidator has been removed.

* MonoTlsProvider.InvokeSystemCertificateValidator() has been renamed
  into ValidateCertificate() and is now abstract.

(cherry picked from commit 63c0803b2b60ccf50cc16ae93cc70443ccf364f2)

7 years ago[mcs] Branch visited labels cache for conditional block. Fixes #44751
Marek Safar [Thu, 29 Sep 2016 20:34:52 +0000 (22:34 +0200)]
[mcs] Branch visited labels cache for conditional block. Fixes #44751

7 years ago[mkbundle] Add diagnostics, fix crash, fix registered path to match runtime name...
Miguel de Icaza [Thu, 29 Sep 2016 19:13:41 +0000 (15:13 -0400)]
[mkbundle] Add diagnostics, fix crash, fix registered path to match runtime name on embedded MonoImages (#3669)

7 years agoMerge pull request #3670 from lambdageek/dev/mempool-loader-error-msg
Aleksey Kliger (λgeek) [Thu, 29 Sep 2016 18:10:52 +0000 (14:10 -0400)]
Merge pull request #3670 from lambdageek/dev/mempool-loader-error-msg

[loader] Store MONO_EXCEPTION_TYPE_LOAD error strings in mempools

7 years agoComparing pid instead of handles in GetModules_internal (#3575)
Henric Müller [Thu, 29 Sep 2016 15:19:43 +0000 (17:19 +0200)]
Comparing pid instead of handles in GetModules_internal (#3575)

Process handles can be different for same process id.
Therefore make sure we compare the process ids instead.

7 years agoMerge pull request #3671 from rolfbjarne/pr-fix-system-tests
Niklas Therning [Thu, 29 Sep 2016 11:25:07 +0000 (13:25 +0200)]
Merge pull request #3671 from rolfbjarne/pr-fix-system-tests

[System] Fix tests that regressed in e6536dd.

7 years agoMerge pull request #3664 from lateralusX/jlorenss/extern-test-driver-usage
Johan Lorensson [Thu, 29 Sep 2016 10:08:31 +0000 (12:08 +0200)]
Merge pull request #3664 from lateralusX/jlorenss/extern-test-driver-usage

Enable reuse of eglib native test framework and test driver source.

7 years ago[System] Fix tests that regressed in e6536dd.
Rolf Bjarne Kvinge [Thu, 29 Sep 2016 10:01:49 +0000 (12:01 +0200)]
[System] Fix tests that regressed in e6536dd.

* I got confused between [TestFixtureSetup] and [Setup], so fix tests whose
  [Setup] methods were changed/removed to properly clean up after each test
  (using a [TearDown] method) so that the next time the on-demand creation of
  objects works as expected (i.e. objects created in the [Setup] method should
  be created on-demand once for each method instead of once for each class).

* Also fix SocketAcceptAsyncTest, the change to properly catch exceptions on
  background threads was incorrect.

7 years ago[threads] Assert that every thread is detached when exiting (#3620)
Ludovic Henry [Thu, 29 Sep 2016 06:49:35 +0000 (08:49 +0200)]
[threads] Assert that every thread is detached when exiting (#3620)

7 years ago[scripts] Add script to package the basic runtime to reuse by mkbundle
Miguel de Icaza [Thu, 29 Sep 2016 02:31:30 +0000 (22:31 -0400)]
[scripts] Add script to package the basic runtime to reuse by mkbundle

7 years ago[System]: Rename MonoLegacyTlsProvider into LegacyTlsProvider. (#3666)
Martin Baulig [Wed, 28 Sep 2016 22:53:03 +0000 (00:53 +0200)]
[System]: Rename MonoLegacyTlsProvider into LegacyTlsProvider. (#3666)

LegacyTlsProvider now lives in the 'Mono.Net.Security' namespace
(previously 'Mono.Net.Security.Private') and derives directly from
the public 'Mono.Security.Interface.MonoTlsProvider'.

This allows it to be used by products, for instance replacing
xamarin-macios/src/Security/Tls/OldTlsProvider.cs.

The idea is to have all 'MonoTlsProvider' implementations inside
System.dll and not access any of the private APIs from outside of it.
(cherry picked from commit 9437553e545f57443ccc33fe4129cbb6ac94f832)

7 years ago[configure] Add configure.ac checks for BTLS. (#3668)
Martin Baulig [Wed, 28 Sep 2016 22:53:33 +0000 (00:53 +0200)]
[configure] Add configure.ac checks for BTLS. (#3668)

7 years ago[corlib] Improve test added in 54ea12e4fa41bae72704a260aadc398328b73b16
Marek Safar [Wed, 28 Sep 2016 22:28:57 +0000 (00:28 +0200)]
[corlib] Improve test added in 54ea12e4fa41bae72704a260aadc398328b73b16

7 years ago[runtime] Use mono_error_set_for_class_failure in more places
Aleksey Kliger [Wed, 28 Sep 2016 22:25:33 +0000 (18:25 -0400)]
[runtime] Use mono_error_set_for_class_failure in more places

Also assert if we see anothing other than MONO_EXCEPTION_TYPE_LOAD or
MONO_EXCEPTION_INVALID_PROGRAM in a class failure.

7 years ago[build] Make monolite output path configurable
Marek Safar [Wed, 28 Sep 2016 21:34:36 +0000 (23:34 +0200)]
[build] Make monolite output path configurable

7 years ago[loader] Use mempool memory for MONO_EXCEPTION_TYPE_LOAD messages.
Aleksey Kliger [Wed, 28 Sep 2016 21:25:36 +0000 (17:25 -0400)]
[loader] Use mempool memory for MONO_EXCEPTION_TYPE_LOAD messages.

Prevent memory leaks by storing the error message strings in the same
mempool as the failing class.

7 years ago[image] Check mempool of mono_image_property_insert value
Aleksey Kliger [Wed, 28 Sep 2016 21:24:14 +0000 (17:24 -0400)]
[image] Check mempool of mono_image_property_insert value

When adding an image property, check that the value belongs to the same image.

Ensure that we don't leak the values when the property hashtables are destroyed.

7 years ago[checked] Add CHECKED_METADATA_STORE and CHECKED_METADATA_STORE_LOCAL
Aleksey Kliger [Wed, 28 Sep 2016 21:22:31 +0000 (17:22 -0400)]
[checked] Add CHECKED_METADATA_STORE and CHECKED_METADATA_STORE_LOCAL

When running a checked build with metadata checking enabled, these
macros check that values written to ptr occupy the apropriate mempool.

7 years ago[image] Add mono_image_strdup_printf and mono_image_strdup_vprintf
Aleksey Kliger [Wed, 28 Sep 2016 21:21:53 +0000 (17:21 -0400)]
[image] Add mono_image_strdup_printf and mono_image_strdup_vprintf

7 years ago[mempool] Add mono_mempool_strdup_printf and mono_mempool_strdup_vprintf
Aleksey Kliger [Wed, 28 Sep 2016 21:21:09 +0000 (17:21 -0400)]
[mempool] Add mono_mempool_strdup_printf and mono_mempool_strdup_vprintf

7 years ago[System] Reduce duration of SendGenericExceedBuffer test
Marek Safar [Wed, 28 Sep 2016 16:12:23 +0000 (18:12 +0200)]
[System] Reduce duration of SendGenericExceedBuffer test

7 years ago[System]: Cleanup the internal MobileTlsContext.
Martin Baulig [Tue, 27 Sep 2016 15:51:06 +0000 (17:51 +0200)]
[System]: Cleanup the internal MobileTlsContext.

* Add SelectClientCertificate().
* ValidateCertificate() now returns bool.
* Add ValidateCertificate() overload.

(cherry picked from commit 0d07c695b504068d2b99a3fa9e84e6de4d2b3eed)

7 years ago[Mono.Security]: Cleanup the internal ICertificateValidator2.
Martin Baulig [Tue, 27 Sep 2016 15:33:13 +0000 (17:33 +0200)]
[Mono.Security]: Cleanup the internal ICertificateValidator2.

(cherry picked from commit fcc570920db2d63cee0c9a00c03b8b0dad6e6df5)

7 years agoRemove all MONO_FEATURE_NEW_TLS conditionals.
Martin Baulig [Tue, 27 Sep 2016 13:59:47 +0000 (15:59 +0200)]
Remove all MONO_FEATURE_NEW_TLS conditionals.

(cherry picked from commit c155563d1e6c61de86839088dd5feaefaef40cc6)

7 years agoCleanup; with the removal of 'PrebuiltSystemAlias', we don't need to use XX509* anymore.
Martin Baulig [Tue, 27 Sep 2016 13:19:13 +0000 (15:19 +0200)]
Cleanup; with the removal of 'PrebuiltSystemAlias', we don't need to use XX509* anymore.

(cherry picked from commit 5b412212cd8bf45bee13084116dc8111e86c47a3)

7 years ago[System]: Make Test/System.Net.Sockets compile.
Martin Baulig [Wed, 28 Sep 2016 11:35:10 +0000 (13:35 +0200)]
[System]: Make Test/System.Net.Sockets compile.

(cherry picked from commit c2e7ca6c99d4ae16832b2e00acde7eafd668de14)

7 years agoEnable reuse of eglib native test framework and test driver source.
lateralusX [Wed, 28 Sep 2016 10:01:08 +0000 (12:01 +0200)]
Enable reuse of eglib native test framework and test driver source.

In current eglib test framework there is no mechanism to specify where
the include file describing all tests is located. Current implementation also assumes it is the main
entry point of the process since it defines the main symbol. There are several scenarios
where it could make sense to reuse eglib test framework and its driver in other native unit test projects
unit testing native code. In those scenarios it would be nice to include existing driver.c
from eglib/test (no copy) and use toolchain capabilities to include needed header with test descriptions
and change main symbol name, since main will most likely be defined elsewhere.

This can be achieved by two simple defines that can be set when embedding eglib test framwork in other
native binaries. By default these defines will not be set and current behavior will be preserved.

7 years ago[build] Update bootstrap info text
Marek Safar [Wed, 28 Sep 2016 06:42:48 +0000 (08:42 +0200)]
[build] Update bootstrap info text

7 years agoMerge pull request #3626 from lateralusX/jlorenss/win-api-family-support-eglib
Johan Lorensson [Wed, 28 Sep 2016 06:40:30 +0000 (08:40 +0200)]
Merge pull request #3626 from lateralusX/jlorenss/win-api-family-support-eglib

Build eglib under none desktop Windows API family.

7 years agoMerge pull request #3658 from kumpera/fix-ios-logging
Rodrigo Kumpera [Wed, 28 Sep 2016 00:11:23 +0000 (20:11 -0400)]
Merge pull request #3658 from kumpera/fix-ios-logging

[logging] Fix logging on iOS. We lost asl redirection and it was sending to stdout instead.

7 years ago[threads] Signal the w32handle later in the thread destruction process (#3652)
Ludovic Henry [Tue, 27 Sep 2016 21:44:51 +0000 (23:44 +0200)]
[threads] Signal the w32handle later in the thread destruction process (#3652)

7 years ago[logging] Fix logging on iOS. We lost asl redirection and it was sending to stdout...
Rodrigo Kumpera [Tue, 27 Sep 2016 21:39:24 +0000 (14:39 -0700)]
[logging] Fix logging on iOS. We lost asl redirection and it was sending to stdout instead.

7 years ago[coop handles] Add some memory fences (#3617)
Aleksey Kliger (λgeek) [Tue, 27 Sep 2016 21:02:18 +0000 (17:02 -0400)]
[coop handles] Add some memory fences (#3617)

When running with async suspend (ie, not coop), a user thread might be
suspended while its manipulating the coop handle stack.  In that case,
we want to present a consitent view to mono_handle_stack_scan () by
adding memory fences to code that updates the stack chunks.  In
particular we want to ensure that the chunk size is increased after
the new slot has a valid (null) value.  Also when creating new chunks
make sure their size is initialized before the chunk stack is updated.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43921 (at least the
one stack trace observed in [comment 1](https://bugzilla.xamarin.com/show_bug.cgi?id=43921#c1)).

7 years ago[Mono.Security.Interface] Cleanup and simplify MonoTlsProviderFactory.
Martin Baulig [Tue, 27 Sep 2016 09:53:05 +0000 (11:53 +0200)]
[Mono.Security.Interface] Cleanup and simplify MonoTlsProviderFactory.

The "global" TLS Provider (returned by MonoTlsProviderFactory.GetProvider())
may only be modified at application startup (before any of the TLS / Certificate
code has been used).

* MonoTlsProviderFactory.HasProvider has been removed.

  This property used to initialize the TLS Subsystem without throwing any
  exceptions.  However, properties with side-effects is a bad design principle.

* Add MonoTlsProviderFactory.IsInitialized.

  Does not have any side-effects.

* Add MonoTlsProviderFactory.Initialize() and Initialize(string).

  May only be called at application startup and explicitly initializes the
  TLS Subsystem.

* Rename MonoTlsProviderFactory.GetDefaultProvider() into GetProvider()
  and removed MonoTlsProviderFactory.GetCurrentProvider().

  We do not distinguish between a "default" and a "current" provider anymore;
  there is only one "global" provider.

* Add MonoTlsProviderFactory.IsProviderSupported(string).

  Checks whether a specific TLS Provider is supported, without having side-effects.

* Make the old APIs [Obsolete] until products have been updated.

* Add some documentation to MonoTlsProviderFactory.

(cherry picked from commit 7c3ae83b31a2456d00daf2949706719e3e694d15)

7 years ago[llvm] Enable support for large basic blocks again.
Zoltan Varga [Tue, 27 Sep 2016 19:23:40 +0000 (15:23 -0400)]
[llvm] Enable support for large basic blocks again.

llc has some performance problems with large basic blocks so we have to break them up into smaller ones. Use some hacks to prevent opt/llc from merging them back again.

7 years agoMerge pull request #3656 from marek-safar/bootstrap
Marek Safar [Tue, 27 Sep 2016 19:24:11 +0000 (21:24 +0200)]
Merge pull request #3656 from marek-safar/bootstrap

[build] Bootstrap extension for roslyn

7 years ago[runtime] Fix MonoMethod.get_base_method when abstract methods are not overridden
Aleksey Kliger [Fri, 23 Sep 2016 20:08:52 +0000 (16:08 -0400)]
[runtime] Fix MonoMethod.get_base_method when abstract methods are not overridden

When there is an abstract class in the middle of an inheritance
hierarchy that doesn't override a method, get_base_methods needs to search
the parent class instead aborting early.

Example:

```
abstract class Root {
  public abstract void Foo ();
}
abstract class Abs : Root { }
class Derived : Abs {
  public override void Foo () { }
}
```

If we ask for the base method of Derived.Foo we used to get Derived.Foo
back because Abs did not provide an override.  Instead we should skip
abs and look in Root.

7 years agoFix trace logging on Android
Marek Habersack [Tue, 27 Sep 2016 18:31:19 +0000 (20:31 +0200)]
Fix trace logging on Android

Introduction of the structured trace logger accidentally broke Android
logcat logging. The reason for this is that the default logging handler
defined in eglib (in goutput.c) for Android was never called, instead it
was superseeded by the log file logger defined in mono-logger.c

The net effect was that Mono tried to write the messages to some file on
Android leaving logcat devoid of any trace of life :)

This commit fixes the issue by introducing a set of structured logging
functions for Android.

As a side note - file logging on Android is not that useful. Writing to
a file on external storage medium requires app permissions and writing
to a location on internal storage medium, while allowed, might be
subject to space limitations and should not be used for possibly
voluminous data. It's therefore not very practical on Android.

7 years ago[build] Bootstrap extension for roslyn
Marek Safar [Tue, 27 Sep 2016 07:19:05 +0000 (09:19 +0200)]
[build] Bootstrap extension for roslyn

7 years ago[System*] Throw a PlatformNotSupported exception when using the networking stack...
Rolf Bjarne Kvinge [Tue, 27 Sep 2016 11:13:38 +0000 (13:13 +0200)]
[System*] Throw a PlatformNotSupported exception when using the networking stack on watchOS. (#3606)

* [System] Fix line endings for a few files.

Best reviewed by not showing whitespace changes (should be empty diff in that case).

* [System] Fix potential crash in CookieParserTests.

Socket.EndAccept can throw an exception, which will crash the process if it
happens on a threadpool. So handle any exceptions when calling
Socket.EndAccept, and propagate those exceptions out of any threadpool code.

* [System.Net.Http] Throw a PlatformNotSupported exception when using HttpClientHandler on watchOS.

* [System.Net.Http] Tweak tests after watchOS API change.

Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.

* [System] Extract the HttpListenerResponseHelper class to a separate file.

Extract the HttpListenerResponseHelper class to a separate file so that it's
easier to replace the HttpListenerResponse implementation by using a different
file.

* [System] Throw a PlatformNotSupported exception when using the networking stack on watchOS.

* [System] Tweak tests after watchOS API changes.

Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.

* [System] Fix potential crash in SocketAcceptAsyncTest.

Fix potential crash in SocketAcceptAsyncTest by catching any exceptions in
code executed on the threadpool so that we never end up with unhandled
exceptions (which may terminate the process).

* [System] Avoid logic in SetUp attributes in tests.

Any type of exception in [SetUp] attributes causes all tests to fail with that
exception.

This even happens for tests that do not need the logic in the [SetUp]
attribute.

So rewrite tests a bit to not use [SetUp] when we can reasonably avoid it, and
instead instantiate class-level variables on first use. This ensures that any
exceptions that occur when initializing those variables are attributed to the
corresponding test, and not all of them.

* [System] Make exception handler (for test) catch more exceptions to avoid unhandled exceptions causing process termination.

* [System] Remove Obsolete attribute on API that throws PNSE.

7 years ago[corlib] Add API to uninstall/reinstall signal handlers.
Rolf Bjarne Kvinge [Fri, 23 Sep 2016 11:53:36 +0000 (13:53 +0200)]
[corlib] Add API to uninstall/reinstall signal handlers.

This API is provided to be used by libraries providing crash reporting, so
that those libraries can install signal handlers and at the same time not
interfere with Mono's signals.

The intended pattern is this:

    Mono.Runtime.RemoveSignalHandlers ();
    InstallThirdPartySignalHandlers ();
    Mono.Runtime.InstallSignalHandlers ();

This ensures that Mono is always notified first of any signals, and will then
chain to the third-party signal handlers if the signal did not originate in
managed code.

Mono's signals must first be removed, so that if third-party signal handler
does signal chaining, we don't end up in Mono's signal handler again.

Mailing-list thread: http://lists.dot.net/pipermail/macios-devel/2016-September/000016.html [Signal-chaining & crash reporters]
Example usage: https://github.com/rolfbjarne/HockeySDK-Xamarin/commit/862721199f1adec210bfc7b1943f975ffb8048a9

7 years ago[mini] Provide a free function to the saved signal handler hash table.
Rolf Bjarne Kvinge [Tue, 13 Sep 2016 11:18:10 +0000 (13:18 +0200)]
[mini] Provide a free function to the saved signal handler hash table.

This makes the cleanup code simpler, and also makes it easier to
replace saved signal handlers without having to worry about
leaking memory.

7 years agoMerge pull request #3647 from BrzVlad/fix-sgen-internal-alloc
Vlad Brezae [Tue, 27 Sep 2016 10:10:01 +0000 (13:10 +0300)]
Merge pull request #3647 from BrzVlad/fix-sgen-internal-alloc

[sgen] Fix sgen internal alloc

7 years ago[Mono.Security]: Cleanup Mono.Security.Interface.CertificateValidationHelper.
Martin Baulig [Mon, 26 Sep 2016 10:39:29 +0000 (12:39 +0200)]
[Mono.Security]: Cleanup Mono.Security.Interface.CertificateValidationHelper.

* CertificateValidationHelper.GetDefaultValidator(): rename this internal method into
  GetInternalValidator() (keeping the old as [Obsolete] until products have been updated).

* CertificateValidationHelper.GetValidator(): remove the 'provider' argument.

This is part of a set of cleanups and simplifications for the upcoming BTLS integration.

7 years agoBuild eglib under none desktop Windows API family.
lateralusX [Tue, 27 Sep 2016 09:28:57 +0000 (11:28 +0200)]
Build eglib under none desktop Windows API family.

Initial work to build eglib under none desktop Windows API family. Classic
Windows API have been split into families and partitions in order to support
different subsets on different Windows platforms. In order to build against
other Windows targets/platforms Mono needs to follow these families/partitions
in order to successfully build where API’s have been removed/replaced. Since most
Mono platforms uses the Windows API signatures a new defined has been added to all
platforms, HAVE_CLASSIC_WINAPI_SUPPORT, used to decide what implementation to include.
On none Windows platforms this is always defined and on Windows platforms it follows the
winapifamily.h. In order to keep down regressions, the existing API’s are kept for HAVE_CLASSIC_WINAPI_SUPPORT
even if there are more modern replacements available.

7 years ago[w32handle] Ensure we initialize begore the gc attach the current thread (#3644)
Ludovic Henry [Tue, 27 Sep 2016 08:43:59 +0000 (10:43 +0200)]
[w32handle] Ensure we initialize begore the gc attach the current thread (#3644)

7 years agoMerge pull request #3643 from marek-safar/bootstrap
Marek Safar [Tue, 27 Sep 2016 06:20:05 +0000 (08:20 +0200)]
Merge pull request #3643 from marek-safar/bootstrap

[build] Bump mono bootstrap dependency to Mono 4.0+

7 years ago[mini] Add some documentation comments to some IR generating macros
Miguel de Icaza [Tue, 27 Sep 2016 02:16:49 +0000 (22:16 -0400)]
[mini] Add some documentation comments to some IR generating macros

7 years ago[sgen] Untag the vtable during concurrent mark
Vlad Brezae [Mon, 26 Sep 2016 20:33:56 +0000 (23:33 +0300)]
[sgen] Untag the vtable during concurrent mark

For now, concurrent mark runs concurrently with bridge during minors. Since bridge processing might tag object vtables, make sure we don't crash when we scan such objects.

7 years ago[sgen] Fix internal allocation
Vlad Brezae [Mon, 26 Sep 2016 17:04:51 +0000 (20:04 +0300)]
[sgen] Fix internal allocation

After recent header size change in 883e0a2d899a6a19db2c1d5222d45b8423ce36a2, we had some slot sizes unaligned which was leading to unaligned memory allocation and therefore SIGBUS-es on some ARMs.

We used to have all allocators use 16k blocks and slot sizes optimized for this. After we switched to allocating in 4k, 8k and 16k blocks the slot sizes were not optimized for the new format.

This commit fixes unaligned problems, at the same time optimizing the size of allocator slots.

7 years ago[aot] Make sure generic wrappers are unique by creating shared versions of the them...
Zoltan Varga [Mon, 26 Sep 2016 18:54:37 +0000 (14:54 -0400)]
[aot] Make sure generic wrappers are unique by creating shared versions of the them in the same order that AOT creates them (shared method -> wrapper).

7 years ago[System] Fixes SendGenericExceedBuffer test
Marek Safar [Mon, 26 Sep 2016 18:45:48 +0000 (20:45 +0200)]
[System] Fixes SendGenericExceedBuffer test

7 years ago[aot] Fix the linux bitcode build.
Zoltan Varga [Mon, 26 Sep 2016 17:24:51 +0000 (13:24 -0400)]
[aot] Fix the linux bitcode build.

7 years ago[build] Bump mono bootstrap dependency to Mono 4.0+
Marek Safar [Mon, 26 Sep 2016 17:19:23 +0000 (19:19 +0200)]
[build] Bump mono bootstrap dependency to Mono 4.0+

7 years ago[System] Revert copyright change in 8e4a52a37499af9383dfdec5a67c81775d260899
Marek Safar [Mon, 26 Sep 2016 14:56:19 +0000 (16:56 +0200)]
[System] Revert copyright change in 8e4a52a37499af9383dfdec5a67c81775d260899

7 years ago[System] netstandard compatible Process collections
Marek Safar [Mon, 26 Sep 2016 14:51:37 +0000 (16:51 +0200)]
[System] netstandard compatible Process collections

7 years agoRestructure and update build status section in README
Alexander Köplinger [Mon, 26 Sep 2016 13:46:03 +0000 (15:46 +0200)]
Restructure and update build status section in README

Add links to Windows/OSX builds on Jenkins.

7 years agoRemove appveyor.yml from repository
Alexander Köplinger [Mon, 26 Sep 2016 13:45:03 +0000 (15:45 +0200)]
Remove appveyor.yml from repository

We now have our own set of Windows bots on our Jenkins CI for building and testing Mono on Windows.

Special thanks to AppVeyor for providing us with build capacity over the last two years <3

7 years ago[runtime] Make a copy of the wrapper date when instantiating generic wrapper methods...
Zoltan Varga [Mon, 26 Sep 2016 05:21:58 +0000 (01:21 -0400)]
[runtime] Make a copy of the wrapper date when instantiating generic wrapper methods, to be able to store a different WrapperInfo for them. (#3634)

7 years ago[Socket] Use SemaphoreSlim instead of Queue (#3633)
Ludovic Henry [Sun, 25 Sep 2016 17:54:07 +0000 (19:54 +0200)]
[Socket] Use SemaphoreSlim instead of Queue (#3633)

This uses the same approach as corefx's FileStream. This simplifies the code, as well as make the intent of the queue clearer.

7 years ago[corlib] Remove unnecessary net_4_x_corlib.dll.sources
Alexander Köplinger [Sun, 25 Sep 2016 15:01:55 +0000 (17:01 +0200)]
[corlib] Remove unnecessary net_4_x_corlib.dll.sources

It only imports corlib.dll.sources, removing the file has the same effect.

7 years ago[System] Add ISupportInitialize on mobile FileSystemWatcher
Alexander Köplinger [Sun, 25 Sep 2016 11:59:53 +0000 (13:59 +0200)]
[System] Add ISupportInitialize on mobile FileSystemWatcher

The interface was missing on the mobile stub.

7 years ago[System] Remove obsolete HttpWebRequest/Response constructors again
Alexander Köplinger [Sun, 25 Sep 2016 11:02:48 +0000 (13:02 +0200)]
[System] Remove obsolete HttpWebRequest/Response constructors again

They were removed from a later revision of netstandard2.0 so we don't need to add them.

7 years ago[jit] Resurrect the Monitor.Enter () v4 optimization. (#3632)
Zoltan Varga [Sun, 25 Sep 2016 07:15:48 +0000 (03:15 -0400)]
[jit] Resurrect the Monitor.Enter () v4 optimization. (#3632)

7 years agoMerge pull request #3631 from slide/bz44714
Alexander Köplinger [Sat, 24 Sep 2016 23:54:27 +0000 (01:54 +0200)]
Merge pull request #3631 from slide/bz44714

Fix issue with VB projects

7 years agoFix tarball build
Alexander Köplinger [Sat, 24 Sep 2016 23:45:00 +0000 (01:45 +0200)]
Fix tarball build

7 years ago[referencesource] Import parts of System.Net.Sockets.Socket (#3618)
Ludovic Henry [Sat, 24 Sep 2016 18:10:01 +0000 (20:10 +0200)]
[referencesource] Import parts of System.Net.Sockets.Socket (#3618)

7 years agoFix tarball build
Alexander Köplinger [Sat, 24 Sep 2016 17:16:55 +0000 (19:16 +0200)]
Fix tarball build

The file was removed in 18ada43d3d4c170269c544bbb684fbfdd1f56408.

7 years agoFix issue with VB projects
Alex Earl [Sat, 24 Sep 2016 15:43:20 +0000 (08:43 -0700)]
Fix issue with VB projects

Fixed GenerateFullPathToTool for Vbc task to match behavior of the Csc
task. This allows VB.NET projects to build successfully.

See https://bugzilla.xamarin.com/show_bug.cgi?id=44714

7 years ago[SRE] Implement the ModuleBuilder:create_modified_icall () in managed code. Use user...
Zoltan Varga [Sat, 24 Sep 2016 13:41:14 +0000 (09:41 -0400)]
[SRE] Implement the ModuleBuilder:create_modified_icall () in managed code. Use user types instead of creating derived types of unfinished typebuilders. (#3629)

7 years agoBump corlib version
Alexander Köplinger [Sat, 24 Sep 2016 10:20:40 +0000 (12:20 +0200)]
Bump corlib version

18ada43d3d4c170269c544bbb684fbfdd1f56408 didn't bump the corlib version and this breaks building with monolite.

7 years agoMerge pull request #3625 from slide/master
Marek Safar [Sat, 24 Sep 2016 07:33:19 +0000 (09:33 +0200)]
Merge pull request #3625 from slide/master

Fix 16628

7 years ago[AppleTls]: Flush the write queue before finishing the handshake.
Martin Baulig [Fri, 23 Sep 2016 15:42:05 +0000 (17:42 +0200)]
[AppleTls]: Flush the write queue before finishing the handshake.

It is possible for SSLHandshake() to return SslStatus.Success while we're still
having a pending write (AsyncOperationStatus.WantWrite).

This is because our managed write callback must never return 'WouldBlock', so
SSLHandshake() things that all data have been sent while we still have them in
our write queue.

When this happens, we currently flush the write queue then call SSLHandshake()
again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.

This returns SslStatus.Protocol on iOS 10.

7 years ago[gc] Warn if we fail to switch gc
Vlad Brezae [Fri, 23 Sep 2016 20:15:44 +0000 (23:15 +0300)]
[gc] Warn if we fail to switch gc

7 years ago[aot] Fix aot support on android.
Zoltan Varga [Fri, 23 Sep 2016 19:39:49 +0000 (15:39 -0400)]
[aot] Fix aot support on android.

Disable the binary writer in llc since it doesn't seem to work. Use $tool_prefix/ld for linking if the tool prefix is set.

7 years ago[bcl] Add missing APIs for netstandard parity and expose a few APIs on mobile
Alexander Köplinger [Fri, 23 Sep 2016 15:01:44 +0000 (17:01 +0200)]
[bcl] Add missing APIs for netstandard parity and expose a few APIs on mobile

This ensures we're compliant with the upcoming netstandard2.0 API surface area.

7 years ago[bcl] Add CLSComplaint(false) to a few types/methods that aren't compliant
Alexander Köplinger [Thu, 22 Sep 2016 20:16:54 +0000 (22:16 +0200)]
[bcl] Add CLSComplaint(false) to a few types/methods that aren't compliant

7 years agoFix 16628
Alex Earl [Fri, 23 Sep 2016 14:47:35 +0000 (07:47 -0700)]
Fix 16628

This changes the IL parser to have the same behavior as ilasm.exe from
MS

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

7 years ago[llvm] Add static rgctx trampolines to array access methods in the aot+llvm case...
Zoltan Varga [Fri, 23 Sep 2016 13:49:51 +0000 (09:49 -0400)]
[llvm] Add static rgctx trampolines to array access methods in the aot+llvm case too. (#3616)

7 years agoMerge pull request #3622 from rolfbjarne/remove-stray-file
Alexander Köplinger [Fri, 23 Sep 2016 12:31:43 +0000 (14:31 +0200)]
Merge pull request #3622 from rolfbjarne/remove-stray-file

Remove stray file.

7 years ago[corcompare] More hacks to make breaking change not too disruptive
Marek Safar [Fri, 23 Sep 2016 12:17:55 +0000 (14:17 +0200)]
[corcompare] More hacks to make breaking change not too disruptive

7 years agoRemove stray file.
Rolf Bjarne Kvinge [Fri, 23 Sep 2016 10:07:07 +0000 (12:07 +0200)]
Remove stray file.

7 years ago[System.Core] Fixes warnings
Marek Safar [Fri, 23 Sep 2016 11:36:11 +0000 (13:36 +0200)]
[System.Core] Fixes warnings

7 years agoMerge pull request #3621 from kloun/patch-9
Marek Safar [Fri, 23 Sep 2016 11:29:03 +0000 (13:29 +0200)]
Merge pull request #3621 from kloun/patch-9

fix Another Typo

7 years agofix Another Typo
kloun [Fri, 23 Sep 2016 11:26:51 +0000 (14:26 +0300)]
fix Another Typo

7 years ago[bcl] Base type update to match netstandard apis
Marek Safar [Fri, 23 Sep 2016 10:10:11 +0000 (12:10 +0200)]
[bcl] Base type update to match netstandard apis

7 years ago[mono-symbolicate] Include pdb debug symbols support file
Marek Safar [Fri, 23 Sep 2016 08:26:17 +0000 (10:26 +0200)]
[mono-symbolicate] Include pdb debug symbols support file

7 years agoMerge pull request #3615 from kloun/patch-8
Marek Safar [Fri, 23 Sep 2016 06:47:21 +0000 (08:47 +0200)]
Merge pull request #3615 from kloun/patch-8

fix typo, "j-j"

7 years agoMerge pull request #3614 from kloun/patch-6
Marek Safar [Fri, 23 Sep 2016 06:46:36 +0000 (08:46 +0200)]
Merge pull request #3614 from kloun/patch-6

fix identical sub-expressions

7 years ago[arm64] Handle thunks with ARM64_B relocations as well.
Zoltan Varga [Thu, 22 Sep 2016 23:29:53 +0000 (19:29 -0400)]
[arm64] Handle thunks with ARM64_B relocations as well.

7 years agoMerge pull request #3613 from kloun/patch-4
Marek Safar [Thu, 22 Sep 2016 21:37:47 +0000 (23:37 +0200)]
Merge pull request #3613 from kloun/patch-4

fix another ERIC

7 years agofix typo, "j-j"
kloun [Thu, 22 Sep 2016 21:24:37 +0000 (00:24 +0300)]
fix typo, "j-j"

7 years agoUpdate generic.cs
kloun [Thu, 22 Sep 2016 21:17:38 +0000 (00:17 +0300)]
Update generic.cs

7 years agoUpdate generic.cs
kloun [Thu, 22 Sep 2016 21:15:47 +0000 (00:15 +0300)]
Update generic.cs

7 years agofix identical sub-expressions
kloun [Thu, 22 Sep 2016 21:12:05 +0000 (00:12 +0300)]
fix identical sub-expressions

7 years agoMerge pull request #3603 from ninjarobot/socket-write
Marek Safar [Thu, 22 Sep 2016 20:58:57 +0000 (22:58 +0200)]
Merge pull request #3603 from ninjarobot/socket-write

Send all data to a socket before exit from Socket.Send.