mono.git
6 years ago[wasm] Implement GC support. Embedder must provide main loop pumping function request...
Rodrigo Kumpera [Thu, 28 Sep 2017 00:30:49 +0000 (17:30 -0700)]
[wasm] Implement GC support. Embedder must provide main loop pumping function request_gc_cycle.

6 years ago[mini] Add my test suite to the list of magic type assemblies.
Rodrigo Kumpera [Tue, 26 Sep 2017 22:03:18 +0000 (15:03 -0700)]
[mini] Add my test suite to the list of magic type assemblies.

6 years ago[mini] Adjust some test suites to work under mobile.
Rodrigo Kumpera [Tue, 26 Sep 2017 21:57:45 +0000 (14:57 -0700)]
[mini] Adjust some test suites to work under mobile.

6 years ago[wasm] Disable test due to emcc bug.
Rodrigo Kumpera [Tue, 26 Sep 2017 00:37:52 +0000 (17:37 -0700)]
[wasm] Disable test due to emcc bug.

6 years ago[wasm] Fix test_0_conv_i under interp.
Rodrigo Kumpera [Tue, 26 Sep 2017 00:01:37 +0000 (17:01 -0700)]
[wasm] Fix test_0_conv_i under interp.

6 years ago[mini] Fix bug categories.
Rodrigo Kumpera [Mon, 25 Sep 2017 23:35:05 +0000 (16:35 -0700)]
[mini] Fix bug categories.

6 years ago[wasm] Add ff signature
Rodrigo Kumpera [Mon, 25 Sep 2017 23:33:11 +0000 (16:33 -0700)]
[wasm] Add ff signature

6 years ago[interp] Don't inline empty calls that take vt arguments.
Rodrigo Kumpera [Mon, 25 Sep 2017 23:32:51 +0000 (16:32 -0700)]
[interp] Don't inline empty calls that take vt arguments.

6 years ago[wasm] Disable tests that crashes the runtime for now
Rodrigo Kumpera [Tue, 12 Sep 2017 23:12:58 +0000 (16:12 -0700)]
[wasm] Disable tests that crashes the runtime for now

6 years ago[wasm] Don't try mini_get_delegate_arg if the interpreter is in use.
Rodrigo Kumpera [Tue, 12 Sep 2017 23:11:32 +0000 (16:11 -0700)]
[wasm] Don't try mini_get_delegate_arg if the interpreter is in use.

6 years ago[wasm] Add one more wasm_invoke entry.
Rodrigo Kumpera [Tue, 12 Sep 2017 20:12:06 +0000 (13:12 -0700)]
[wasm] Add one more wasm_invoke entry.

6 years ago[interp] Add some error handling to the interpreter
Rodrigo Kumpera [Tue, 12 Sep 2017 20:04:46 +0000 (13:04 -0700)]
[interp] Add some error handling to the interpreter

6 years ago[wasm] Don't use capture_context fast path that requires function tramps.
Rodrigo Kumpera [Tue, 12 Sep 2017 18:52:50 +0000 (11:52 -0700)]
[wasm] Don't use capture_context fast path that requires function tramps.

6 years ago[mini] Add MONO_ prefix to RETURN_ADDRESS macro.
Rodrigo Kumpera [Fri, 8 Sep 2017 18:58:19 +0000 (11:58 -0700)]
[mini] Add MONO_ prefix to RETURN_ADDRESS macro.

6 years agoFix bug 57918:
Katelyn Gadd [Tue, 12 Sep 2017 00:26:04 +0000 (17:26 -0700)]
Fix bug 57918:
Async Socket reads that need to perform multiple underlying read operations fail to return a correct total # of bytes read

6 years agoMark operations on `shutting_down` as known and accepted data races
cherusker [Thu, 7 Sep 2017 09:25:09 +0000 (11:25 +0200)]
Mark operations on `shutting_down` as known and accepted data races

6 years ago[coop handles] Record backtrace when allocating handles when MONO_HANDLE_TRACK_OWNER...
Aleksey Kliger [Fri, 8 Sep 2017 18:24:05 +0000 (14:24 -0400)]
[coop handles] Record backtrace when allocating handles when MONO_HANDLE_TRACK_OWNER is defined

A backtrace that leads to the allocation site is helpful for debugging.

6 years ago[appdomain] Catch exceptions when invoking AppDomain.DoAssemblyResolve
Aleksey Kliger [Fri, 8 Sep 2017 18:21:53 +0000 (14:21 -0400)]
[appdomain] Catch exceptions when invoking AppDomain.DoAssemblyResolve

Otherwise we may leak a coop handle for the requesting assembly, which may
lead to an assertion when we unload the current domain.

6 years ago[test] Regression test for #58950
Aleksey Kliger [Fri, 8 Sep 2017 19:18:20 +0000 (15:18 -0400)]
[test] Regression test for #58950

If a reflection only assembly resolve event handler throws an exception, catch
the exception in the runtime to ensure that no coop handles leak.

6 years agoImplement stack overflow handling on Win64. Call _resetstkoflw to restore stack prote...
Jonathan Chambers [Mon, 11 Sep 2017 17:27:00 +0000 (13:27 -0400)]
Implement stack overflow handling on Win64. Call _resetstkoflw to restore stack protection before calling handler, and then jump to handler via a cached MonoContext. (#5472)

6 years ago[TSan] Interlock and unlock MonoJitStats (#5437)
Armin Hasitzka [Mon, 11 Sep 2017 14:35:03 +0000 (16:35 +0200)]
[TSan] Interlock and unlock MonoJitStats (#5437)

[TSan] Interlock and unlock MonoJitStats

This is the first part of telling TSan what to do with `MonoJitStats`; I dealt with all the `gint32` values and partly touched the `gboolean` value (see `FIXME`). However, `MonoJitStats` also contains `gdouble` which can (1) probably be interlocked and (2) will be updated in a later step, together with the `FIXME`, as soon as an updated version of the atomic interface exists.

I did my best to distinguish between perf. critical parts and parts where `Interlocked* ()` seems to work perfectly fine. As before, if I misjudged anything, I would kindly ask to comment the affected operations, and I will update them accordingly.

More (technical) details can be found in the commit messages.

6 years ago[System.Xaml] Fix deadlock on exception in XamlBackgroundReader
Alexander Köplinger [Fri, 8 Sep 2017 14:36:06 +0000 (16:36 +0200)]
[System.Xaml] Fix deadlock on exception in XamlBackgroundReader

The ManualResetEvent wouldn't be signaled when an exception happens
in the reader loop so we'd deadlock in Read().

I'm still investigating where the exception comes from but this
should at least help unblocking CI.

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

6 years agoMerge pull request #5504 from ntherning/wait-for-native-thread-to-die-in-Thread-Join
Niklas Therning [Mon, 11 Sep 2017 09:07:53 +0000 (11:07 +0200)]
Merge pull request #5504 from ntherning/wait-for-native-thread-to-die-in-Thread-Join

Wait for the native thread to die in Thread.Join() on Windows

6 years agoUpdate CONTRIBUTING.md (#5542)
Bernhard Urban [Mon, 11 Sep 2017 08:59:14 +0000 (10:59 +0200)]
Update CONTRIBUTING.md (#5542)

6 years ago[F#] Reinstate _DebugFileExt as it's needed for mobile debugging. (#5534)
Jason Imison [Fri, 8 Sep 2017 22:07:07 +0000 (00:07 +0200)]
[F#] Reinstate _DebugFileExt as it's needed for mobile debugging. (#5534)

Also added a mechanism for users to override DebugType

6 years agoMerge pull request #5428 from kumpera/wasm-support-p2
Rodrigo Kumpera [Fri, 8 Sep 2017 18:55:38 +0000 (14:55 -0400)]
Merge pull request #5428 from kumpera/wasm-support-p2

Mono Wasm support

6 years ago[threads] Fix "[threads] Fix leaking threads: SGen Worker and Finalizer (#5284)"...
Ludovic Henry [Fri, 8 Sep 2017 18:07:00 +0000 (14:07 -0400)]
[threads] Fix "[threads] Fix leaking threads: SGen Worker and Finalizer (#5284)" (#5532)

* Revert "[threads] Fix leaking threads: SGen Worker and Finalizer (#5284)"

The sgen-specific cleanup cannot be run before the sgen-agnostic cleanup

This reverts commit 7db0fb0c886f5157066e26c2e2ae2d39c338cf6b.

* [threads] Make sure we do not leak the finalizer and sgen threadpool threads

6 years agoF# portable debugging (#5531)
Jason Imison [Fri, 8 Sep 2017 12:38:29 +0000 (14:38 +0200)]
F# portable debugging (#5531)

* Switch F# builds over to portable pdb

* Add portable pdb metadata fix from https://github.com/Microsoft/visualfsharp/pull/3553

6 years ago[Tests] Fix Mono.Data.Tds tests on iOS (#5501)
Manuel de la Pena [Fri, 8 Sep 2017 11:05:48 +0000 (13:05 +0200)]
[Tests] Fix Mono.Data.Tds tests on iOS (#5501)

* [Tests] Fix Mono.Data.Tds tests on iOS

The modified tests failed on iOS following PR:
https://github.com/xamarin/xamarin-macios/pull/2580 that adds support
for Xharness to run the Mono.Data.Tds on Xamarin.iOS. With the changes
the tests run a expected.

* Close Listener when done.

6 years ago[TSan] Tackle MonoPerfCounters (#5413)
Armin Hasitzka [Fri, 8 Sep 2017 09:20:28 +0000 (11:20 +0200)]
[TSan] Tackle MonoPerfCounters (#5413)

[TSan] Tackle MonoPerfCounters

With `MonoPerfCounters` taking part in many races, I thought it's finally time to attend to it. If I am not mistaken, most (if not all) load / store operations can be interlocked. If I am wrong, I would kindly ask to quickly comment the respective perf. critial operations and I will change them to `Unlocked* ()`.

Furthermore, a few details:

* updated all fields to signed types as `Interlocked* ()` functions exist for these types already
* upgraded a few values to `64-bit` as other `64-bit` values are assigned to them
* fixed a few `FIXME`s in `predef_writable_update ()` that were connected to `Interlocked* ()` functions

6 years agoUpdate man page
Miguel de Icaza [Thu, 7 Sep 2017 20:40:43 +0000 (16:40 -0400)]
Update man page

6 years agoShorter
Miguel de Icaza [Thu, 7 Sep 2017 19:17:00 +0000 (15:17 -0400)]
Shorter

6 years agoToggle the turbo button
Miguel de Icaza [Thu, 7 Sep 2017 19:13:39 +0000 (15:13 -0400)]
Toggle the turbo button

6 years agoRemove lingering bits from removed prj2make tool (#5526)
Miguel de Icaza [Thu, 7 Sep 2017 21:57:53 +0000 (17:57 -0400)]
Remove lingering bits from removed prj2make tool (#5526)

6 years agoBump Roslyn
Marek Safar [Thu, 7 Sep 2017 15:19:25 +0000 (17:19 +0200)]
Bump Roslyn

6 years ago[msvc] Update csproj files (#5524)
monojenkins [Thu, 7 Sep 2017 15:42:30 +0000 (17:42 +0200)]
[msvc] Update csproj files (#5524)

6 years agoUse `Unlocked* ()` to mark racy counters (#5500)
Armin Hasitzka [Thu, 7 Sep 2017 12:50:49 +0000 (14:50 +0200)]
Use `Unlocked* ()` to mark racy counters (#5500)

[TSan] Mark racy counters in metadata.c

- using `gint32` instead of `int` should not be an issue
- `img_set_count` is interlocked by `image_sets_lock ()` - `UnlockedIncrement ()` is just used for completeness / documentation
- `++img_set_cache_(hit|miss)` is called quite often and is connected to caching: it seems to me as if interlocking these counters would be a bad idea (at least for cache hits)

6 years ago[threads] Fix leaking threads: SGen Worker and Finalizer (#5284)
Armin Hasitzka [Thu, 7 Sep 2017 10:23:07 +0000 (12:23 +0200)]
[threads] Fix leaking threads: SGen Worker and Finalizer (#5284)

* Fix leaking threads: SGen Worker and Finalizer
- https://bugzilla.xamarin.com/show_bug.cgi?id=58317
- stop SGen workers before the finalizer stops
- clean up SGen workers with the Finalizer
- remove `mono_thread_join (GUINT_TO_POINTER (gc_thread->tid));` as we detach the Finalizer with `mono_threads_join_threads ()` within `mono_gc_cleanup ()`

* [fixup!] Move counting variable into the loop initialiser and add a `(gpointer)` cast

6 years ago[TSan] Reorganise / clean up counters logic in mini-generic-sharing.c (#5502)
Armin Hasitzka [Thu, 7 Sep 2017 10:19:23 +0000 (12:19 +0200)]
[TSan] Reorganise / clean up counters logic in mini-generic-sharing.c (#5502)

* Reorganise counters:
- use `Interlocked* ()` and `Unlocked* ()` to fix / mark (possible) races
- change the initialisation location and the visbility of some counters
- fix a few typos

* Extend the warning when re-registering counters

* also print counter address if we have a duplicate

6 years agoUpdates for CODEOWNERS
Marek Safar [Thu, 7 Sep 2017 09:22:25 +0000 (11:22 +0200)]
Updates for CODEOWNERS

6 years agoUpdate reference-assemblies (#5519)
Alexander Köplinger [Thu, 7 Sep 2017 09:24:35 +0000 (11:24 +0200)]
Update reference-assemblies (#5519)

6 years agoBump roslyn to 2.3.2
Marek Safar [Wed, 6 Sep 2017 15:09:53 +0000 (17:09 +0200)]
Bump roslyn to 2.3.2

6 years agoMerge pull request #5512 from rodrmoya/fix-mono-profiler-lib
Alex Rønne Petersen [Wed, 6 Sep 2017 23:01:57 +0000 (01:01 +0200)]
Merge pull request #5512 from rodrmoya/fix-mono-profiler-lib

[Mono.Profiler.Log] Initialize LogEvent's properties

6 years ago[Mono.Profiler.Log] Initialize LogEvent's properties
Rodrigo Moya [Tue, 5 Sep 2017 19:43:36 +0000 (21:43 +0200)]
[Mono.Profiler.Log] Initialize LogEvent's properties

Make sure all events have all fields initialized. This was missing setting
Buffer and Timestamp properties when creating the different LogEvent* subclasses.

6 years ago[WinForms/Drawing] Remove some leftover test scripts (#5518)
Alexander Köplinger [Wed, 6 Sep 2017 20:24:07 +0000 (22:24 +0200)]
[WinForms/Drawing] Remove some leftover test scripts (#5518)

They're no longer used.

6 years ago[Mono.Security]: Remove some unused `Mono.Security.Interface` classes. (#5509)
Martin Baulig [Wed, 6 Sep 2017 18:56:11 +0000 (14:56 -0400)]
[Mono.Security]: Remove some unused `Mono.Security.Interface` classes. (#5509)

* [Mono.Security]: Remove some unused `Mono.Security.Interface` classes.

* Mono.Security.Interface: removed `IBufferOffsetSize` and `BufferOffsetSize`
  (these were not general-purpose BOS APIs, but depend on the internal
  `SecretParameters` class).

* Mono.Security.Interface: removed `SecretParameters`, `SecureBuffer`,
  `IMonoTlsEventSink`, `TlsBuffer` and `TlsMultiBuffer`.

* Bump API snapshot submodule

6 years ago[amd64] fix tailcall insn size (#5483)
Bernhard Urban [Wed, 6 Sep 2017 12:28:20 +0000 (14:28 +0200)]
[amd64] fix tailcall insn size (#5483)

commit
https://github.com/mono/mono/commit/9a634c1810aad46d30a674f3a97ab263dcd4272e
introduces a regression for
https://github.com/mono/coreclr/blob/mono/tests/src/JIT/Methodical/Invoke/25params/25param1c.il

```
Testing method of 25 parameters, all of int data type, tail.call
mono-sgen(46435,0x7fff9d34b3c0) malloc: *** error for object 0x101045400: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Process 46435 stopped
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x00007fff945c915f libsystem_malloc.dylib`malloc_error_break
libsystem_malloc.dylib`malloc_error_break:
->  0x7fff945c915f <+0>: pushq  %rbp
    0x7fff945c9160 <+1>: movq   %rsp, %rbp
    0x7fff945c9163 <+4>: nop
    0x7fff945c9164 <+5>: nopl   (%rax)
(lldb) mbt
* thread #1
  * frame #0: 0x00007fff945c915f libsystem_malloc.dylib`malloc_error_break
    frame #1: 0x00007fff945c5e81 libsystem_malloc.dylib`szone_error + 406
    frame #2: 0x00007fff945c7925 libsystem_malloc.dylib`small_free_list_remove_ptr_no_clear + 766
    frame #3: 0x00007fff945c7cb2 libsystem_malloc.dylib`free_small + 881
    frame #4: 0x00000001004d2110 mono-sgen`monoeg_g_free(ptr=0x0000000101083c00) at gmem.c:66
    frame #5: 0x0000000100007b64 mono-sgen`mono_codegen(cfg=0x000000010108c800) at mini.c:2300
    frame #6: 0x000000010000aedf mono-sgen`mini_method_compile(method=0x0000000100910310, opts=370239999, domain=0x000000010090ebd0, flags=JIT_FLAG_RUN_CCTORS, parts=0, aot_method_index=-1) at mini.c:3829
    frame #7: 0x000000010000edd0 mono-sgen`mono_jit_compile_method_inner(method=0x0000000100910310, target_domain=0x000000010090ebd0, opt=370239999, error=0x00007fff5fbfe048) at mini.c:4156
    frame #8: 0x000000010001459e mono-sgen`mono_jit_compile_method_with_opt(method=0x0000000100910310, opt=370239999, jit_only=0, error=0x00007fff5fbfe048) at mini-runtime.c:2127
    frame #9: 0x0000000100013e6d mono-sgen`mono_jit_compile_method(method=0x0000000100910310, error=0x00007fff5fbfe048) at mini-runtime.c:2173
    frame #10: 0x0000000100131eea mono-sgen`common_call_trampoline(regs=0x00007fff5fbfe128, code="H\x8bй\x01", m=0x0000000100910310, vt=0x0000000000000000, vtable_slot=0x0000000000000000, error=0x00007fff5fbfe048) at mini-trampolines.c:704
    frame #11: 0x00000001001313b7 mono-sgen`mono_magic_trampoline(regs=0x00007fff5fbfe128, code="H\x8bй\x01", arg=0x0000000100910310, tramp="����\b\x10\x03\x91") at mini-trampolines.c:835
```

turns out we smashed our code buffer.

Also, transform this comparison:

```
if (G_UNLIKELY (offset > (cfg->code_size - max_len - EXTRA_CODE_SPACE))) {

if (G_UNLIKELY ((offset + max_len + EXTRA_CODE_SPACE) > cfg->code_size)) {
```

we deal with unsigned values here, and if `max_len` is bigger then
`cfg->code_size`, we won't resize the buffer.

6 years agoInterlock `inflated_signatures_size`, `memberref_sig_cache_size`, `methods_size`...
Armin Hasitzka [Wed, 6 Sep 2017 12:16:02 +0000 (14:16 +0200)]
Interlock `inflated_signatures_size`, `memberref_sig_cache_size`, `methods_size` and `signatures_size` (#5489)

[TSan] Interlocking loader.c

`loader.c` contains four statistics counters and all of them are invovled in data races. This PR focuses on dealing with them:

- All of them can be `gint32` as they are registered as `MONO_COUNTER_INT` anyways.
- Since there is already a lot of locking involved in `loader.c` (including an approved usage of `Interlocked* ()` with with `mono_stats`), I think that `Interlocked* ()` can be used here instead of `Unlocked* ()`. If this assumption is wrong, I would kindly ask to correct me by commenting the affected rows and I will change it to `Unlocked* ()`.

6 years ago[bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of … (#5511)
Zoltan Varga [Wed, 6 Sep 2017 11:56:37 +0000 (07:56 -0400)]
[bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of … (#5511)

* [bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of the delegate target to avoid calling user defined hash code implementations which can throw exceptions. Fixes a regression introduced by a48bc439850869e565833d7fe6330c289beffe40.

* add test for #59235

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

* [fixup] RuntimeHelpers.GetHashCode handles null

6 years ago[sdb] Don't set tls->context when interrupting a thread, it could race with the threa...
Zoltan Varga [Tue, 5 Sep 2017 00:24:48 +0000 (02:24 +0200)]
[sdb] Don't set tls->context when interrupting a thread, it could race with the thread processing a breakpoint at the same time. Fixes #58612.

6 years agoAdd z14 support and extend z13 support
Neale Ferguson [Thu, 31 Aug 2017 20:40:06 +0000 (16:40 -0400)]
Add z14 support and extend z13 support

6 years ago[utils] Fix inet_pton fallback.
Rodrigo Kumpera [Tue, 5 Sep 2017 21:28:37 +0000 (14:28 -0700)]
[utils] Fix inet_pton fallback.

6 years agoWait for the native thread to die in Thread.Join() on Windows
Niklas Therning [Tue, 5 Sep 2017 09:15:22 +0000 (11:15 +0200)]
Wait for the native thread to die in Thread.Join() on Windows

This is the behavior of .NET. After this patch the code on Mono for Windows
will make sure the underlying native thread of a managed thread has died
before Thread.Join() returns.

This PR builds on PR #5454 but makes it Windows specific. PR #5454 was
reverted since it caused crashes on some Unix platforms.

6 years ago[ci] Add the coverage collection script.
Vladimir Kargov [Sat, 2 Sep 2017 00:06:46 +0000 (17:06 -0700)]
[ci] Add the coverage collection script.

6 years agoMore codeowners update
Marek Safar [Mon, 4 Sep 2017 11:10:47 +0000 (13:10 +0200)]
More codeowners update

6 years agoUse `Unlocked* ()` for operations on `joinable_thread_count`
cherusker [Sun, 3 Sep 2017 17:54:35 +0000 (19:54 +0200)]
Use `Unlocked* ()` for operations on `joinable_thread_count`
- mark the (harmless) data race of the fastpath

6 years agoFix racy counter and unify the styles
cherusker [Mon, 4 Sep 2017 07:09:10 +0000 (09:09 +0200)]
Fix racy counter and unify the styles

6 years agoClarifying the usage of the --library option
HinTak [Fri, 1 Sep 2017 22:01:51 +0000 (23:01 +0100)]
Clarifying the usage of the --library option

I found that multiple libraries need to be specified in dependency order. That was not obvious from the man page. Make it explicit.

See https://bugzilla.xamarin.com/show_bug.cgi?id=59154

6 years ago[ci] Retry flaky tests only on PRs (#5492)
Alexander Köplinger [Fri, 1 Sep 2017 22:10:40 +0000 (00:10 +0200)]
[ci] Retry flaky tests only on PRs (#5492)

So we can still see failures in master and release branches.

6 years ago[wasm][sgen] Introduce DEFAULT_SWEEP_MODE, move DEFAULT_MAJOR to sgen-config.h and...
Rodrigo Kumpera [Thu, 31 Aug 2017 18:20:31 +0000 (11:20 -0700)]
[wasm][sgen] Introduce DEFAULT_SWEEP_MODE, move DEFAULT_MAJOR to sgen-config.h and make wasm defaults serial.

6 years ago[wasm] Wasm actually has inet_pton but configure doesn't detect it.
Rodrigo Kumpera [Thu, 31 Aug 2017 18:19:43 +0000 (11:19 -0700)]
[wasm] Wasm actually has inet_pton but configure doesn't detect it.

6 years ago[wasm] Make sure we don't use the posix dl backend with wasm
Rodrigo Kumpera [Thu, 31 Aug 2017 18:19:15 +0000 (11:19 -0700)]
[wasm] Make sure we don't use the posix dl backend with wasm

6 years ago[wasm] Disable posix threading backend and fix wasm's.
Rodrigo Kumpera [Thu, 31 Aug 2017 18:18:52 +0000 (11:18 -0700)]
[wasm] Disable posix threading backend and fix wasm's.

6 years ago[wasm] Move RETURN_ADDRESS macros to mini.h, use them in mini-exceptions.h and add...
Rodrigo Kumpera [Thu, 31 Aug 2017 18:17:19 +0000 (11:17 -0700)]
[wasm] Move RETURN_ADDRESS macros to mini.h, use them in mini-exceptions.h and add wasm version.

6 years ago[runtime] Replace a mono_class_vtable with mono_class_vtable_full.
Rodrigo Kumpera [Thu, 31 Aug 2017 18:11:18 +0000 (11:11 -0700)]
[runtime] Replace a mono_class_vtable with mono_class_vtable_full.

6 years ago[wasm] Fix eglib issues with WASM.
Rodrigo Kumpera [Wed, 30 Aug 2017 23:31:33 +0000 (16:31 -0700)]
[wasm] Fix eglib issues with WASM.

6 years agoMerge pull request #5486 from kumpera/fix_array_dispatch_perf
Rodrigo Kumpera [Fri, 1 Sep 2017 20:50:40 +0000 (16:50 -0400)]
Merge pull request #5486 from kumpera/fix_array_dispatch_perf

[mini] Handle magic interfaces in common_trampoline as if they were variant.

6 years ago[mini] Remove never defined MONO_ARCH_STACK_GROWS_UP (#5491)
Ludovic Henry [Fri, 1 Sep 2017 17:49:29 +0000 (13:49 -0400)]
[mini] Remove never defined MONO_ARCH_STACK_GROWS_UP (#5491)

6 years ago[mini] Handle magic interfaces in common_trampoline as if they were variant.
Rodrigo Kumpera [Thu, 31 Aug 2017 23:06:58 +0000 (16:06 -0700)]
[mini] Handle magic interfaces in common_trampoline as if they were variant.

With the introduction of magic array interfaces, they must be handled as if they
were variant if they are being dispatched against an array.

This was not being done in common_trampoline and resulted in the IMT thunk never
getting rebuilt and getting decent perf.

With this patch, dispatch to simple methods such as Array::Count over a magic interface
in a covariant case (such as IList<object> dispatch onto string[]) will accrue gvi's.

On a trivial benchmark of executing Count 1M times, perf goes from 760ms to 50ms.

6 years agoImprove `class.c` for TSan instrumentation: (#5485)
Armin Hasitzka [Fri, 1 Sep 2017 13:44:25 +0000 (15:44 +0200)]
Improve `class.c` for TSan instrumentation: (#5485)

- use `Unlocked* ()` for `class_gparam_count`, `classes_size` and `inflated_methods_size`
- dead code: `class_ext_size`
- fix a typo: "the the" -> "let the"

6 years ago[bockbuild] Blacklist more llvm libraries/binaries. (#5488)
Zoltan Varga [Fri, 1 Sep 2017 13:42:25 +0000 (09:42 -0400)]
[bockbuild] Blacklist more llvm libraries/binaries. (#5488)

6 years ago[ci] Reenable xunit tests on Windows (#5487)
Alexander Köplinger [Fri, 1 Sep 2017 12:51:43 +0000 (14:51 +0200)]
[ci] Reenable xunit tests on Windows (#5487)

Should be fixed now that https://github.com/mono/mono/pull/5477 was merged.

6 years agoMerge pull request #5444 from hifi/fix-tds-inputoutput
Egor Bogatov [Fri, 1 Sep 2017 08:41:49 +0000 (11:41 +0300)]
Merge pull request #5444 from hifi/fix-tds-inputoutput

[System] Fix TDS 7.0 prepared InputOutput parameter info

6 years agomkbundle: add console confirmations of actions (#5457)
HinTak [Fri, 1 Sep 2017 08:29:25 +0000 (09:29 +0100)]
mkbundle: add console confirmations of actions (#5457)

Almost all the other "maker.Add()" are accompanied by console messages, except these two. User might worry about why they are missing. (I did!)

6 years agoFixing another confusing typo
HinTak [Sun, 27 Aug 2017 05:00:53 +0000 (13:00 +0800)]
Fixing another confusing typo

The file being added is the config of the last assembly read, not the runtime name.

6 years agoupdate comment
EgorBo [Wed, 30 Aug 2017 22:13:04 +0000 (01:13 +0300)]
update comment

6 years agoxunit on windows doesn't like ln to xunit.execution.desktop.dll, provide a copy
EgorBo [Wed, 30 Aug 2017 17:31:02 +0000 (20:31 +0300)]
xunit on windows doesn't like ln to xunit.execution.desktop.dll, provide a copy

6 years ago[w32file] Add 'kbfuse' filesystem type to known drive types array.
Aleksey Kliger [Thu, 31 Aug 2017 15:50:04 +0000 (11:50 -0400)]
[w32file] Add 'kbfuse' filesystem type to known drive types array.

It's the https://keybase.io desktop client filesystem

6 years ago[socket] Reduce handle manipulations in native (#5378)
Ludovic Henry [Thu, 31 Aug 2017 17:21:29 +0000 (13:21 -0400)]
[socket] Reduce handle manipulations in native (#5378)

6 years agoMerge pull request #5479 from marek-safar/cecil-bump
Marek Safar [Thu, 31 Aug 2017 17:13:04 +0000 (19:13 +0200)]
Merge pull request #5479 from marek-safar/cecil-bump

Bump cecil and linker

6 years agoBump API snapshot submodule
monojenkins [Thu, 31 Aug 2017 17:10:57 +0000 (17:10 +0000)]
Bump API snapshot submodule

6 years agoAdd retrying of failed tests by default to reduce flaky tests (#5461)
Alexander Köplinger [Thu, 31 Aug 2017 15:04:23 +0000 (17:04 +0200)]
Add retrying of failed tests by default to reduce flaky tests (#5461)

Whenever a test fails we retry it five times and then decide the
overall result based on that. If three or more of the five retries
fail too then the overall result is FAIL, two or lower means PASS.

We're modifying nunitlite here so this only works for those tests
right now, we'd need to add it to the other test runners too.

6 years ago[cominterop] Get function ptr from interface before switching to blocking
Aleksey Kliger [Tue, 29 Aug 2017 23:02:24 +0000 (19:02 -0400)]
[cominterop] Get function ptr from interface before switching to blocking

The cominterop_get_function_pointer icall has a wrapper which has a
trampoline.  When we enter the trampoline mono_marshal_emit_native_wrapper
already switched us to blocking.

6 years ago[marshal] Don't use a wrapper for mono_marshal_set_last_error
Aleksey Kliger [Mon, 28 Aug 2017 18:21:36 +0000 (14:21 -0400)]
[marshal] Don't use a wrapper for mono_marshal_set_last_error

This fixes assertions due to d0e103fcb4ed3f0ba867052f9b5a4ac71faa0226 in
cooperative GC mode.

mono_marshal_set_last_error is called from a P/Invoke wrapper just after the
pinvoked method returns before we transition the thread state back to running
from blocking.  If mono_marshal_set_last_error had a wrapper, we would invoke
the trampoline (mono_magic_trampoline) to JIT the wrapper while in blocking
mode, which would trigger the assertion.

6 years ago[llvm] Add support for building with more recent versions of the mono llvm branch...
Zoltan Varga [Thu, 31 Aug 2017 12:51:47 +0000 (08:51 -0400)]
[llvm] Add support for building with more recent versions of the mono llvm branch, in particular https://github.com/mono/llvm/tree/2017-07-06-5a1ffa96376e8a3ee895b782790591e5e7814ccf, which is based on llvm 5.0. (#5474)

6 years agoBump cecil and linker
Marek Safar [Thu, 31 Aug 2017 12:34:11 +0000 (14:34 +0200)]
Bump cecil and linker

6 years ago[sdb] Fix support for async debugging in optimized mode, roslyn generates valuetype...
Zoltan Varga [Thu, 31 Aug 2017 11:17:02 +0000 (07:17 -0400)]
[sdb] Fix support for async debugging in optimized mode, roslyn generates valuetype IAsyncStateMethod implementations. Fixes #58728. (#5476)

6 years ago[bcl] Fix a few hardcoded socket ports in tests (#5471)
Alexander Köplinger [Thu, 31 Aug 2017 08:53:35 +0000 (10:53 +0200)]
[bcl] Fix a few hardcoded socket ports in tests (#5471)

* [System] Fix a few hardcoded socket ports in tests

Those could've shown up as "address already in use" in CI.

* [System.Runtime.Remoting] Fix a few hardcoded socket ports in tests

Those could've shown up as "address already in use" in CI.

Additionally remove a copy of RemotingServicesTest.cs from corlib
which also exists in System.Runtime.Remoting in updated form.

* [System.ServiceModel] Fix a few hardcoded socket ports in tests

Those could've shown up as "address already in use" in CI.

* [System.Net.Http] Fix a few hardcoded socket ports in tests

Those could've shown up as "address already in use" in CI.

The additional "keep-alive" header in Send_Complete_NoContent() and
Send_Transfer_Encoding_Chunked() is because we were using the same
port for all tests before so other tests would clear the header.
This doesn't happen now that we use distinct test ports.

* [System.ServiceModel.Web] Fix a few hardcoded socket ports in tests

Those could've shown up as "address already in use" in CI.

6 years ago[wasm] Hack around AC_CHECK_SIZEOF bug and don't hardcode -Os in CFLAGS
Rodrigo Kumpera [Wed, 30 Aug 2017 23:30:36 +0000 (16:30 -0700)]
[wasm] Hack around AC_CHECK_SIZEOF bug and don't hardcode -Os in CFLAGS

6 years agoRevert "Merge pull request #5330 from alexanderkyte/dedup_mkbundle"
Alexander Köplinger [Wed, 30 Aug 2017 22:41:53 +0000 (00:41 +0200)]
Revert "Merge pull request #5330 from alexanderkyte/dedup_mkbundle"

This reverts commit 9a287c04126d095e7371afee32632febd0dafd93, reversing
changes made to 4a79280b3bef8d5f15da9ddd2a2af3a03e194b03.

It breaks tons of tests.

6 years agoMerge pull request #5330 from alexanderkyte/dedup_mkbundle
Alexander Kyte [Wed, 30 Aug 2017 19:59:18 +0000 (15:59 -0400)]
Merge pull request #5330 from alexanderkyte/dedup_mkbundle

[runtime] Add Dedup Support to MkBundle

6 years ago[Mono.Security]: Add 'MonoTlsProvider.SupportsCleanShutdown' and 'MonoTlsSettings...
Martin Baulig [Wed, 30 Aug 2017 17:43:36 +0000 (13:43 -0400)]
[Mono.Security]: Add 'MonoTlsProvider.SupportsCleanShutdown' and 'MonoTlsSettings.SendCloseNotify'. (#5465)

Only send close_notify when using BTLS and explicitly requested via 'MonoTlsSettings.SendCloseNotify'.

6 years ago[runtime] Document mkbundle AOT options in man pages
Alexander Kyte [Sun, 13 Aug 2017 10:43:36 +0000 (06:43 -0400)]
[runtime] Document mkbundle AOT options in man pages

6 years ago[runtime] Fix tracking of dedup module in mkbundle
Alexander Kyte [Mon, 7 Aug 2017 21:25:52 +0000 (17:25 -0400)]
[runtime] Fix tracking of dedup module in mkbundle

6 years ago[runtime] Add mkbundle support for dedup
Alexander Kyte [Mon, 10 Jul 2017 22:12:32 +0000 (18:12 -0400)]
[runtime] Add mkbundle support for dedup

6 years ago[runtime] Clean up temp mkbundle aot directory
Alexander Kyte [Wed, 7 Jun 2017 18:42:34 +0000 (14:42 -0400)]
[runtime] Clean up temp mkbundle aot directory

6 years ago[runtime] Fix mkbundle internationalization test results, build all
Alexander Kyte [Wed, 7 Jun 2017 05:19:12 +0000 (01:19 -0400)]
[runtime] Fix mkbundle internationalization test results, build all

6 years ago[runtime] Provide config to mkbundle
Alexander Kyte [Tue, 6 Jun 2017 22:41:13 +0000 (18:41 -0400)]
[runtime] Provide config to mkbundle

6 years ago[runtime] Don't re-aot when running BCL tests
Alexander Kyte [Mon, 5 Jun 2017 21:52:59 +0000 (17:52 -0400)]
[runtime] Don't re-aot when running BCL tests

6 years ago[runtime] Skip not supported tests with mkbundle
Alexander Kyte [Mon, 5 Jun 2017 19:18:41 +0000 (15:18 -0400)]
[runtime] Skip not supported tests with mkbundle