mono.git
8 years agoMerge pull request #2884 from ludovic-henry/fix-process-hasexited
Alexander Köplinger [Thu, 14 Apr 2016 13:58:31 +0000 (15:58 +0200)]
Merge pull request #2884 from ludovic-henry/fix-process-hasexited

[Process] Fix HasExited for non-child process

8 years ago[Process] Fix HasExited for non-child process
Ludovic Henry [Thu, 14 Apr 2016 09:53:56 +0000 (11:53 +0200)]
[Process] Fix HasExited for non-child process

NativeMethods.GetExitCodeProcess would inherently be broken on Unix platforms for non-child processes as it can't succesfully get the exit code. This would in turn break Process.HasExited, which should not break, as it is possible to check if a non-child process is alive or dead.

8 years ago[Process] Set haveProcessHandle to true when setting m_processHandle
Ludovic Henry [Thu, 14 Apr 2016 09:53:13 +0000 (11:53 +0200)]
[Process] Set haveProcessHandle to true when setting m_processHandle

8 years agoRevert "Fix missing CommonCrypto/Makefile.include in "make dist" tarballs"
Jo Shields [Thu, 14 Apr 2016 08:40:29 +0000 (09:40 +0100)]
Revert "Fix missing CommonCrypto/Makefile.include in "make dist" tarballs"

Needed due to Marek's CommonCrypto changes

This reverts commit c0ea8090525213e5236568f1ae494fac17fdd27b.

8 years agoRevert "Revert "[Mono.Security] Fixes wrong path in makefile""
Marek Safar [Thu, 14 Apr 2016 06:30:22 +0000 (08:30 +0200)]
Revert "Revert "[Mono.Security] Fixes wrong path in makefile""

This reverts commit b0c6a92785e5590af777a29600130ff5adb27e30.

8 years agoRevert "Revert "[build] Clean up common crypto build""
Marek Safar [Thu, 14 Apr 2016 06:13:47 +0000 (08:13 +0200)]
Revert "Revert "[build] Clean up common crypto build""

This reverts commit ba9d141ed8b7680d812e54f5db8adf19e1a3d4f4.

8 years ago[Mono.Security] Fixes build
Marek Safar [Thu, 14 Apr 2016 06:06:56 +0000 (08:06 +0200)]
[Mono.Security] Fixes build

8 years agouse native realpath() function (#2877)
Daniel Becker [Thu, 14 Apr 2016 02:53:34 +0000 (19:53 -0700)]
use native realpath() function (#2877)

Instead of opening a file for the sole purpose of calling
F_GETPATH on the resulting descriptor, we can just use the
native realpath() function; as a side benefit, this also works
on *BSD where F_GETPATH isn't supported.

8 years agoMerge pull request #2879 from lewurm/undo-breaking-changes
monojenkins [Thu, 14 Apr 2016 02:15:22 +0000 (03:15 +0100)]
Merge pull request #2879 from lewurm/undo-breaking-changes

Undo breaking changes

@monojenkins merge

8 years agoRevert "[build] Clean up common crypto build"
Bernhard Urban [Thu, 14 Apr 2016 00:21:57 +0000 (17:21 -0700)]
Revert "[build] Clean up common crypto build"

This reverts commit ecd2f512ced44cd6c6e48594aa27435d0e64eecc.

8 years agoRevert "[Mono.Security] Fixes wrong path in makefile"
Bernhard Urban [Thu, 14 Apr 2016 00:20:29 +0000 (17:20 -0700)]
Revert "[Mono.Security] Fixes wrong path in makefile"

This reverts commit 90611f918522633f3d88aff0d54980c6f275f0f6.

8 years ago[arm] Use a direct branch in the krait workaround to avoid clang generating extra...
Zoltan Varga [Wed, 13 Apr 2016 20:28:14 +0000 (16:28 -0400)]
[arm] Use a direct branch in the krait workaround to avoid clang generating extra code and moving it before the inline assembly block. Fixes #40239.

8 years agoMove remaining System.Net.Http pieces from mono-extensions to mono
Alexander Köplinger [Wed, 13 Apr 2016 16:58:43 +0000 (18:58 +0200)]
Move remaining System.Net.Http pieces from mono-extensions to mono

Discussed with @rolfbjarne, these were missed in the initial import of the mono-extension sources.

8 years agoMerge pull request #2874 from lateralusX/jlorenss/win-x64-support
monojenkins [Wed, 13 Apr 2016 16:35:31 +0000 (17:35 +0100)]
Merge pull request #2874 from lateralusX/jlorenss/win-x64-support

jlorenss/win x64 support

Initial fixes needed in order to get pass on mono regression tests for windows x64 visual studio build,

--regression basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe

Before fixes there were failures in basic.exe, exceptions.exe and objects.exe for windows x64  Visual studio build.

Failures in basic.exe and exceptions.exe was due to a mix up of signal defines on windows platform in Visual Studio build  where SIGILL and SIGFPE was defined differently in different source files causing incorrect signal handler to be invoked at runtime, causing incorrect thrown .NET exception. Fix is to make sure signal.h is always included giving the same value for SIGILl and SIGFPE over all source files.

Failures in objects.exe test_0_mul_ovf_regress_36052 caused a stack overflow crash when running togehter with branch optimization mode. This was due to incorrect lowering of x64 test instruction when optimization moved over to use R8 instead of RAX and current lowering didn't handle that correctly meaning that the actual test was performed against wrong register causing a loop that caused a stack overflow error. The specific amd64 codegen , amd64_test_reg_imm, is currently only used on x64 windows platform for the stackalloc call.

8 years ago[Mono.Security] Fixes wrong path in makefile
Marek Safar [Wed, 13 Apr 2016 16:18:37 +0000 (18:18 +0200)]
[Mono.Security] Fixes wrong path in makefile

8 years ago[build] Clean up common crypto build
Marek Safar [Wed, 13 Apr 2016 15:46:25 +0000 (17:46 +0200)]
[build] Clean up common crypto build

8 years agoUpdate X509CertificateImplApple.
Martin Baulig [Wed, 13 Apr 2016 14:21:29 +0000 (16:21 +0200)]
Update X509CertificateImplApple.

8 years ago[corlib]: Add X509CertificateImpl.GetNativeAppleCertificate().
Martin Baulig [Wed, 13 Apr 2016 13:45:42 +0000 (15:45 +0200)]
[corlib]: Add X509CertificateImpl.GetNativeAppleCertificate().

In SSCX.OSX509Certificates.GetCertificate(), we cannot simply use
'X509Certificate.Handle' because it may point to something that's
not a SecCertificate.

(cherry picked from commit 3fc068f7e283a3d7e2e78ff2d0e3cec492c87cc6)

8 years agoMerge pull request #2800 from BrzVlad/feature-lazy-sweep
Vlad Brezae [Wed, 13 Apr 2016 08:51:25 +0000 (16:51 +0800)]
Merge pull request #2800 from BrzVlad/feature-lazy-sweep

[sgen] Enable lazy sweep by default

8 years ago[sgen] Enable lazy sweep by default
Vlad Brezae [Thu, 10 Mar 2016 18:16:52 +0000 (20:16 +0200)]
[sgen] Enable lazy sweep by default

8 years ago[sgen] Concurrently sweep blocks also in the lazy sweep case
Vlad Brezae [Thu, 10 Mar 2016 16:59:20 +0000 (18:59 +0200)]
[sgen] Concurrently sweep blocks also in the lazy sweep case

In the lazy sweep case, the sweep job doesn't sweep the blocks. Instead, the blocks are swept when they are actually needed (when we want to allocate in the block, scan the block etc.). This delays the mutator or increases the nursery pauses. Try to sweep as many blocks as possible concurrently, immediately after we finish the sweep job.

8 years agoMerge pull request #2822 from BrzVlad/feature-lshift-decomposition
Vlad Brezae [Tue, 12 Apr 2016 21:32:39 +0000 (05:32 +0800)]
Merge pull request #2822 from BrzVlad/feature-lshift-decomposition

[jit] Decompose long immediate shifts

8 years ago[corlib] Handle CreateDirectory with relative paths. Fixes #40187
Marek Safar [Tue, 12 Apr 2016 14:44:58 +0000 (16:44 +0200)]
[corlib] Handle CreateDirectory with relative paths. Fixes #40187

8 years agoBump reference source
Marek Safar [Tue, 12 Apr 2016 14:10:17 +0000 (16:10 +0200)]
Bump reference source

8 years agoMerge pull request #2872 from alexrp/timer-dispose2-test
Alex Rønne Petersen [Tue, 12 Apr 2016 13:31:31 +0000 (15:31 +0200)]
Merge pull request #2872 from alexrp/timer-dispose2-test

[corlib] Fix TimerTest.TestDispose2 () test.

8 years ago[corlib] SymbolType from reference source. Fixes #39911
Marek Safar [Tue, 12 Apr 2016 13:17:53 +0000 (15:17 +0200)]
[corlib] SymbolType from reference source. Fixes #39911

8 years agoFixed incorrect lowering on x64 for test instruction when register r8-r15 where used.
lateralusX [Tue, 12 Apr 2016 09:25:51 +0000 (11:25 +0200)]
Fixed incorrect lowering on x64 for test instruction when register r8-r15 where used.
Currently only triggered by objects.exe regression test on windows x64 with branch opt, since stackalloc gets lowered to this test and branch will start using R8 instead of RAX for the test.

8 years agoFixed issue on x64 windows Visual Studio builds where signal define values got mixedup.
lateralusX [Tue, 12 Apr 2016 09:25:02 +0000 (11:25 +0200)]
Fixed issue on x64 windows Visual Studio builds where signal define values got mixedup.
Caused incorrect exception behavior and failures in basic.exe, exceptions.exe regression test on x64 windows. This was due to the fact that some source files didn't include signal.h while others did. In case where signal.h was not included incompatible defines were used for SIGILL and SIGFPE in mini-amd64.h.

8 years agoBump referencesource
Marek Safar [Tue, 12 Apr 2016 09:29:38 +0000 (11:29 +0200)]
Bump referencesource

8 years ago[corlib] Fix TimerTest.TestDispose2 () test.
Alex Rønne Petersen [Tue, 12 Apr 2016 05:01:01 +0000 (07:01 +0200)]
[corlib] Fix TimerTest.TestDispose2 () test.

8 years agoMerge pull request #2870 from madewokherd/arginfo
monojenkins [Tue, 12 Apr 2016 03:45:27 +0000 (04:45 +0100)]
Merge pull request #2870 from madewokherd/arginfo

x86 cleanups for register arguments

Best I can tell, cinfo->args and cfg->args need to be independent before implementing calling conventions where some arguments are in registers, at least if we want to do it cleanly. Also, storing the argument offset in a cfg->args instruction that claims to be for a register seems hacky and confusing to me.

8 years ago[sgen] Fix compare function
Vlad Brezae [Mon, 11 Apr 2016 23:26:52 +0000 (02:26 +0300)]
[sgen] Fix compare function

8 years ago[runtime] Avoid printing out the corlib version when running -v --version, it require...
Zoltan Varga [Mon, 11 Apr 2016 22:44:51 +0000 (18:44 -0400)]
[runtime] Avoid printing out the corlib version when running -v --version, it requires a working runtime. Fixes #40175.

8 years ago[runtime] Fix the build of cominterop.c with DISABLE_JIT.
Zoltan Varga [Mon, 11 Apr 2016 22:33:25 +0000 (18:33 -0400)]
[runtime] Fix the build of cominterop.c with DISABLE_JIT.

8 years agoMerge pull request #2802 from BrzVlad/feature-evacuation-opt2
Vlad Brezae [Mon, 11 Apr 2016 20:38:19 +0000 (04:38 +0800)]
Merge pull request #2802 from BrzVlad/feature-evacuation-opt2

[sgen] Reduce number of evacuated objects

8 years ago[x86] Don't use the inst_offset field of OP_REGVAR arguments.
Vincent Povirk [Mon, 11 Apr 2016 19:16:05 +0000 (14:16 -0500)]
[x86] Don't use the inst_offset field of OP_REGVAR arguments.

8 years ago[x86] Store CallInfo in MonoCompileArch structure.
Vincent Povirk [Mon, 11 Apr 2016 19:15:20 +0000 (14:15 -0500)]
[x86] Store CallInfo in MonoCompileArch structure.

8 years ago[build] Remove unused lib paths
Marek Safar [Mon, 11 Apr 2016 18:35:31 +0000 (20:35 +0200)]
[build] Remove unused lib paths

8 years ago[mcs] Dynamic context in constructor initializers or field initializers is static...
Marek Safar [Mon, 11 Apr 2016 18:33:47 +0000 (20:33 +0200)]
[mcs] Dynamic context in constructor initializers or field initializers is static. Fixes #40088

8 years agoMerge pull request #2819 from BrzVlad/fix-major-log
Vlad Brezae [Mon, 11 Apr 2016 16:23:50 +0000 (00:23 +0800)]
Merge pull request #2819 from BrzVlad/fix-major-log

[sgen] Fix major size logging

8 years ago[jit] Decompose long immediate shifts
Vlad Brezae [Wed, 10 Feb 2016 09:55:17 +0000 (11:55 +0200)]
[jit] Decompose long immediate shifts

We decompose them as part of the cprop pass to handle more immediates and to further propagate copies.

The native backend of some architectures (for example x86) may support long shifts with specialized instructions. Even there, this still makes immediate shifts 2 times faster because long ops are poorly handled by the jit.

On arm, where we were emulating, this makes long immediate shifts 3-5 times faster.

8 years agoMerge pull request #2867 from alexrp/sgen-block-size-ppc
monojenkins [Mon, 11 Apr 2016 16:15:24 +0000 (17:15 +0100)]
Merge pull request #2867 from alexrp/sgen-block-size-ppc

[sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.

This fixes a problem that was happening on Debian ppc32 build machines. Since
they are set up as a 32-bit userland on a 64-bit kernel, Mono would be compiled
with an ARCH_MIN_MS_BLOCK_SIZE value of 16k. However, at runtime, the system
page size would be 64k (due to the 64-bit kernel with PPC_64K_PAGES set).

Signed-off-by: `Alex Rønne Petersen <alexrp@xamarin.com>`
8 years agoMerge pull request #2866 from alexrp/solaris-10-tls
Alex Rønne Petersen [Mon, 11 Apr 2016 16:12:09 +0000 (18:12 +0200)]
Merge pull request #2866 from alexrp/solaris-10-tls

[configure] Use __thread instead of pthread TLS on Solaris/x86.

8 years ago[mcs] Use Array.Empty for empty arrays when available
Marek Safar [Mon, 11 Apr 2016 15:59:17 +0000 (17:59 +0200)]
[mcs] Use Array.Empty for empty arrays when available

8 years ago[mcs] Tie-breaking rules are applied also for non-equivalent parameter types. Fixess...
Marek Safar [Mon, 11 Apr 2016 14:11:34 +0000 (16:11 +0200)]
[mcs] Tie-breaking rules are applied also for non-equivalent parameter types. Fixess #40183

8 years ago[mcs] Add tie breaking rule when candidate is in expanded form only and best has...
Marek Safar [Sat, 9 Apr 2016 14:34:56 +0000 (16:34 +0200)]
[mcs] Add tie breaking rule when candidate is in expanded form only and best has default arguments

8 years agoMerge pull request #2868 from akoeplinger/maccore-fixes
monojenkins [Mon, 11 Apr 2016 15:50:26 +0000 (16:50 +0100)]
Merge pull request #2868 from akoeplinger/maccore-fixes

[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case

It caused errors like the following on the maccore builds:

```
  CCLD     libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
  "_mono_reflection_get_custom_attrs_blob_checked", referenced from:
      _ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```

---

This is the last patch required for getting maccore master to build again with mono master.

@monojenkins merge

8 years agoCompiler-less mkbundle support in Mono.
Miguel de Icaza [Mon, 11 Apr 2016 14:42:51 +0000 (10:42 -0400)]
Compiler-less mkbundle support in Mono.

This is the support that makes it so that mkbundle can create self-contained executables without requiring a native toolchain to be present. Also is the foundation to allow cross-compilation of self-contained executables.

This works by concatenating the runtime with the various dependencies and configuration files, attaching a directory at the end of the file and a signature to flag this as a runtime that has embedded resources in the executable file itself.

This works by modifying the runtime startup to check for a special signature at the end of the main executable, if it is not present, execution resumes as usual. Otherwise a directory is read from the end of the file which contains both the kind of file (assembly, configuration file, and so on), as well as pointer to the contents in the file. Then the regular Mono APIs to load resources are used to load these.This is the support that makes it so that mkbundle can create self-contained executables without requiring a native toolchain to be present. Also is the foundation to allow cross-compilation of self-contained executables.

This works by concatenating the runtime with the various dependencies and configuration files, attaching a directory at the end of the file and a signature to flag this as a runtime that has embedded resources in the executable file itself.

This works by modifying the runtime startup to check for a special signature at the end of the main executable, if it is not present, execution resumes as usual. Otherwise a directory is read from the end of the file which contains both the kind of file (assembly, configuration file, and so on), as well as pointer to the contents in the file. Then the regular Mono APIs to load resources are used to load these.

8 years ago[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT...
Alexander Köplinger [Mon, 11 Apr 2016 13:50:42 +0000 (15:50 +0200)]
[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case

It caused errors like the following on the maccore builds:

```
  CCLD     libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
  "_mono_reflection_get_custom_attrs_blob_checked", referenced from:
      _ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```

8 years agoMerge pull request #2865 from akoeplinger/maccore-fixes
Alexander Köplinger [Mon, 11 Apr 2016 12:05:06 +0000 (14:05 +0200)]
Merge pull request #2865 from akoeplinger/maccore-fixes

A few small fixes for maccore

8 years ago[sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.
Mathieu Malaterre [Mon, 11 Apr 2016 09:04:47 +0000 (11:04 +0200)]
[sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.

This fixes a problem that was happening on Debian ppc32 build machines. Since
they are set up as a 32-bit userland on a 64-bit kernel, Mono would be compiled
with an ARCH_MIN_MS_BLOCK_SIZE value of 16k. However, at runtime, the system
page size would be 64k (due to the 64-bit kernel with PPC_64K_PAGES set).

Signed-off-by: Alex Rønne Petersen <alexrp@xamarin.com>
8 years ago[configure] Use __thread instead of pthread TLS on Solaris/x86.
Alex Rønne Petersen [Mon, 11 Apr 2016 07:41:12 +0000 (09:41 +0200)]
[configure] Use __thread instead of pthread TLS on Solaris/x86.

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

Tested on Solaris/x86 by Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>.

8 years ago[mini] Add a stub for mono_arch_create_handler_block_trampoline to tramp-arm64.c
Alexander Köplinger [Mon, 11 Apr 2016 00:38:22 +0000 (02:38 +0200)]
[mini] Add a stub for mono_arch_create_handler_block_trampoline to tramp-arm64.c

Otherwise it's not defined in the DISABLE_JIT case.

8 years ago[metadata] reflection.c: add missing MonoError parameter for mono_reflection_lookup_d...
Alexander Köplinger [Sun, 10 Apr 2016 23:34:11 +0000 (01:34 +0200)]
[metadata] reflection.c: add missing MonoError parameter for mono_reflection_lookup_dynamic_token

It was missed in the recent refactoring in 96373eb62e4a73876b5ded49449ccb0fd16c40e8

8 years ago[metadata] Guard access to mb->locals_list with DISABLE_JIT ifdef
Alexander Köplinger [Sun, 10 Apr 2016 23:29:10 +0000 (01:29 +0200)]
[metadata] Guard access to mb->locals_list with DISABLE_JIT ifdef

The field is only available when DISABLE_JIT is not defined.

8 years ago[build] Remove EXTENSION_include and _exclude from library.make
Alexander Köplinger [Sun, 10 Apr 2016 16:46:37 +0000 (18:46 +0200)]
[build] Remove EXTENSION_include and _exclude from library.make

We do not have any .sources or .exclude.sources in mono-extensions anymore so this is no longer needed.

8 years agoMerge pull request #2864 from cptjazz/python3_compatibility
Alexander Köplinger [Sun, 10 Apr 2016 16:02:35 +0000 (18:02 +0200)]
Merge pull request #2864 from cptjazz/python3_compatibility

Make versions script compatible to python3: Add () when using `print'.

8 years agoMerge pull request #2854 from alexrp/lock-free-queue-docs
Miguel de Icaza [Sun, 10 Apr 2016 14:44:18 +0000 (10:44 -0400)]
Merge pull request #2854 from alexrp/lock-free-queue-docs

[utils/lfq] Clarify and document the lock-free queue API.

8 years agoMake versions script compatible to python3: Add () when using `print'.
Alexander Jesner [Sun, 10 Apr 2016 14:19:56 +0000 (16:19 +0200)]
Make versions script compatible to python3: Add () when using `print'.

8 years ago[sgen] Evacuate from emptier blocks to fuller ones
Vlad Brezae [Tue, 22 Mar 2016 19:11:39 +0000 (21:11 +0200)]
[sgen] Evacuate from emptier blocks to fuller ones

We don't evacuate from full blocks. When it comes to blocks that have free slots, instead of evacuating all of them to a new set of blocks, aim to keep the fuller blocks around and evacuate the emptier ones into them.

8 years ago[sgen] Don't evacuate full blocks
Vlad Brezae [Tue, 22 Mar 2016 18:16:07 +0000 (20:16 +0200)]
[sgen] Don't evacuate full blocks

8 years agoMerge pull request #2851 from mono/mono-symbolicate-ikvm-master
Alexis Christoforides [Sun, 10 Apr 2016 00:07:58 +0000 (20:07 -0400)]
Merge pull request #2851 from mono/mono-symbolicate-ikvm-master

[mono-symbolicate] Use IKVM.Reflection instead of System.Reflection

8 years ago[mcs] Codegen of try-catch-finally with await inside both try and catch. Fixes #39866
Marek Safar [Sat, 9 Apr 2016 07:44:25 +0000 (09:44 +0200)]
[mcs] Codegen of try-catch-finally with await inside both try and catch. Fixes #39866

8 years agoMerge pull request #2860 from lewurm/fix-cfgdump-related-stuff
monojenkins [Fri, 8 Apr 2016 22:45:18 +0000 (23:45 +0100)]
Merge pull request #2860 from lewurm/fix-cfgdump-related-stuff

Fix `cfgdump` related stuff

8 years ago[jit] include cfgdump.h in common_sources
Bernhard Urban [Fri, 8 Apr 2016 19:03:30 +0000 (12:03 -0700)]
[jit] include cfgdump.h in common_sources

8 years ago[cfg-dump] fix warning
Bernhard Urban [Fri, 8 Apr 2016 18:59:51 +0000 (11:59 -0700)]
[cfg-dump] fix warning

8 years agoMerge pull request #2856 from alexrp/profiler-fix-sem
monojenkins [Fri, 8 Apr 2016 17:55:19 +0000 (18:55 +0100)]
Merge pull request #2856 from alexrp/profiler-fix-sem

[profiler] Fix incorrect initial writer semaphore value.

This was used during debugging. I forgot to revert it back to 0 before posting
the pull request (#2838). This led to ~3-5% more CPU usage by the writer thread
than actually necessary; it now sits around 0-1% for typical workloads.

8 years ago[utils/lfq] Clarify and document the lock-free queue API.
Alex Rønne Petersen [Fri, 8 Apr 2016 01:48:42 +0000 (03:48 +0200)]
[utils/lfq] Clarify and document the lock-free queue API.

8 years ago[corlib]: Add internal callback to 'X509Helper' to use System's X509Helper2.
Martin Baulig [Fri, 8 Apr 2016 12:18:46 +0000 (14:18 +0200)]
[corlib]: Add internal callback to 'X509Helper' to use System's X509Helper2.

(cherry picked from commit 5eaf4db0918f4e59c47b22e6379236a55f6c813e)

8 years ago[Mono.Security]: Cleanup 'CertificateValidationHelper'.
Martin Baulig [Fri, 8 Apr 2016 13:41:13 +0000 (15:41 +0200)]
[Mono.Security]: Cleanup 'CertificateValidationHelper'.

The overloaded GetValidator() which takes both 'MonoTlsSettings'
and 'MonoTlsProvider' is actually used by the test suite, so let's
keep it public.

(cherry picked from commit 0977d531d2579c9051a6a2e6d0cb47e4f720bea4)

8 years agoMerge pull request #2857 from malaterre/master
monojenkins [Fri, 8 Apr 2016 16:40:17 +0000 (17:40 +0100)]
Merge pull request #2857 from malaterre/master

Remove an undefined behavior

Found using gcc -fsanitize=bounds

8 years ago[ci] Don't use babysitter on Windows/cygwin
Alexander Köplinger [Fri, 8 Apr 2016 15:22:23 +0000 (17:22 +0200)]
[ci] Don't use babysitter on Windows/cygwin

babysitter generates some temp paths in python when running under cygwin, which breaks down
when those paths are passed to the native Windows mono.exe during testing:

    Exception in TestRunnerThread ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\cygdrive\c\WINDOWS\TEMP\tmpC4K5yK\babysitter_report_current_test_file.txt".

8 years ago[System]: Use MonoTlsProviderFactory.GetDefaultProviderInternal() to cache the result.
Martin Baulig [Fri, 8 Apr 2016 12:57:26 +0000 (14:57 +0200)]
[System]: Use MonoTlsProviderFactory.GetDefaultProviderInternal() to cache the result.

(cherry picked from commit 6d41d1562f6cec0da94229fb33e0c42ae2bf22e9)

8 years agoRemove an undefined behavior
Mathieu Malaterre [Fri, 8 Apr 2016 10:49:17 +0000 (12:49 +0200)]
Remove an undefined behavior

Found using gcc -fsanitize=bounds

8 years agoMerge pull request #2855 from malaterre/master
Alex Rønne Petersen [Fri, 8 Apr 2016 10:44:17 +0000 (12:44 +0200)]
Merge pull request #2855 from malaterre/master

Remove a simple memory leak

8 years ago[profiler] Fix incorrect initial writer semaphore value.
Alex Rønne Petersen [Fri, 8 Apr 2016 10:36:20 +0000 (12:36 +0200)]
[profiler] Fix incorrect initial writer semaphore value.

This was used during debugging. I forgot to revert it back to 0 before posting
the pull request (#2838). This led to ~3-5% more CPU usage by the writer thread
than actually necessary; it now sits around 0-1% for typical workloads.

8 years agoRemove a simple memory leak
Mathieu Malaterre [Fri, 8 Apr 2016 06:50:19 +0000 (08:50 +0200)]
Remove a simple memory leak

8 years agoMerge pull request #2852 from alexrp/master
monojenkins [Fri, 8 Apr 2016 04:20:40 +0000 (05:20 +0100)]
Merge pull request #2852 from alexrp/master

[profiler] Fix usage of the lock-free queue API.

* Free nodes hazardously.
* No need to unpoison nodes since we're not reusing them.
* Fix memory leak when emptying coverage queues.

8 years ago[profiler] Fix a warning.
Alex Rønne Petersen [Fri, 8 Apr 2016 00:49:22 +0000 (02:49 +0200)]
[profiler] Fix a warning.

8 years ago[profiler] Fix usage of the lock-free queue API.
Alex Rønne Petersen [Thu, 7 Apr 2016 23:18:09 +0000 (01:18 +0200)]
[profiler] Fix usage of the lock-free queue API.

* Free nodes hazardously.
* No need to unpoison nodes since we're not reusing them.
* Fix memory leak when emptying coverage queues.

8 years agoMerge pull request #2850 from madewokherd/inetpton
Alexander Köplinger [Fri, 8 Apr 2016 00:18:00 +0000 (02:18 +0200)]
Merge pull request #2850 from madewokherd/inetpton

[configure] Also check that inet_pton is defined when building for Windows.

8 years ago[utils/hp] Export mono_thread_hazardous_try_free () for use in the profiler.
Alex Rønne Petersen [Thu, 7 Apr 2016 23:17:46 +0000 (01:17 +0200)]
[utils/hp] Export mono_thread_hazardous_try_free () for use in the profiler.

8 years ago[ci] Remove quotes from windows msbuild command
Alexander Köplinger [Thu, 7 Apr 2016 23:17:41 +0000 (01:17 +0200)]
[ci] Remove quotes from windows msbuild command

Turns out it wasn't the right fix.

8 years ago[ci] Don't enable the mobile profiles on the community archs
Alexander Köplinger [Thu, 7 Apr 2016 22:52:33 +0000 (00:52 +0200)]
[ci] Don't enable the mobile profiles on the community archs

It only takes time and e.g. causes issues if e.g. AOT doesn't work.

8 years agoRemove unused Mono.Cecil references
Alexis Christoforides [Thu, 7 Apr 2016 22:01:42 +0000 (18:01 -0400)]
Remove unused Mono.Cecil references

8 years ago[mono-symbolicate] Use IKVM.Reflection instead of System.Reflection
Alexis Christoforides [Thu, 7 Apr 2016 21:53:14 +0000 (17:53 -0400)]
[mono-symbolicate] Use IKVM.Reflection instead of System.Reflection
This is so that the tool can work independently of runtime assembly resolution (ie. to load alternate corlibs)

8 years agoMerge pull request #2788 from lambdageek/dev/monoerror-reflection-no-more-raise
monojenkins [Thu, 7 Apr 2016 21:15:36 +0000 (22:15 +0100)]
Merge pull request #2788 from lambdageek/dev/monoerror-reflection-no-more-raise

[reflection] No more mono_*_raise_*

No more `mono_error_raise_exception` and `mono_raise_exception` in `reflection.c`

8 years agoMerge pull request #2769 from lewurm/jit-cfg-dump
monojenkins [Thu, 7 Apr 2016 20:26:04 +0000 (21:26 +0100)]
Merge pull request #2769 from lewurm/jit-cfg-dump

[jit] mini IR dumping feature for IGV

related doc PR: https://github.com/mono/website/pull/189

8 years ago[Mono.Security]: Add new internal 'MonoTlsProvider' APIs.
Martin Baulig [Thu, 7 Apr 2016 19:07:22 +0000 (21:07 +0200)]
[Mono.Security]: Add new internal 'MonoTlsProvider' APIs.

(cherry picked from commit c02a885bd62631c4ff5cde5443f1b1e0cdccc237)

8 years ago[BoringTls]: Register via 'MonoTlsProviderFactory'.
Martin Baulig [Thu, 7 Apr 2016 16:41:53 +0000 (18:41 +0200)]
[BoringTls]: Register via 'MonoTlsProviderFactory'.

(cherry picked from commit e43a5f73320fbde80c36ed294ea1ba7b06cf58bb)

8 years agoMerge pull request #2824 from lambdageek/dev/monoerror-icalls-noraise
monojenkins [Thu, 7 Apr 2016 19:06:02 +0000 (20:06 +0100)]
Merge pull request #2824 from lambdageek/dev/monoerror-icalls-noraise

[runtime] Set pending exception in icalls instead of raising.

8 years ago[configure] Also check that inet_pton is defined when building for Windows.
Vincent Povirk [Thu, 7 Apr 2016 18:18:47 +0000 (13:18 -0500)]
[configure] Also check that inet_pton is defined when building for Windows.

The version of mingw-w64 on Debian wheezy has this symbol in its libraries
but not its headers.

8 years agoMerge pull request #2848 from alexrp/master
monojenkins [Thu, 7 Apr 2016 17:35:18 +0000 (18:35 +0100)]
Merge pull request #2848 from alexrp/master

[libgc] Fix broken AC_TRY_COMPILE() invocation in configure.ac.

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

Tested on PowerPC by `Mathieu Malaterre <malat@debian.org>`.

8 years ago[SRE] Remove uses of mono_error_raise_exception
Aleksey Kliger [Tue, 22 Mar 2016 22:06:15 +0000 (18:06 -0400)]
[SRE] Remove uses of mono_error_raise_exception

1. icall `mono_image_module_basic_init`
2. icall `mono_reflection_sighelper_get_signature_local`
3. icall `mono_reflection_sighelper_get_signature_field`
4. API function mono_module_get_object
5. API function mono_type_get_object
6. API function mono_method_get_object
7. API function mono_field_get_object
8. API function mono_property_get_object
9. API function mono_event_get_object

8 years ago[reflection] Remove last uses of mono_raise_exception
Aleksey Kliger [Tue, 22 Mar 2016 20:51:48 +0000 (16:51 -0400)]
[reflection] Remove last uses of mono_raise_exception

1. static function `create_custom_attr` (set MonoError exception instance)
2. icall `mono_reflection_resolve_custom_attribute_data` (set pending
exception from MonoError). Also rename it to
ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal
3. icall `mono_reflection_bind_generic_method_parameters` (set pending
exception from MonoError)  Not renaming this one because it's actually
used for two icalls:
System.Reflection.Emit.MethodBuilder.MakeGenericMethod and System.Reflection.MonoMethod.MakeGenericMethod_impl

8 years ago[SRE] MonoError-ize reflection_methodbuilder_to_mono_method
Aleksey Kliger [Tue, 15 Mar 2016 22:29:38 +0000 (15:29 -0700)]
[SRE] MonoError-ize reflection_methodbuilder_to_mono_method

8 years ago[SRE] MonoError-ize mono_reflection_create_generic_class
Aleksey Kliger [Tue, 15 Mar 2016 18:14:29 +0000 (11:14 -0700)]
[SRE] MonoError-ize mono_reflection_create_generic_class

Change icall name to
ves_icall_System_Reflection_Emit_TypeBuilder_create_generic_class

Give mono_reflection_create_generic_class a MonoError argument,
and get rid of the redundant mono_reflection_create_generic_class_checked

8 years ago[ci] Fall back to timeout command if babysitter doesn't work
Alexander Köplinger [Thu, 7 Apr 2016 14:57:54 +0000 (16:57 +0200)]
[ci] Fall back to timeout command if babysitter doesn't work

Some Jenkins workers (e.g. the s390x one) have an earlier python version installed where the babysitter doesn't work.
Fall back to timeout in those cases.

8 years ago[BoringTls]: Merge the work branch.
Martin Baulig [Thu, 7 Apr 2016 13:55:27 +0000 (15:55 +0200)]
[BoringTls]: Merge the work branch.

* Mono.Security.Interface.ICertificateValidator2:
  new internal interface, deriving from ICertificateValidator.

* Mono.Security.Interface.CertificateValidationHelper:
  the internal GetValidator() now returns ICertificateValidator2.

* Mono.Security.Interface.MonoTlsProvider:
  make HasCustomSystemCertificateValidator and InvokeSystemCertificateValidator()
  internal and use ICertificateValidator2.

* Mono.Net.Security.ChainValidator:
  implement ICertificateValidator2; we may now be called with a
  fully-built X509Chain.

* corlib, System, Mono.Security:
  add [assembly: InternalsVisibleTo].

8 years ago[ci] Escape run-step.sh invocations, for paths with spaces in
Jo Shields [Thu, 7 Apr 2016 14:28:59 +0000 (15:28 +0100)]
[ci] Escape run-step.sh invocations, for paths with spaces in