mono.git
7 years ago[msvc] Update csproj files (#4163)
monojenkins [Mon, 19 Dec 2016 11:20:27 +0000 (12:20 +0100)]
[msvc] Update csproj files (#4163)

7 years ago.NET allows each finalizer thread up to 2 seconds to complete and 40 seconds for...
Neale Ferguson [Sun, 18 Dec 2016 13:08:48 +0000 (08:08 -0500)]
.NET allows each finalizer thread up to 2 seconds to complete and 40 seconds for all threads to complete. However, mono just allows 2 seconds for all finalizers. Some complex applications easily exceed this and this results in thread aborts to be invoked. This fix is simplistic as it simply replaces the 2 seconds with 40 without addressing the 2 seconds per finalizer thread. This problem is more complex but this fix will circumvent the problem until a final option is designed and implemented. (#4162)

7 years agoconfigure.ac: import makedev() and friends from <sys/sysmacros.h> (#4170)
Sergei Trofimovich [Sun, 18 Dec 2016 11:15:14 +0000 (11:15 +0000)]
configure.ac: import makedev() and friends from <sys/sysmacros.h> (#4170)

Current glibc's <sys/types.h> headers are included into
many C standard headers.

The problem here is that makedev()/major()/minor() macros
defined in <sys/sysmacros.h> leak into C standard headers
and poison global namespace.

The plan is to get rid of <sys/sysmacros.h> inclusion
in <sys/types.h>:
    https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html

On such system without implicit <sys/sysmacros.h> mono fails
to build as:

  CC       libmonoruntime_la-w32process-unix-default.lo
w32process-unix-default.c: In function 'mono_w32process_get_modules':
w32process-unix-default.c:225:12: error: implicit declaration of function 'makedev' [-Werror=implicit-function-declaration]
   device = makedev ((int)maj_dev, (int)min_dev);
            ^~~~~~~

autoconf has a AC_HEADER_MAJOR macro to autodetect
header for major() and friends.

This change switches to AC_HEADER_MAJOR.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
7 years ago[test-runner] Try to dump threads on timeout with lldb and gdb
Ludovic Henry [Thu, 15 Dec 2016 19:43:08 +0000 (14:43 -0500)]
[test-runner] Try to dump threads on timeout with lldb and gdb

7 years ago[mini] Inline only use of mono_runtime_syscall_fork
Ludovic Henry [Thu, 15 Dec 2016 19:11:39 +0000 (14:11 -0500)]
[mini] Inline only use of mono_runtime_syscall_fork

7 years ago[mini] Factor duplicates mono_gdb_render_native_backtraces
Ludovic Henry [Thu, 15 Dec 2016 19:09:42 +0000 (14:09 -0500)]
[mini] Factor duplicates mono_gdb_render_native_backtraces

7 years ago[threadpool] Remove assertion on RequestWorkerThread failure (#4167)
Ludovic Henry [Sat, 17 Dec 2016 14:42:18 +0000 (09:42 -0500)]
[threadpool] Remove assertion on RequestWorkerThread failure (#4167)

We observed that this assertion would sometimes be triggered on CI in case of intensive load. This would be possible because we wouldn't necessarily decrease the outstanding_request in a new worker. To decrease resource usage, we also want to limit the amount of new worker we request.

7 years ago[threadpool] Use threadpool->threads instead of threadpool->counters to wait on clean...
Ludovic Henry [Sat, 17 Dec 2016 14:41:36 +0000 (09:41 -0500)]
[threadpool] Use threadpool->threads instead of threadpool->counters to wait on cleanup (#4146)

7 years ago[jit] Enable tests for the Vector<T> intrinsics. (#4157)
Zoltan Varga [Sat, 17 Dec 2016 12:11:21 +0000 (07:11 -0500)]
[jit] Enable tests for the Vector<T> intrinsics. (#4157)

7 years ago[llvm] Fix the mapping of simd types to llvm types when using -O=-simd.
Zoltan Varga [Sat, 17 Dec 2016 12:08:09 +0000 (07:08 -0500)]
[llvm] Fix the mapping of simd types to llvm types when using -O=-simd.

7 years ago[llvm] Add back support for OP_TLS_GET.
Zoltan Varga [Sat, 17 Dec 2016 10:56:41 +0000 (05:56 -0500)]
[llvm] Add back support for OP_TLS_GET.

7 years ago[runtime] Fix Mach ARM assert.
Jon Purdy [Fri, 11 Nov 2016 22:19:54 +0000 (14:19 -0800)]
[runtime] Fix Mach ARM assert.

This changes mono_mach_arch_get_thread_fpstate_size to return a value,
rather than asserting. The actual float state isn't used yet. This also
assumes NEON, which may not be correct.

7 years ago[simd] Fix the exception thrown by Vector<T>.CopyTo () on a failed bounds check.
Zoltan Varga [Fri, 16 Dec 2016 19:58:57 +0000 (14:58 -0500)]
[simd] Fix the exception thrown by Vector<T>.CopyTo () on a failed bounds check.

7 years ago[aot] Bump AOT file format version due to changes to patch infos etc.
Zoltan Varga [Fri, 16 Dec 2016 18:47:32 +0000 (13:47 -0500)]
[aot] Bump AOT file format version due to changes to patch infos etc.

7 years ago[threads] Ensure thread is still alive when detaching it
Ludovic Henry [Fri, 16 Dec 2016 18:42:36 +0000 (13:42 -0500)]
[threads] Ensure thread is still alive when detaching it

If the compiler optimized it so that we would unregister the thread->thread_pinning_ref GC root before we would destroy the thread fields, we could run into "* Assertion at threads.c:1081, condition 'thread->suspended' not met"

7 years ago[runtime] Remove old unused defines/prototypes
Vlad Brezae [Fri, 16 Dec 2016 17:39:09 +0000 (19:39 +0200)]
[runtime] Remove old unused defines/prototypes

7 years ago[build] Remove PEAPI from library profiles
Marek Safar [Fri, 16 Dec 2016 11:01:53 +0000 (12:01 +0100)]
[build] Remove PEAPI from library profiles

7 years ago[build] Update list of aoted images in mcs mode
Marek Safar [Fri, 16 Dec 2016 11:17:40 +0000 (12:17 +0100)]
[build] Update list of aoted images in mcs mode

7 years ago[System.Numerics.Vectors] Update to the latest CoreFX version
Marek Safar [Fri, 16 Dec 2016 14:43:58 +0000 (15:43 +0100)]
[System.Numerics.Vectors] Update to the latest CoreFX version

7 years ago[System.Numerics.Vectors] Enable Vector on desktop profile
Marek Safar [Fri, 16 Dec 2016 14:26:38 +0000 (15:26 +0100)]
[System.Numerics.Vectors] Enable Vector on desktop profile

7 years agoBump corefx
Marek Safar [Fri, 16 Dec 2016 11:43:57 +0000 (12:43 +0100)]
Bump corefx

7 years ago[corlib] Override virtual DSA.HashData() methods in DSACryptoServiceProvider (#4150)
Alexander Köplinger [Fri, 16 Dec 2016 10:53:25 +0000 (11:53 +0100)]
[corlib] Override virtual DSA.HashData() methods in DSACryptoServiceProvider (#4150)

The methods were added in .NET 4.6 but couldn't be done abstract so instead
they were added virtual which just throws an exception telling you to override
it in the subclass.

We implemented this for RSACryptoServiceProvider in https://github.com/mono/mono/pull/3770
(the methods were already overriden in that case because we moved to referencesource)
but DSACryptoServiceProvider is still using the Mono code so we need to
implement it there too.

7 years agoFix a warning.
Zoltan Varga [Fri, 16 Dec 2016 02:47:46 +0000 (21:47 -0500)]
Fix a warning.

7 years agoRevert "[build] Update list of aoted images in mcs mode"
Alexander Köplinger [Thu, 15 Dec 2016 20:36:41 +0000 (21:36 +0100)]
Revert "[build] Update list of aoted images in mcs mode"

This reverts commit 59b8a5d3bae8f55c7fa31080a0c1b9e88d4419b8.

It breaks the mcs build:

```
20:35:27 MONO_PATH='./../../class/lib/build/' > build_aot.log 2>&1 /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/runtime/mono-wrapper --aot=bind-to-runtime-version,outfile=/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools//System.Collections.Immutable.dll.so --debug /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools//System.Collections.Immutable.dll || (cat build_aot.log; exit 1)
20:35:27 Failed to load method 0x6000001 from '/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/System.Collections.Immutable.dll' due to Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:<none>.
20:35:27 Run with MONO_LOG_LEVEL=debug for more information.
20:35:27 AOT of image /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools//System.Collections.Immutable.dll failed.
20:35:27 Mono Ahead of Time compiler - compiling assembly /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/System.Collections.Immutable.dll
20:35:27 AOTID 368C895D-F9C7-38E7-C0BA-F9B6964CD1A0
20:35:27
make[7]: *** [/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools//System.Reflection.Metadata.dll.so] Error 1
20:35:27 make[7]: *** Waiting for unfinished jobs....
20:35:27 Failed to load method 0x6000001 from '/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/System.Collections.Immutable.dll' due to Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:<none>.
20:35:27 Run with MONO_LOG_LEVEL=debug for more information.
20:35:27 AOT of image /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools//System.Collections.Immutable.dll failed.
20:35:27 Mono Ahead of Time compiler - compiling assembly /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/System.Collections.Immutable.dll
20:35:27 AOTID 368C895D-F9C7-38E7-C0BA-F9B6964CD1A0
20:35:27 make[7]: *** [/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools//System.Collections.Immutable.dll.so] Error 1
20:35:27 Failed to load method 0x600000c from '/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/csc.exe' due to Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:<none>.
20:35:27 Run with MONO_LOG_LEVEL=debug for more information.
20:35:27 AOT of image /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/csc.exe failed.
20:35:27 Mono Ahead of Time compiler - compiling assembly /mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/csc.exe
20:35:27 AOTID 44CBE5F8-37FA-0F68-B472-47E2F4209FC5
20:35:27 System.Collections.Immutable.dll
20:35:27 AOTID 368C895D-F9C7-38E7-C0BA-F9B6964CD1A0
20:35:33 make[7]: Leaving directory `/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/mcs/class/aot-compiler'
20:35:33 make[6]: Leaving directory `/mnt/jenkins/workspace/test-mono-mainline-mcs/label/ubuntu-1404-amd64/mcs/class/aot-compiler'
20:35:33 make[6]: *** [do-all] Error 2
```

7 years ago[msvc] Update csproj files (#4151)
monojenkins [Thu, 15 Dec 2016 20:01:12 +0000 (21:01 +0100)]
[msvc] Update csproj files (#4151)

7 years ago[build] Update list of aoted images in mcs mode
Marek Safar [Thu, 15 Dec 2016 18:04:31 +0000 (19:04 +0100)]
[build] Update list of aoted images in mcs mode

7 years ago[System.Core] Add CryptoServiceProviders to mobile
Marek Safar [Thu, 15 Dec 2016 16:01:43 +0000 (17:01 +0100)]
[System.Core] Add CryptoServiceProviders to mobile

7 years ago[Facades] Move IncrementalHash to System.Security.Cryptography.Algorithms facade
Marek Safar [Thu, 15 Dec 2016 14:23:04 +0000 (15:23 +0100)]
[Facades] Move IncrementalHash to System.Security.Cryptography.Algorithms facade

It looks like the type won't be part of .net for anytime soon

7 years ago[corlib] Fixes warning
Marek Safar [Thu, 15 Dec 2016 11:10:02 +0000 (12:10 +0100)]
[corlib] Fixes warning

7 years ago[process] Fix process-unref-race.exe (#4144)
Ludovic Henry [Thu, 15 Dec 2016 13:18:23 +0000 (08:18 -0500)]
[process] Fix process-unref-race.exe (#4144)

* [process] Rename MonoProcess to Process as it's not public anymore

* [process] Replace setting process->pid = 0 by process->signalled = TRUE

* [process] Remove processes_mutex lock when unrefing process->handle

We do not need to synchronize it here because we do not modify `processes`, and the only other place where we access process->handle is before adding it to `processes`.

* [process] Fix race condition

Without this memory barrier `process->next = processes` and `processes = process` could be reordered, and when accessing `processes` in mono_sigchld_signal_handler, we could observe a NULL processes->next. This would make us not find a pid in `processes`, and because of the posix API, we would never mark this process as exited.

This would trigger a hang in `process-unref-race.exe` test.

Thank you to @kumpera for the help figuring this out!

7 years ago[s390x] Fix build
Vlad Brezae [Thu, 15 Dec 2016 13:13:56 +0000 (15:13 +0200)]
[s390x] Fix build

7 years ago[aot] fix linker invocation for llvm mode on linux
Bernhard Urban [Thu, 15 Dec 2016 06:41:45 +0000 (07:41 +0100)]
[aot] fix linker invocation for llvm mode on linux

clang++ should only be used for llvm_only (aka. bitcode) mode.

this is a follow up fix for:
https://github.com/mono/mono/commit/7d238ddd5edeeb42cec5e07b6d6527d16332f921
and
https://github.com/mono/mono/commit/fc5305d2af1b6891b05cb82342bf92d4659546e1

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

7 years ago[tools] Add resx2sr internal tool
Marek Safar [Thu, 15 Dec 2016 10:22:07 +0000 (11:22 +0100)]
[tools] Add resx2sr internal tool

7 years agoMerge pull request #4014 from BrzVlad/feature-tls-refactor
Vlad Brezae [Thu, 15 Dec 2016 10:22:04 +0000 (12:22 +0200)]
Merge pull request #4014 from BrzVlad/feature-tls-refactor

[runtime] thread local storage refactor

7 years ago[arm64] Mark MONO_CONTEXT_GET_CURRENT () as clobbering x16.
Zoltan Varga [Thu, 15 Dec 2016 04:45:29 +0000 (05:45 +0100)]
[arm64] Mark MONO_CONTEXT_GET_CURRENT () as clobbering x16.

7 years agoFix build break due to Cecil API change
Alexander Köplinger [Wed, 14 Dec 2016 20:35:31 +0000 (21:35 +0100)]
Fix build break due to Cecil API change

https://github.com/jbevain/cecil/commit/42db79cc16f1cbe8dbab558904e188352dba2b41

7 years ago[xbuild] Bump buildtools to get support for netstandard 1.6
Ankit Jain [Wed, 14 Dec 2016 19:54:35 +0000 (14:54 -0500)]
[xbuild] Bump buildtools to get support for netstandard 1.6

https://github.com/mono/buildtools/commit/9b6ee8686be55a983d886938165b6206cda50772

7 years ago[system] Remove port number from TLS Server Name Identification (SNI). Fixes #46549...
Sebastien Pouliot [Wed, 14 Dec 2016 19:24:41 +0000 (14:24 -0500)]
[system] Remove port number from TLS Server Name Identification (SNI). Fixes #46549 (#4120)

The port number should not be included along the host name. Otherwise
the server will refuse the connection (and we'll throw). This is a
problem when servers are not using the default (443) SSL/TLS port.

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

The BTLS provider was fixed but the old MonoTLS (managed) provider had
the same issue.

Another PR will be made to fix AppleTLS in xamarin-macios repo [2]

[1] https://github.com/mono/mono/pull/3939
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=45994

7 years agoBump cecil to get portable pdb fix
Alexander Köplinger [Wed, 14 Dec 2016 19:16:08 +0000 (20:16 +0100)]
Bump cecil to get portable pdb fix

7 years ago[arm] Resurrect inlined fast tls
Vlad Brezae [Wed, 23 Nov 2016 01:48:48 +0000 (01:48 +0000)]
[arm] Resurrect inlined fast tls

Only on desktop linux, where we now inline aeabi_read_tp.

7 years ago[arm64] Resurrect inlined fast tls
Vlad Brezae [Tue, 22 Nov 2016 11:07:18 +0000 (03:07 -0800)]
[arm64] Resurrect inlined fast tls

7 years ago[x86] Resurrect inlined fast tls
Vlad Brezae [Mon, 21 Nov 2016 21:52:50 +0000 (13:52 -0800)]
[x86] Resurrect inlined fast tls

7 years ago[runtime] Global debug option for using fallback tls
Vlad Brezae [Fri, 18 Nov 2016 20:34:42 +0000 (22:34 +0200)]
[runtime] Global debug option for using fallback tls

7 years ago[amd64] Resurrect inlined fast tls
Vlad Brezae [Fri, 18 Nov 2016 20:15:01 +0000 (22:15 +0200)]
[amd64] Resurrect inlined fast tls

By default all platforms will call into native getters/setters whenever they need to get access tls value. On certain platforms we can try to be faster than this and avoid the call. We call this fast tls and each platform defines its own way to achieve this. Fast tls should normally be inlined, otherwise there is little point to doing anything else in the first place (on linux, __thread access is 2-3 instructions, on mac pthread_getspecific is 2 instructions, other platforms also having decent implementations).  For this, a platform has to define MONO_ARCH_HAVE_FAST_TLS, and provide alternative getters/setters for a MonoTlsKey. In order to have fast getter/setters, the platform has to declare a way to fetch an internal offset (MONO_THREAD_VAR_OFFSET) which is stored in the tls module, and in the arch specific file probe the system to see if we can use the offset initialized here. If these run-time checks don't succeed we just use the fallbacks.

In case we would wish to provide fast inlined tls for aot code, we would need to be sure that, at run-time, these two platform checks would never fail otherwise the tls getter/setters that we emitted would not work. Normally, there is little incentive to support this since tls access is most common in wrappers and managed allocators, both of which are not aot-ed by default. So far, we never supported inlined fast tls on full-aot systems.

7 years ago[runtime] Refactor and unify tls access
Vlad Brezae [Thu, 10 Nov 2016 22:24:51 +0000 (00:24 +0200)]
[runtime] Refactor and unify tls access

The purpose of this commit is to unify tls access across all platforms. We had tls information spread out throughout the entire code which was guarded with many defines/capabilities which made very hard to follow what was going on. Also this made switching between pthread and __thread very unstable since there were a lot of dependencies between different pieces of the tls infrastructure. Also it was not very clear what happens if one of the tls pieces failed.

Now we are moving all the tls variables to a single module that provides getters/setters and initialization API. Runtime code now knows that we can always access a tls variable (from managed code, we just do a nowrapper icall into the same global geters/setters). Even though we used to these type of calls all around before, it is worth mentioning that runtime should account for a thread to be in this type of unregistered code without m2n wrapper and no register jinfo.

On average this makes common tls intensive methods (m2n wrappers and managed allocator) 20% slower, with potential for more regression if we use tls getters/setters recklessly. As a consequence we will re-enable the most important pieces of fast tls code in the future.

7 years ago[exception] do not wrap SIGILL into a managed exception
Bernhard Urban [Mon, 12 Dec 2016 14:25:59 +0000 (15:25 +0100)]
[exception] do not wrap SIGILL into a managed exception

there is not much point in trying to recover from it and even worse,
wrapping it into a managed exception might hide it if the application is
sloppy with exception handling (cf. Pokémon Exception Handling).

7 years ago[exception] rename mono_handle_native_sigsegv -> mono_handle_native_crash
Bernhard Urban [Mon, 12 Dec 2016 13:32:23 +0000 (14:32 +0100)]
[exception] rename mono_handle_native_sigsegv -> mono_handle_native_crash

7 years ago[exception] pass signal as string already to mono_handle_native_sigsegv
Bernhard Urban [Mon, 12 Dec 2016 14:28:41 +0000 (15:28 +0100)]
[exception] pass signal as string already to mono_handle_native_sigsegv

7 years agoMerge pull request #4139 from lambdageek/bug-49686
Marek Safar [Wed, 14 Dec 2016 10:08:51 +0000 (11:08 +0100)]
Merge pull request #4139 from lambdageek/bug-49686

[sre] Implement DynamicMethod.GetCustomAttributes() and IsDefined() (Fixes #49686)

7 years agoMerge pull request #4110 from BrzVlad/fix-sgen-win32
Vlad Brezae [Wed, 14 Dec 2016 09:56:08 +0000 (11:56 +0200)]
Merge pull request #4110 from BrzVlad/fix-sgen-win32

[sgen] Fix sgen win32

7 years ago[jit] Add a workaround to avoid a crash in mini_above_abort_threshold () when using...
Zoltan Varga [Wed, 14 Dec 2016 06:12:29 +0000 (07:12 +0100)]
[jit] Add a workaround to avoid a crash in mini_above_abort_threshold () when using bitcode.

7 years ago[process] Remove useless FIXME
Ludovic Henry [Wed, 14 Dec 2016 02:44:27 +0000 (21:44 -0500)]
[process] Remove useless FIXME

7 years ago[arm64] Save the fp regs in MONO_CONTEXT_GET_CURRENT (). (#4121)
Zoltan Varga [Tue, 13 Dec 2016 22:38:41 +0000 (17:38 -0500)]
[arm64] Save the fp regs in MONO_CONTEXT_GET_CURRENT (). (#4121)

7 years ago[threadpool] Assert that we do not overflow ThreadPoolCounter starting and working...
Ludovic Henry [Tue, 13 Dec 2016 21:58:15 +0000 (16:58 -0500)]
[threadpool] Assert that we do not overflow ThreadPoolCounter starting and working fields (#4138)

7 years ago[threadpool] Fix `MonoTests.runtime.unload-appdomain-on-shutdown.exe` (#4135)
Ludovic Henry [Tue, 13 Dec 2016 21:53:03 +0000 (16:53 -0500)]
[threadpool] Fix `MonoTests.runtime.unload-appdomain-on-shutdown.exe` (#4135)

* [threadpool] Increase and decrease refcount when removing domain

* [threadpool] Fix unload-appdomain-on-shutdown.exe

If the threadpool is not initialized, there is no need to initialize it, as no worker is going to start in the domain because mono_domain_is_unloading would return TRUE.

7 years ago[sre] Implement DynamicMethod.GetCustomAttributes() and IsDefined ()
Aleksey Kliger [Tue, 13 Dec 2016 17:27:13 +0000 (12:27 -0500)]
[sre] Implement DynamicMethod.GetCustomAttributes() and IsDefined ()

Per .NET documentation, DynamicMethod does not support custom attributes
exception the MethodImplAttribute pseudo-custom attribute.

Also change GetMethodImplementationFlags to include NoInlining as on .NET

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

7 years ago[test] Test for System.Linq.Expressions.MethodCallExpression with a DynamicMethod
Aleksey Kliger [Tue, 13 Dec 2016 21:17:08 +0000 (16:17 -0500)]
[test] Test for System.Linq.Expressions.MethodCallExpression with a DynamicMethod

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

7 years agoRevert "[ci] Move mcs switch for Win32 builds into the run-jenkins.sh script"
Vlad Brezae [Wed, 7 Dec 2016 12:21:49 +0000 (14:21 +0200)]
Revert "[ci] Move mcs switch for Win32 builds into the run-jenkins.sh script"

This reverts commit 2b8d9bdb0850d98ed65f025a4cdcb4ca3f1eaa19.

7 years ago[sgen] Don't suspend thread in wow64 transition
Vlad Brezae [Wed, 7 Dec 2016 00:06:00 +0000 (02:06 +0200)]
[sgen] Don't suspend thread in wow64 transition

The stack pointer provided by GetThreadContext is not reliable.

7 years ago[test] Test for System.Reflection.Emit.DynamicMethod.GetCustomAttributes
Aleksey Kliger [Tue, 13 Dec 2016 20:49:39 +0000 (15:49 -0500)]
[test] Test for System.Reflection.Emit.DynamicMethod.GetCustomAttributes

7 years ago[sgen] binary protocol on windows
Vlad Brezae [Tue, 29 Nov 2016 22:06:55 +0000 (00:06 +0200)]
[sgen] binary protocol on windows

7 years ago[runtime] Fix prototype of functions
Vlad Brezae [Tue, 29 Nov 2016 19:06:13 +0000 (21:06 +0200)]
[runtime] Fix prototype of functions

These functions are cast and invoked as a MonoThreadStart (which requires to receive on arg, return one arg and be WINAPI on windwos), which could lead to cconv problems if the prototype is not matching.

7 years agoFix a warning.
Zoltan Varga [Tue, 13 Dec 2016 16:40:10 +0000 (17:40 +0100)]
Fix a warning.

7 years ago[amd64] Return from the altstack before handling native sigsegvs. This will make...
Zoltan Varga [Tue, 13 Dec 2016 06:48:37 +0000 (07:48 +0100)]
[amd64] Return from the altstack before handling native sigsegvs. This will make backtrace () actually work.

7 years ago[jit] Pass '-nx' to gdb when printing native backtraces so it doesn't read .gdbinit...
Zoltan Varga [Tue, 13 Dec 2016 06:47:31 +0000 (07:47 +0100)]
[jit] Pass '-nx' to gdb when printing native backtraces so it doesn't read .gdbinit, thus making it more deterministic.

7 years agoRemove the debian-snapshot submodule
Alexander Köplinger [Tue, 13 Dec 2016 15:44:48 +0000 (16:44 +0100)]
Remove the debian-snapshot submodule

Jo said it's no longer used. We're using the following repos now:

https://github.com/mono/linux-packaging-mono
https://github.com/mono/linux-packaging-mono-snapshot

7 years ago[msvc] Update csproj files (#4136)
monojenkins [Tue, 13 Dec 2016 12:52:22 +0000 (13:52 +0100)]
[msvc] Update csproj files (#4136)

7 years agoRevert "Fix a warning."
Bernhard Urban [Tue, 13 Dec 2016 12:41:32 +0000 (13:41 +0100)]
Revert "Fix a warning."

This reverts commit b498facf7cebade5762d79f28cd102a5ed120bc5.

7 years agoFix a warning.
Zoltan Varga [Tue, 13 Dec 2016 06:29:41 +0000 (07:29 +0100)]
Fix a warning.

7 years ago[threads] Destroy thread->suspended before removing the GC root to thread (#4133)
Ludovic Henry [Mon, 12 Dec 2016 23:57:07 +0000 (18:57 -0500)]
[threads] Destroy thread->suspended before removing the GC root to thread (#4133)

7 years ago[build] Print CSC when compiling with roslyn
Alexander Köplinger [Mon, 12 Dec 2016 19:45:39 +0000 (20:45 +0100)]
[build] Print CSC when compiling with roslyn

Reduces confusion about why the log contains lines starting with MCS
even when using roslyn.

7 years ago[xbuild] publicsign and delaysign cannot be used at same time
Marek Safar [Mon, 12 Dec 2016 18:57:25 +0000 (19:57 +0100)]
[xbuild] publicsign and delaysign cannot be used at same time

7 years ago[xbuild] Add a workaround for not yet implemented full /keyfile signing using csc
Marek Safar [Mon, 12 Dec 2016 17:25:50 +0000 (18:25 +0100)]
[xbuild] Add a workaround for not yet implemented full /keyfile signing using csc

7 years ago[unwind] reduce frame size of mono_unwind_frame ()
Bernhard Urban [Wed, 7 Dec 2016 09:11:24 +0000 (10:11 +0100)]
[unwind] reduce frame size of mono_unwind_frame ()

on arm32 it goes down from 5120 bytes to 676 bytes in terms of frame
size.

7 years ago[Microsoft.CSharp] Tweaks 76f97e30731d6c98f21771b516b78399185c1c51 to not call new...
Marek Safar [Mon, 12 Dec 2016 16:24:06 +0000 (17:24 +0100)]
[Microsoft.CSharp] Tweaks 76f97e30731d6c98f21771b516b78399185c1c51 to not call new API from Microsoft.CSharp. Fixes #47353

This is a workaround for runtime assembly loading bug always preferring local assembly

7 years ago[xbuild] Convert pbdonly to portable debug mode
Marek Safar [Mon, 12 Dec 2016 15:02:48 +0000 (16:02 +0100)]
[xbuild] Convert pbdonly to portable debug mode

7 years ago[System] Always use mcs as CodeDOM backend compiler
Marek Safar [Mon, 12 Dec 2016 14:48:36 +0000 (15:48 +0100)]
[System] Always use mcs as CodeDOM backend compiler

7 years ago[build] Add System.ValueTuple to bootstrap facades
Marek Safar [Mon, 12 Dec 2016 12:42:16 +0000 (13:42 +0100)]
[build] Add System.ValueTuple to bootstrap facades

7 years agoDon't remove the roslyn binaries in "make dist" for now
Alexander Köplinger [Mon, 12 Dec 2016 11:50:48 +0000 (12:50 +0100)]
Don't remove the roslyn binaries in "make dist" for now

Should help fix the package builds on Jenkins.

7 years agoAdd unimplemented Transaction.PromoteAndEnlistDurable (#4129)
Shay Rojansky [Mon, 12 Dec 2016 10:05:23 +0000 (12:05 +0200)]
Add unimplemented Transaction.PromoteAndEnlistDurable (#4129)

Which was added to .NET 4.5.2.

7 years ago[simd] Add intrinsics support for Vector<T>.CopyTo ().
Zoltan Varga [Sun, 11 Dec 2016 06:14:18 +0000 (01:14 -0500)]
[simd] Add intrinsics support for Vector<T>.CopyTo ().

7 years ago[msvc] Update csproj files (#4128)
monojenkins [Sat, 10 Dec 2016 16:36:36 +0000 (17:36 +0100)]
[msvc] Update csproj files (#4128)

7 years ago[Facades] Add System.ValueTuple facade (#4125)
Alexander Köplinger [Sat, 10 Dec 2016 02:59:47 +0000 (03:59 +0100)]
[Facades] Add System.ValueTuple facade (#4125)

7 years ago[arm64] Handle fp regs in mono_sigctx_to_monoctx () on linux, recent gcc versions...
Zoltan Varga [Sat, 10 Dec 2016 00:12:21 +0000 (19:12 -0500)]
[arm64] Handle fp regs in mono_sigctx_to_monoctx () on linux, recent gcc versions generate code which store object references in them, so sgen now requires this. (#4127)

7 years ago[threadpool] Split domain and worker management (#4117)
Ludovic Henry [Fri, 9 Dec 2016 20:40:28 +0000 (15:40 -0500)]
[threadpool] Split domain and worker management (#4117)

* [threadpool] Remove `-ms` suffix

* [threadpool] Split domain and worker management

This will allow us to use native threadpool more easily: we will simply have to implement a threadpool worker with the specific API.

On windows, we will use the Win32 Threadpool, and on OSX we will explore using GCD (Grand Central Dispatch).

7 years ago[threads] Inline thread_cleanup into mono_thread_detach_internal (#4119)
Ludovic Henry [Fri, 9 Dec 2016 16:09:59 +0000 (11:09 -0500)]
[threads] Inline thread_cleanup into mono_thread_detach_internal (#4119)

7 years agoExpose mono_build_root to mcs build system
Alexander Köplinger [Fri, 9 Dec 2016 15:38:28 +0000 (16:38 +0100)]
Expose mono_build_root to mcs build system

In an out-of-tree build the Makefile which contains get-monolite-latest
doesn't exist in the source directory (which $(topdir)/.. would point to)
but in the build directory.

In order to invoke get-monolite-latest we need to actually call the Makefile
in the correct directory which requires exposing the build directory to the
mcs build system.

7 years ago[configure] fix out-of-tree-build with roslyn
Bernhard Urban [Fri, 9 Dec 2016 12:14:16 +0000 (13:14 +0100)]
[configure] fix out-of-tree-build with roslyn

7 years ago[runtime] Add write barriers for FindFirstFile/FindNextFile icalls (#4114)
Alexander Köplinger [Fri, 9 Dec 2016 13:01:06 +0000 (14:01 +0100)]
[runtime] Add write barriers for FindFirstFile/FindNextFile icalls (#4114)

We were seeing crashes like [1] or [2] after https://github.com/mono/mono/pull/4042 was merged.
While debugging the issue I found out that when instead of using `out data.cFileName` for passing
the string through the the icall I use a temporary field and assign the result to `data` later on
the crash went away. It also worked if I made the `WIN32_FIND_DATA` class a struct instead.

I talked to @ludovic-henry and he was able to figure out what was going on (many thanks!):

> It seems to be a missing wbarrier
> and that would also explains why it would work with a struct, but not with a class
> so it would work with a struct, because `out data.filename` would be a `MonoString**` to the thread stack,
> and that would work because we would always scan the thread stack
> and it wouldn’t work with a class, because `out data.filename` would be a `MonoString**` to the heap
>
> and because we have a generational GC, if `data` is in the “old” heap (and because we are missing this write barrier),
> we would never scan `data`, thus freeing the `data.filename` string object, and as soon as you are trying to access it,
> well you access garbage
>
> with the write barrier, we will make sure to scan the `data` object, and not loose the reference to `data.filename`

[1] https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/5422/parsed_console/log_content.html#WARNING1
[2] https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/5419/parsed_console/log_content.html#WARNING1
[3] https://github.com/mono/mono/blob/dd88ff52e2f130ee188661a34794aa7c7b564fa8/mcs/class/referencesource/mscorlib/system/io/filesystemenumerable.cs#L280

7 years ago[System] Add new test
Marek Safar [Fri, 9 Dec 2016 01:16:15 +0000 (17:16 -0800)]
[System] Add new test

7 years ago[MacSDK] Include 'opt' as a PATH-available binary
Alexis Christoforides [Thu, 8 Dec 2016 20:14:49 +0000 (15:14 -0500)]
[MacSDK] Include 'opt' as a PATH-available binary

7 years ago[runtime] Use MonoBoolean instead of gboolean in monitor icalls. Add new internal...
Zoltan Varga [Thu, 8 Dec 2016 06:30:48 +0000 (01:30 -0500)]
[runtime] Use MonoBoolean instead of gboolean in monitor icalls. Add new internal variants for the ones which are exported. (#4109)

7 years ago[jenkins] Rename runtime presets to match CI tags
Ludovic Henry [Wed, 7 Dec 2016 22:07:54 +0000 (17:07 -0500)]
[jenkins] Rename runtime presets to match CI tags

7 years ago[ci] Simplify run-jenkins.sh script variables (#4111)
Alexander Köplinger [Wed, 7 Dec 2016 22:54:28 +0000 (23:54 +0100)]
[ci] Simplify run-jenkins.sh script variables (#4111)

Get rid of WORKSPACE which is set by Jenkins, this allows one to
more easily run the run-jenkins.sh script locally e.g. on cygwin.

The only thing that needs to be passed in is CI_TAGS and label.

7 years ago[ci] Run aot-test on more platforms (#4108)
Alexander Köplinger [Wed, 7 Dec 2016 22:53:51 +0000 (23:53 +0100)]
[ci] Run aot-test on more platforms (#4108)

* [ci] Run aot-test on more platforms

Now that https://github.com/mono/mono/pull/4096 is merged, we should be able to run it on Linux too.

* [ci] Don't run aot-test on Windows

It's broken there.

7 years ago[jenkins] Add `bitcode` CI tag and rename `bitcode_aot_only` runtime preset to `bitcode`
Ludovic Henry [Wed, 7 Dec 2016 21:35:54 +0000 (16:35 -0500)]
[jenkins] Add `bitcode` CI tag and rename `bitcode_aot_only` runtime preset to `bitcode`

7 years ago[jenkins] Add `aot_llvm` and `aot` CI tag as well as `aot` runtime preset
Ludovic Henry [Wed, 7 Dec 2016 21:20:30 +0000 (16:20 -0500)]
[jenkins] Add `aot_llvm` and `aot` CI tag as well as `aot` runtime preset

7 years ago[jenkins] Add fullaot_llvm CI tag and rename aot_only to fullaot
Ludovic Henry [Wed, 7 Dec 2016 20:53:22 +0000 (15:53 -0500)]
[jenkins] Add fullaot_llvm CI tag and rename aot_only to fullaot

7 years ago[jenkins] Fix order of CI tags
Ludovic Henry [Wed, 7 Dec 2016 20:27:22 +0000 (15:27 -0500)]
[jenkins] Fix order of CI tags

7 years ago[jenkins] Add hybridaot_llvm CI tag and rename aot_preferred to hybrid
Ludovic Henry [Wed, 7 Dec 2016 20:14:30 +0000 (15:14 -0500)]
[jenkins] Add hybridaot_llvm CI tag and rename aot_preferred to hybrid