mono.git
7 years ago[System.Net.Http] Simplify default http message handler for watchOS since there's...
Rolf Bjarne Kvinge [Mon, 3 Oct 2016 16:21:40 +0000 (18:21 +0200)]
[System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value.

7 years ago[ci] Temporarily switch back to legacy TLS provider
Alexander Köplinger [Mon, 3 Oct 2016 15:10:49 +0000 (17:10 +0200)]
[ci] Temporarily switch back to legacy TLS provider

7 years ago[Mono.Debugger.Soft] Tweak ClassLocalReflection test
Marek Safar [Mon, 3 Oct 2016 14:09:59 +0000 (16:09 +0200)]
[Mono.Debugger.Soft] Tweak ClassLocalReflection test

7 years agoMerge pull request #3691 from ntherning/enable-tests-in-pr-builds-on-windows
Niklas Therning [Mon, 3 Oct 2016 12:56:26 +0000 (14:56 +0200)]
Merge pull request #3691 from ntherning/enable-tests-in-pr-builds-on-windows

Enable tests in Windows PR builds

7 years ago[System*] Throw a PlatformNotSupported exception when using the managed networking...
Rolf Bjarne Kvinge [Mon, 3 Oct 2016 11:00:16 +0000 (13:00 +0200)]
[System*] Throw a PlatformNotSupported exception when using the managed networking stack on watchOS. (#3683)

* [System.Data] System.Data.SqlClient is not supported in watchOS.

System.Data.SqlClient is not supported in watchOS, because it depends on a
working managed networking stack, which we don't have on watchOS.

* [System] Throw PlatformNotSupportedExceptions in the networking stack for watchOS.

* [System] Don't reference/build Mono.Security.dll when building for watchOS.

This means we can't build Mono.Data.Tds.dll either, since it uses
Mono.Security.dll extensively. In any case Mono.Data.Tds.dll is useless
without a working networking stack, and since it's a Mono-only dll (i.e. not
part of netstandard or facades), just remove the entire assembly from the
watchOS profile.

System.Security.dll uses Mono.Security.dll as well, but the required classes
are available inside mscorlib.dll (as internal classes), so just open up
mscorlib internals to System.Security.dll.

* [System] Update tests after API change for watchOS.

* [System.Data] Update tests after API change in watchOS.

* Revert "Fix build break from 81fb20737f810def6dde88d87a1b2f23cdb736c3"

This reverts commit f4475ff01358f8490e7cd0878e8b39bed2a0def7.

* Fix missing trailing newline in monotouch_watch_System.dll.sources

It breaks the build on Linux if the newline is missing.

7 years agoEnable tests in Windows PR builds
Niklas Therning [Mon, 3 Oct 2016 09:10:42 +0000 (11:10 +0200)]
Enable tests in Windows PR builds

Also run the test suite in Windows PR builds. We disable all the test suites
in Windows PR builds that are known to fail.

7 years ago[System] Server property of HttpWebResponse should never be null
Marek Safar [Mon, 3 Oct 2016 07:37:47 +0000 (09:37 +0200)]
[System] Server property of HttpWebResponse should never be null

7 years ago[btls] Fix i386 build on Linux by setting -arch on Darwin only
Alexander Köplinger [Sun, 2 Oct 2016 22:33:15 +0000 (00:33 +0200)]
[btls] Fix i386 build on Linux by setting -arch on Darwin only

The -arch option is an Apple extension, it caused failures on i386 Linux: "unrecognized command line option '-arch'"

7 years agoMerge pull request #3689 from alexrp/profiler-c9-fixes
Alex Rønne Petersen [Sun, 2 Oct 2016 19:59:26 +0000 (21:59 +0200)]
Merge pull request #3689 from alexrp/profiler-c9-fixes

Profiler fixes for Cycle 9 (#2)

7 years ago[profiler] Fix GC finalize object end event not getting invoked.
Alex Rønne Petersen [Sun, 2 Oct 2016 19:55:29 +0000 (21:55 +0200)]
[profiler] Fix GC finalize object end event not getting invoked.

7 years agoRevert "[domain] Report domain unloads to the profiler when finalizing the domain."
Alex Rønne Petersen [Sun, 2 Oct 2016 19:53:09 +0000 (21:53 +0200)]
Revert "[domain] Report domain unloads to the profiler when finalizing the domain."

This reverts commit c8b20290808563f89d29b22d2fe35eb906cfe725.

This caused ordering problems with app domain events: https://bugzilla.xamarin.com/show_bug.cgi?id=44552

Conflicts:

mono/metadata/gc.c

7 years agoMerge pull request #3688 from alexrp/profiler-c9-fixes
Alex Rønne Petersen [Sun, 2 Oct 2016 19:10:58 +0000 (21:10 +0200)]
Merge pull request #3688 from alexrp/profiler-c9-fixes

Profiler fixes for Cycle 9

7 years ago[profiler] Bump profiler version to v1.1.
Alex Rønne Petersen [Wed, 14 Sep 2016 12:26:12 +0000 (14:26 +0200)]
[profiler] Bump profiler version to v1.1.

7 years ago[profiler] Don't emit enter/leave events in onlycoverage mode.
Alex Rønne Petersen [Wed, 14 Sep 2016 19:50:18 +0000 (21:50 +0200)]
[profiler] Don't emit enter/leave events in onlycoverage mode.

7 years ago[profiler] Add a nocounters option.
Alex Rønne Petersen [Wed, 14 Sep 2016 19:26:51 +0000 (21:26 +0200)]
[profiler] Add a nocounters option.

7 years ago[profiler] Address a couple of FIXMEs in the counters sampling code.
Alex Rønne Petersen [Wed, 14 Sep 2016 19:14:20 +0000 (21:14 +0200)]
[profiler] Address a couple of FIXMEs in the counters sampling code.

7 years ago[profiler] Use eglib alloc/free functions everywhere.
Alex Rønne Petersen [Wed, 14 Sep 2016 13:42:26 +0000 (15:42 +0200)]
[profiler] Use eglib alloc/free functions everywhere.

7 years ago[profiler] Warn if we can't detect the CPU count.
Alex Rønne Petersen [Wed, 14 Sep 2016 13:38:06 +0000 (15:38 +0200)]
[profiler] Warn if we can't detect the CPU count.

7 years ago[profiler] Use the native thread wrapper functions to manage threads.
Alex Rønne Petersen [Wed, 14 Sep 2016 13:20:15 +0000 (15:20 +0200)]
[profiler] Use the native thread wrapper functions to manage threads.

7 years ago[utils/threads] Add and export a mono_native_thread_join () function.
Alex Rønne Petersen [Wed, 14 Sep 2016 12:59:42 +0000 (14:59 +0200)]
[utils/threads] Add and export a mono_native_thread_join () function.

7 years ago[utils/threads] Export all native thread functions.
Alex Rønne Petersen [Wed, 14 Sep 2016 12:36:54 +0000 (14:36 +0200)]
[utils/threads] Export all native thread functions.

7 years ago[profiler] Access in_shutdown atomically.
Alex Rønne Petersen [Wed, 14 Sep 2016 12:31:32 +0000 (14:31 +0200)]
[profiler] Access in_shutdown atomically.

7 years ago[profiler] Drop support for perf events on Linux.
Alex Rønne Petersen [Wed, 14 Sep 2016 16:20:14 +0000 (18:20 +0200)]
[profiler] Drop support for perf events on Linux.

7 years ago[utils/lfa] Add a missing #include to fix the profiler build.
Alex Rønne Petersen [Tue, 13 Sep 2016 15:57:54 +0000 (17:57 +0200)]
[utils/lfa] Add a missing #include to fix the profiler build.

7 years ago[profiler] Disable GC move events when allocation events are disabled.
Alex Rønne Petersen [Tue, 13 Sep 2016 11:09:24 +0000 (13:09 +0200)]
[profiler] Disable GC move events when allocation events are disabled.

They serve no purpose when allocation profiling is enabled, and just make log
files bigger than they have to be.

7 years ago[profiler] Clean up and improve the helper thread code.
Alex Rønne Petersen [Tue, 13 Sep 2016 09:34:22 +0000 (11:34 +0200)]
[profiler] Clean up and improve the helper thread code.

* Don't invoke undefined behavior if an fd is >= FD_SETSIZE.
* Allow multiple command sockets.
* Close the command socket(s) on shutdown.
* Properly run cleanup logic on shutdown.

7 years ago[profiler] Process requests in method_jitted ().
Alex Rønne Petersen [Mon, 12 Sep 2016 17:29:05 +0000 (19:29 +0200)]
[profiler] Process requests in method_jitted ().

7 years ago[profiler] Remove the need to pass a MonoProfiler argument to some functions.
Alex Rønne Petersen [Mon, 12 Sep 2016 13:53:37 +0000 (15:53 +0200)]
[profiler] Remove the need to pass a MonoProfiler argument to some functions.

This is now available on the MonoProfilerThread structure.

7 years ago[profiler] Fix the way the profiler frees hazardous data on shutdown.
Alex Rønne Petersen [Mon, 12 Sep 2016 13:35:24 +0000 (15:35 +0200)]
[profiler] Fix the way the profiler frees hazardous data on shutdown.

7 years ago[profiler] Replace a check with an assert in coverage_filter ().
Alex Rønne Petersen [Mon, 12 Sep 2016 12:48:51 +0000 (14:48 +0200)]
[profiler] Replace a check with an assert in coverage_filter ().

7 years ago[profiler] Add messages to most assertions.
Alex Rønne Petersen [Mon, 12 Sep 2016 12:44:01 +0000 (14:44 +0200)]
[profiler] Add messages to most assertions.

7 years ago[profiler] Remove the ign_res () hack.
Alex Rønne Petersen [Mon, 12 Sep 2016 12:31:16 +0000 (14:31 +0200)]
[profiler] Remove the ign_res () hack.

7 years ago[profiler] Clean up the #include mess in mono-profiler-log.c.
Alex Rønne Petersen [Mon, 12 Sep 2016 12:15:16 +0000 (14:15 +0200)]
[profiler] Clean up the #include mess in mono-profiler-log.c.

Half of these aren't even needed - get rid of those. Sort the rest.

7 years ago[profiler] Remove mono_threads_attach_tools_thread () declaration.
Alex Rønne Petersen [Mon, 12 Sep 2016 11:58:25 +0000 (13:58 +0200)]
[profiler] Remove mono_threads_attach_tools_thread () declaration.

We get this from mono-threads.h now.

7 years ago[profiler] Remove some broken, commented-out code from register_method_local ().
Alex Rønne Petersen [Mon, 12 Sep 2016 11:51:45 +0000 (13:51 +0200)]
[profiler] Remove some broken, commented-out code from register_method_local ().

7 years ago[profiler] assert () -> g_assert ().
Alex Rønne Petersen [Mon, 12 Sep 2016 11:06:54 +0000 (13:06 +0200)]
[profiler] assert () -> g_assert ().

7 years ago[profiler] Always enable the helper thread.
Alex Rønne Petersen [Mon, 12 Sep 2016 10:49:10 +0000 (12:49 +0200)]
[profiler] Always enable the helper thread.

We need it in all cases now that we use it to periodically flush all buffers.
The only platforms it was disabled on was NaCl, which we haven't bothered to
support in a while anyway.

7 years ago[profiler] Encapsulate some common logic in the ENTER_LOG/EXIT_LOG macros.
Alex Rønne Petersen [Mon, 12 Sep 2016 10:27:39 +0000 (12:27 +0200)]
[profiler] Encapsulate some common logic in the ENTER_LOG/EXIT_LOG macros.

This also has the nice effect of reducing the amount of times we attempt to
take the reader lock. Now we take it and release it once for a single event.

7 years ago[profiler] Add a missing deinit_thread () call to the helper thread.
Alex Rønne Petersen [Mon, 12 Sep 2016 10:27:21 +0000 (12:27 +0200)]
[profiler] Add a missing deinit_thread () call to the helper thread.

7 years ago[profiler] Fix several race conditions in accessing MonoProfilerThread.buffer.
Alex Rønne Petersen [Mon, 12 Sep 2016 08:44:34 +0000 (10:44 +0200)]
[profiler] Fix several race conditions in accessing MonoProfilerThread.buffer.

Only in very few situations is it okay to access this field without first
taking the reader lock or exclusive lock.

Fixes some crashes observed in the profiler stress tests.

7 years ago[profiler] Don't flush empty log buffers.
Alex Rønne Petersen [Mon, 12 Sep 2016 08:44:00 +0000 (10:44 +0200)]
[profiler] Don't flush empty log buffers.

7 years ago[profiler] Add an extra assert.
Alex Rønne Petersen [Mon, 12 Sep 2016 08:43:38 +0000 (10:43 +0200)]
[profiler] Add an extra assert.

7 years ago[sgen] Always report object moves on the GC thread.
Alex Rønne Petersen [Sat, 10 Sep 2016 21:09:48 +0000 (23:09 +0200)]
[sgen] Always report object moves on the GC thread.

This avoids exposing the SGen worker threads through the profiler APIs. Doing
so had two main problems:

* It's easy for a user of the profiler API to accidentally mess with the state
  of the worker thread in all sorts of ways, which could break the GC.
* It's been a long-standing guarantee that any profiler API callback will be
  invoked on a thread that is, at the very least, attached to the runtime via
  the mono-threads infrastructure. This is not the case for SGen workers.

This fixes a deadlock in the log profiler when using major=marksweep-conc.

7 years ago[profiler] Rename decode.c to mprof-report.c.
Alex Rønne Petersen [Sat, 10 Sep 2016 05:22:25 +0000 (07:22 +0200)]
[profiler] Rename decode.c to mprof-report.c.

7 years ago[profiler] Rename proflog.{c,h} to mono-profiler-log.{c,h} for consistency with other...
Alex Rønne Petersen [Sat, 10 Sep 2016 05:15:50 +0000 (07:15 +0200)]
[profiler] Rename proflog.{c,h} to mono-profiler-log.{c,h} for consistency with other profilers.

7 years ago[profiler] Remove utils.c/utils.h, move the code to proflog.c/decode.c, and clean...
Alex Rønne Petersen [Fri, 9 Sep 2016 16:50:56 +0000 (18:50 +0200)]
[profiler] Remove utils.c/utils.h, move the code to proflog.c/decode.c, and clean it up.

* Drop support for fast/null timers.
* Use Mono runtime functions for getting the thread ID and allocating buffers.

7 years ago[acceptance-tests] Improve the profiler-stress test runner.
Alex Rønne Petersen [Sat, 10 Sep 2016 10:38:01 +0000 (12:38 +0200)]
[acceptance-tests] Improve the profiler-stress test runner.

* Emit an NUnit test report file.
* Set a timeout of 6 hours per test.
* Do a thread dump for timed-out tests.
* Don't print stdout/stderr for passing tests.

7 years ago[ci] Bump the timeout of the profiler stress test suite to 24 hours.
Alex Rønne Petersen [Sat, 10 Sep 2016 10:22:58 +0000 (12:22 +0200)]
[ci] Bump the timeout of the profiler stress test suite to 24 hours.

7 years ago[sgen] Remove bogus mono_profiler_events assert.
Alex Rønne Petersen [Fri, 9 Sep 2016 16:00:36 +0000 (18:00 +0200)]
[sgen] Remove bogus mono_profiler_events assert.

This variable can be changed at any time by any thread. It makes no sense to
assert that it has a particular flag.

7 years ago[utils] Move MONO_DEPRECATED to mono-publib.h and make it imply MONO_API + MONO_RT_EX...
Alex Rønne Petersen [Fri, 9 Sep 2016 10:26:04 +0000 (12:26 +0200)]
[utils] Move MONO_DEPRECATED to mono-publib.h and make it imply MONO_API + MONO_RT_EXTERNAL_ONLY.

Also make it work with MSVC.

7 years ago[profiler] Remove the long-obsolete hsmode option.
Alex Rønne Petersen [Fri, 9 Sep 2016 10:12:27 +0000 (12:12 +0200)]
[profiler] Remove the long-obsolete hsmode option.

Also refactor the heap walk code a bit.

7 years ago[profiler] Document and fix the onlycoverage option.
Alex Rønne Petersen [Fri, 9 Sep 2016 09:46:15 +0000 (11:46 +0200)]
[profiler] Document and fix the onlycoverage option.

7 years ago[profiler] Remove the countersonly option.
Alex Rønne Petersen [Fri, 9 Sep 2016 09:33:31 +0000 (11:33 +0200)]
[profiler] Remove the countersonly option.

It was never documented and is no longer functional.

7 years ago[man] Update mprof-report.1 to indicate the correct default maxframes value.
Alex Rønne Petersen [Fri, 9 Sep 2016 09:21:20 +0000 (11:21 +0200)]
[man] Update mprof-report.1 to indicate the correct default maxframes value.

7 years ago[profiler] Use the signal shutdown logic for the sampling thread for more cases.
Alex Rønne Petersen [Fri, 9 Sep 2016 09:11:21 +0000 (11:11 +0200)]
[profiler] Use the signal shutdown logic for the sampling thread for more cases.

7 years ago[profiler] Remove some indirection in setting up GC events.
Alex Rønne Petersen [Fri, 9 Sep 2016 08:23:41 +0000 (10:23 +0200)]
[profiler] Remove some indirection in setting up GC events.

* mono_gc_enable_events: This did nothing for SGen and we called it
  unconditionally for Boehm. So no point in having it around.
* mono_gc_enable_alloc_events: The performance difference between checking
  a static alloc_events variable versus checking mono_profiler_events is
  marginal at best and doesn't justify the indirection, especially now that
  we support managed allocators while profiling.

7 years ago[profiler] Lift profiler limitation in mono_class_get_allocation_ftn ().
Alex Rønne Petersen [Fri, 9 Sep 2016 08:16:26 +0000 (10:16 +0200)]
[profiler] Lift profiler limitation in mono_class_get_allocation_ftn ().

This has not actually been necessary since allocation reporting was moved into
the GC implementations.

7 years ago[profiler] Don't leak counter data structures on shutdown.
Alex Rønne Petersen [Fri, 9 Sep 2016 05:21:17 +0000 (07:21 +0200)]
[profiler] Don't leak counter data structures on shutdown.

7 years ago[profiler] Simplify counters initialization.
Alex Rønne Petersen [Fri, 9 Sep 2016 05:07:55 +0000 (07:07 +0200)]
[profiler] Simplify counters initialization.

7 years ago[profiler] Don't emit a perf counters sample event if none are registered.
Alex Rønne Petersen [Fri, 9 Sep 2016 05:04:13 +0000 (07:04 +0200)]
[profiler] Don't emit a perf counters sample event if none are registered.

7 years ago[profiler] Fix the code that synthesizes thread end events.
Alex Rønne Petersen [Fri, 9 Sep 2016 05:03:29 +0000 (07:03 +0200)]
[profiler] Fix the code that synthesizes thread end events.

It could previously fail to process a newly allocated buffer.

7 years ago[profiler] Add counters for all event types.
Alex Rønne Petersen [Fri, 9 Sep 2016 05:02:21 +0000 (07:02 +0200)]
[profiler] Add counters for all event types.

7 years ago[metadata] Fix FullAOT build
Alexander Köplinger [Sun, 2 Oct 2016 15:24:22 +0000 (17:24 +0200)]
[metadata] Fix FullAOT build

The function was renamed in https://github.com/mono/mono/commit/a0ad8154f7cdca706802aa196d95686e0f8d3b7b#diff-9a532ce56888ac899468740a872fd7e0L1814, but this stub was missed.

7 years ago[btls] Fix bashism in create-object-library.sh
Alexander Köplinger [Sun, 2 Oct 2016 15:12:45 +0000 (17:12 +0200)]
[btls] Fix bashism in create-object-library.sh

Found by checkbashisms(1) as "unsafe echo with backslash". Some shells don't expand embedded \n in a string by default,
which broke the build on systems like ArchLinux or Alpine where /bin/sh points to those shells because the generated .lo
file contained just a single line instead of two.

Thanks to @JustArchi for researching this on the Mono Gitter channel, it made fixing the issue a lot easier!

7 years ago[System]: ChainValidationHelper: ignore port number when validating a certificate...
Martin Baulig [Sat, 1 Oct 2016 19:29:32 +0000 (21:29 +0200)]
[System]: ChainValidationHelper: ignore port number when validating a certificate's host name.

(cherry picked from commit 4d28eb4b889d4f317675998f906cd9ca47440566)
(cherry picked from commit 7c88bf755ec19ecd7e6db578de329567ee41b8d0)

7 years ago[BTLS]: Ignore port number when validating certificates.
Martin Baulig [Sat, 1 Oct 2016 19:19:39 +0000 (21:19 +0200)]
[BTLS]: Ignore port number when validating certificates.

(cherry picked from commit baebc1d8c0e5ebe0e98f737390546b834baf2932)

7 years ago[BTLS]: Send server name extension on the client.
Martin Baulig [Sat, 1 Oct 2016 19:19:22 +0000 (21:19 +0200)]
[BTLS]: Send server name extension on the client.

(cherry picked from commit 2602c52de4773fe028b36d13d14555036835aa4e)

7 years agoFix build break from 81fb20737f810def6dde88d87a1b2f23cdb736c3
Alexander Köplinger [Sat, 1 Oct 2016 00:42:24 +0000 (02:42 +0200)]
Fix build break from 81fb20737f810def6dde88d87a1b2f23cdb736c3

The HttpWebResponse stub that is used e.g. on the monotouch_watch profile was missing an overload that this commit was using.

7 years ago[corlib] Fix a warning
Alexander Köplinger [Sat, 1 Oct 2016 00:23:52 +0000 (02:23 +0200)]
[corlib] Fix a warning

7 years agoFix build break from efd53c8e2f1823568309a2920091b724be0feff8
Alexander Köplinger [Sat, 1 Oct 2016 00:23:32 +0000 (02:23 +0200)]
Fix build break from efd53c8e2f1823568309a2920091b724be0feff8

The new/renamed TypeBuilderInstantiation wasn't available with FULL_AOT_RUNTIME,
breaking the monotouch profile build.

7 years ago[System] Fill more WebException details when CONNECT fails. Fixes #19594
Marek Safar [Fri, 30 Sep 2016 22:10:03 +0000 (00:10 +0200)]
[System] Fill more WebException details when CONNECT fails. Fixes #19594

7 years agoBump corlib version for efd53c8e2f1823568309a2920091b724be0feff8.
Zoltan Varga [Fri, 30 Sep 2016 21:27:39 +0000 (17:27 -0400)]
Bump corlib version for efd53c8e2f1823568309a2920091b724be0feff8.

7 years ago[scripts]: Add 'btls-cert-sync' script.
Martin Baulig [Fri, 30 Sep 2016 20:48:01 +0000 (22:48 +0200)]
[scripts]: Add 'btls-cert-sync' script.

(cherry picked from commit 30fabaedd3c8e7f6cc7b512ce731396bb82e98eb)

7 years ago[System]: Fix MonoTlsProviderFactory.TryDynamicLoad() logic.
Martin Baulig [Fri, 30 Sep 2016 20:45:30 +0000 (22:45 +0200)]
[System]: Fix MonoTlsProviderFactory.TryDynamicLoad() logic.

If the MONO_TLS_PROVIDER environment variable is missing, use "default".

(cherry picked from commit 7002264dd26784f8df2a5a4f39db768da892b9d1)

7 years ago[SRE] Rename MonoGenericClass to TypeBuilderInstantiation to match MS. (#3679)
Zoltan Varga [Fri, 30 Sep 2016 17:45:30 +0000 (13:45 -0400)]
[SRE] Rename MonoGenericClass to TypeBuilderInstantiation to match MS. (#3679)

7 years ago[runtime] Fix a warning.
Zoltan Varga [Fri, 30 Sep 2016 17:35:11 +0000 (13:35 -0400)]
[runtime] Fix a warning.

7 years ago[System]: Make BTLS the default TLS Provider on Desktop.
Martin Baulig [Fri, 30 Sep 2016 15:36:50 +0000 (17:36 +0200)]
[System]: Make BTLS the default TLS Provider on Desktop.

7 years ago[cert-sync]: Make the new store the default and add '--legacy' for the old one.
Martin Baulig [Fri, 30 Sep 2016 15:28:52 +0000 (17:28 +0200)]
[cert-sync]: Make the new store the default and add '--legacy' for the old one.

7 years ago[BTLS]: Remove some debugging methods.
Martin Baulig [Fri, 30 Sep 2016 15:02:01 +0000 (17:02 +0200)]
[BTLS]: Remove some debugging methods.

7 years agoMerge pull request #3681 from rolfbjarne/fix-monotouch-build
Alexander Köplinger [Fri, 30 Sep 2016 15:02:57 +0000 (17:02 +0200)]
Merge pull request #3681 from rolfbjarne/fix-monotouch-build

[System] Fix monotouch* build.

7 years ago[System] Fix monotouch* build.
Rolf Bjarne Kvinge [Fri, 30 Sep 2016 14:23:23 +0000 (16:23 +0200)]
[System] Fix monotouch* build.

7 years ago[System]: Enable AndroidPlatform.CertStoreLookup().
Martin Baulig [Fri, 30 Sep 2016 14:24:38 +0000 (16:24 +0200)]
[System]: Enable AndroidPlatform.CertStoreLookup().

Uses reflection to call into AndroidEnvironment.CertStoreLookup()
(which as been added in https://github.com/xamarin/xamarin-android/pull/246).

7 years agoBump boringssl to fix the build
Alexander Köplinger [Fri, 30 Sep 2016 14:13:02 +0000 (16:13 +0200)]
Bump boringssl to fix the build

7 years ago[btls] Only use cmake policies CMP0026/CMP0042 if cmake supports it
Alexander Köplinger [Fri, 30 Sep 2016 13:56:53 +0000 (15:56 +0200)]
[btls] Only use cmake policies CMP0026/CMP0042 if cmake supports it

Some older cmake versions don't.

7 years ago[System]: AndroidPlatform.CertStoreLookup(): add to the build, but return null.
Martin Baulig [Fri, 30 Sep 2016 13:16:42 +0000 (15:16 +0200)]
[System]: AndroidPlatform.CertStoreLookup(): add to the build, but return null.

This needs to have support added to xamarin-android before we can enable it.

(cherry picked from commit 9e46b5744b93bcc0bc36ab9d957a5510aaeabf1f)

7 years agoMerge pull request #3676 from chamons/SignalHandlerAPI_XM45
Alexander Köplinger [Fri, 30 Sep 2016 12:56:38 +0000 (14:56 +0200)]
Merge pull request #3676 from chamons/SignalHandlerAPI_XM45

Add Mono.Runtime to XM 4.5 profile

7 years ago[BTLS]: Add managed BTLS sources.
Martin Baulig [Fri, 30 Sep 2016 11:47:22 +0000 (13:47 +0200)]
[BTLS]: Add managed BTLS sources.

* external/boringssl: unmanaged code from Google (added earlier).

* mono/btls: unmanaged BTLS lives here (added earlier).

* System/Mono.Btls: managed BTLS lives here.

* Mono.Btls.Interface: The purpose of this assembly is to allow test suites
  such as xamarin/web-tests to test parts of the BTLS APIs without making
  System.dll's internals visible.  It is not a stable and maintained API.

7 years ago[Mono.Security]: Add the new certificate store.
Martin Baulig [Fri, 30 Sep 2016 11:08:26 +0000 (13:08 +0200)]
[Mono.Security]: Add the new certificate store.

BTLS uses a different format and naming scheme for the local certificate store.

Before using BTLS for the first time on desktop, you need to convert the local
certificate store by either using the new `btls-cert-sync` tool (which will convert
your existing certificate store to the new new format) or `cert-sync` with the
`--btls` argument.

The new format and naming scheme is identically to what you'll find in
'/system/etc/security/cacerts/' on an Android device.  It stores the certificates
in PEM format (with a human-readable text section added) using filenames which
are based on the certificate's subject name hash.

Previously, Mono stored the certificates in binary DER format, using a filename
based on either the Subject-Key-Identifier (if available) or the thumbprint.

We cannot access this from BTLS because computing these filenames requires
reading the entire X509 certificate (including the X509v3 extensions), but
their native lookup code only gives us the SubjectName.

This transitioning won't affect Android users as we're using the system
certificate store (including the user certificate store, via a Java callback).

* Mono.Security.X509.X509Store and X509Stores:
  Support both the old and the new format.  Using the new format requires BTLS.

* Mono.Security.X509.X509StoreManager:
  Add `NewCurrentUserPath` and `NewLocalMachinePath` properties for the
  new path names (~/.config/.mono/new-certs).

* Mono.Security.X509.X509StoreManager:
  Add `NewCurrentUser` and `NewLocalMachine` properties.  Requires BTLS.

* tools/security/cert-sync:
  Add new `--btls` argument to use the new store.

7 years ago[System]: Add AndroidPlatform.CertStoreLookup().
Martin Baulig [Fri, 30 Sep 2016 10:58:15 +0000 (12:58 +0200)]
[System]: Add AndroidPlatform.CertStoreLookup().

This is conditional to HAVE_BTLS and needs to have support added
to xamarin-android first.

7 years ago[System]: New X509Helper2 APIs for BTLS.
Martin Baulig [Fri, 30 Sep 2016 10:55:31 +0000 (12:55 +0200)]
[System]: New X509Helper2 APIs for BTLS.

The managed HAVE_BTLS conditionals will be removed once BTLS itself has landed.

7 years ago[System.Core] Cleanup more warnings
Marek Safar [Fri, 30 Sep 2016 10:08:33 +0000 (12:08 +0200)]
[System.Core] Cleanup more warnings

7 years ago[System.Data] Cleanup warnings
Marek Safar [Fri, 30 Sep 2016 09:04:07 +0000 (11:04 +0200)]
[System.Data] Cleanup warnings

7 years ago[System.Data] Implements SqlClient async readers. Fixes #44843
Marek Safar [Fri, 30 Sep 2016 08:52:00 +0000 (10:52 +0200)]
[System.Data] Implements SqlClient async readers. Fixes #44843

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 agoAdd Mono.Runtime to XM 4.5 profile
Chris Hamons [Thu, 29 Sep 2016 19:53:32 +0000 (14:53 -0500)]
Add Mono.Runtime to XM 4.5 profile

- Extends https://github.com/mono/mono/pull/3624