mono.git
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

7 years ago[msvc] Update csproj files (#4115)
monojenkins [Wed, 7 Dec 2016 18:28:51 +0000 (19:28 +0100)]
[msvc] Update csproj files (#4115)

7 years ago[build] Add System.Security.Cryptography.Primitives to bootstrap facades
Marek Safar [Wed, 7 Dec 2016 15:34:47 +0000 (07:34 -0800)]
[build] Add System.Security.Cryptography.Primitives to bootstrap facades

7 years agoMerge pull request #4102 from marek-safar/bootstrap
Marek Safar [Wed, 7 Dec 2016 14:20:26 +0000 (06:20 -0800)]
Merge pull request #4102 from marek-safar/bootstrap

[build] Fixes win32 bootstrap in mcs mode

7 years ago[ci] Move mcs switch for Win32 builds into the run-jenkins.sh script
Alexander Köplinger [Wed, 7 Dec 2016 12:17:08 +0000 (13:17 +0100)]
[ci] Move mcs switch for Win32 builds into the run-jenkins.sh script

So we can more easily switch it over to roslyn again in a PR.

7 years ago[threads] Fix conflicting signal with boehm (#4096)
Ludovic Henry [Wed, 7 Dec 2016 01:46:43 +0000 (20:46 -0500)]
[threads] Fix conflicting signal with boehm (#4096)

Boehm would use SIGPWR on linux 32/64bits for its suspend signal, but that would conflict with utils/threads suspend signal.

The fix consists in looking for an available realtime signal in utils/threads, and fallback to the default SIGXFSZ, SIGPWR and SIGXCPU

7 years ago[llvm] Fix intrinsic Selector.GetHandle support. (#4103)
Rolf Bjarne Kvinge [Tue, 6 Dec 2016 23:50:31 +0000 (00:50 +0100)]
[llvm] Fix intrinsic Selector.GetHandle support. (#4103)

An OBJC_IMAGE_INFO section must be emitted when we emit the native equivalent
of @selector for Selector.GetHandle, otherwise the Objective-C runtime will
not process the selectors in this image at runtime (and we may end up with
duplicate selectors in memory).

The AOT compiler already does this here: https://github.com/mono/mono/blob/2eda626316fd8f70cd98947af2f89b7ca9b0ebe5/mono/mini/aot-compiler.c#L9657-L9661

7 years ago[Mac SDK] Use MSBuild to build IronPython/IronRuby.
Alexis Christoforides [Tue, 6 Dec 2016 21:49:49 +0000 (16:49 -0500)]
[Mac SDK] Use MSBuild to build IronPython/IronRuby.

Xbuild currently fails with 'CSC: error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll'

Xbuild should be passing "/debug:Portable" to csc in order to work. There is a possibly broken attempt to this in 2d08353991213b17f58f64b6ef0fb4525eb4c659.

7 years ago[System]: fix certificate validation on Wine/OSX
Roger Vuistiner [Tue, 6 Dec 2016 19:46:18 +0000 (20:46 +0100)]
[System]: fix certificate validation on Wine/OSX

- the `is_macosx` static field should be false on Wine/OSX, as it is on Windows.

7 years agoRevert "[runtime] Use MonoBoolean as the return value of monitor icalls."
Alexander Köplinger [Tue, 6 Dec 2016 20:30:00 +0000 (21:30 +0100)]
Revert "[runtime] Use MonoBoolean as the return value of monitor icalls."

This reverts commit 06088609b0ee50af41e59e7366100e25d55a9130.

It was breaking the build on i386 Linux:

```
Unhandled Exception:
 System.ExecutionEngineException: System.Threading.SynchronizationLockException: Object synchronization method was called from an unsynchronized block of code.
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitExpression (Microsoft.CodeAnalysis.CSharp.BoundExpression expression, System.Boolean used) [0x00070] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement (Microsoft.CodeAnalysis.CSharp.BoundStatement statement) [0x000ad] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatementAndCountInstructions (Microsoft.CodeAnalysis.CSharp.BoundStatement statement) [0x0000c] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitSequencePointStatement (Microsoft.CodeAnalysis.CSharp.BoundSequencePoint node) [0x0002d] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement (Microsoft.CodeAnalysis.CSharp.BoundStatement statement) [0x00087] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitBlock (Microsoft.CodeAnalysis.CSharp.BoundBlock block) [0x0009d] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement (Microsoft.CodeAnalysis.CSharp.BoundStatement statement) [0x0007a] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatementList (Microsoft.CodeAnalysis.CSharp.BoundStatementList list) [0x00023] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement (Microsoft.CodeAnalysis.CSharp.BoundStatement statement) [0x000b4] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
...
```

7 years ago[corlib] Put back Directory.GetDirectoryRoot() which was accidentally removed
Alexander Köplinger [Tue, 6 Dec 2016 19:02:58 +0000 (20:02 +0100)]
[corlib] Put back Directory.GetDirectoryRoot() which was accidentally removed

The mistake happened in https://github.com/mono/mono/pull/4042.
Added a test for the method so we don't do it again.

7 years agoFix Microsoft.Build.Engine fail when built with mcs
Niklas Therning [Tue, 6 Dec 2016 10:00:18 +0000 (11:00 +0100)]
Fix Microsoft.Build.Engine fail when built with mcs

Fixes the Makefile to not fail if the compiler hasn't generated a pdb file for
the TestTasks dll.

7 years agoRevert "Merge pull request #4093 from ntherning/enable-building-bcl-with-mono-4.6...
Marek Safar [Tue, 6 Dec 2016 14:07:19 +0000 (06:07 -0800)]
Revert "Merge pull request #4093 from ntherning/enable-building-bcl-with-mono-4.6-mcs"

This reverts commit d661684b9a7a49646720ff14dfaf63c62c8619ed, reversing
changes made to 556a4f45653f048c13a171cb03ba4b674f21afb1.

7 years ago[build] Fixes win32 bootstrap in mcs mode
Marek Safar [Tue, 6 Dec 2016 14:05:07 +0000 (06:05 -0800)]
[build] Fixes win32 bootstrap in mcs mode

Uses installed mono instead on .NET to run same boostrap check as we
do on other platforms

7 years ago[io-layer] Remove io-layer.h include from as many headers as possible (#4088)
Ludovic Henry [Tue, 6 Dec 2016 14:50:26 +0000 (09:50 -0500)]
[io-layer] Remove io-layer.h include from as many headers as possible (#4088)

7 years ago[w32handle] Fix race in foreach and unref (#4089)
Ludovic Henry [Tue, 6 Dec 2016 14:49:32 +0000 (09:49 -0500)]
[w32handle] Fix race in foreach and unref (#4089)

It could happen that we unref a handle that we are currently looping over. This could be the case if we are calling Process.GetProcessById (which loops over all handles) and mono_w32handle_unref on a MonoW32HandleProcess handle.

7 years ago[runtime] Use MonoBoolean as the return value of monitor icalls.
Zoltan Varga [Tue, 6 Dec 2016 05:47:27 +0000 (00:47 -0500)]
[runtime] Use MonoBoolean as the return value of monitor icalls.

7 years agoMerge pull request #4093 from ntherning/enable-building-bcl-with-mono-4.6-mcs
Alexander Köplinger [Tue, 6 Dec 2016 00:39:19 +0000 (01:39 +0100)]
Merge pull request #4093 from ntherning/enable-building-bcl-with-mono-4.6-mcs

Enable building the BCL with mcs from pre-4.8 mono installation

7 years ago[threads] Do not switch to GC safe twice, it's already done inside mono_join_uninterr...
Ludovic Henry [Mon, 5 Dec 2016 16:23:48 +0000 (11:23 -0500)]
[threads] Do not switch to GC safe twice, it's already done inside mono_join_uninterrupted

7 years ago[runtime] Use coop handles for the remaining System.Reflection.Assembly icalls (...
Aleksey Kliger (λgeek) [Mon, 5 Dec 2016 15:24:10 +0000 (10:24 -0500)]
[runtime] Use coop handles for the remaining System.Reflection.Assembly icalls (#4082)

* [reflection] Use handles for System.Reflection.Assembly.GetFilesInternal

* [reflection] Use handles for System.Reflection.Assembly.InternalGetType

* [reflection] Use handles for System.Reflection.Assembly.GetManifestResourceNames

* [reflection] Use handles for System.Reflection.Assembly.LoadPermissions

* [reflection] Add mono_method_get_object_handle

  Reimplement mono_method_get_object_checked in terms of the handles one.

* [reflection] Use handles for System.Reflection.Assembly.get_EntryPoint

* [reflection] Use handles for four more icalls in System.Refleciton.Assembly

  That's the lot of them.

    * get_ReflecitonOnly
    * get_code_base
    * get_fullname

* get_global_assembly_cache

* [security] Use handles for System.Security.Policy.Evidence.IsAuthenticodePresent

* [runtime] Use handles for System.Web.Util.Icalls.GetUnmanagedResourcesPtr

* [runtime] Use MONO_HANDLE_GETVAL instead of MONO_HANDLE_RAW in a few places

* [runtime] Use handles for System.AppDomain.ExecuteAssembly

7 years agoEnable building the BCL with mcs from pre-4.8 mono installation
Niklas Therning [Mon, 5 Dec 2016 10:56:27 +0000 (11:56 +0100)]
Enable building the BCL with mcs from pre-4.8 mono installation

This skips passing -runtimemetadataversion when building the BCL with
--with-csc=mcs.

7 years agoMerge pull request #4092 from ntherning/fix-w32process-win32.c-build-failure
Niklas Therning [Mon, 5 Dec 2016 13:22:22 +0000 (14:22 +0100)]
Merge pull request #4092 from ntherning/fix-w32process-win32.c-build-failure

Fix build failure in w32process-win32.c

7 years agoFix build failure in w32process-win32.c
Niklas Therning [Mon, 5 Dec 2016 10:50:07 +0000 (11:50 +0100)]
Fix build failure in w32process-win32.c

Commit 07630fe8c5b73c5ed47038a8e63b098fbbea05ff broke the build on Windows.

7 years agoMerge pull request #3997 from lateralusX/jlorenss/win-api-family-support-safearray
Johan Lorensson [Mon, 5 Dec 2016 10:45:19 +0000 (11:45 +0100)]
Merge pull request #3997 from lateralusX/jlorenss/win-api-family-support-safearray

Add possibility to exclude COM SafeArray implementation on some none desktop Windows API families.

7 years agoA few pretty print fixes for the GDB plugin. (#4001)
vkargov [Sun, 4 Dec 2016 00:41:54 +0000 (16:41 -0800)]
A few pretty print fixes for the GDB plugin. (#4001)