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"
Vlad Brezae [Fri, 16 Dec 2016 17:39:09 +0000 (19:39 +0200)]
[runtime] Remove old unused defines/prototypes
Marek Safar [Fri, 16 Dec 2016 11:01:53 +0000 (12:01 +0100)]
[build] Remove PEAPI from library profiles
Marek Safar [Fri, 16 Dec 2016 11:17:40 +0000 (12:17 +0100)]
[build] Update list of aoted images in mcs mode
Marek Safar [Fri, 16 Dec 2016 14:43:58 +0000 (15:43 +0100)]
[System.Numerics.Vectors] Update to the latest CoreFX version
Marek Safar [Fri, 16 Dec 2016 14:26:38 +0000 (15:26 +0100)]
[System.Numerics.Vectors] Enable Vector on desktop profile
Marek Safar [Fri, 16 Dec 2016 11:43:57 +0000 (12:43 +0100)]
Bump corefx
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.
Zoltan Varga [Fri, 16 Dec 2016 02:47:46 +0000 (21:47 -0500)]
Fix a warning.
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
```
monojenkins [Thu, 15 Dec 2016 20:01:12 +0000 (21:01 +0100)]
[msvc] Update csproj files (#4151)
Marek Safar [Thu, 15 Dec 2016 18:04:31 +0000 (19:04 +0100)]
[build] Update list of aoted images in mcs mode
Marek Safar [Thu, 15 Dec 2016 16:01:43 +0000 (17:01 +0100)]
[System.Core] Add CryptoServiceProviders to mobile
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
Marek Safar [Thu, 15 Dec 2016 11:10:02 +0000 (12:10 +0100)]
[corlib] Fixes warning
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!
Vlad Brezae [Thu, 15 Dec 2016 13:13:56 +0000 (15:13 +0200)]
[s390x] Fix build
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
Marek Safar [Thu, 15 Dec 2016 10:22:07 +0000 (11:22 +0100)]
[tools] Add resx2sr internal tool
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
Zoltan Varga [Thu, 15 Dec 2016 04:45:29 +0000 (05:45 +0100)]
[arm64] Mark MONO_CONTEXT_GET_CURRENT () as clobbering x16.
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
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
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
Alexander Köplinger [Wed, 14 Dec 2016 19:16:08 +0000 (20:16 +0100)]
Bump cecil to get portable pdb fix
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.
Vlad Brezae [Tue, 22 Nov 2016 11:07:18 +0000 (03:07 -0800)]
[arm64] Resurrect inlined fast tls
Vlad Brezae [Mon, 21 Nov 2016 21:52:50 +0000 (13:52 -0800)]
[x86] Resurrect inlined fast tls
Vlad Brezae [Fri, 18 Nov 2016 20:34:42 +0000 (22:34 +0200)]
[runtime] Global debug option for using fallback 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.
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.
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).
Bernhard Urban [Mon, 12 Dec 2016 13:32:23 +0000 (14:32 +0100)]
[exception] rename mono_handle_native_sigsegv -> mono_handle_native_crash
Bernhard Urban [Mon, 12 Dec 2016 14:28:41 +0000 (15:28 +0100)]
[exception] pass signal as string already to mono_handle_native_sigsegv
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)
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
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.
Ludovic Henry [Wed, 14 Dec 2016 02:44:27 +0000 (21:44 -0500)]
[process] Remove useless FIXME
Zoltan Varga [Tue, 13 Dec 2016 22:38:41 +0000 (17:38 -0500)]
[arm64] Save the fp regs in MONO_CONTEXT_GET_CURRENT (). (#4121)
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)
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.
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
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
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.
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.
Aleksey Kliger [Tue, 13 Dec 2016 20:49:39 +0000 (15:49 -0500)]
[test] Test for System.Reflection.Emit.DynamicMethod.GetCustomAttributes
Vlad Brezae [Tue, 29 Nov 2016 22:06:55 +0000 (00:06 +0200)]
[sgen] binary protocol on windows
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.
Zoltan Varga [Tue, 13 Dec 2016 16:40:10 +0000 (17:40 +0100)]
Fix a warning.
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.
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.
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
monojenkins [Tue, 13 Dec 2016 12:52:22 +0000 (13:52 +0100)]
[msvc] Update csproj files (#4136)
Bernhard Urban [Tue, 13 Dec 2016 12:41:32 +0000 (13:41 +0100)]
Revert "Fix a warning."
This reverts commit
b498facf7cebade5762d79f28cd102a5ed120bc5.
Zoltan Varga [Tue, 13 Dec 2016 06:29:41 +0000 (07:29 +0100)]
Fix a warning.
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)
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.
Marek Safar [Mon, 12 Dec 2016 18:57:25 +0000 (19:57 +0100)]
[xbuild] publicsign and delaysign cannot be used at same time
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
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.
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
Marek Safar [Mon, 12 Dec 2016 15:02:48 +0000 (16:02 +0100)]
[xbuild] Convert pbdonly to portable debug mode
Marek Safar [Mon, 12 Dec 2016 14:48:36 +0000 (15:48 +0100)]
[System] Always use mcs as CodeDOM backend compiler
Marek Safar [Mon, 12 Dec 2016 12:42:16 +0000 (13:42 +0100)]
[build] Add System.ValueTuple to bootstrap facades
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.
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.
Zoltan Varga [Sun, 11 Dec 2016 06:14:18 +0000 (01:14 -0500)]
[simd] Add intrinsics support for Vector<T>.CopyTo ().
monojenkins [Sat, 10 Dec 2016 16:36:36 +0000 (17:36 +0100)]
[msvc] Update csproj files (#4128)
Alexander Köplinger [Sat, 10 Dec 2016 02:59:47 +0000 (03:59 +0100)]
[Facades] Add System.ValueTuple facade (#4125)
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)
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).
Ludovic Henry [Fri, 9 Dec 2016 16:09:59 +0000 (11:09 -0500)]
[threads] Inline thread_cleanup into mono_thread_detach_internal (#4119)
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.
Bernhard Urban [Fri, 9 Dec 2016 12:14:16 +0000 (13:14 +0100)]
[configure] fix out-of-tree-build with roslyn
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
Marek Safar [Fri, 9 Dec 2016 01:16:15 +0000 (17:16 -0800)]
[System] Add new test
Alexis Christoforides [Thu, 8 Dec 2016 20:14:49 +0000 (15:14 -0500)]
[MacSDK] Include 'opt' as a PATH-available binary
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)
Ludovic Henry [Wed, 7 Dec 2016 22:07:54 +0000 (17:07 -0500)]
[jenkins] Rename runtime presets to match CI tags
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.
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.
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`
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
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
Ludovic Henry [Wed, 7 Dec 2016 20:27:22 +0000 (15:27 -0500)]
[jenkins] Fix order of CI tags
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
monojenkins [Wed, 7 Dec 2016 18:28:51 +0000 (19:28 +0100)]
[msvc] Update csproj files (#4115)
Marek Safar [Wed, 7 Dec 2016 15:34:47 +0000 (07:34 -0800)]
[build] Add System.Security.Cryptography.Primitives to bootstrap facades
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
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.
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
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
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.
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.
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
...
```
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.
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.
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.
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
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)