mono.git
7 years ago[System] Flush few colliding changes
Marek Safar [Fri, 3 Jun 2016 16:04:33 +0000 (18:04 +0200)]
[System] Flush few colliding changes

7 years ago[runtime] Use new mono_error_set_for_class_failure where applicable.
Alexander Kyte [Tue, 31 May 2016 21:13:21 +0000 (17:13 -0400)]
[runtime] Use new mono_error_set_for_class_failure where applicable.

We were seeing an issue where attempts to create the MonoClass for an
exception in a no-exec context was causing failure. No-exec will forbid
the constructor call. Our solution was to realize that there was no
need to allocate an exception, as MonoError could already encode the
errors.

7 years ago[runtime] Make helper to set MonoError directly from MonoClass error
Alexander Kyte [Tue, 31 May 2016 21:04:33 +0000 (17:04 -0400)]
[runtime] Make helper to set MonoError directly from MonoClass error

7 years agoCorrect typo
Neale Ferguson [Fri, 3 Jun 2016 14:56:34 +0000 (10:56 -0400)]
Correct typo

7 years agoCorrect for widechar on Windows
Neale Ferguson [Fri, 3 Jun 2016 14:34:35 +0000 (10:34 -0400)]
Correct for widechar on Windows

7 years ago[mcs] Fixes NRE during error reporting
Marek Safar [Fri, 3 Jun 2016 14:21:13 +0000 (16:21 +0200)]
[mcs] Fixes NRE during error reporting

7 years ago[System] Remove duplicate file entry
Marek Safar [Fri, 3 Jun 2016 14:20:52 +0000 (16:20 +0200)]
[System] Remove duplicate file entry

7 years agoSeveral corrections thanks to Johan Lorensson
Neale Ferguson [Fri, 3 Jun 2016 13:57:11 +0000 (09:57 -0400)]
Several corrections thanks to Johan Lorensson

7 years ago[WinForms] Fix build broken by 5d54803af7af4c78cfeac020e0e2046b1282af91
Alexander Köplinger [Fri, 3 Jun 2016 13:13:10 +0000 (15:13 +0200)]
[WinForms] Fix build broken by 5d54803af7af4c78cfeac020e0e2046b1282af91

7 years agoCorrecty initialize image ref_count. Ensures image is correctly unloaded during appdo...
Jonathan Chambers [Fri, 3 Jun 2016 13:13:41 +0000 (09:13 -0400)]
Correcty initialize image ref_count. Ensures image is correctly unloaded during appdomain unload. (#3084)

7 years agoMerge pull request #3102 from alexrp/master
Marek Safar [Fri, 3 Jun 2016 09:04:40 +0000 (11:04 +0200)]
Merge pull request #3102 from alexrp/master

[System] Add back IWebProxyScript to the mobile profile.

7 years ago[System] Add back IWebProxyScript to the mobile profile.
Alex Rønne Petersen [Fri, 3 Jun 2016 08:09:00 +0000 (10:09 +0200)]
[System] Add back IWebProxyScript to the mobile profile.

7 years agoSWF - Fixed exiting modal runloop. (#2980)
Jiří Volejník [Fri, 3 Jun 2016 07:09:24 +0000 (09:09 +0200)]
SWF - Fixed exiting modal runloop. (#2980)

Fixes a bug in exiting modal runloop that caused not really exiting it
(not calling XplatUI.SetModal(..., false).

It caused issues with menu, for example, if you first ran a modal
dialog (a wizard), and then you started the application.

7 years agoMerge pull request #3099 from marek-safar/rs-Semaphore
Marek Safar [Fri, 3 Jun 2016 06:23:12 +0000 (08:23 +0200)]
Merge pull request #3099 from marek-safar/rs-Semaphore

[System] Semaphore from referencesource

7 years ago[mobile_static] Removed use of StringAssert nunit helper.
Alexander Kyte [Fri, 27 May 2016 20:23:01 +0000 (16:23 -0400)]
[mobile_static] Removed use of StringAssert nunit helper.

7 years ago[sgen] Use raw mutex for pin_queue_mutex as it's only used during a collection
Ludovic Henry [Thu, 2 Jun 2016 21:25:04 +0000 (23:25 +0200)]
[sgen] Use raw mutex for pin_queue_mutex as it's only used during a collection

7 years ago[coop] Reuse local info variable for polling
Ludovic Henry [Tue, 31 May 2016 16:37:46 +0000 (18:37 +0200)]
[coop] Reuse local info variable for polling

This would lead to a crash when unregistering the thread from the currnt MonoThreadInfo* destructor, as `mono_thread_info_current_unchecked` would return NULL. This would trigger an infinite loop in `mono_threads_enter_gc_safe_region_unbalanced_with_info`.

7 years ago[marshal] Fix unused variable warning
Ludovic Henry [Tue, 31 May 2016 16:35:14 +0000 (18:35 +0200)]
[marshal] Fix unused variable warning

7 years ago[threads] Make mono_thread_detach_if_exiting return if it detached
Ludovic Henry [Mon, 30 May 2016 18:19:19 +0000 (20:19 +0200)]
[threads] Make mono_thread_detach_if_exiting return if it detached

7 years ago[coop] Use mono_thread_info_is_current in checked build
Ludovic Henry [Mon, 30 May 2016 18:17:45 +0000 (20:17 +0200)]
[coop] Use mono_thread_info_is_current in checked build

7 years ago[coop] Remove unecessary assertion
Ludovic Henry [Mon, 30 May 2016 18:16:57 +0000 (20:16 +0200)]
[coop] Remove unecessary assertion

7 years ago[coop] Switch to GC unsafe state in SIGILL signal handler as it may throw an exception
Ludovic Henry [Mon, 30 May 2016 18:15:19 +0000 (20:15 +0200)]
[coop] Switch to GC unsafe state in SIGILL signal handler as it may throw an exception

7 years ago[runtine] We should always ignore SIGPIPE signal
Ludovic Henry [Mon, 30 May 2016 18:14:43 +0000 (20:14 +0200)]
[runtine] We should always ignore SIGPIPE signal

7 years ago[coop] Ensure GC unsafe state when throwing exception
Ludovic Henry [Mon, 30 May 2016 18:14:09 +0000 (20:14 +0200)]
[coop] Ensure GC unsafe state when throwing exception

7 years ago[coop] Switch to GC safe around pthread_join
Ludovic Henry [Mon, 30 May 2016 18:13:21 +0000 (20:13 +0200)]
[coop] Switch to GC safe around pthread_join

7 years ago[coop] Do not pass current thread to mono_threads_enter_gc_unsafe_region_cookie
Ludovic Henry [Mon, 30 May 2016 18:11:35 +0000 (20:11 +0200)]
[coop] Do not pass current thread to mono_threads_enter_gc_unsafe_region_cookie

7 years ago[coop] Fix state transition when unregistering the thread
Ludovic Henry [Mon, 30 May 2016 17:16:33 +0000 (19:16 +0200)]
[coop] Fix state transition when unregistering the thread

unregister_thread is the destructor for the current MonoThreadInfo* TLS key, meaning that when in this function, calling mono_thread_info_current_unchecked will always return NULL.

7 years ago[coop] Make GC safe/unsafe unbalanced transitions public
Ludovic Henry [Mon, 30 May 2016 17:08:06 +0000 (19:08 +0200)]
[coop] Make GC safe/unsafe unbalanced transitions public

This is needed by Xamarin.iOS for unbalanced transitions, for example aroung a ObjC @throw.

7 years ago[coop] Do not include mono-threads-coop.h and mono-threads-api.h in mono-threads.h
Ludovic Henry [Mon, 30 May 2016 17:04:02 +0000 (19:04 +0200)]
[coop] Do not include mono-threads-coop.h and mono-threads-api.h in mono-threads.h

This leads to circular dependency between them, while mono-threads.h does not depends on the other 2.

7 years ago[coop] Do not allow transition on not-attached, not-current and not-live thread
Ludovic Henry [Mon, 30 May 2016 16:42:48 +0000 (18:42 +0200)]
[coop] Do not allow transition on not-attached, not-current and not-live thread

7 years ago[coop] Remove unecessary GC unsafe transition
Ludovic Henry [Mon, 30 May 2016 16:29:45 +0000 (18:29 +0200)]
[coop] Remove unecessary GC unsafe transition

7 years ago[marshal] Fix setting of last error for P/Invoke
Ludovic Henry [Mon, 30 May 2016 16:27:05 +0000 (18:27 +0200)]
[marshal] Fix setting of last error for P/Invoke

On Unix, errno value might change between the native call and the call to mono_marshal_set_last_error, if we exit the gc safe region. We need to ensure that it's done right after the native call.

7 years ago[checked-build] Fix warning
Ludovic Henry [Mon, 30 May 2016 16:26:31 +0000 (18:26 +0200)]
[checked-build] Fix warning

7 years ago[coop] Remove DoneBlockingAborted state transition
Ludovic Henry [Mon, 30 May 2016 16:25:24 +0000 (18:25 +0200)]
[coop] Remove DoneBlockingAborted state transition

This state transition would only be possible in case something went wrong. It's better to fix where this issue comes from.

7 years agoMerge pull request #2881 from alexrp/gc-sample-managed-alloc
monojenkins [Thu, 2 Jun 2016 20:45:26 +0000 (21:45 +0100)]
Merge pull request #2881 from alexrp/gc-sample-managed-alloc

[gc] Register a critical region when executing managed allocators.

Previously, if we stopped a thread and it had a stack looking like this:

    ...
    profiler_signal_handler
    <signal handler called>
    managed_allocator
    ...

We would fail to identify the fact that we've just interrupted a thread that's
in a managed allocator (uninterruptible code) because we only look at the very
latest instruction pointer of the thread, which will be pointing into
profiler_signal_handler or some other function called by it. So we would
happily continue along with the STW process and proceed to doing the actual GC,
where we would see a broken heap.

We could solve this by unwinding the stack and checking all frames, but that's
complicated and error-prone. Instead, register a critical region while the
managed allocator runs. This way, if we don't identify it by instruction pointer, we
will identify it by the fact that the thread is in a critical region.

7 years agoMerge pull request #3066 from alexanderkyte/pedump_sgen
Alexander Köplinger [Thu, 2 Jun 2016 20:00:38 +0000 (22:00 +0200)]
Merge pull request #3066 from alexanderkyte/pedump_sgen

[runtime] Replace pedump boehm dependency with sgen dependency

7 years ago[runtime] Mark mono_exception_from_token_two_strings external only
Aleksey Kliger [Thu, 2 Jun 2016 19:29:12 +0000 (15:29 -0400)]
[runtime] Mark mono_exception_from_token_two_strings external only

Runtime should use mono_exception_from_token_two_strings_checked

7 years ago[runtime] Mark mono_exception_from_name_two_strings external only.
Aleksey Kliger [Thu, 2 Jun 2016 19:21:13 +0000 (15:21 -0400)]
[runtime] Mark mono_exception_from_name_two_strings external only.

Runtime should use mono_exception_from_name_two_strings_checked

7 years ago[System] Semaphore from referencesource
Marek Safar [Thu, 2 Jun 2016 19:33:22 +0000 (21:33 +0200)]
[System] Semaphore from referencesource

7 years agoCorrect use of localtime() in Win32
Neale Ferguson [Thu, 2 Jun 2016 19:33:12 +0000 (15:33 -0400)]
Correct use of localtime() in Win32

7 years agoUse localtime for Win32 and localtime_r for others
Neale Ferguson [Thu, 2 Jun 2016 18:40:05 +0000 (14:40 -0400)]
Use localtime for Win32 and localtime_r for others

7 years agoCorrect syntax error and G_LOG_xxx identifier
Neale Ferguson [Thu, 2 Jun 2016 18:09:26 +0000 (14:09 -0400)]
Correct syntax error and G_LOG_xxx identifier

7 years agoCorrect use of Windows APIs
Neale Ferguson [Thu, 2 Jun 2016 17:40:15 +0000 (13:40 -0400)]
Correct use of Windows APIs

7 years agoUse correct APIs for Windows; Remove sys/time.h
Neale Ferguson [Thu, 2 Jun 2016 17:14:56 +0000 (13:14 -0400)]
Use correct APIs for Windows; Remove sys/time.h

7 years agoCorrect conditional compilation & move logger source files to correct place
Neale Ferguson [Thu, 2 Jun 2016 15:59:45 +0000 (11:59 -0400)]
Correct conditional compilation & move logger source files to correct place

7 years ago[runtime] Mark mono_runtime_run_main external only.
Aleksey Kliger [Wed, 1 Jun 2016 22:01:43 +0000 (18:01 -0400)]
[runtime] Mark mono_runtime_run_main external only.

Runtime should use mono_runtime_run_main_checked or mono_runtime_try_run_main

7 years ago[runtime] Mark mono_runtime_exec_main external only.
Aleksey Kliger [Wed, 1 Jun 2016 19:38:19 +0000 (15:38 -0400)]
[runtime] Mark mono_runtime_exec_main external only.

Runtime should use mono_runtime_exec_main_checked or mono_runtime_try_exec_main

7 years agoMerge pull request #3087 from lambdageek/dev/monoerror-mono_object_to_string
Aleksey Kliger (λgeek) [Thu, 2 Jun 2016 14:31:29 +0000 (10:31 -0400)]
Merge pull request #3087 from lambdageek/dev/monoerror-mono_object_to_string

[runtime] Mark mono_object_to_string external only.

7 years ago[System] Internal connectionpool from referencesource
Marek Safar [Thu, 2 Jun 2016 14:19:15 +0000 (16:19 +0200)]
[System] Internal connectionpool from referencesource

7 years agoMerge pull request #3096 from alexrp/master
Alex Rønne Petersen [Thu, 2 Jun 2016 13:11:51 +0000 (15:11 +0200)]
Merge pull request #3096 from alexrp/master

[bcl] Avoid ObjectDisposedException in EndPointListener.

7 years ago[corlib] Fixes mobile tests
Marek Safar [Thu, 2 Jun 2016 12:40:25 +0000 (14:40 +0200)]
[corlib] Fixes mobile tests

7 years agoMerge pull request #3097 from rolfbjarne/mono-api-info-compare-generic-method-parameters
Marek Safar [Thu, 2 Jun 2016 11:11:16 +0000 (13:11 +0200)]
Merge pull request #3097 from rolfbjarne/mono-api-info-compare-generic-method-parameters

[mono-api-info] Take number of generic parameters into account when comparing methods.

7 years ago[mono-api-info] Take number of generic parameters into account when comparing methods.
Rolf Bjarne Kvinge [Thu, 2 Jun 2016 10:09:09 +0000 (12:09 +0200)]
[mono-api-info] Take number of generic parameters into account when comparing methods.

7 years ago[arm] Return structures with sizes up to 16 bytes in int registers on watchos. Fixes...
Zoltan Varga [Thu, 2 Jun 2016 10:01:31 +0000 (06:01 -0400)]
[arm] Return structures with sizes up to 16 bytes in int registers on watchos. Fixes #41393.

7 years ago[bcl] Avoid ObjectDisposedException in EndPointListener.
Alex Rønne Petersen [Thu, 2 Jun 2016 09:27:38 +0000 (11:27 +0200)]
[bcl] Avoid ObjectDisposedException in EndPointListener.

This fixes a regression introduced in 123aaa5db07fe464d12ea178ecc3f27990cc1a72.
We would sometimes see an ObjectDisposedException when calling AcceptAsync ()
because that patch removed the try-catch around it.

7 years agoMerge pull request #3094 from mbrophy1/master
Marek Safar [Thu, 2 Jun 2016 07:51:50 +0000 (09:51 +0200)]
Merge pull request #3094 from mbrophy1/master

Add missing type forwarder for System.Diagnostics.Tracing.EventSource…

7 years agoMerge pull request #3095 from alexanderkyte/typespec_cache_fix
Alexander Kyte [Wed, 1 Jun 2016 22:42:38 +0000 (18:42 -0400)]
Merge pull request #3095 from alexanderkyte/typespec_cache_fix

[runtime] Don't free null cache hash table in aot compiler

7 years ago[runtime] Don't free null cache hash table in aot compiler
Alexander Kyte [Wed, 1 Jun 2016 22:39:35 +0000 (18:39 -0400)]
[runtime] Don't free null cache hash table in aot compiler

7 years agoHalve the stack depth for both the new single step tests
Andi McClure [Wed, 1 Jun 2016 22:04:35 +0000 (18:04 -0400)]
Halve the stack depth for both the new single step tests

7 years ago[genproj] More updates to the project files, getting closer, down to 5 errors
Miguel de Icaza [Wed, 1 Jun 2016 20:17:59 +0000 (16:17 -0400)]
[genproj] More updates to the project files, getting closer, down to 5 errors

7 years agoAdd missing type forwarder for System.Diagnostics.Tracing.EventSourceSettings. ASP...
Matthew Brophy [Wed, 1 Jun 2016 20:17:29 +0000 (21:17 +0100)]
Add missing type forwarder for System.Diagnostics.Tracing.EventSourceSettings.  ASP.net Core 1.0 RC2 apps will not run against mono without this.

7 years ago[runtime] Comment external only functions that call mono_error_raise_exception
Aleksey Kliger [Wed, 1 Jun 2016 17:21:42 +0000 (13:21 -0400)]
[runtime] Comment external only functions that call mono_error_raise_exception

7 years ago[runtime] Mark mono_object_to_string external only.
Aleksey Kliger [Wed, 1 Jun 2016 15:47:34 +0000 (11:47 -0400)]
[runtime] Mark mono_object_to_string external only.

Runtime should use mono_object_to_string_checked and mono_object_try_to_string.

7 years agoXamarin.Android test suite updates
Marek Habersack [Wed, 1 Jun 2016 16:54:19 +0000 (18:54 +0200)]
Xamarin.Android test suite updates

Xamarin.Android internal test suite takes advantage of the BCL tests
in Mono, so far their inclusion was a manual process and this commit
fixes it. A set of source inclusion and exclusion lists is added
and a handful of code fixes to make them compile on Xamarin.Android

7 years ago[corlib] Disable even more cas in mobile
Marek Safar [Wed, 1 Jun 2016 17:42:08 +0000 (19:42 +0200)]
[corlib] Disable even more cas in mobile

7 years ago[runtime] Replace pedump boehm dependency with sgen dependency
Alexander Kyte [Fri, 27 May 2016 15:32:53 +0000 (11:32 -0400)]
[runtime] Replace pedump boehm dependency with sgen dependency

7 years agoMerge pull request #3081 from lambdageek/coop-no-prof
Aleksey Kliger (λgeek) [Wed, 1 Jun 2016 16:55:58 +0000 (12:55 -0400)]
Merge pull request #3081 from lambdageek/coop-no-prof

[coop] Disable profiler tests if coop is enabled

7 years agoMerge pull request #3086 from esdrubal/master
monojenkins [Wed, 1 Jun 2016 16:25:11 +0000 (17:25 +0100)]
Merge pull request #3086 from esdrubal/master

[System] Fixes socket async exception.

SendAsyncFile uses StartSocketServer to start a server and at the same
time begins to accept a client socket. The issue is that when
the accept callback is called SendAsyncFile already closed the socket.

Fixed race condition by moving StartSocketServer and ReceiveCallback
logic into SendAsyncFile, and by using a new MRE to ensure that the
client receives all the data before the server is closed.

Fixes [#41264](https://bugzilla.xamarin.com/show_bug.cgi?id=41264)

7 years ago[corlib] Disable more CAS code
Marek Safar [Wed, 1 Jun 2016 16:01:10 +0000 (18:01 +0200)]
[corlib] Disable more CAS code

7 years ago[coop] Disable profiler tests if coop is enabled
Aleksey Kliger [Tue, 31 May 2016 19:03:03 +0000 (15:03 -0400)]
[coop] Disable profiler tests if coop is enabled

7 years ago[System] Fixes socket async exception.
Marcos Henrich [Tue, 31 May 2016 15:22:33 +0000 (16:22 +0100)]
[System] Fixes socket async exception.

SendAsyncFile uses StartSocketServer to start a server and at the same
time begins to accept a client socket. The issue is that when
the accept callback is called SendAsyncFile already closed the socket.

Fixed race condition by moving StartSocketServer and ReceiveCallback
logic into SendAsyncFile, and by using a new MRE to ensure that the
client receives all the data before the server is closed.

Fixes #41264

7 years ago[mcs] Use only mcs specific assembly references resolver. Fixes #29189
Marek Safar [Wed, 1 Jun 2016 11:41:48 +0000 (13:41 +0200)]
[mcs] Use only mcs specific assembly references resolver. Fixes #29189

7 years agoFix for non GCC win x64 calling convention when passing empty structs over pinvoke.
lateralusX [Wed, 1 Jun 2016 08:33:22 +0000 (10:33 +0200)]
Fix for non GCC win x64 calling convention when passing empty structs over pinvoke.

Standard C and C++ doesn't allow empty structs, empty structs will always have a
size of 1 byte. GCC have an extension to allow empty structs,
https://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html. This cause a
little dilemma since runtime build using none GCC compiler will not be
compatible with GCC build C libraries and the other way around. On platforms
where empty structs has size of 1 byte it must be represented in call and cannot
be dropped.

Libraries build using for example MSVC failed pinvoke call when empty
structs where used in pinvoke2.cs tests. The problem was that current
implementation dropped value types of size 0, eliminating them from the
call. Since MSVC implements C/C++ standard regarding empty structs (no extension used),
the function expected the parameter to be present, even if was not used.
This became a problem if the empty struct ended up in one of the 4 first
parameters (backed by registers) since if excluded, wrong parameter gets
into wrong registers (the same will apply to stack slots as well). For example,
a C signature like this, (int a, EmptyStruct es, int b) will get lowered to the
following on MSVC win x64, a -> rcx, es -> rdx and b -> r8, but since caller
eliminated es from the call, the register assignment from the caller was
a -> rcx and b -> rdx causing a violation of the calling convention and
error in callee.

The fix is to make sure that empty structs are still represented on none GCC
compilers on windows x64 (MSVC), since they must be represented in the call
to pinvoked methods. Fix will also use a const value of 0 to represent the value
passed as the struct instead of loading a value from stack into register/stack slot,
this is inline with the value the .NET runtime passes to pinvoked method. The reason
why we use a 0 instead of loading from stack is because a struct of size 0 is not explicitly
represented on stack and will have garbage data if loaded. Since it’s an empty struct value
type there is no need to load anything, just represent it as 0 in the register/stack slot passed
to caller.

There is also a case when returning an empty struct from a pinvoked method. Result will be returned
as 0 in RAX by MSVC compiled libraries (or whatever value stored in the 1 byte representation).
Since we have similar issues as above with empty structs of size 0 not explicitly represented on the
stack, the store will be eliminated and not written back to stack by caller since an empty struct doesn’t
represent any unique data.

Calling convention for managed->managed code is kept intact since it is working as expected
handling the case with empty structs as input and return values.

With fix all pinvoke2.cs tests now pass running on Windows x64 JIT.

7 years ago[mcs] Adjust correctly newline counter inside pragma warning
Marek Safar [Wed, 1 Jun 2016 07:36:21 +0000 (09:36 +0200)]
[mcs] Adjust correctly newline counter inside pragma warning

7 years ago[System] Fixes bootstrap build with old mcs
Marek Safar [Wed, 1 Jun 2016 07:18:15 +0000 (09:18 +0200)]
[System] Fixes bootstrap build with old mcs

7 years ago[arm] Pass structures larger than 16 bytes by ref on watchos. Fixes #41393.
Zoltan Varga [Wed, 1 Jun 2016 07:28:43 +0000 (03:28 -0400)]
[arm] Pass structures larger than 16 bytes by ref on watchos. Fixes #41393.

7 years ago[sgen] Remove a pointless memory barrier from the middle of the managed allocator.
Alex Rønne Petersen [Thu, 26 May 2016 08:49:46 +0000 (10:49 +0200)]
[sgen] Remove a pointless memory barrier from the middle of the managed allocator.

This appears to serve no purpose as tlab_next is a thread-local variable. It's
only ever accessed by other threads in order to write to it, not read it. We
also don't do this memory barrier in the native allocation functions.

7 years ago[arm] Don't emit memory barriers for relaxed atomic loads/stores.
Alex Rønne Petersen [Sat, 23 Apr 2016 00:02:02 +0000 (02:02 +0200)]
[arm] Don't emit memory barriers for relaxed atomic loads/stores.

7 years ago[sgen] Cache the SgenThreadInfo pointer in a local when emitting managed allocators.
Alex Rønne Petersen [Thu, 14 Apr 2016 20:05:44 +0000 (22:05 +0200)]
[sgen] Cache the SgenThreadInfo pointer in a local when emitting managed allocators.

7 years ago[gc] Register a critical region when executing managed allocators.
Alex Rønne Petersen [Thu, 14 Apr 2016 02:12:57 +0000 (04:12 +0200)]
[gc] Register a critical region when executing managed allocators.

Previously, if we stopped a thread and it had a stack looking like this:

    ...
    profiler_signal_handler
    <signal handler called>
    managed_allocator
    ...

We would fail to identify the fact that we've just interrupted a thread that's
in a managed allocator (uninterruptible code) because we only look at the very
latest instruction pointer of the thread, which will be pointing into
profiler_signal_handler or some other function called by it. So we would
happily continue along with the STW process and proceed to doing the actual GC,
where we would see a broken heap.

We could solve this by unwinding the stack and checking all frames, but that's
complicated and error-prone. Instead, register a critical region while the
managed allocator. This way, if we don't identify it by instruction pointer, we
will identify it by the fact that the thread is in a critical region.

7 years ago[genproj] Another library works, System.Json.Microsoft
Miguel de Icaza [Tue, 31 May 2016 21:17:59 +0000 (17:17 -0400)]
[genproj] Another library works, System.Json.Microsoft

7 years agoMerge pull request #3080 from BrzVlad/feature-enable-conc-master
Rodrigo Kumpera [Tue, 31 May 2016 20:58:09 +0000 (13:58 -0700)]
Merge pull request #3080 from BrzVlad/feature-enable-conc-master

[sgen] Enable concurrent major by default on desktop platforms

7 years ago[genproj] support for using prebuilt resources
Miguel de Icaza [Tue, 31 May 2016 20:50:55 +0000 (16:50 -0400)]
[genproj] support for using prebuilt resources

7 years agoFixes for peer feedback on recursive step patch
Andi McClure [Tue, 31 May 2016 20:36:45 +0000 (16:36 -0400)]
Fixes for peer feedback on recursive step patch

Made breakpoint uniqueness test switch to a hash after 8th item added,
consolidated the code that handles the uniqueness test and makes the
breakpoint in one function, fixed style issues.

7 years ago[genproj] Getting closer to a full build
Miguel de Icaza [Tue, 31 May 2016 16:56:57 +0000 (12:56 -0400)]
[genproj] Getting closer to a full build
* Add TODO list
* Use -useSourcePath when building resources, so we do not need to add the explicit extra path
* More updates, now battling resource generation across the board
* Use newlines in the Unix commands to avoid generating things like cs-parser.cs^M

7 years agoMerge pull request #2871 from BrzVlad/feature-conc-sweep-nrs
Mark Probst [Tue, 31 May 2016 18:07:42 +0000 (11:07 -0700)]
Merge pull request #2871 from BrzVlad/feature-conc-sweep-nrs

[sgen] Run sweep concurrently with nursery collections

7 years agoMerge pull request #3019 from schani/fix-major-pinning
Mark Probst [Tue, 31 May 2016 18:03:43 +0000 (11:03 -0700)]
Merge pull request #3019 from schani/fix-major-pinning

Fix major pinning, and cheap pinning stats by default

7 years ago[mcs] Add more of undocumented C#6 improved overload resolution
Marek Safar [Tue, 31 May 2016 16:37:01 +0000 (18:37 +0200)]
[mcs] Add more of undocumented C#6 improved overload resolution

7 years ago[genproj] Update build files
Miguel de Icaza [Tue, 31 May 2016 16:23:41 +0000 (12:23 -0400)]
[genproj] Update build files

7 years ago[mconfig] Remove dependency on build time settings
Miguel de Icaza [Tue, 31 May 2016 16:10:57 +0000 (12:10 -0400)]
[mconfig] Remove dependency on build time settings

7 years agoMerge pull request #2377 from joelmartinez/docs-multiassembly-extension-fix
Jonathan Pryor [Tue, 31 May 2016 16:01:02 +0000 (12:01 -0400)]
Merge pull request #2377 from joelmartinez/docs-multiassembly-extension-fix

[mdoc] Extension method crash fix, removes -multiassembly

7 years agoMake log header message consistent
Neale Ferguson [Tue, 31 May 2016 15:51:23 +0000 (11:51 -0400)]
Make log header message consistent

7 years ago[mdoc] Extension method crash fix, removes -multiassembly
Joel Martinez [Wed, 16 Dec 2015 16:34:05 +0000 (11:34 -0500)]
[mdoc] Extension method crash fix, removes -multiassembly
The tests added during the initial development of the -multiassembly argument failed to test the presence of extension methods;
the result was a crash that occurred when there were extension methods present in multiple assemblies.

This patch addresses the issue by putting a guard clause around the code that adds the extension method to the index.
Tests have been modified accordingly to verify this bug and include extension methods

Additionally, the -multiassembly parameter was removed entirely. This behavior is now triggered by the presence of -apistyle,
which is where support for "multiple assemblies" was meant to work anyways. To review, this is to support cross-platform
development, where you have multiple -- *different* -- assemblies for each platform. These assemblies will share a certain
cross-section of APIs that will be *exactly* the same in each assembly (as opposed to multiple versions of literally the same assembly).
As a result, every member will now contain an individual `AssemblyInfo` tag that also contains the name of the assembly.

7 years ago[sgen] Enable concurrent major by default on desktop platforms
Vlad Brezae [Wed, 18 May 2016 18:34:05 +0000 (21:34 +0300)]
[sgen] Enable concurrent major by default on desktop platforms

7 years agoMerge pull request #3078 from akoeplinger/fix-test-exclude-filename
Alexander Köplinger [Tue, 31 May 2016 15:24:11 +0000 (17:24 +0200)]
Merge pull request #3078 from akoeplinger/fix-test-exclude-filename

[build] Make exclusion filename consistent between library and test

7 years agoMerge pull request #3067 from lambdageek/dev/monoerror-stringy
Aleksey Kliger (λgeek) [Tue, 31 May 2016 15:13:53 +0000 (11:13 -0400)]
Merge pull request #3067 from lambdageek/dev/monoerror-stringy

[runtime] Deal with MonoErrors from string_to_utf8_checked changes

7 years agoMerge pull request #3059 from lateralusX/jlorenss/win-x64-dyncall-gsharedvt-support
lateralusX [Tue, 31 May 2016 14:32:40 +0000 (16:32 +0200)]
Merge pull request #3059 from lateralusX/jlorenss/win-x64-dyncall-gsharedvt-support

[aot] Added support for GSHAREDVT and DYNCALL on Windows x64 for full AOT builds.

7 years agoMerge pull request #3076 from akoeplinger/fix-ziptime-offbyone
Alexander Köplinger [Tue, 31 May 2016 14:06:41 +0000 (16:06 +0200)]
Merge pull request #3076 from akoeplinger/fix-ziptime-offbyone

[WindowsBase] Fix off-by-one error in ZipTime

7 years ago[WindowsBase] Fix off-by-one error in ZipTime
Alexander Köplinger [Tue, 31 May 2016 09:59:49 +0000 (11:59 +0200)]
[WindowsBase] Fix off-by-one error in ZipTime

The date/time struct in zip.h defines the month value as

    uInt tm_mon;            /* months since January - [0,11] */

.NET's DateTime object in turn stores months from 1-12. We didn't
take this into account when passing the values from managed->native
so the month ended up being off by one.

We didn't use this codepath before https://github.com/mono/mono/pull/3036
that's why it didn't show up until now.

7 years ago[build] Make exclusion filename consistent between library and test
Alexander Köplinger [Tue, 31 May 2016 11:10:28 +0000 (13:10 +0200)]
[build] Make exclusion filename consistent between library and test

The test assembly used *.dll.excludes before while the library uses *.dll.exclude.sources.
Make this consistent to reduce confusion.

Also remove corlib_cmp.dll.excludes which is from a profile that no longer exists.