Permalink
Commits on Sep 29, 2016
  1. 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.
    henricm committed with migueldeicaza Sep 29, 2016
  2. Merge pull request #3671 from rolfbjarne/pr-fix-system-tests

    [System] Fix tests that regressed in e6536dd.
    ntherning committed on GitHub Sep 29, 2016
  3. Merge pull request #3664 from lateralusX/jlorenss/extern-test-driver-…

    …usage
    
    Enable reuse of eglib native test framework and test driver source.
    lateralusX committed on GitHub Sep 29, 2016
  4. [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.
    rolfbjarne committed Sep 29, 2016
Commits on Sep 28, 2016
  1. [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 9437553)
    baulig committed Sep 28, 2016
  2. [System]: Cleanup the internal MobileTlsContext.

    * Add SelectClientCertificate().
    * ValidateCertificate() now returns bool.
    * Add ValidateCertificate() overload.
    
    (cherry picked from commit 0d07c69)
    baulig committed Sep 27, 2016
  3. [Mono.Security]: Cleanup the internal ICertificateValidator2.

    (cherry picked from commit fcc5709)
    baulig committed Sep 27, 2016
  4. Remove all MONO_FEATURE_NEW_TLS conditionals.

    (cherry picked from commit c155563)
    baulig committed Sep 27, 2016
  5. Cleanup; with the removal of 'PrebuiltSystemAlias', we don't need to …

    …use XX509* anymore.
    
    (cherry picked from commit 5b41221)
    baulig committed Sep 27, 2016
  6. [System]: Make Test/System.Net.Sockets compile.

    (cherry picked from commit c2e7ca6)
    baulig committed Sep 28, 2016
  7. 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.
    lateralusX committed Sep 28, 2016
  8. Merge pull request #3626 from lateralusX/jlorenss/win-api-family-supp…

    …ort-eglib
    
    Build eglib under none desktop Windows API family.
    lateralusX committed on GitHub Sep 28, 2016
  9. 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.
    kumpera committed on GitHub Sep 28, 2016
Commits on Sep 27, 2016
  1. [logging] Fix logging on iOS. We lost asl redirection and it was send…

    …ing to stdout instead.
    kumpera committed Sep 27, 2016
  2. [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)).
    lambdageek committed on GitHub Sep 27, 2016
  3. [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 7c3ae83)
    baulig committed Sep 27, 2016
  4. [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.
    vargaz committed Sep 27, 2016
  5. Merge pull request #3656 from marek-safar/bootstrap

    [build] Bootstrap extension for roslyn
    marek-safar committed on GitHub Sep 27, 2016
  6. [runtime] Fix MonoMethod.get_base_method when abstract methods are no…

    …t 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.
    lambdageek committed with lambdageek Sep 23, 2016
  7. 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.
    grendello committed Sep 27, 2016
  8. [build] Bootstrap extension for roslyn

    marek-safar committed Sep 27, 2016
  9. [System*] Throw a PlatformNotSupported exception when using the netwo…

    …rking 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.
    rolfbjarne committed with marek-safar Sep 27, 2016
  10. [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: rolfbjarne/HockeySDK-Xamarin@8627211
    rolfbjarne committed Sep 23, 2016
  11. [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.
    rolfbjarne committed Sep 13, 2016
  12. Merge pull request #3647 from BrzVlad/fix-sgen-internal-alloc

    [sgen] Fix sgen internal alloc
    BrzVlad committed on GitHub Sep 27, 2016
  13. [Mono.Security]: Cleanup Mono.Security.Interface.CertificateValidatio…

    …nHelper.
    
    * 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.
    baulig committed Sep 26, 2016
  14. 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.
    lateralusX committed Sep 27, 2016