mono.git
7 years ago[msvc] Update csproj files
monojenkins [Tue, 22 Nov 2016 16:39:46 +0000 (16:39 +0000)]
[msvc] Update csproj files

7 years ago[profiles] Fix MOBILE assemblies and tests compilation + Rename MOBILE to AOT_HYBRID
Ludovic Henry [Fri, 18 Nov 2016 20:58:03 +0000 (15:58 -0500)]
[profiles] Fix MOBILE assemblies and tests compilation + Rename MOBILE to AOT_HYBRID

This only fixes the compilation of the assemblies and the tests. This doesn't fix the failing tests or the crashes.

7 years ago[ci] Add script to run MOBILE profile tests
Ludovic Henry [Fri, 18 Nov 2016 21:53:21 +0000 (16:53 -0500)]
[ci] Add script to run MOBILE profile tests

7 years ago[utils] Add MonoRefCount to factor ref-counting mechanisms
Ludovic Henry [Thu, 17 Nov 2016 22:55:53 +0000 (17:55 -0500)]
[utils] Add MonoRefCount to factor ref-counting mechanisms

7 years ago[corlib] Update list of known lcids and update CLRD data. Fixes #46456
Marek Safar [Mon, 21 Nov 2016 15:49:30 +0000 (16:49 +0100)]
[corlib] Update list of known lcids and update CLRD data. Fixes #46456

7 years agoMerge pull request #3998 from ntherning/fix-assert-in-poll_event_wait-on-WSAENOTSOCK...
Niklas Therning [Tue, 22 Nov 2016 10:36:04 +0000 (11:36 +0100)]
Merge pull request #3998 from ntherning/fix-assert-in-poll_event_wait-on-WSAENOTSOCK-on-windows

Fix assert in poll_event_wait() on WSAENOTSOCK on Windows

7 years ago[runtime] Add a test for appdomain unload + blocking tp thread. (#4000)
Zoltan Varga [Tue, 22 Nov 2016 01:51:05 +0000 (20:51 -0500)]
[runtime] Add a test for appdomain unload + blocking tp thread. (#4000)

7 years ago[MacSDK] Fix typo
Alexis Christoforides [Mon, 21 Nov 2016 22:40:00 +0000 (17:40 -0500)]
[MacSDK] Fix typo

7 years ago[runtime] Add back locking around mono_class_layout_fields () to work around https...
Zoltan Varga [Mon, 21 Nov 2016 22:28:34 +0000 (17:28 -0500)]
[runtime] Add back locking around mono_class_layout_fields () to work around https://bugzilla.xamarin.com/show_bug.cgi?id=47156.

7 years agoThreadpool appdomain unload cleanup (#3996)
Zoltan Varga [Mon, 21 Nov 2016 21:59:02 +0000 (16:59 -0500)]
Threadpool appdomain unload cleanup (#3996)

* [runtime] Move the threadpool related data from MonoDomain to ThreadPoolDomain.

* [runtime] Simplify the waiting for tp threads in the domain unload code. Use a condvar to wait for the active+outstanding number of jobs to reach 0.

7 years ago[tests] Rework how we do disabled tests
Ludovic Henry [Fri, 18 Nov 2016 19:15:06 +0000 (14:15 -0500)]
[tests] Rework how we do disabled tests

7 years agoMerge pull request #3988 from lambdageek/dev-handles-srmodule
Aleksey Kliger (λgeek) [Mon, 21 Nov 2016 14:43:07 +0000 (09:43 -0500)]
Merge pull request #3988 from lambdageek/dev-handles-srmodule

[coop] Use handles in System.Reflection.Module and System.Reflection.Assembly

7 years agoFix assert in poll_event_wait() on WSAENOTSOCK on Windows
Niklas Therning [Mon, 21 Nov 2016 09:17:40 +0000 (10:17 +0100)]
Fix assert in poll_event_wait() on WSAENOTSOCK on Windows

On Windows poll_event_wait() in threadpool-ms-io-poll.c checks
WSAGetLastError() when mono_poll() fails. However, mono_poll() sets errno
after converting the WSAXXX error code (e.g. WSAEFAULT->EFAULT). Occasionally
(maybe 1 in 100) the System test suite fails due to mono_poll() returning an
error and poll_event_wait() not handling the error code correctly on Windows.

This patch changes poll_event_wait() to use the same code path which checks
errno on all platforms including Windows. It also fixes a few other places
which used to check WSAGetLastError() rather than errno after a call to
mono_poll(). Also, the Socket.Poll_internal() and Socket.Select_internal()
icalls had to be patched to convert back the errno value to a corresponding
WSAXXX error code by adding WSABASEERR on Windows.

7 years agoRevert "[runtime] Default mobile_static AOT type to FullAOT"
Marek Safar [Mon, 21 Nov 2016 13:40:23 +0000 (14:40 +0100)]
Revert "[runtime] Default mobile_static AOT type to FullAOT"

7 years agoMerge pull request #3406 from alexanderkyte/mobile_static_default
Marek Safar [Mon, 21 Nov 2016 08:54:08 +0000 (09:54 +0100)]
Merge pull request #3406 from alexanderkyte/mobile_static_default

[runtime] Default mobile_static AOT type to FullAOT

7 years ago[runtime] Add even more logging code for the class.c assertion.
Zoltan Varga [Sun, 20 Nov 2016 23:01:32 +0000 (18:01 -0500)]
[runtime] Add even more logging code for the class.c assertion.

7 years agoFix the build.
Zoltan Varga [Sun, 20 Nov 2016 16:01:47 +0000 (11:01 -0500)]
Fix the build.

7 years agoImplement SIMD support for the Vector2/3/4 classes in System.Numerics. (#3765)
Zoltan Varga [Sun, 20 Nov 2016 15:57:07 +0000 (10:57 -0500)]
Implement SIMD support for the Vector2/3/4 classes in System.Numerics. (#3765)

* [simd] Rename SimdIntrinsc->SimdIntrinsic.

* [ji] Add beginnings of support for the SIMD types in the System.Numerics assembly.

Add intrinsics for the methods marked [JitIntrinsic] in the System.Numerics.Vector2 class. Generalize some code in simd-intrinsic.c
so it works both with System.Numerics and Mono.Simd types.

* [jit] Add support for System.Numerics.Vector4.

* [jit] Add support for System.Numerics.Vector3.

* [jit] Add tests for the JIT intrinsics in System.Numerics.Vectors.

* [jit] Implement System.Numerics.Vector.IsHardwareAccelerated intrinsics.

* [jit] Fix the implementation of System.Numerics.Vector.IsHardwareAccelerated, it should return true.

* [jit] Implement some support for the SIMD intrinsics in System.Numerics.Vector<T>.

* [jit] Disable the usage of the Vector SIMD intrinsics when using r4fp until support for it is implemented.

* [jit] Fix llvm support for the Vector<T> intrinsics.

* [jit] Disable the Vector<T> tests since they don't compile yet.

* [jit] Add an optimization for the typeof(T)==typeof(<concrete type>) construct common in some generics code.

* [simd] Only return true from IsHardwareAccelerated () if simd_supported_versions is non-zero.

* [simd] Add support for add/sub/mul/div operations on Vector<T>.

7 years ago[System] WebClient async request on file streams. Fixes #46538
Marek Safar [Sun, 20 Nov 2016 10:34:26 +0000 (11:34 +0100)]
[System] WebClient async request on file streams. Fixes #46538

7 years ago[runtime] Add more debug code to help debug a class.c assert.
Zoltan Varga [Sat, 19 Nov 2016 20:23:25 +0000 (15:23 -0500)]
[runtime] Add more debug code to help debug a class.c assert.

7 years ago[corlib] Don't crash when calling Evidence on AssemblyBuilder. Fixes #46739
Marek Safar [Fri, 18 Nov 2016 22:37:54 +0000 (23:37 +0100)]
[corlib] Don't crash when calling Evidence on AssemblyBuilder. Fixes #46739

7 years ago[sgen] Fix sgen_qsort.
Jon Purdy [Thu, 3 Nov 2016 19:36:09 +0000 (12:36 -0700)]
[sgen] Fix sgen_qsort.

sgen_qsort sometimes had pathological behavior due to a poor choice of
pivot. This implementation uses the median-of-three strategy, and limits
stack depth by avoiding recursive calls when possible.

7 years agoRevert "[process] Allocate a handle even for non-child processes"
Ludovic Henry [Fri, 18 Nov 2016 16:12:24 +0000 (11:12 -0500)]
Revert "[process] Allocate a handle even for non-child processes"

This reverts commit d6928839015effec6358d7bc9c7b1b547645140a.

7 years agoRevert "[runtime] Change the thread wait code to use cond variables instead o… (...
Zoltan Varga [Fri, 18 Nov 2016 20:41:32 +0000 (15:41 -0500)]
Revert "[runtime] Change the thread wait code to use cond variables instead o… (#3946)"

This reverts commit 4a1161e2d691672e8544ce5a3e20e5c08daa4f45.

Revert this, keep the event based code for now.

7 years agoRevert "[runtime] Fix the waiting for background threads which got broken by 4a1161e2...
Zoltan Varga [Fri, 18 Nov 2016 20:40:26 +0000 (15:40 -0500)]
Revert "[runtime] Fix the waiting for background threads which got broken by 4a1161e2d691672e8544ce5a3e20e5c08daa4f45. (#3983)"

This reverts commit dbc63ae672bcd65d87dbf4b1960904102cdcde97.

Revert this, keep the event based code for now.

7 years ago[System] Add range check for empty URI prefix when it also contains unicode character...
Marek Safar [Fri, 18 Nov 2016 16:58:05 +0000 (17:58 +0100)]
[System] Add range check for empty URI prefix when it also contains unicode character. Fixes #47205

7 years ago[reflection] Use handles for System.Reflection.Assembly.GetTypes
Aleksey Kliger [Thu, 17 Nov 2016 22:28:42 +0000 (17:28 -0500)]
[reflection] Use handles for System.Reflection.Assembly.GetTypes

Also change mono_get_exception_reflection_type_load_checked() to use handles.

7 years ago[reflection] Use coop handles for 6 icalls in System.Reflection.Module
Aleksey Kliger [Thu, 17 Nov 2016 21:03:18 +0000 (16:03 -0500)]
[reflection] Use coop handles for 6 icalls in System.Reflection.Module

- Close
- GetGlobalType
- GetHINSTANCE
- GetMDStreamVersion
- GetPEKind
- InternalGetTypes

7 years ago[coop] mono_type_get_object_handle
Aleksey Kliger [Thu, 17 Nov 2016 18:08:19 +0000 (13:08 -0500)]
[coop] mono_type_get_object_handle

7 years ago[coop] Add more handle utility functions
Aleksey Kliger [Thu, 17 Nov 2016 20:19:19 +0000 (15:19 -0500)]
[coop] Add more handle utility functions

- MONO_HANDLE_ARRAY_GETREF
- HANDLE_FUNCTION_RETURN_OBJ
- mono_array_handle_memcpy_refs

7 years ago[coop] Add mono_error_set_exception_handle
Aleksey Kliger [Thu, 17 Nov 2016 20:18:30 +0000 (15:18 -0500)]
[coop] Add mono_error_set_exception_handle

7 years agoMerge pull request #3932 from lambdageek/dev-handles-outargs
Aleksey Kliger (λgeek) [Fri, 18 Nov 2016 14:53:59 +0000 (09:53 -0500)]
Merge pull request #3932 from lambdageek/dev-handles-outargs

[coop handles] Support out args; convert some icalls.

7 years agoMerge pull request #3985 from ntherning/fix-Mono.Posix-on-windows
Niklas Therning [Fri, 18 Nov 2016 13:30:22 +0000 (14:30 +0100)]
Merge pull request #3985 from ntherning/fix-Mono.Posix-on-windows

Fix Mono.Posix tests on Windows

7 years agoMerge pull request #3948 from henricm/fix-pinvoke-utf8-windows
Henric Müller [Fri, 18 Nov 2016 06:11:17 +0000 (07:11 +0100)]
Merge pull request #3948 from henricm/fix-pinvoke-utf8-windows

Fix crash on Windows in PInvoke UTF8 tests

7 years ago[configure.ac] Factor common code for runtime preset
Ludovic Henry [Thu, 17 Nov 2016 16:08:28 +0000 (11:08 -0500)]
[configure.ac] Factor common code for runtime preset

7 years ago[configure] Add hybrid runtime preset
Ludovic Henry [Fri, 5 Aug 2016 18:17:14 +0000 (20:17 +0200)]
[configure] Add hybrid runtime preset

It is very close to the Full AOT profile (mobile static), but as the JIT is available, we still allow features like System.Reflection.Emit.

7 years agoMerge pull request #3987 from ntherning/fix-support-stdio-compile-error-on-android
Niklas Therning [Thu, 17 Nov 2016 21:20:58 +0000 (22:20 +0100)]
Merge pull request #3987 from ntherning/fix-support-stdio-compile-error-on-android

Fixes compile error in support/stdio.c on XA

7 years agoFixes compile error in support/stdio.c on XA
Niklas Therning [Thu, 17 Nov 2016 21:14:24 +0000 (22:14 +0100)]
Fixes compile error in support/stdio.c on XA

7 years agoFixed arrays pinvoke (#3972)
Zoltan Varga [Thu, 17 Nov 2016 19:38:27 +0000 (14:38 -0500)]
Fixed arrays pinvoke (#3972)

* [amd64] Use a GArray to collect field information in add_valuetype ().

* [amd64] Fix the marshalling of fixed buffers by treating them as an array of elements.

7 years ago[sdb] Error out when trying to obtain objects from unloaded domains, we have to check...
Zoltan Varga [Thu, 17 Nov 2016 19:07:04 +0000 (14:07 -0500)]
[sdb] Error out when trying to obtain objects from unloaded domains, we have to check domain->state as well since the object references become invalid before we received the domain unloaded profiler event. Fixes #44381.

7 years agoMerge pull request #3968 from BrzVlad/fix-monitor-exception
Vlad Brezae [Thu, 17 Nov 2016 18:40:14 +0000 (20:40 +0200)]
Merge pull request #3968 from BrzVlad/fix-monitor-exception

[runtime] Fix monitor exception throwing

7 years agoMerge pull request #3979 from radical/fix-xbuild-tgt
Ankit Jain [Thu, 17 Nov 2016 18:22:49 +0000 (13:22 -0500)]
Merge pull request #3979 from radical/fix-xbuild-tgt

[xbuild] Handle a repeat build of a target, when building through ..

7 years ago[runtime] Add some printfs to help debug the g_assert (klass->instance_size == instan...
Zoltan Varga [Thu, 17 Nov 2016 18:06:33 +0000 (13:06 -0500)]
[runtime] Add some printfs to help debug the g_assert (klass->instance_size == instance_size); assert failure.

7 years ago[mcs] Fixes user operator extraction from shared list. Fixes #46806
Marek Safar [Thu, 17 Nov 2016 17:40:45 +0000 (18:40 +0100)]
[mcs] Fixes user operator extraction from shared list. Fixes #46806

7 years ago[coop] Fix mono_stack_mark_pop
Aleksey Kliger [Wed, 16 Nov 2016 21:44:56 +0000 (16:44 -0500)]
[coop] Fix mono_stack_mark_pop

We need to restore the old size into the old top chunk, not the current
top chunk.

7 years ago[runtime] Use handles for System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray
Aleksey Kliger [Mon, 14 Nov 2016 18:48:23 +0000 (13:48 -0500)]
[runtime] Use handles for System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray

7 years ago[runtime] Use coop handles for System.Enum.GetEnumValuesAndNames
Aleksey Kliger [Thu, 10 Nov 2016 22:00:21 +0000 (17:00 -0500)]
[runtime] Use coop handles for System.Enum.GetEnumValuesAndNames

7 years ago[coop] Marshal out args for icalls using handles.
Aleksey Kliger [Tue, 8 Nov 2016 21:46:34 +0000 (16:46 -0500)]
[coop] Marshal out args for icalls using handles.

7 years ago[coop] Use coop handles for Mono.Runtime.GetNativeStackTrace
Aleksey Kliger [Tue, 8 Nov 2016 16:37:54 +0000 (11:37 -0500)]
[coop] Use coop handles for Mono.Runtime.GetNativeStackTrace

Implement mono_exception_get_native_backtrace in terms of mono_exception_handle_get_native_backtrace.

7 years ago[coop] Functions to convert coop handles to gchandles and back
Aleksey Kliger [Thu, 17 Nov 2016 15:57:52 +0000 (10:57 -0500)]
[coop] Functions to convert coop handles to gchandles and back

7 years agoMerge pull request #3965 from akoeplinger/ppc-disable-tests
Alexander Köplinger [Thu, 17 Nov 2016 15:58:00 +0000 (16:58 +0100)]
Merge pull request #3965 from akoeplinger/ppc-disable-tests

[ppc64] Disable a few runtime/bcl tests that currently fail

7 years ago[runtime] Fix the waiting for background threads which got broken by 4a1161e2d691672e...
Zoltan Varga [Thu, 17 Nov 2016 14:49:21 +0000 (09:49 -0500)]
[runtime] Fix the waiting for background threads which got broken by 4a1161e2d691672e8544ce5a3e20e5c08daa4f45. (#3983)

7 years agoMerge pull request #3953 from rolfbjarne/offsets-tool-autoreclone
João Matos [Thu, 17 Nov 2016 13:29:27 +0000 (13:29 +0000)]
Merge pull request #3953 from rolfbjarne/offsets-tool-autoreclone

[offsets-tool] Make sure to re-clone when the hash for the cpp binaries changes.

7 years agoFix Mono.Posix tests on Windows
Niklas Therning [Thu, 17 Nov 2016 12:34:09 +0000 (13:34 +0100)]
Fix Mono.Posix tests on Windows

Cleaned up Mono_Posix_FromSeekFlags() in support/map.c. It didn't properly
handle the case when L_INCR, L_SET, L_XTND aren't available, like on Windows.

Added Mono_Posix_Stdlib_GetLastError() to support/errno.c and changed
Stdlib.GetlastError() use it. Without this Stdlib.GetlastError() wouldn't take
errno in the C runtime used by libMonoPosixHelper.dll into account.

On Windows the Syscall class failed to initialize due to missing functions,
e.g. Mono_Posix_Syscall_get_at_fdcwd(), in libMonoPosixHelper.dll. Those
readonly static fields which were initialized at class initialization have now
been converted to static readonly properties so that the Syscall class can be
initialized despite those functions not being defined.

Cleaned up temp file handling in StdioFileStreamTest to avoid failures due to
sharing violations on Windows.

Fixed a bug in the StdioFileStreamTest.Write() test method when reading back
the batch of bytes written in the second part of the test.

Enabled the Mono.Posix test suite to run on PR builds. This test suite should
from now on be green.

7 years ago[ppc64] Disable a few runtime/bcl tests that currently fail
Alexander Köplinger [Tue, 15 Nov 2016 14:31:07 +0000 (15:31 +0100)]
[ppc64] Disable a few runtime/bcl tests that currently fail

Until someone can investigate those we want to have a clean CI.

7 years agoMerge pull request #3966 from ntherning/prevent-multiple-c-runtimes-on-windows
Niklas Therning [Thu, 17 Nov 2016 11:49:47 +0000 (12:49 +0100)]
Merge pull request #3966 from ntherning/prevent-multiple-c-runtimes-on-windows

Prevent Mono.Posix from using multiple C runtimes on Windows

7 years ago[jit] Make mono_print_method_from_ip () work when invoked from threads which are...
Zoltan Varga [Thu, 17 Nov 2016 05:09:02 +0000 (00:09 -0500)]
[jit] Make mono_print_method_from_ip () work when invoked from threads which are not attached to the runtime.

7 years ago[corlib] Remove public ctor from IncrementalHash
Alexander Köplinger [Thu, 17 Nov 2016 00:55:54 +0000 (01:55 +0100)]
[corlib] Remove public ctor from IncrementalHash

It doesn't have a public constructor in netstandard/corefx.

7 years ago[xbuild] Handle a repeat build of a target, when building through ..
Ankit Jain [Wed, 16 Nov 2016 22:42:12 +0000 (17:42 -0500)]
[xbuild] Handle a repeat build of a target, when building through ..

.. `Project.Build(..)`. For example, in:

```
<MSBuild Projects="bar.proj" Targets="foo;foo" />
```

The second invocation of `foo`, in the *same* `Project.Build(..)` call,
would get skipped, but BuildTarget assumed that no previous `outputs`
entry existed in the `targetOutputs` dictionary.

System.Exception: MSBuild operation failed ---> System.ArgumentException: Item has already been added. Key in dictionary: 'foo'  Key being added: 'foo'
  at System.Collections.Hashtable.Insert (System.Object key, System.Object nvalue, System.Boolean add) [0x00200] in <94fd79a3b7144c54b4cb162b50fc7761>:0
  at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <94fd79a3b7144c54b4cb162b50fc7761>:0
  at Microsoft.Build.BuildEngine.Project.BuildTarget (System.String target_name, System.Collections.IDictionary targetOutputs) [0x0007e] in <b1524340ac7e4c06b22fac1b2db62c08>:0
  at Microsoft.Build.BuildEngine.Project.BuildInternal (System.String[] targetNames, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags) [0x00134] in <b1524340ac7e4c06b22fac1b2db62c08>:0
  at Microsoft.Build.BuildEngine.Project.Build (System.String[] targetNames, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags) [0x0004b] in <b1524340ac7e4c06b22fac1b2db62c08>:0

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

7 years ago[coop] Use coop handles for Mono.Runtime.GetDisplayName
Aleksey Kliger [Tue, 8 Nov 2016 16:37:23 +0000 (11:37 -0500)]
[coop] Use coop handles for Mono.Runtime.GetDisplayName

7 years ago[coop] Enter/exit macros for handle-allocating functions
Aleksey Kliger [Tue, 8 Nov 2016 16:35:53 +0000 (11:35 -0500)]
[coop] Enter/exit macros for handle-allocating functions

Just setup/clear handle frames

7 years ago[coop] Handle accessor macros
Aleksey Kliger [Tue, 8 Nov 2016 16:34:38 +0000 (11:34 -0500)]
[coop] Handle accessor macros

- MONO_HANDLE_IS_NULL
- MONO_HANDLE_GET
- MONO_HANDLE_ARRAY_GETVAL
- mono_array_handle_length ()

7 years ago[btls] Download & extract BTLS certs, on Linux builds.
Jo Shields [Mon, 14 Nov 2016 19:25:57 +0000 (19:25 +0000)]
[btls] Download & extract BTLS certs, on Linux builds.

Actually use the correct pathname.  Martin.

7 years agoMerge pull request #3956 from directhex/install-btls-certs-in-jenkins
Martin Baulig [Wed, 16 Nov 2016 20:53:20 +0000 (21:53 +0100)]
Merge pull request #3956 from directhex/install-btls-certs-in-jenkins

[btls] Download & extract BTLS certs, on Linux builds.

7 years agoMerge pull request #3967 from atsushieno/fix-linux-btls
Martin Baulig [Wed, 16 Nov 2016 20:51:27 +0000 (21:51 +0100)]
Merge pull request #3967 from atsushieno/fix-linux-btls

Fix btls build for Linux.

7 years agoMerge pull request #3950 from mono/work-btls-sni-2
Martin Baulig [Wed, 16 Nov 2016 20:48:14 +0000 (21:48 +0100)]
Merge pull request #3950 from mono/work-btls-sni-2

[BTLS]: Add MonoBtlsSsl.GetServerName() and set MonoTlsConnectionInfo.PeerDomainName
(cherry picked from commit e6aa904d9d47186f01e92afc1d1f6d334aa46d1e)

7 years agoMerge pull request #3678 from mono/seq-read
Rodrigo Kumpera [Wed, 16 Nov 2016 18:15:41 +0000 (10:15 -0800)]
Merge pull request #3678 from mono/seq-read

[IO] Implement FileOptions.SequentialScan for Mac/BSD

7 years ago[mcs/build] Use make functions instead of calling a shell
Ludovic Henry [Fri, 5 Aug 2016 18:23:08 +0000 (20:23 +0200)]
[mcs/build] Use make functions instead of calling a shell

7 years ago[mcs/build] Factor Q_AOT for future use
Ludovic Henry [Fri, 5 Aug 2016 18:20:00 +0000 (20:20 +0200)]
[mcs/build] Factor Q_AOT for future use

7 years ago[acceptance-tests] Add dependency on nunitlite.dll
Alexander Köplinger [Wed, 16 Nov 2016 14:43:38 +0000 (15:43 +0100)]
[acceptance-tests] Add dependency on nunitlite.dll

nunitlite.dll is not built anymore with a normal Mono build
so we need to depend on it explicitly.

7 years ago[acceptance-tests] Specify nunitlite path
Marek Safar [Wed, 16 Nov 2016 14:22:44 +0000 (15:22 +0100)]
[acceptance-tests] Specify nunitlite path

7 years agoMerge pull request #3971 from directhex/longer-longer-longer-longer-longer-lasting...
Bernhard Urban [Wed, 16 Nov 2016 11:38:04 +0000 (12:38 +0100)]
Merge pull request #3971 from directhex/longer-longer-longer-longer-longer-lasting-tailcalls

Increase tailcall instruction length on ppc64

7 years agoPrevent Mono.Posix from using multiple C runtimes on Windows
Niklas Therning [Tue, 15 Nov 2016 15:22:33 +0000 (16:22 +0100)]
Prevent Mono.Posix from using multiple C runtimes on Windows

Since libMonoPosixHelper.dll is linked against ucrtbase.dll the C runtime
wrapper functions in it will call into ucrtbase.dll. Some pinvokes in
Mono.Unix.Native.Stdlib, however, bind directly to C runtime functions in
msvcrt. This is problematic if a resource (heap memory, file pointer, etc) is
allocated using one C runtime and then operated upon using funcitons form the
other C runtime. E.g., Stdlib.malloc() calls into a wrapper in
libMonoPosixHelper so it will use the ucrtbase heap while Stdlib.free() calls
directly into msvcrt's free() which will abort the process since it's called
with a pointer in an unknown heap.

This commit adds libMonoPosixHelper wrappers for all memory and file related
functions in Stdlib to ensure that all such functions use the same C runtime.

Some of the Mono.Posix tests still fail but at least the test suite doesn't
crash after this change. The test failures will be addressed in a future PR.

7 years agoIncrease tailcall instruction length on ppc64
Jo Shields [Wed, 16 Nov 2016 01:23:33 +0000 (01:23 +0000)]
Increase tailcall instruction length on ppc64

wrong maximal instruction length of instruction tailcall (expected 120, got 124)
* Assertion: should not be reached at mini-ppc.c:4694

7 years ago[runtime] Disable some failing tests until they are fixed.
Zoltan Varga [Tue, 15 Nov 2016 21:21:14 +0000 (16:21 -0500)]
[runtime] Disable some failing tests until they are fixed.

7 years ago[runtime] Change the thread wait code to use cond variables instead o… (#3946)
Zoltan Varga [Tue, 15 Nov 2016 20:56:45 +0000 (15:56 -0500)]
[runtime] Change the thread wait code to use cond variables instead o… (#3946)

* [runtime] Change the thread wait code to use cond variables instead of events.

Instead of waiting for the thread handles to be signalled, wait for a cond variable signalled which is signalled by the code which calls pthread_join ().

* [runtime] Synchronize access to njoined_threads. Only use the background_change_event on windows.

* Fix a warning.

7 years agoBump bockbuild for helpful CI cleaning fix
Alexis Christoforides [Tue, 15 Nov 2016 19:03:01 +0000 (14:03 -0500)]
Bump bockbuild for helpful CI cleaning fix

7 years ago[jit] Optimize out the early pinvoke address loading done by emit_native_wrapper...
Zoltan Varga [Tue, 15 Nov 2016 17:51:54 +0000 (12:51 -0500)]
[jit] Optimize out the early pinvoke address loading done by emit_native_wrapper () when coop+direct pinvokes is enabled, since its not needed, and it generates MONO_PATCH_INFO_ICALL_ADDR relocations which cause pinvoke lookups at runtime on platforms where its not supported like watchos. Fixes #45369. (#3960)

7 years ago[runtime] Fix monitor exception throwing
Vlad Brezae [Tue, 15 Nov 2016 15:56:22 +0000 (17:56 +0200)]
[runtime] Fix monitor exception throwing

mono_monitor_ensure_owned used to throw exception directly and not return. After switching the runtime to use pending exceptions, monitor code would continue running assuming we owned to monitor.

Fixes 46994

7 years agoFix btls build for Linux.
Atsushi Eno [Tue, 15 Nov 2016 16:01:01 +0000 (01:01 +0900)]
Fix btls build for Linux.

As @baulig suggested us elsewhere.

7 years agoRemove global ipv6 disabled setting. Fixes #35536
Marek Safar [Mon, 14 Nov 2016 19:30:14 +0000 (20:30 +0100)]
Remove global ipv6 disabled setting. Fixes #35536

7 years agoMerge pull request #3963 from ntherning/fix-missing-property-bag-c-file-in-vs-project
Niklas Therning [Tue, 15 Nov 2016 10:39:58 +0000 (11:39 +0100)]
Merge pull request #3963 from ntherning/fix-missing-property-bag-c-file-in-vs-project

Fix missing property-bag.c file in VS project

7 years agoMerge pull request #3964 from ntherning/fix-vs-linking-error-missing-mono_dl_open
Niklas Therning [Tue, 15 Nov 2016 10:39:22 +0000 (11:39 +0100)]
Merge pull request #3964 from ntherning/fix-vs-linking-error-missing-mono_dl_open

Fix VS error due to missing mono_dl_open()/mono_loader_register_module()

7 years agoFix VS error due to missing mono_dl_open()/mono_loader_register_module()
Niklas Therning [Tue, 15 Nov 2016 10:33:02 +0000 (11:33 +0100)]
Fix VS error due to missing mono_dl_open()/mono_loader_register_module()

PR #3955 removes mono_dl_open() and mono_loader_register_module() from
msvc/mono.def and msvc/monosgen.def which causes VS linking error. This change
readds the symbols to the def files as a temporary solution to get the VS
builds to build successfully again.

7 years agoFix missing property-bag.c file in VS project
Niklas Therning [Tue, 15 Nov 2016 10:25:56 +0000 (11:25 +0100)]
Fix missing property-bag.c file in VS project

PR #3936 adds the mono/metadata/property-bag.c file but doesn't add it to
msvc/libmonoruntime.vcxproj, resulting in linking errors when building the VS
solution.

7 years agoMerge pull request #3961 from akoeplinger/ppc-parallelism
Bernhard Urban [Tue, 15 Nov 2016 07:31:10 +0000 (08:31 +0100)]
Merge pull request #3961 from akoeplinger/ppc-parallelism

[ci] Reduce make parallelism on ppc64

7 years agoMerge pull request #3952 from akoeplinger/add-tests
Alexander Köplinger [Tue, 15 Nov 2016 02:19:21 +0000 (03:19 +0100)]
Merge pull request #3952 from akoeplinger/add-tests

[ci] Add missing tests from Wrench

7 years ago[ci] Reduce make parallelism on ppc64
Alexander Köplinger [Tue, 15 Nov 2016 01:31:45 +0000 (02:31 +0100)]
[ci] Reduce make parallelism on ppc64

-j4 seems to fail the build.

7 years agoMerge pull request #3936 from kumpera/monoclass_reorg2
Rodrigo Kumpera [Tue, 15 Nov 2016 01:18:26 +0000 (17:18 -0800)]
Merge pull request #3936 from kumpera/monoclass_reorg2

More MonoClass reorg, replace 3 fields with a property bag

7 years ago[ci] Add missing tests from Wrench
Alexander Köplinger [Mon, 14 Nov 2016 15:33:55 +0000 (16:33 +0100)]
[ci] Add missing tests from Wrench

While looking at the Wrench config I noticed there are a few
tests we don't run on Jenkins. This change adds those tests.

7 years agoMerge pull request #3958 from akoeplinger/disable-tests
Alexander Köplinger [Tue, 15 Nov 2016 00:50:08 +0000 (01:50 +0100)]
Merge pull request #3958 from akoeplinger/disable-tests

[runtime] Disable certain tests on PRs

7 years ago[runtime] Disable certain tests on PRs
Alexander Köplinger [Mon, 14 Nov 2016 21:20:16 +0000 (22:20 +0100)]
[runtime] Disable certain tests on PRs

This allows us to get back to green builds for PRs
while still keeping track of failing tests in master.

7 years ago[runtime] Cache marshal info in locals whenever possible.
Rodrigo Kumpera [Mon, 14 Nov 2016 22:25:36 +0000 (14:25 -0800)]
[runtime] Cache marshal info in locals whenever possible.

7 years agoMerge pull request #3945 from kumpera/fix-cross-domain-abort
Rodrigo Kumpera [Mon, 14 Nov 2016 21:59:05 +0000 (13:59 -0800)]
Merge pull request #3945 from kumpera/fix-cross-domain-abort

[corlib] Fix cross-domain exception serialization under thread abortion.

7 years ago[bcl] Add comment on why the empty try block.
Rodrigo Kumpera [Mon, 14 Nov 2016 21:58:40 +0000 (13:58 -0800)]
[bcl] Add comment on why the empty try block.

7 years agoMerge pull request #3951 from akoeplinger/add-csproj-warning
Alexander Köplinger [Mon, 14 Nov 2016 19:26:47 +0000 (20:26 +0100)]
Merge pull request #3951 from akoeplinger/add-csproj-warning

[msvc] Add warning about autogenerated csproj to genproj

7 years ago[btls] Download & extract BTLS certs, on Linux builds.
Jo Shields [Mon, 14 Nov 2016 19:25:57 +0000 (19:25 +0000)]
[btls] Download & extract BTLS certs, on Linux builds.

7 years agoMerge pull request #3955 from kumpera/fix-embedding-api
Rodrigo Kumpera [Mon, 14 Nov 2016 19:03:25 +0000 (14:03 -0500)]
Merge pull request #3955 from kumpera/fix-embedding-api

[runtime] Don't add mono-dl.h to loader.h. Move the internal function to an internal header.

7 years ago[runtime] Don't add mono-dl.h to loader.h. Move the internal function to an internal...
Rodrigo Kumpera [Mon, 14 Nov 2016 16:04:24 +0000 (08:04 -0800)]
[runtime] Don't add mono-dl.h to loader.h. Move the internal function to an internal header.

7 years ago[offsets-tool] Make sure to re-clone when the hash for the cpp binaries changes.
Rolf Bjarne Kvinge [Mon, 14 Nov 2016 15:57:54 +0000 (16:57 +0100)]
[offsets-tool] Make sure to re-clone when the hash for the cpp binaries changes.