mono.git
6 years ago[Socket] Fix Socket.BeginConnect to multiple IPAddress (#4960)
Ludovic Henry [Wed, 31 May 2017 22:22:27 +0000 (18:22 -0400)]
[Socket] Fix Socket.BeginConnect to multiple IPAddress (#4960)

We would previously mix 2 SocketAsyncResult, and in case we would succeed asynchronously, we would return one that would not be updated afterwards.

The solution consists in using only 1 SocketAsyncResult that we ensure to update accordingly.

6 years agoMerge pull request #4935 from lambdageek/dev-handles-may
Aleksey Kliger (λgeek) [Wed, 31 May 2017 18:34:20 +0000 (14:34 -0400)]
Merge pull request #4935 from lambdageek/dev-handles-may

[coop handles] w32event, w32handle and DNS icalls

6 years ago[runtime] Avoid calling mono_class_from_mono_type () for sre arrays, it could initial...
Zoltan Varga [Wed, 31 May 2017 17:21:10 +0000 (13:21 -0400)]
[runtime] Avoid calling mono_class_from_mono_type () for sre arrays, it could initialize unfinished element types. Create a normal MonoType structure instead. Fixes #56611. (#4952)

6 years ago[System] Adds watch specific HttpListenerWebSocketContext
Marek Safar [Wed, 31 May 2017 17:16:38 +0000 (19:16 +0200)]
[System] Adds watch specific HttpListenerWebSocketContext

6 years agoBump bockbuild to include gtk# bump (#4959)
Marius Ungureanu [Wed, 31 May 2017 14:49:10 +0000 (07:49 -0700)]
Bump bockbuild to include gtk# bump (#4959)

6 years agoBump api-snapshot
Alexander Köplinger [Wed, 31 May 2017 10:44:14 +0000 (12:44 +0200)]
Bump api-snapshot

6 years ago[unaligned] relax test regarding floating point precision
Bernhard Urban [Tue, 30 May 2017 10:52:54 +0000 (12:52 +0200)]
[unaligned] relax test regarding floating point precision

6 years ago[interp] use memmove for some primitve types, because it takes care of unaligned...
Bernhard Urban [Tue, 30 May 2017 10:28:11 +0000 (12:28 +0200)]
[interp] use memmove for some primitve types, because it takes care of unaligned addresses

relevant on architectures which do not support unaligned load/stores.

6 years agoBump corefx
Marek Safar [Sun, 28 May 2017 10:25:48 +0000 (12:25 +0200)]
Bump corefx

6 years ago[build] Fixes profile path for aot compilation
Marek Safar [Wed, 31 May 2017 06:44:35 +0000 (08:44 +0200)]
[build] Fixes profile path for aot compilation

6 years agoBump cecil
Marek Safar [Tue, 30 May 2017 16:38:24 +0000 (18:38 +0200)]
Bump cecil

6 years ago[System] Add missing configuration properties to the list of properties (#4954)
Alexander Köplinger [Wed, 31 May 2017 01:52:08 +0000 (03:52 +0200)]
[System] Add missing configuration properties to the list of properties (#4954)

After looking at https://github.com/mono/mono/pull/4949 I did a
quick pass through the other config sections and found two more
cases where we missed adding to the properties list.

6 years ago[MacSDK] Bump xamarin-gtk-theme.py to latest revision from private bockbuild
Alexander Köplinger [Wed, 31 May 2017 01:50:09 +0000 (03:50 +0200)]
[MacSDK] Bump xamarin-gtk-theme.py to latest revision from private bockbuild

6 years ago[MacSDK] Port two msbuild fixes from private bockbuild
Alexander Köplinger [Wed, 31 May 2017 01:24:19 +0000 (03:24 +0200)]
[MacSDK] Port two msbuild fixes from private bockbuild

https://github.com/xamarin/bockbuild/commit/58467b852e13b4bdfc75a2a0f9b9507b417b0694:

    [msbuild] Create symlinks from lib/mono/xbuild/Microsoft/NuGet/*
    msbuild install script cannot do this as the source files are installed
    by mono, which are in a different staging directory.

https://github.com/xamarin/bockbuild/commit/fb9656a7613bab2d77c8ce7e05d673c5abbbdac5:

    Partially Revert "[msbuild] Remove redundant msbuild logic from mono_master.py"

    Use 15.0 instead of mono version! msbuild's install script cannot
    copy these since bockbuild installs msbuild to a separate staging
    directory from mono. So, it needs to be done here.

6 years agoBump bockbuild to include gtk+ patch
Alexander Köplinger [Wed, 31 May 2017 01:33:35 +0000 (03:33 +0200)]
Bump bockbuild to include gtk+ patch

6 years ago[System] Add useDefaultCredentialsProp to the list of properties. (#4949)
Cody Russell [Tue, 30 May 2017 23:39:26 +0000 (18:39 -0500)]
[System] Add useDefaultCredentialsProp to the list of properties. (#4949)

6 years ago[runtime] Don't make the domain id allocatable before we clear the domain (#4942)
Vlad Brezae [Tue, 30 May 2017 22:28:50 +0000 (01:28 +0300)]
[runtime] Don't make the domain id allocatable before we clear the domain (#4942)

Otherwise, while we are clearing the domain, another domain might be created that has the same id as the current one. This would lead to crashes due to releasing of data from the newly created domain (ex gchandles).

6 years agoMerge pull request #4938 from kumpera/optimize_ref_queries
Rodrigo Kumpera [Tue, 30 May 2017 22:20:44 +0000 (15:20 -0700)]
Merge pull request #4938 from kumpera/optimize_ref_queries

Add concurrent read version of MonoGHashTable and use it with MonoDomain::refobject

6 years ago[win32] Add new files.
Rodrigo Kumpera [Tue, 30 May 2017 20:03:35 +0000 (13:03 -0700)]
[win32] Add new files.

6 years ago[w32socket] Remove dead code
Aleksey Kliger [Tue, 30 May 2017 19:15:06 +0000 (15:15 -0400)]
[w32socket] Remove dead code

6 years ago[w32socket] Use coop handles for System.Net.Dns.GetHostByAddr_internal
Aleksey Kliger [Tue, 30 May 2017 19:14:18 +0000 (15:14 -0400)]
[w32socket] Use coop handles for System.Net.Dns.GetHostByAddr_internal

6 years ago[w32socket] Use coop handles for System.Net.Dns.GetHostByName_internal
Aleksey Kliger [Tue, 30 May 2017 18:57:09 +0000 (14:57 -0400)]
[w32socket] Use coop handles for System.Net.Dns.GetHostByName_internal

6 years ago[mcs] Don't emit param-array attribute on method overrides, it's ignored by C# compil...
Marek Safar [Tue, 30 May 2017 17:30:43 +0000 (19:30 +0200)]
[mcs] Don't emit param-array attribute on method overrides, it's ignored by C# compiler. Fixes #53244

6 years agoBump bockbuild
Alexis Christoforides [Tue, 30 May 2017 17:29:33 +0000 (13:29 -0400)]
Bump bockbuild

6 years ago[S.R.I.RuntimeInformation] Fix FrameworkDescription on Android (#4946)
Alexander Köplinger [Tue, 30 May 2017 16:34:53 +0000 (18:34 +0200)]
[S.R.I.RuntimeInformation] Fix FrameworkDescription on Android (#4946)

* [S.R.I.RuntimeInformation] Fix FrameworkDescription on Android

It turns out using `DllImport ["__Internal"]` doesn't work on
XA (and other cases where Mono is embedded) because it searches
for the method in the host which embeds Mono and doesn't find it,
resulting in an EntryPointNotFoundException.

We need to switch to an icall instead. However there's already
an existing icall+BCL wrapper: Mono.Runtime.GetDisplayName().

Added IVT from corlib to S.R.I.RuntimeInformation so we can call it.

* Update API snapshot

6 years ago[mcs] Reset catch state variable after it has been checked. Fixes #54322
Marek Safar [Tue, 30 May 2017 09:39:46 +0000 (11:39 +0200)]
[mcs] Reset catch state variable after it has been checked. Fixes #54322

6 years ago[mcs] New property/indexer cannot have accessors implementing an interface in base...
Marek Safar [Mon, 29 May 2017 21:55:47 +0000 (23:55 +0200)]
[mcs] New property/indexer cannot have accessors implementing an interface in base type. Fixes #56627

6 years agoBugfix Ping.cs (#4936)
Jochen Kühner [Mon, 29 May 2017 21:05:34 +0000 (23:05 +0200)]
Bugfix Ping.cs (#4936)

6 years ago[interp] implement RELOC_LONG_BRANCH. fixes test/imt_big_iface_test.exe
Bernhard Urban [Mon, 29 May 2017 16:41:29 +0000 (18:41 +0200)]
[interp] implement RELOC_LONG_BRANCH.  fixes test/imt_big_iface_test.exe

6 years ago[runtime] Handle mono_method_body_get_object returning NULL on success.
Rodrigo Kumpera [Mon, 29 May 2017 17:36:54 +0000 (10:36 -0700)]
[runtime] Handle mono_method_body_get_object returning NULL on success.

6 years ago[Facades] Update to match latest contracts (#4939)
Alexander Köplinger [Mon, 29 May 2017 17:31:44 +0000 (19:31 +0200)]
[Facades] Update to match latest contracts (#4939)

* [Facades] Update to match latest contracts

* Update API snapshot

6 years ago[CI] ignore appdomain-unload-asmload.exe on interp and full-aot
Bernhard Urban [Mon, 29 May 2017 13:26:00 +0000 (15:26 +0200)]
[CI] ignore appdomain-unload-asmload.exe on interp and full-aot

6 years ago[android] add hardware specific workaround for Nexus9 in armv7 mode
Bernhard Urban [Tue, 16 May 2017 15:31:59 +0000 (17:31 +0200)]
[android] add hardware specific workaround for Nexus9 in armv7 mode

we got a couple of bug reports, all with the same failure:

https://bugzilla.xamarin.com/show_bug.cgi?id=44907
https://bugzilla.xamarin.com/show_bug.cgi?id=46482
https://bugzilla.xamarin.com/show_bug.cgi?id=51791

The bugs are private, therefore here what I wrote:

```
Thank you Matthias, this was very helpful.

>>> 09-30 12:24:50.347: A/DEBUG(6211): pid: 6191, tid: 6209, name: Thread-4  >>> com.distech.x50.ui.droid <<<
>>> 09-30 12:24:50.347: A/DEBUG(6211): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
>>> 09-30 12:24:50.347: A/DEBUG(6211):     r0 d6b58728  r1 00004001  r2 00000000  r3 d6b58738
>>> 09-30 12:24:50.347: A/DEBUG(6211):     r4 00000008  r5 ea97427c  r6 00001f3c  r7 00000015
>>> 09-30 12:24:50.347: A/DEBUG(6211):     r8 00001f38  r9 00000015  sl d6b58728  fp d67fed90
>>> 09-30 12:24:50.347: A/DEBUG(6211):     ip ea9742c0  sp d67fed60  lr ea7a4504  pc ea716a58  cpsr 800e0010

The crash happens on this assignment:
https://github.com/mono/mono/blob/de1865dad5c0350f391fedcaa08f02f610530d3f/mono/mini/mini-generic-sharing.c#L418
Here the according disassembly:
https://gist.github.com/lewurm/b1094749027c9e5ea19fdc4fac7905a7

The crash happens in the last loop iteration (`r9=i`, `r7=slot`).  Looking
at the machine code it just _cannot_ happen, which is confirmed by the C
code as well: `*oti` successfully happens in the if check, but after
returning from `alloc_oti()`, `oti` doesn't contain a valid address anymore.
I suspect some weird hardware issue that fails to restore all registers
properly from the stack.
```
[...]

```
Thanks again Matthias.  Unfortunately, I'm out of ideas, and I can't
blame anything but the hardware. The situation we see is too weird. We
segfault at offset `0xdda60: str sl, [r4]`, but really we should
already segfault at offset `0xdda2c: ldrge   sl, [r4, #8]!"`.  So I
suspect two things why this could happen:

(1) The instruction at `dda2c` fails to do the post-increment correctly
    for *whatever* reason.

(2) Something along the execution path corrupts the stackslot, where
    `r4` is saved, in such a way that it *exactly* masks it with `0xf`.
    Everything else on the stack looks fine, so this is sort of very
    unlikely to be honest.

This only happens on a very specific device: The Nexus 9 is the only
device that was ever shipped with the Tegra K1 T132.  I suspect an issue
in the binary translation layer of `armv7` instruction set to the internal
micro-ops of the CPU.  I tried to stress test the instruction in
question (see https://github.com/lewurm/ldrinsntest), however I was not
able to trigger a crash.  So either, I'm missing some context in order
to trigger the bug or I'm on a completely wrong track.

That said, even if we could proof that it is indeed a hardware issue,
the workaround is also non-trivial (it would then either need a fix in
gcc or require a microcode update by the chip vendor).
```

And then we saw:
https://github.com/golang/go/issues/19809#issuecomment-290804472

Another hint that this device is buggy.

6 years agoBump bockbuild
Alexander Köplinger [Mon, 29 May 2017 10:33:02 +0000 (12:33 +0200)]
Bump bockbuild

6 years ago[runtime] Change MonoDomain::refobject_hash to use MonoConcGHashTable.
Rodrigo Kumpera [Mon, 29 May 2017 03:16:29 +0000 (20:16 -0700)]
[runtime] Change MonoDomain::refobject_hash to use MonoConcGHashTable.

This change massively improves reflection query scalability.

Given this benchmark and my 4 cores laptop:

```
const int T_C = 4;
var list = new List<Thread> ();
bool done = false;
int count = 0;
for (int i = 0; i < T_C; ++i) {
var t = new Thread(() => {
while (!done) {
typeof (Driver)
.GetMethods (
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.Static);
Interlocked.Increment (ref count);
}
});
t.Start ();
list.Add (t);
}

Thread.Sleep (5000);
done = true;
foreach (var t in list)
t.Join ();
Console.WriteLine ("Got {0} lists done", count);
```

This change makes us go from 166.725 queries/s to 5.140.821 queries/s. Or 30x faster.

6 years ago[runtime] Add concurrent read variant of MonoGHashTable name MonoConcGHashTable.
Rodrigo Kumpera [Mon, 29 May 2017 00:24:58 +0000 (17:24 -0700)]
[runtime] Add concurrent read variant of MonoGHashTable name MonoConcGHashTable.

Use the same design as MonoConcHashTable.

Aaaaand confusing name will confuse.

6 years ago[mcs] Improves imported destructor detection. Fixes #54159
Marek Safar [Sun, 28 May 2017 11:47:45 +0000 (13:47 +0200)]
[mcs] Improves imported destructor detection. Fixes #54159

6 years agoBump bockbuild
Alexander Köplinger [Sun, 28 May 2017 00:02:31 +0000 (02:02 +0200)]
Bump bockbuild

6 years agoBump bockbuild to fix wrench build
Alexander Köplinger [Sat, 27 May 2017 23:17:47 +0000 (01:17 +0200)]
Bump bockbuild to fix wrench build

6 years agoMerge pull request #4904 from kumpera/more_opts
Rodrigo Kumpera [Sat, 27 May 2017 19:29:01 +0000 (12:29 -0700)]
Merge pull request #4904 from kumpera/more_opts

[runtime] Change jit_info_table_num_elements to O(1).

6 years agoMerge pull request #4928 from kumpera/ptr_to_struct_intrinsic
Rodrigo Kumpera [Sat, 27 May 2017 19:27:37 +0000 (12:27 -0700)]
Merge pull request #4928 from kumpera/ptr_to_struct_intrinsic

[mini] Intrinsify Marshal.PtrToStructure<T>

6 years agoInterp sdb (#4911)
Zoltan Varga [Sat, 27 May 2017 16:29:56 +0000 (12:29 -0400)]
Interp sdb (#4911)

* [interpreter] Add beginnings of debugger support.

Handle debugger support similarly to the JIT:
- Add a MINT_SDB_SEQ_POINT instruction to the debugger IR. Replace it with a MINT_BREAKPOINT instruction when a breakpoint is placed.
- Store the sequence point information in the existing sequence point data structures.

* [interp] Add support for debugger stacktraces.

* [interp] Add support for debugger frame info.

* [interp] Connect seq points inside the same basic block so simple single stepping works.

* [interp] Link sequence points in different basic blocks the same way the JIT does it.

* [interp] Allocate some bitsets from a mempool.

* [interp] Rewrite the patching in the transform pass to make it a bit easier to understand.

* [interp] Add interruption support for sdb.

* [interp] Add support for mkrefany,refanytype and refanyval.

* [interp] Fix debugger failures.

* Add support for setting byref variables.
* Fix thread interruption when the top frame is an interpreter frame.
* Allow stack walks when a thread is suspended while transforming a method.
* Implement method entry/exit events.
* Fix ldstr+dynamic methods.

* [interp] Implement support for Debugger.Break.

* [interp] Change the offsets in MonoJitInfo/seq points into byte based from short based to reduce the amount of special casing needed in other parts of the code.

* [interp] Factor out the push/pop lmf code into a pair of helper functions.

* [mixed] Fix mixed mode EH.

* [interp] Implement support for MONO_VERBOSE_METHOD. Improve sequence point placement.

* [interp] Implement support for SetIP ().

Pass the target thread as an additional argument to mono_interp_set_resume_state (). Check the resume state after single
stepping/breakpoints in the interpreter.

* [interp] Disable the usage of the STLOC_NP opcodes when running under the debugger, it doesn't work if the ip is changed when the execution is stopped.

* [interp] Fix async stack walks in the debugger when the thread is in native code called from interpreter code.

* [interp] Fix the disable interpreter build.

* [interp] Fix the calculation of native offsets in the line number info.

* [interp] Fix the build.

* [interp] Make CMD_STACK_FRAME_GET_THIS behave the same when called on managed-to-native frames, with the interpreter, frame->has_ctx is set.

* [interp] Fix typos, remove some dead code, use g_print instead of printf in a few places, move some interpreter stubs to interp-stubs.c.

6 years ago[runtime] Fix a race in mono_class_get_virtual_methods () which happens when klass...
Zoltan Varga [Sat, 27 May 2017 13:33:59 +0000 (09:33 -0400)]
[runtime] Fix a race in mono_class_get_virtual_methods () which happens when klass->method is NULL initially, but gets initialized later. Use the lowest bit of the iterator pointer to distinguish between the two cases. Fixes #56824. (#4933)

6 years ago[runtime] Change jit_info_table_num_elements to O(1).
Rodrigo Kumpera [Fri, 19 May 2017 06:24:08 +0000 (23:24 -0700)]
[runtime] Change jit_info_table_num_elements to O(1).

On very large apps such as XS, this looking can take half a second of CPU time when opening a big solution.

6 years ago[Mono.Posix] Adding .Net Core 2.0 support. (#4774)
Bill Holmes [Sat, 27 May 2017 06:24:10 +0000 (23:24 -0700)]
[Mono.Posix] Adding .Net Core 2.0 support. (#4774)

6 years ago[w32socket] addrinfo_to_IPHostEntry_handles
Aleksey Kliger [Fri, 26 May 2017 22:43:24 +0000 (18:43 -0400)]
[w32socket] addrinfo_to_IPHostEntry_handles

- change addrinfo_to_IPHostEntry to use the handles version
- next commits will update the callers to use the _handles version directly

6 years agoRe-bump bockbuild for libtiff URL change
Alexis Christoforides [Fri, 26 May 2017 20:11:08 +0000 (16:11 -0400)]
Re-bump bockbuild for libtiff URL change

6 years ago[System] Use coop handles for System.Net.Dns.GetHostName_internal
Aleksey Kliger [Fri, 26 May 2017 20:03:25 +0000 (16:03 -0400)]
[System] Use coop handles for System.Net.Dns.GetHostName_internal

6 years agoRevert "Bump bockbuild", as it breaks the build.
Alexis Christoforides [Fri, 26 May 2017 19:38:38 +0000 (15:38 -0400)]
Revert "Bump bockbuild", as it breaks the build.

This reverts commit 30f9a22f0869d727c663cc4ba2c283ce75dc73f2.

6 years agoMerge pull request #4931 from kumpera/com-interop-fix
Rodrigo Kumpera [Fri, 26 May 2017 19:28:40 +0000 (12:28 -0700)]
Merge pull request #4931 from kumpera/com-interop-fix

Fix cominterop bug

6 years ago[mini]Add test for PtrToStruct<T>
Rodrigo Kumpera [Fri, 26 May 2017 05:45:16 +0000 (22:45 -0700)]
[mini]Add test for PtrToStruct<T>

6 years agoMerge pull request #4840 from kumpera/unaligned-access
Rodrigo Kumpera [Fri, 26 May 2017 19:17:02 +0000 (12:17 -0700)]
Merge pull request #4840 from kumpera/unaligned-access

Another round of cleanups plus fix how the JIT emit unaligned access.

6 years ago[runtime] Use coop handles for ves_icall_System_Threading_Mutex_OpenMutex_internal
Aleksey Kliger [Fri, 26 May 2017 15:33:07 +0000 (11:33 -0400)]
[runtime] Use coop handles for ves_icall_System_Threading_Mutex_OpenMutex_internal

- add mono_w32mutex_open for w32mutex-unix.c

6 years ago[runtime] Use coop handles for ves_icall_System_Threading_Mutex_CreateMutex_internal
Aleksey Kliger [Fri, 26 May 2017 15:08:22 +0000 (11:08 -0400)]
[runtime] Use coop handles for ves_icall_System_Threading_Mutex_CreateMutex_internal

6 years ago[runtime] Use coop handles for ves_icall_System_Threading_Events_OpenEvent_internal
Aleksey Kliger [Fri, 26 May 2017 14:01:10 +0000 (10:01 -0400)]
[runtime] Use coop handles for ves_icall_System_Threading_Events_OpenEvent_internal

6 years ago[w32event] Use coop handles for System.Threading.NativeEventCalls.CreateEvent_internal
Aleksey Kliger [Thu, 25 May 2017 22:21:31 +0000 (18:21 -0400)]
[w32event] Use coop handles for System.Threading.NativeEventCalls.CreateEvent_internal

- Make a new mono_w32event_create_full on unix
- Convert the MonoString to utf8 (unix) or utf16 (win32) in the icall, then
  call an implementation func.
- transition to GC safe mode around the win32 api call on Windows

6 years agoBump bockbuild
Alexis Christoforides [Fri, 26 May 2017 16:19:03 +0000 (12:19 -0400)]
Bump bockbuild

6 years ago[mcs] Codegen for optimized new with valuetype load and awaited arguments. Fixes...
Marek Safar [Fri, 26 May 2017 16:22:58 +0000 (18:22 +0200)]
[mcs] Codegen for optimized new with valuetype load and awaited arguments. Fixes #56081

6 years ago[coop handles] Add mono_string_handle_pin_chars
Aleksey Kliger [Thu, 25 May 2017 22:17:59 +0000 (18:17 -0400)]
[coop handles] Add mono_string_handle_pin_chars

6 years ago[w32handle] Const-ify arg of mono_w32handle_namespace_search_handle
Aleksey Kliger [Thu, 25 May 2017 22:16:44 +0000 (18:16 -0400)]
[w32handle] Const-ify arg of mono_w32handle_namespace_search_handle

6 years ago[remoting] Use coop handles for ves_icall_System_Runtime_Activation_ActivationService...
Aleksey Kliger [Thu, 25 May 2017 18:54:20 +0000 (14:54 -0400)]
[remoting] Use coop handles for ves_icall_System_Runtime_Activation_ActivationServices_EnableProxyActivation

6 years ago[remoting] Use coop handles for ves_icall_IsTransparentProxy
Aleksey Kliger [Thu, 25 May 2017 17:57:36 +0000 (13:57 -0400)]
[remoting] Use coop handles for ves_icall_IsTransparentProxy

6 years ago[arm] use r8 instead of r5 in icall trampoline, because r5 is used as IMT reg
Bernhard Urban [Thu, 18 May 2017 21:48:50 +0000 (23:48 +0200)]
[arm] use r8 instead of r5 in icall trampoline, because r5 is used as IMT reg

6 years ago[arm] respect iOS specific ABI for frame pointer in icall trampoline
Bernhard Urban [Thu, 18 May 2017 17:13:45 +0000 (19:13 +0200)]
[arm] respect iOS specific ABI for frame pointer in icall trampoline

6 years ago[mini] Intrinsify Marshal.PtrToStructure<T>
Rodrigo Kumpera [Thu, 25 May 2017 05:56:27 +0000 (22:56 -0700)]
[mini] Intrinsify Marshal.PtrToStructure<T>

6 years ago[runtime] Add support for using COM types from corlib.
Rodrigo Kumpera [Thu, 25 May 2017 22:19:52 +0000 (15:19 -0700)]
[runtime] Add support for using COM types from corlib.

This can be reproduced by trying to load a type that implements a COM interface corlib ships.

6 years ago[mini] Fix the llvmonlycheck test.
Rodrigo Kumpera [Wed, 24 May 2017 00:07:37 +0000 (17:07 -0700)]
[mini] Fix the llvmonlycheck test.

6 years ago[aot] Avoid printing out AOT NOT FOUND messages for icall methods which have no body.
Zoltan Varga [Thu, 25 May 2017 21:59:55 +0000 (17:59 -0400)]
[aot] Avoid printing out AOT NOT FOUND messages for icall methods which have no body.

6 years ago[arm] Do not use the ARM Run-time ABI in cross-compilers (#4914)
Damien Diederen [Thu, 25 May 2017 17:16:38 +0000 (19:16 +0200)]
[arm] Do not use the ARM Run-time ABI in cross-compilers (#4914)

6 years ago[remoting] refactor ves_icall_InternalExecute
Aleksey Kliger [Thu, 25 May 2017 16:05:34 +0000 (12:05 -0400)]
[remoting] refactor ves_icall_InternalExecute

Pull the FieldGetter and FieldSetter logic into separate functions

6 years ago[runtime] Use coop handles for System.Runtime.Remoting.RemotingServices.GetVirtualMethod
Aleksey Kliger [Thu, 25 May 2017 15:31:29 +0000 (11:31 -0400)]
[runtime] Use coop handles for System.Runtime.Remoting.RemotingServices.GetVirtualMethod

6 years agoMerge pull request #4926 from BrzVlad/fix-tls-v5
Vlad Brezae [Thu, 25 May 2017 11:53:39 +0000 (14:53 +0300)]
Merge pull request #4926 from BrzVlad/fix-tls-v5

[arm] Don't use fast tls on v5 arm

6 years agoFix mono build with disabled sgen (#4915)
e-kovalenko [Wed, 24 May 2017 23:11:40 +0000 (02:11 +0300)]
Fix mono build with disabled sgen (#4915)

Build of the Mono failed with the Boehm GC only (without SGEN)
if it configured like this: --with-gc=included --withsgen=no

6 years agosysctl takes 3 name components (#4883)
Marcin Cieślak [Wed, 24 May 2017 23:09:05 +0000 (01:09 +0200)]
sysctl takes 3 name components (#4883)

Adapted from:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212259

https://github.com/mono/mono/pull/3480

https://svnweb.freebsd.org/ports?view=revision&revision=423356

6 years agoMove <sys/types.h> higher for integer types (#4884)
Marcin Cieślak [Wed, 24 May 2017 23:06:53 +0000 (01:06 +0200)]
Move <sys/types.h> higher for integer types (#4884)

Fix build on FreeBSD 8 and maybe others
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198404#c6

6 years ago[arm] Don't use fast tls on v5 arm
Vlad Brezae [Wed, 24 May 2017 22:14:00 +0000 (01:14 +0300)]
[arm] Don't use fast tls on v5 arm

The thread coprocessor registers appear only in v7 specification.

6 years agoMerge pull request #4923 from lambdageek/bug-56694
Aleksey Kliger (λgeek) [Wed, 24 May 2017 21:35:22 +0000 (17:35 -0400)]
Merge pull request #4923 from lambdageek/bug-56694

[appdomain] Don't leak MonoReflectionAssemblyHandles firing events

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

6 years agoMerge pull request #4872 from kumpera/add_test_for_eloop
Rodrigo Kumpera [Wed, 24 May 2017 20:25:41 +0000 (16:25 -0400)]
Merge pull request #4872 from kumpera/add_test_for_eloop

[runtime] Fix runtime behavior when dealing with missing symlinks

6 years agoMerge pull request #4845 from lambdageek/dev-coop-delegates
Aleksey Kliger (λgeek) [Wed, 24 May 2017 19:56:38 +0000 (15:56 -0400)]
Merge pull request #4845 from lambdageek/dev-coop-delegates

[marshal] Use coop handles for delegates icalls

6 years agoBug #56499: unreadable /etc/localtime should not cause an exception (#4881)
Marcin Cieślak [Wed, 24 May 2017 18:53:23 +0000 (20:53 +0200)]
Bug #56499: unreadable /etc/localtime should not cause an exception (#4881)

* Bug #56499: unreadable /etc/localtime should not cause an exception

* Fix build

6 years ago[sgen] Scan the handle stack for dangling ptrs during domain unload
Aleksey Kliger [Wed, 24 May 2017 16:25:26 +0000 (12:25 -0400)]
[sgen] Scan the handle stack for dangling ptrs during domain unload

There should be no handles pointing to objects in the domain that is unloading
in any thread's handle stack once mono_gc_clear_domain () is called.

6 years ago[coop handles] Fix wrong #ifdef
Aleksey Kliger [Wed, 24 May 2017 15:41:44 +0000 (11:41 -0400)]
[coop handles] Fix wrong #ifdef

6 years ago[appdomain] Don't leak MonoReflectionAssemblyHandles in callbacks to managed
Aleksey Kliger [Tue, 23 May 2017 21:24:18 +0000 (17:24 -0400)]
[appdomain] Don't leak MonoReflectionAssemblyHandles in callbacks to managed

6 years ago[tests] Regression test for #56694
Aleksey Kliger [Wed, 24 May 2017 15:18:36 +0000 (11:18 -0400)]
[tests] Regression test for #56694

When an AssemblyLoad event fires in a domain, a System.Reflection.Assembly
object is created in that domain for the assembly being loaded.  The bug left
this object alive after the domain was unloaded, which lead to a GC crash.

6 years ago[runtime] Implement interior handles as a special case to simplify and speed up the...
Zoltan Varga [Wed, 24 May 2017 17:58:18 +0000 (13:58 -0400)]
[runtime] Implement interior handles as a special case to simplify and speed up the more common handle code. (#4921)

6 years ago[corlib] Fixes warning
Marek Safar [Wed, 24 May 2017 17:28:29 +0000 (19:28 +0200)]
[corlib] Fixes warning

6 years ago[mcs] Parsing of nested unbound types. Fixes #55400
Marek Safar [Wed, 24 May 2017 17:26:46 +0000 (19:26 +0200)]
[mcs] Parsing of nested unbound types. Fixes #55400

6 years ago[corlib] Remove unused field
Marek Safar [Wed, 24 May 2017 13:39:37 +0000 (15:39 +0200)]
[corlib] Remove unused field

6 years agoImprove error messages to help users diagnose problems when using custom mode (#4922)
Miguel de Icaza [Wed, 24 May 2017 17:19:58 +0000 (13:19 -0400)]
Improve error messages to help users diagnose problems when using custom mode (#4922)

* Improve error messages to help users diagnose problems when using the custom mode

* Update mkbundle.cs

6 years ago[runtime] Convert a g_warning to a type load failure. (#4920)
Zoltan Varga [Wed, 24 May 2017 13:35:18 +0000 (09:35 -0400)]
[runtime] Convert a g_warning to a type load failure. (#4920)

6 years agoFix make dist.
Zoltan Varga [Wed, 24 May 2017 02:51:09 +0000 (22:51 -0400)]
Fix make dist.

6 years agoFix the CpBlk and InitBlk intrinsics.
Rodrigo Kumpera [Tue, 23 May 2017 23:59:07 +0000 (16:59 -0700)]
Fix the CpBlk and InitBlk intrinsics.

6 years agoUpdate test for correct behavior.
Rodrigo Kumpera [Tue, 23 May 2017 21:59:02 +0000 (14:59 -0700)]
Update test for correct behavior.

6 years ago[runtime] Fix multiple issues around symlink handling.
Rodrigo Kumpera [Tue, 23 May 2017 21:46:53 +0000 (14:46 -0700)]
[runtime] Fix multiple issues around symlink handling.

After fixing my windows setup, I managed to properly test MS's behavior, which is a lot saner and it's the following:

Opening fails with ERROR_CANT_RESOLVE_FILENAME (1921).
Testing and Deleting works.

Fixing File.Delete required removing the lstat we do before deleting, which no longer serves any purpose.

Fixing File.Exists requires handling ELOOP when stat fails and we retry with lstat.

6 years ago[System]: Don't call OnCompleted(this) twice in SocketAsyncEventArgs.FinishWrapperCon...
Martin Baulig [Tue, 23 May 2017 19:42:05 +0000 (15:42 -0400)]
[System]: Don't call OnCompleted(this) twice in SocketAsyncEventArgs.FinishWrapperConnectSuccess(). (#4894)

6 years ago[bcl] Fix compiling xunit-based tests
Alexander Köplinger [Tue, 23 May 2017 17:54:35 +0000 (19:54 +0200)]
[bcl] Fix compiling xunit-based tests

We moved System.Runtime.InteropServices.RuntimeInformation to a facade.

6 years ago[runtime] Add specialized versions of mono_icall_handle_new () for internal/non-inter...
Zoltan Varga [Tue, 23 May 2017 15:46:59 +0000 (11:46 -0400)]
[runtime] Add specialized versions of mono_icall_handle_new () for internal/non-internal pointers. (#4918)

6 years agoFix full aot (#4919)
Zoltan Varga [Tue, 23 May 2017 15:36:43 +0000 (11:36 -0400)]
Fix full aot (#4919)

* [runtime] Fix the generation of invalid IL in the return marshalling of stringbuilders.

* [runtime] Disable some failing fullaot tests.

6 years ago[runtime] Use coop handles for System.Delegate.AllocDelegateLike_internal
Aleksey Kliger [Fri, 12 May 2017 16:30:05 +0000 (12:30 -0400)]
[runtime] Use coop handles for System.Delegate.AllocDelegateLike_internal

6 years ago[marshal] Use coop handles for System.Delegate.GetVirtualMethod_internal
Aleksey Kliger [Thu, 11 May 2017 21:35:42 +0000 (17:35 -0400)]
[marshal] Use coop handles for System.Delegate.GetVirtualMethod_internal