mono.git
8 years ago[corlib] Disable ThreadLocalTests.DisposeOnThreadExit on MonoTouch, it's randomly...
Rolf Bjarne Kvinge [Fri, 5 Feb 2016 14:15:45 +0000 (15:15 +0100)]
[corlib] Disable ThreadLocalTests.DisposeOnThreadExit on MonoTouch, it's randomly failing.

8 years agoMerge pull request #2572 from akoeplinger/fix-monodoc-language
Alexander Köplinger [Fri, 5 Feb 2016 15:14:05 +0000 (16:14 +0100)]
Merge pull request #2572 from akoeplinger/fix-monodoc-language

[monodoc] Fix literal formatting on systems where decimal separator is not a dot

8 years ago[llvmonly] Various small fixes. Make mono_llvm_throw_exception etc. directly callable...
Zoltan Varga [Fri, 5 Feb 2016 07:07:40 +0000 (02:07 -0500)]
[llvmonly] Various small fixes. Make mono_llvm_throw_exception etc. directly callable in static mode. Add support for directly calling pinvoke methods. Fix an assertion during EH.

8 years ago[Docs] More API docs
Miguel de Icaza [Fri, 5 Feb 2016 04:14:01 +0000 (23:14 -0500)]
[Docs] More API docs

8 years ago[llvmonly] Don't set the invariant.load flag on loads from the GOT, they are initiali...
Zoltan Varga [Fri, 5 Feb 2016 03:40:44 +0000 (22:40 -0500)]
[llvmonly] Don't set the invariant.load flag on loads from the GOT, they are initialized by a call to init_method () so they are not completely invariant.

8 years agoRevert "[jit] Don't allocate memory for unused vreg"
Zoltan Varga [Fri, 5 Feb 2016 00:02:18 +0000 (19:02 -0500)]
Revert "[jit] Don't allocate memory for unused vreg"

This reverts commit 137c0999cc8e1e9171c7703af9b013f2e43731f5.

Revert this as leads to a memory overwrite on x86:

defs [ins->dreg + 1] = NULL;

8 years agoMerge pull request #2566 from lambdageek/monoerror-mono_module_get_object
Aleksey Kliger (λgeek) [Thu, 4 Feb 2016 15:26:54 +0000 (10:26 -0500)]
Merge pull request #2566 from lambdageek/monoerror-mono_module_get_object

[reflection] Use MonoError for mono_module_get_object

8 years agoMerge pull request #2535 from lambdageek/monoerror-reflection-bubble
Aleksey Kliger (λgeek) [Thu, 4 Feb 2016 15:26:25 +0000 (10:26 -0500)]
Merge pull request #2535 from lambdageek/monoerror-reflection-bubble

[reflection] Push MonoError through misc methods

8 years ago[System] Remove explicit sdk target from CSharpCodeCompiler
Marek Safar [Thu, 4 Feb 2016 15:03:11 +0000 (16:03 +0100)]
[System] Remove explicit sdk target from CSharpCodeCompiler

8 years ago[io-layer] Print from which pipe we just read
Ludovic Henry [Thu, 4 Feb 2016 14:30:55 +0000 (14:30 +0000)]
[io-layer] Print from which pipe we just read

8 years ago[Process] Fix possible double call to Begin(Output|Error)ReadLine
Ludovic Henry [Thu, 4 Feb 2016 14:28:17 +0000 (14:28 +0000)]
[Process] Fix possible double call to Begin(Output|Error)ReadLine

This is not allowed in .NET, as it could lead to unexpected results.

8 years ago[threads] Remove mono_thread_notify_pending_exc_fn dead code
Ludovic Henry [Tue, 2 Feb 2016 11:30:59 +0000 (11:30 +0000)]
[threads] Remove mono_thread_notify_pending_exc_fn dead code

8 years ago[thread] Remove mono_thread_info_begin_suspend unused parameter
Ludovic Henry [Mon, 1 Feb 2016 18:17:35 +0000 (18:17 +0000)]
[thread] Remove mono_thread_info_begin_suspend unused parameter

8 years ago[threads] Remove unecessary block/unblock suspend ACK signal
Ludovic Henry [Tue, 2 Feb 2016 10:23:25 +0000 (10:23 +0000)]
[threads] Remove unecessary block/unblock suspend ACK signal

Blocking suspend_ack_signal_mask is only useful if we are notifying the initiator of suspend followed by waiting on the suspend_signal_mask.

8 years ago[mcs] Update sdk profile paths after 88b287f06584a6284face60accb94d000b1c6ce7
Marek Safar [Thu, 4 Feb 2016 13:08:57 +0000 (14:08 +0100)]
[mcs] Update sdk profile paths after 88b287f06584a6284face60accb94d000b1c6ce7

8 years ago[monodoc] Fix literal formatting on systems where decimal separator is not a dot
Alexander Köplinger [Thu, 4 Feb 2016 01:37:36 +0000 (02:37 +0100)]
[monodoc] Fix literal formatting on systems where decimal separator is not a dot

E.g. on a German language OS the "make check-mdoc-export-html" test fails with this:

```
diff --exclude=.svn -rup Test/en.expected/Mono.DocTest/Widget.xml Test/en.actual/Mono.DocTest/Widget.xml
--- Test/en.expected/Mono.DocTest/Widget.xml 2015-11-18 04:42:11.000000000 +0100
+++ Test/en.actual/Mono.DocTest/Widget.xml 2016-02-04 02:38:09.000000000 +0100
@@ -1061,8 +1061,8 @@
       </Docs>
     </Member>
     <Member MemberName="PI">
-      <MemberSignature Language="C#" Value="protected const double PI = 3.14159;" />
-      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3.14159)" />
+      <MemberSignature Language="C#" Value="protected const double PI = 3,14159;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3,14159)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -1070,7 +1070,7 @@
       <ReturnValue>
         <ReturnType>System.Double</ReturnType>
       </ReturnValue>
-      <MemberValue>3.14159</MemberValue>
+      <MemberValue>3,14159</MemberValue>
       <Docs>
```

The fix is to always use InvariantCulture for literal formatting.

8 years ago[llvm] Zero extend unsigned enum arguments. Fixes #38379.
Zoltan Varga [Wed, 3 Feb 2016 23:16:02 +0000 (18:16 -0500)]
[llvm] Zero extend unsigned enum arguments. Fixes #38379.

8 years ago[reflection] Use MonoError for mono_module_get_object
Aleksey Kliger [Fri, 29 Jan 2016 17:15:50 +0000 (12:15 -0500)]
[reflection] Use MonoError for mono_module_get_object

Mark mono_module_get_object external only.
Runtime should use mono_module_get_object_checked.

8 years ago[reflection] Use MonoError in mono_image_get_{method,ctor}_on_inst_token
Aleksey Kliger [Fri, 29 Jan 2016 00:55:02 +0000 (19:55 -0500)]
[reflection] Use MonoError in mono_image_get_{method,ctor}_on_inst_token

8 years ago[reflection] Use MonoError for mono_image_get_{method,ctor}builder_token
Aleksey Kliger [Fri, 29 Jan 2016 00:14:22 +0000 (19:14 -0500)]
[reflection] Use MonoError for mono_image_get_{method,ctor}builder_token

8 years ago[reflection] Use MonoError in mono_image_create_pefile
Aleksey Kliger [Thu, 28 Jan 2016 23:56:30 +0000 (18:56 -0500)]
[reflection] Use MonoError in mono_image_create_pefile

8 years ago[reflection] Don't raise in mono_image_get_method_info
Aleksey Kliger [Thu, 28 Jan 2016 23:47:25 +0000 (18:47 -0500)]
[reflection] Don't raise in mono_image_get_method_info

8 years ago[reflection] Don't raise in reflection_methodbuilder_from_{method,ctor}_builder
Aleksey Kliger [Thu, 28 Jan 2016 23:32:18 +0000 (18:32 -0500)]
[reflection] Don't raise in reflection_methodbuilder_from_{method,ctor}_builder

8 years ago[reflection] Don't raise in mono_type_get_object_checked
Aleksey Kliger [Thu, 28 Jan 2016 23:20:46 +0000 (18:20 -0500)]
[reflection] Don't raise in mono_type_get_object_checked

8 years ago[reflection] Use MonoError for mono_image_create_method_token
Aleksey Kliger [Thu, 28 Jan 2016 23:18:08 +0000 (18:18 -0500)]
[reflection] Use MonoError for mono_image_create_method_token

8 years ago[reflection] Use MonoError for mono_image_build_metadata
Aleksey Kliger [Thu, 28 Jan 2016 22:57:53 +0000 (17:57 -0500)]
[reflection] Use MonoError for mono_image_build_metadata

8 years ago[reflection] Use MonoError in mono_image_create_token
Aleksey Kliger [Thu, 28 Jan 2016 22:35:52 +0000 (17:35 -0500)]
[reflection] Use MonoError in mono_image_create_token

8 years ago[reflection] Use MonoError in some static functions
Aleksey Kliger [Thu, 28 Jan 2016 22:21:15 +0000 (17:21 -0500)]
[reflection] Use MonoError in some static functions

Pass a MonoError argument to:
method_encode_code, mono_image_basic_method, mono_image_get_ctor_info

8 years agoMerge pull request #2542 from akoeplinger/remove-changelog
Alexander Köplinger [Wed, 3 Feb 2016 20:09:24 +0000 (21:09 +0100)]
Merge pull request #2542 from akoeplinger/remove-changelog

Remove ChangeLog files from the repo

8 years agoMerge pull request #2554 from ludovic-henry/coop-blocking-interrupt
Rodrigo Kumpera [Wed, 3 Feb 2016 20:08:35 +0000 (15:08 -0500)]
Merge pull request #2554 from ludovic-henry/coop-blocking-interrupt

[coop] Use signals for blocking syscall interrupt

8 years agoMerge pull request #2559 from lewurm/hazard-pointer-clear
Rodrigo Kumpera [Wed, 3 Feb 2016 19:53:55 +0000 (14:53 -0500)]
Merge pull request #2559 from lewurm/hazard-pointer-clear

[hazard pointers] add write barrier on clear as well

8 years ago[binary-reference-assemblies] Add a symlink from 4.0/mscorlib.dll to 4.0-api/mscorlib.dll
Alexander Köplinger [Wed, 3 Feb 2016 18:45:25 +0000 (19:45 +0100)]
[binary-reference-assemblies] Add a symlink from 4.0/mscorlib.dll to 4.0-api/mscorlib.dll

Some programs like NUnit check if a file exists there and break otherwise.

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

8 years ago[docs] remove a deleted file from EXTRA_DIST
Alexander Köplinger [Wed, 3 Feb 2016 18:04:36 +0000 (19:04 +0100)]
[docs] remove a deleted file from EXTRA_DIST

8 years agoRevert "[rules.make] to support 'make dist' on MacOS"
Alexander Köplinger [Wed, 3 Feb 2016 17:50:21 +0000 (18:50 +0100)]
Revert "[rules.make] to support 'make dist' on MacOS"

This reverts commit a234d21471806a4ab9e5b5ae42ec88cdbda1e144.

It isn't necessary after f1dad87178085f688afbcddcb77cf70d193ed995.

8 years ago[Runtime Documentation] More work on runtime documentation
Miguel de Icaza [Wed, 3 Feb 2016 18:18:42 +0000 (13:18 -0500)]
[Runtime Documentation] More work on runtime documentation

8 years ago[hazard pointers] add write barrier on clear as well
Bernhard Urban [Wed, 3 Feb 2016 18:09:31 +0000 (10:09 -0800)]
[hazard pointers] add write barrier on clear as well

8 years ago[coop] Use signals for blocking syscall interrupt
Ludovic Henry [Tue, 2 Feb 2016 14:51:46 +0000 (14:51 +0000)]
[coop] Use signals for blocking syscall interrupt

8 years ago[Documentation] Document some of Mono's embedding API, improve the style
Miguel de Icaza [Wed, 3 Feb 2016 15:11:19 +0000 (10:11 -0500)]
[Documentation] Document some of Mono's embedding API, improve the style

8 years agoRemove stale files
Miguel de Icaza [Wed, 3 Feb 2016 14:24:59 +0000 (09:24 -0500)]
Remove stale files

8 years ago[rules.make] to support 'make dist' on MacOS
Miguel de Icaza [Wed, 3 Feb 2016 14:23:52 +0000 (09:23 -0500)]
[rules.make] to support 'make dist' on MacOS

8 years agoDocument Coop mode in README
Miguel de Icaza [Tue, 2 Feb 2016 20:30:29 +0000 (15:30 -0500)]
Document Coop mode in README

8 years ago[test] Use using TimerTest
Ludovic Henry [Wed, 3 Feb 2016 13:51:41 +0000 (13:51 +0000)]
[test] Use using TimerTest

8 years ago[tests] Use explicit delegates to get more information from stacktrace
Ludovic Henry [Wed, 3 Feb 2016 13:11:04 +0000 (13:11 +0000)]
[tests] Use explicit delegates to get more information from stacktrace

8 years ago[proc] Fix potential buffer overflow
Ludovic Henry [Wed, 3 Feb 2016 12:40:15 +0000 (12:40 +0000)]
[proc] Fix potential buffer overflow

8 years agoMerge pull request #2530 from lambdageek/monoerror-mono_string_new
monojenkins [Wed, 3 Feb 2016 06:45:23 +0000 (06:45 +0000)]
Merge pull request #2530 from lambdageek/monoerror-mono_string_new

[runtime] Use MonoError for mono_string_new

We are refraining from changing runtime callers of `mono_string_new` to `mono_string_new_checked` in one commit. String creation is used in several hundred places and threading error handling through all the callers is very intrusive. Additionally, AFAIK the only error condition from mono_string_new is out-of-memory. In a lot of cases there's no way to meaningfully recover.

We should revisit individual callers when it makes sense, but just mechanically updating everywhere doesn't get us a lot of benefit.

8 years agoRemove from the documentation non-public APIs, or move to files that flag them as...
Miguel de Icaza [Wed, 3 Feb 2016 03:32:04 +0000 (22:32 -0500)]
Remove from the documentation non-public APIs, or move to files that flag them as internal

8 years agoMerge pull request #2524 from lambdageek/monoerror-mono_string_new_utf16_checked
monojenkins [Wed, 3 Feb 2016 03:32:00 +0000 (03:32 +0000)]
Merge pull request #2524 from lambdageek/monoerror-mono_string_new_utf16_checked

[runtime] Use MonoError for mono_string_new_utf16

8 years agoUpdated the runtime template documentation with all new APIs in Mono
Miguel de Icaza [Wed, 3 Feb 2016 03:05:15 +0000 (22:05 -0500)]
Updated the runtime template documentation with all new APIs in Mono

8 years agoMerge pull request #2518 from lambdageek/monoerror-mono_method_get_object
monojenkins [Wed, 3 Feb 2016 02:25:22 +0000 (02:25 +0000)]
Merge pull request #2518 from lambdageek/monoerror-mono_method_get_object

[runtime] Use MonoError for mono_method_get_object

Depends on #2532

Issues:

- [x] ~~depends on #2486~~
- [x] ~~Should use `mono_object_new_checked` #2532~~
- [x] ~~Should use `mono_string_new_checked`~~ (`mono_string_new` will assert instead of raising an exception - #2530)

8 years ago[llvmonly] Implement support for stack walks if _Unwind_Backtrace () is available.
Zoltan Varga [Wed, 3 Feb 2016 00:35:01 +0000 (19:35 -0500)]
[llvmonly] Implement support for stack walks if _Unwind_Backtrace () is available.

8 years ago[runtime] Switch to mono_method_get_object_checked
Aleksey Kliger [Tue, 26 Jan 2016 21:14:10 +0000 (16:14 -0500)]
[runtime] Switch to mono_method_get_object_checked

Mark mono_method_get_object external only.

8 years ago[runtime] Use MonoError for mono_method_get_object
Aleksey Kliger [Tue, 26 Jan 2016 17:20:33 +0000 (12:20 -0500)]
[runtime] Use MonoError for mono_method_get_object

8 years ago[reflection] Fix build breakage
Aleksey Kliger [Wed, 3 Feb 2016 00:10:44 +0000 (19:10 -0500)]
[reflection] Fix build breakage

8 years agoMerge pull request #2558 from lewurm/thread-suspension-race
monojenkins [Wed, 3 Feb 2016 00:00:29 +0000 (00:00 +0000)]
Merge pull request #2558 from lewurm/thread-suspension-race

[threads] avoid race between setting the state flag and suspension

there's a short window where we release the lock and another thread
could modify the state.  That is what we saw on the ARM machines for a
while, e.g. in `subthread-exit.cs` there's a race between
`mono_thread_execute_interruption` and `mono_thread_suspend_all_other_threads`:

> Thread 2 (Thread 0x429ff430 (LWP 5189)):  // SUB THREAD
> #0  0x40398e30 in nanosleep () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x0028c0ac in monoeg_g_usleep (microseconds=86650) at gdate-unix.c:53
> #2  0x0027b1d8 in suspend_sync_nolock (id=1079603792, interrupt_kernel=1) at mono-threads.c:913
> #3  0x0027b2d4 in mono_thread_info_safe_suspend_and_run (id=1079603792, interrupt_kernel=1, callback=0x1ab109 <suspend_thread_critical>, user_data=0x429fe534)
>     at mono-threads.c:935
> #4  0x001ab28a in suspend_thread_internal (thread=0x401c0120, interrupt=1) at threads.c:4807
> #5  0x001a91ec in mono_thread_suspend_all_other_threads () at threads.c:3297
> #6  0x00158d8c in ves_icall_System_Environment_Exit (result=0) at icall.c:6378
> #7  0x400e7d9c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> Thread 1 (Thread 0x40597250 (LWP 5186)):  // MAIN THREAD
> #0  0x4039a5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x4039796e in do_futex_wait () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #2  0x403979da in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #3  0x002788d8 in mono_os_sem_wait (sem=0x388248, flags=MONO_SEM_FLAGS_NONE) at ../../mono/utils/mono-os-semaphore.h:163
> #4  0x00279722 in mono_thread_info_wait_for_resume (info=0x388210) at mono-threads.c:144
> #5  0x0027ad5e in mono_thread_info_end_self_suspend () at mono-threads.c:700
> #6  0x001ab2d2 in self_suspend_internal (thread=0x401c0120) at threads.c:4822
> #7  0x001aab0a in mono_thread_execute_interruption () at threads.c:4337
> #8  0x001a6a82 in ves_icall_System_Threading_Thread_Sleep_internal (ms=1200) at threads.c:1217
> #9  0x400da75c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)

8 years agoMerge pull request #2563 from OffBase/master
João Matos [Wed, 3 Feb 2016 00:00:02 +0000 (00:00 +0000)]
Merge pull request #2563 from OffBase/master

Fix stream leak when failing to open a zip file

8 years ago[runtime] Use MonoError for mono_string_new
Aleksey Kliger [Wed, 27 Jan 2016 21:02:58 +0000 (16:02 -0500)]
[runtime] Use MonoError for mono_string_new

8 years ago[runtime] Switch to mono_string_new_utf16_checked
Aleksey Kliger [Wed, 27 Jan 2016 20:27:47 +0000 (15:27 -0500)]
[runtime] Switch to mono_string_new_utf16_checked

8 years agoMerge pull request #2536 from lambdageek/monoerror-mono_field_get_object
Rodrigo Kumpera [Tue, 2 Feb 2016 23:37:33 +0000 (18:37 -0500)]
Merge pull request #2536 from lambdageek/monoerror-mono_field_get_object

[runtime] Use MonoError for mono_field_get_object

8 years agoMerge pull request #2532 from lambdageek/monoerror-mono_object_new
Rodrigo Kumpera [Tue, 2 Feb 2016 23:35:49 +0000 (18:35 -0500)]
Merge pull request #2532 from lambdageek/monoerror-mono_object_new

[runtime] Use MonoError for mono_object_new

8 years ago[llvmonly] Implement limited support for stack walks so new StackTrace () works.
Zoltan Varga [Tue, 2 Feb 2016 22:47:42 +0000 (17:47 -0500)]
[llvmonly] Implement limited support for stack walks so new StackTrace () works.

8 years agoFix stream leak in all cases
Matthew Orlando [Tue, 2 Feb 2016 21:57:42 +0000 (13:57 -0800)]
Fix stream leak in all cases

8 years ago[corlib] Fixes Environment version for .net 4.6
Marek Safar [Tue, 2 Feb 2016 21:29:28 +0000 (22:29 +0100)]
[corlib] Fixes Environment version for .net 4.6

8 years agoFix stream leak when failing to open a zip file
Matthew Orlando [Tue, 2 Feb 2016 20:58:06 +0000 (12:58 -0800)]
Fix stream leak when failing to open a zip file

8 years agoMerge pull request #2556 from BrzVlad/feature-sgen-stats
Vlad Brezae [Tue, 2 Feb 2016 20:56:11 +0000 (20:56 +0000)]
Merge pull request #2556 from BrzVlad/feature-sgen-stats

[sgen] sgen stats

8 years agoFix the build.
Zoltan Varga [Tue, 2 Feb 2016 19:52:59 +0000 (14:52 -0500)]
Fix the build.

8 years ago[llvm] Fix the loaded llvm build broken by 204f2985d7c9835e8cefaf3439d51ccaf0d3d2b0.
Zoltan Varga [Tue, 2 Feb 2016 18:51:56 +0000 (13:51 -0500)]
[llvm] Fix the loaded llvm build broken by 204f2985d7c9835e8cefaf3439d51ccaf0d3d2b0.

8 years agoMerge pull request #2557 from ludovic-henry/monoerror-return-macro
monojenkins [Tue, 2 Feb 2016 16:30:26 +0000 (16:30 +0000)]
Merge pull request #2557 from ludovic-henry/monoerror-return-macro

[MonoError] Add error checking macro

8 years agofixup! [MonoError] Add error checking macro
Ludovic Henry [Tue, 2 Feb 2016 15:01:34 +0000 (15:01 +0000)]
fixup! [MonoError] Add error checking macro

8 years ago[threads] avoid race between setting the state flag and suspension
Bernhard Urban [Tue, 2 Feb 2016 14:59:27 +0000 (06:59 -0800)]
[threads] avoid race between setting the state flag and suspension

there's a short window where we release the lock and another thread
could modify the state.  That is what we saw on the ARM machines for a
while, e.g. in `subthread-exit.cs` there's a race between
`mono_thread_execute_interruption` and `mono_thread_suspend_all_other_threads`:

> Thread 2 (Thread 0x429ff430 (LWP 5189)):  // SUB THREAD
> #0  0x40398e30 in nanosleep () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x0028c0ac in monoeg_g_usleep (microseconds=86650) at gdate-unix.c:53
> #2  0x0027b1d8 in suspend_sync_nolock (id=1079603792, interrupt_kernel=1) at mono-threads.c:913
> #3  0x0027b2d4 in mono_thread_info_safe_suspend_and_run (id=1079603792, interrupt_kernel=1, callback=0x1ab109 <suspend_thread_critical>, user_data=0x429fe534)
>     at mono-threads.c:935
> #4  0x001ab28a in suspend_thread_internal (thread=0x401c0120, interrupt=1) at threads.c:4807
> #5  0x001a91ec in mono_thread_suspend_all_other_threads () at threads.c:3297
> #6  0x00158d8c in ves_icall_System_Environment_Exit (result=0) at icall.c:6378
> #7  0x400e7d9c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> Thread 1 (Thread 0x40597250 (LWP 5186)):  // MAIN THREAD
> #0  0x4039a5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x4039796e in do_futex_wait () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #2  0x403979da in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #3  0x002788d8 in mono_os_sem_wait (sem=0x388248, flags=MONO_SEM_FLAGS_NONE) at ../../mono/utils/mono-os-semaphore.h:163
> #4  0x00279722 in mono_thread_info_wait_for_resume (info=0x388210) at mono-threads.c:144
> #5  0x0027ad5e in mono_thread_info_end_self_suspend () at mono-threads.c:700
> #6  0x001ab2d2 in self_suspend_internal (thread=0x401c0120) at threads.c:4822
> #7  0x001aab0a in mono_thread_execute_interruption () at threads.c:4337
> #8  0x001a6a82 in ves_icall_System_Threading_Thread_Sleep_internal (ms=1200) at threads.c:1217
> #9  0x400da75c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)

8 years ago[error] Use error_return_(val_)if_nok at some places
Ludovic Henry [Tue, 2 Feb 2016 14:16:26 +0000 (14:16 +0000)]
[error] Use error_return_(val_)if_nok at some places

8 years ago[MonoError] Add error checking macro
Ludovic Henry [Tue, 2 Feb 2016 14:15:10 +0000 (14:15 +0000)]
[MonoError] Add error checking macro

8 years ago[binary-reference-assemblies] Make sure only .dll files are included in the wildcard
Alexander Köplinger [Tue, 2 Feb 2016 13:29:46 +0000 (14:29 +0100)]
[binary-reference-assemblies] Make sure only .dll files are included in the wildcard

The wildcard `$(wildcard ../../../external/binary-reference-assemblies/v4.5/*)` would include the directory entry `../../../external/binary-reference-assemblies/v4.5/Facades/` which returns an error during "make dist".

Fixing this by including only the .dll files in the wildcards.

8 years ago[binary-reference-assemblies] Include 4.5 Facades in tarball
Alexander Köplinger [Tue, 2 Feb 2016 12:41:04 +0000 (13:41 +0100)]
[binary-reference-assemblies] Include 4.5 Facades in tarball

8 years ago[Mono.Security.Providers.OldTls]: Don't build on mobile.
Martin Baulig [Mon, 1 Feb 2016 23:44:52 +0000 (00:44 +0100)]
[Mono.Security.Providers.OldTls]: Don't build on mobile.

(cherry picked from commit f379b7df517b18cea025cb3f53e144bc0e851b9f)

8 years ago[sgen] Add binary protocol entries for evacuation
Vlad Brezae [Mon, 1 Feb 2016 16:28:04 +0000 (18:28 +0200)]
[sgen] Add binary protocol entries for evacuation

This way we can detect which collections are doing evacuation, which can be useful both for debugging and performance reasons.

8 years ago[sgen] Remove fixed FIXME comment
Vlad Brezae [Mon, 1 Feb 2016 16:14:46 +0000 (18:14 +0200)]
[sgen] Remove fixed FIXME comment

8 years ago[sgen] Add binary protocol entry for worker finish
Vlad Brezae [Mon, 1 Feb 2016 16:10:23 +0000 (18:10 +0200)]
[sgen] Add binary protocol entry for worker finish

This will allow us to detect actual concurrent M&S end and whether the concurrent M&S was forced to finish.

8 years ago[sgen] Add binary protocol entries for finishing the gray stack
Vlad Brezae [Mon, 1 Feb 2016 15:53:11 +0000 (17:53 +0200)]
[sgen] Add binary protocol entries for finishing the gray stack

These entries have a timestamp associated with them, allowing us to gather information about time spent during each collection.

8 years ago[sgen] Add binary protocol entries for cardtable scanning
Vlad Brezae [Mon, 1 Feb 2016 15:40:30 +0000 (17:40 +0200)]
[sgen] Add binary protocol entries for cardtable scanning

These entries have a timestamp associated with them, allowing us to gather information about time spent during each collection.

8 years ago[sgen] Fix HEAVY_STATISTICS build warning
Vlad Brezae [Thu, 28 Jan 2016 02:12:15 +0000 (04:12 +0200)]
[sgen] Fix HEAVY_STATISTICS build warning

8 years ago[Makefile] fix make dist on libgc
Miguel de Icaza [Mon, 1 Feb 2016 22:54:27 +0000 (17:54 -0500)]
[Makefile] fix make dist on libgc

8 years ago[jit] Avoid merging some bblocks which are not after each other when inlining since...
Zoltan Varga [Mon, 1 Feb 2016 22:44:55 +0000 (17:44 -0500)]
[jit] Avoid merging some bblocks which are not after each other when inlining since it can cause the bblock between them to be ignored later. Fixes #38250.

8 years ago[amd64] Fix the stack alignment check.
Zoltan Varga [Mon, 1 Feb 2016 22:44:01 +0000 (17:44 -0500)]
[amd64] Fix the stack alignment check.

8 years agoMerge pull request #2551 from ludovic-henry/coop-products
monojenkins [Mon, 1 Feb 2016 22:35:22 +0000 (22:35 +0000)]
Merge pull request #2551 from ludovic-henry/coop-products

[coop] Add support for entering/exiting GC safe/unsafe region for products

8 years ago[coop] Add support for entering/exiting GC safe/unsafe region for products
Ludovic Henry [Mon, 1 Feb 2016 13:27:03 +0000 (13:27 +0000)]
[coop] Add support for entering/exiting GC safe/unsafe region for products

8 years ago[coop] Ensure we exit blocking mode when invoking managed code
Ludovic Henry [Mon, 1 Feb 2016 13:11:44 +0000 (13:11 +0000)]
[coop] Ensure we exit blocking mode when invoking managed code

mono_runtime_invoke might be called by P/Invoked code, which is in blocking mode. Not switching back to running can lead to a crash when hitting a safepoint.

8 years ago[arm] Fix a code generation problem when a virtual call is made with a large offset...
Zoltan Varga [Mon, 1 Feb 2016 19:51:23 +0000 (14:51 -0500)]
[arm] Fix a code generation problem when a virtual call is made with a large offset, the offset generation code would overwrite a source register. Fixes #27303.

8 years ago[aot] Emit gsharedvt wrappers only in llvmonly mode.
Zoltan Varga [Mon, 1 Feb 2016 19:28:40 +0000 (14:28 -0500)]
[aot] Emit gsharedvt wrappers only in llvmonly mode.

8 years ago[mcs] Filter out nested private types of forwarded types
Marek Safar [Mon, 1 Feb 2016 15:32:15 +0000 (16:32 +0100)]
[mcs] Filter out nested private types of forwarded types

8 years agoMerge pull request #2538 from ludovic-henry/fix-sgen-38012
monojenkins [Mon, 1 Feb 2016 13:16:41 +0000 (13:16 +0000)]
Merge pull request #2538 from ludovic-henry/fix-sgen-38012

[sgen] Fix register scanning on ARM

This bug would trigger a use after sweep in System.Threading.Tasks.Task.FinishContinuations:3621.

The issue would arise on ARM, as `MonoContext` and `ARCH_NUM_REGS` are defined as followed :

```
typedef struct {
  mgreg_t pc;
  mgreg_t regs [16];
  double fregs [16];
  mgreg_t cpsr;
} MonoContext;

\#define ARCH_NUM_REGS 14
```

As you can see, the MonoContext structure is bigger than 14 words, and it does not even covers the last 3 values of `regs`. By using pointer arithmetic, we ensure that we do not miss some parts of the `MonoContext` structure.

The observed behaviour in System.Threading.Tasks.Task.FinishContinuations would be that `continuationObject` would not be marked, and thus freed; `continuationObject` would still contains the pointer to the old location, meaning it wouldn't be null. We would then try to check its type via a call to the `as` operator. This would call the `isinst` IL opcode which would load `continuationObject->vtable->klass->supertypes [...]`, which would trigger a segfault, as `supertypes` would be null.

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

8 years agoMerge pull request #2541 from ludovic-henry/fix-coop-hang
monojenkins [Mon, 1 Feb 2016 12:55:11 +0000 (12:55 +0000)]
Merge pull request #2541 from ludovic-henry/fix-coop-hang

[coop] Fix hang in ves_icall_System_Net_Dns_GetHostByName_internal

8 years ago[binary-reference-assemblies] Install 4.5 api facades
Marek Safar [Mon, 1 Feb 2016 11:47:43 +0000 (12:47 +0100)]
[binary-reference-assemblies] Install 4.5 api facades

8 years ago[coop] Fix hang in ves_icall_System_Net_Dns_GetHostByName_internal
Ludovic Henry [Fri, 29 Jan 2016 19:45:45 +0000 (19:45 +0000)]
[coop] Fix hang in ves_icall_System_Net_Dns_GetHostByName_internal

8 years ago[llvm] Make mini-llvm-loader.c simpler by putting all the function pointers into...
Zoltan Varga [Mon, 1 Feb 2016 08:04:39 +0000 (03:04 -0500)]
[llvm] Make mini-llvm-loader.c simpler by putting all the function pointers into a structure.

8 years ago[amd64] Add support for float arguments/return values to the dyncall code.
Zoltan Varga [Mon, 1 Feb 2016 05:03:39 +0000 (00:03 -0500)]
[amd64] Add support for float arguments/return values to the dyncall code.

8 years agoMerge pull request #2547 from ermshiperete/Xamarin-33183
Zoltan Varga [Mon, 1 Feb 2016 04:06:31 +0000 (23:06 -0500)]
Merge pull request #2547 from ermshiperete/Xamarin-33183

[SWF] Fix behavior when scrollbar values change in TreeView

8 years ago[llvm] Remove the goto based error handling code, use explicit error checks and retur...
Zoltan Varga [Mon, 1 Feb 2016 02:55:01 +0000 (21:55 -0500)]
[llvm] Remove the goto based error handling code, use explicit error checks and returns instead.

8 years ago[msvc] Update order.xml and csproj files
Alexander Köplinger [Mon, 1 Feb 2016 00:57:36 +0000 (01:57 +0100)]
[msvc] Update order.xml and csproj files

8 years agoMerge pull request #2546 from ermshiperete/libtoolize
Alex Rønne Petersen [Sun, 31 Jan 2016 15:49:01 +0000 (16:49 +0100)]
Merge pull request #2546 from ermshiperete/libtoolize

Check for libtoolize rather than libtool

8 years ago[mcs] Stop after fields initializers resolve errors
Marek Safar [Sat, 30 Jan 2016 19:13:55 +0000 (20:13 +0100)]
[mcs] Stop after fields initializers resolve errors