mono.git
8 years agoMerge pull request #2820 from kumpera/license-change-rebased
Zoltan Varga [Thu, 31 Mar 2016 17:18:26 +0000 (13:18 -0400)]
Merge pull request #2820 from kumpera/license-change-rebased

Change license and publish xamarin mono extensions

8 years agoUpdate COPYING.LIB
Rodrigo Kumpera [Thu, 31 Mar 2016 16:18:04 +0000 (09:18 -0700)]
Update COPYING.LIB

8 years ago[utils] Fix the build.
Rodrigo Kumpera [Thu, 31 Mar 2016 16:12:22 +0000 (09:12 -0700)]
[utils] Fix the build.

8 years agoMerge pull request #2394 from Mailaender/patch-1
monojenkins [Thu, 31 Mar 2016 16:05:56 +0000 (17:05 +0100)]
Merge pull request #2394 from Mailaender/patch-1

Fixed runtime dependency on libgdiplus with developer soname

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

8 years agoUpdate trademark
hannakim123 [Wed, 30 Mar 2016 22:15:37 +0000 (15:15 -0700)]
Update trademark

8 years agoMerge pull request #1 from xamarin/hannakim123-patch-1
Miguel de Icaza [Thu, 31 Mar 2016 01:24:09 +0000 (18:24 -0700)]
Merge pull request #1 from xamarin/hannakim123-patch-1

Update for CLA

8 years agoMerge pull request #2807 from akoeplinger/gchandle
Alexander Köplinger [Wed, 30 Mar 2016 22:36:57 +0000 (00:36 +0200)]
Merge pull request #2807 from akoeplinger/gchandle

[corlib] Two small fixes for GCHandle

8 years agoMerge pull request #2786 from alexanderkyte/leaked_type_in_parse_header
monojenkins [Wed, 30 Mar 2016 21:11:01 +0000 (22:11 +0100)]
Merge pull request #2786 from alexanderkyte/leaked_type_in_parse_header

[runtime] Free leaked short-lived MonoType

8 years agoMerge pull request #2799 from BrzVlad/fix-conc-card-clean
Vlad Brezae [Wed, 30 Mar 2016 19:54:57 +0000 (02:54 +0700)]
Merge pull request #2799 from BrzVlad/fix-conc-card-clean

[sgen] Fix concurrent card clean

8 years agoMerge pull request #2808 from lambdageek/dev/monoerror-security-core-clr
monojenkins [Wed, 30 Mar 2016 19:25:17 +0000 (20:25 +0100)]
Merge pull request #2808 from lambdageek/dev/monoerror-security-core-clr

[security-core-clr] Use MonoError outarg instead of mono_raise_exception

8 years agoMerge pull request #2812 from madewokherd/threadpool-ms-rand
Zoltan Varga [Wed, 30 Mar 2016 19:13:02 +0000 (15:13 -0400)]
Merge pull request #2812 from madewokherd/threadpool-ms-rand

[threadpool-ms] Fix incorrect use of mono_rand.

8 years ago[threadpool-ms] Fix incorrect use of mono_rand.
Vincent Povirk [Wed, 30 Mar 2016 16:16:12 +0000 (11:16 -0500)]
[threadpool-ms] Fix incorrect use of mono_rand.

This takes a pointer to an RNG handle, not the handle itself.

8 years agoMerge pull request #2698 from esdrubal/iosxmlarray
Marcos Henrich [Wed, 30 Mar 2016 10:57:56 +0000 (11:57 +0100)]
Merge pull request #2698 from esdrubal/iosxmlarray

[System.Runtime.Serialization] Static writer fix.

8 years agoMerge pull request #2763 from esdrubal/mono-symbolicate-standalone2
Marcos Henrich [Wed, 30 Mar 2016 07:55:15 +0000 (08:55 +0100)]
Merge pull request #2763 from esdrubal/mono-symbolicate-standalone2

Mono-symbolicate standalone

8 years agoMerge pull request #2787 from esdrubal/endpointaddress10
Marcos Henrich [Wed, 30 Mar 2016 07:37:40 +0000 (08:37 +0100)]
Merge pull request #2787 from esdrubal/endpointaddress10

[System.ServiceModel] Fixes reflection call to undefined method

8 years agoMerge pull request #2781 from alexanderkyte/inflated_method_header_leak
Rodrigo Kumpera [Wed, 30 Mar 2016 00:15:24 +0000 (17:15 -0700)]
Merge pull request #2781 from alexanderkyte/inflated_method_header_leak

[runtime] Fix leaking of inflated method headers

8 years agoUpdate CONTRIBUTING.md
hannakim123 [Tue, 29 Mar 2016 23:07:39 +0000 (16:07 -0700)]
Update CONTRIBUTING.md

8 years ago[security-core-clr] Add MonoError arg to
Aleksey Kliger [Tue, 29 Mar 2016 20:23:19 +0000 (16:23 -0400)]
[security-core-clr] Add MonoError arg to
mono_security_core_clr_ensure_delegate_creation

8 years ago[security-core-clr] Add MonoError arg to mono_security_core_clr_ensure_reflection_acc...
Aleksey Kliger [Tue, 29 Mar 2016 19:58:12 +0000 (15:58 -0400)]
[security-core-clr] Add MonoError arg to mono_security_core_clr_ensure_reflection_access_method

8 years ago[security-core-clr] Add MonoError to mono_security_core_clr_ensure_reflection_access_...
Aleksey Kliger [Tue, 29 Mar 2016 19:43:45 +0000 (15:43 -0400)]
[security-core-clr] Add MonoError to mono_security_core_clr_ensure_reflection_access_field

8 years agoMerge pull request #1718 from madewokherd/sgenthreadcleanup
monojenkins [Tue, 29 Mar 2016 20:01:05 +0000 (21:01 +0100)]
Merge pull request #1718 from madewokherd/sgenthreadcleanup

[sgen] Clean up thread pool on shutdown.

Keeping threads around can cause processes to keep running when they shouldn't, particularly on Windows when the entry point returns.

(The reason this is important for me is that Wine provides _CorExeMain, which is an entry point that does return, unlike normal compiled C programs which appear to call exit() after main() returns. A Windows process doesn't exit until ALL threads have exited, so a thread that never exits means a hung process.)

It doesn't seem like we have other GC-specific cleanup code, so I don't know if this is a good approach. Feedback on that question would be appreciated.

8 years ago[tests] Force tests to print thread dumps when they time out.
Zoltan Varga [Tue, 29 Mar 2016 18:32:00 +0000 (14:32 -0400)]
[tests] Force tests to print thread dumps when they time out.

8 years agoMerge pull request #2801 from BrzVlad/feature-conc-cementing
Vlad Brezae [Tue, 29 Mar 2016 17:45:10 +0000 (00:45 +0700)]
Merge pull request #2801 from BrzVlad/feature-conc-cementing

[sgen] Cementing for the finishing pause

8 years ago[corlib] Remove local variables inadvertently overriding class variables.
Rolf Bjarne Kvinge [Tue, 29 Mar 2016 17:04:58 +0000 (19:04 +0200)]
[corlib] Remove local variables inadvertently overriding class variables.

8 years ago[corlib] Add Console.[Input|Output]Encoding to the mobile profiles.
Rolf Bjarne Kvinge [Tue, 29 Mar 2016 16:24:19 +0000 (18:24 +0200)]
[corlib] Add Console.[Input|Output]Encoding to the mobile profiles.

8 years agoMerge pull request #2794 from xmcclure/win-aot-basic
monojenkins [Tue, 29 Mar 2016 16:31:13 +0000 (17:31 +0100)]
Merge pull request #2794 from xmcclure/win-aot-basic

Make AOT compilation on 64 bit windows produce executables

This PR contains three commits (see commit descriptions) which:

- Fix 64-bit debug windows builds in MSVC 2015
- Make it possible to use the tool-prefix aot option with mono/mini make fullaotcheck (necessary if you are in cygwin and wish to invoke `x86_64-w64-mingw32-gcc`)
- Change mini so that `--aot=full` successfully emits 64-bit windows executables.

Building 32 bit executables will generally fail because we do not follow cdecl. The 64 bit executables do not run properly when executed.

8 years agoMerge pull request #2767 from lambdageek/dev/monoerror-mono_lookup_dynamic_token
monojenkins [Tue, 29 Mar 2016 15:15:20 +0000 (16:15 +0100)]
Merge pull request #2767 from lambdageek/dev/monoerror-mono_lookup_dynamic_token

[runtime] MonoError-ize mono_loookup_dynamic_token{,_class}

Push `MonoError` through `mono_lookup_dynamic_token_class` and `mono_lookup_dynamic_token`

Also simplify the implementations of those functions so that they call `mono_reflection_lookup_dynamic_token` directly, rather than via a function pointer.  The old implementation was a holdover from when the runtime was implemented as separate libraries.

8 years ago[runtime] Use mono_object_isinst_checked for ppc and ia64
Alexander Köplinger [Tue, 29 Mar 2016 13:02:20 +0000 (15:02 +0200)]
[runtime] Use mono_object_isinst_checked for ppc and ia64

The usages were only partially changed in the move from mono_object_isinst in fbe121079035450251d4169b71b64196c9f5657c and caused build errors.

8 years agoBump referencesource
Marek Safar [Tue, 29 Mar 2016 11:24:32 +0000 (13:24 +0200)]
Bump referencesource

8 years ago[System.Runtime.Serialization] Static writer fix.
Marcos Henrich [Mon, 29 Feb 2016 19:10:55 +0000 (19:10 +0000)]
[System.Runtime.Serialization] Static writer fix.

While serializing any type into a contract member of type object an
exception would be thrown.

To avoid this XmlObjectSerializerWriteContext.InternalSerialize should
in this case be called using the object type instead of the member type,
similar how reference sources does in  type instead of the member type,
 referencesources seems to be doing omething similar [1].

Fixes #37116.

[1]
http://referencesource.microsoft.com/#System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs,619

8 years agoMerge pull request #896 from echampet/webresource
Marek Safar [Tue, 29 Mar 2016 07:33:39 +0000 (09:33 +0200)]
Merge pull request #896 from echampet/webresource

[Fix] ReusableHashAlgorithm doesn't set the Key of the ValidationAlgorit...

8 years ago[sgen] Clear the card table in the finishing pause
Vlad Brezae [Wed, 23 Mar 2016 17:17:03 +0000 (19:17 +0200)]
[sgen] Clear the card table in the finishing pause

It is not used during a major collection. The collector will add the necessary global remsets afterwards, for the nursery collections.

8 years ago[bcl] Avoid printing debug messages to stdout in the default trace listener when...
Zoltan Varga [Tue, 29 Mar 2016 01:46:23 +0000 (21:46 -0400)]
[bcl] Avoid printing debug messages to stdout in the default trace listener when a debugger is connected. Fixes #13538.

8 years ago[amd64] Avoid passing the pc/pc offset to the throw corlib exception trampoline in...
Zoltan Varga [Tue, 29 Mar 2016 00:44:40 +0000 (20:44 -0400)]
[amd64] Avoid passing the pc/pc offset to the throw corlib exception trampoline in llvm mode, instead simply use the return address pushed by the call itself. In JIT mode, this is needed because the throw code is generated out of line so its not inside the try range, but in llvm mode, the try-range encompasses the call.

8 years agoUpdate LICENSE including GPL
Miguel de Icaza [Tue, 29 Mar 2016 00:09:53 +0000 (17:09 -0700)]
Update LICENSE including GPL

8 years agoMove all licenses to a single LICENSE file
Miguel de Icaza [Fri, 25 Mar 2016 19:03:54 +0000 (15:03 -0400)]
Move all licenses to a single LICENSE file

8 years agoNo more LGPL requirements
Miguel de Icaza [Fri, 25 Mar 2016 18:28:47 +0000 (14:28 -0400)]
No more LGPL requirements

8 years agoAdded PATENTS.TXT file and link to it
Miguel de Icaza [Wed, 23 Mar 2016 18:46:38 +0000 (14:46 -0400)]
Added PATENTS.TXT file and link to it

8 years agoUpdate LICENSE
Miguel de Icaza [Wed, 23 Mar 2016 18:25:59 +0000 (14:25 -0400)]
Update LICENSE

8 years agoFirst set of licensing changes
Miguel de Icaza [Wed, 23 Mar 2016 15:12:01 +0000 (11:12 -0400)]
First set of licensing changes

8 years ago[System] Add new 'Mono.Security.Interface.MonoTlsProviderFactory' callback to let...
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 12:41:13 +0000 (13:41 +0100)]
[System] Add new 'Mono.Security.Interface.MonoTlsProviderFactory' callback to let the framework libraries select the provider at runtime.

List of original contributors:

Martin Baulig <martin.baulig@xamarin.com>

8 years agoExtend HttpClient to use infrastructure in Xamarin.Mac (via reflection) to pick right...
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 12:29:33 +0000 (13:29 +0100)]
Extend HttpClient to use infrastructure in Xamarin.Mac (via reflection) to pick right type.

List of original contributors:

Chris Hamons <chris.hamons@xamarin.com>

8 years ago[corlib] Add partial EncodingHelper type to let XI define its own default encoding...
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 12:21:18 +0000 (13:21 +0100)]
[corlib] Add partial EncodingHelper type to let XI define its own default encoding [#29928]

List of original contributors:

Sebastien Pouliot <sebastien@xamarin.com>

8 years ago[corlib] New lazily initialized X509Certificate.
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 11:54:29 +0000 (12:54 +0100)]
[corlib] New lazily initialized X509Certificate.

List of original contributors:

Martin Baulig <martin.baulig@xamarin.com>

8 years ago[corlib] Add a special method for XI so the linker does not always have to generate it.
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 11:47:21 +0000 (12:47 +0100)]
[corlib] Add a special method for XI so the linker does not always have to generate it.

List of original contributors:

Sebastien Pouliot <sebastien@xamarin.com>

8 years ago[corlib] Add back System/Guid.MonoTouch.cs implementation.
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 11:45:16 +0000 (12:45 +0100)]
[corlib] Add back System/Guid.MonoTouch.cs implementation.

This is a partial reversal of 82a1747f (for this file only).

8 years ago[corlib] Add iOS specific code for System.Environment.
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 11:41:50 +0000 (12:41 +0100)]
[corlib] Add iOS specific code for System.Environment.

List of original contributors:

Sebastien Pouliot <sebastien@xamarin.com>
Rolf Bjarne Kvinge <rolf@xamarin.com>

8 years ago[bcl] Add CommonCrypto to corlib, Mono.Security and System.Core.
Rolf Bjarne Kvinge [Tue, 15 Mar 2016 11:01:48 +0000 (12:01 +0100)]
[bcl] Add CommonCrypto to corlib, Mono.Security and System.Core.

List of original contributors:

Sebastien Pouliot <sebastien@xamarin.com>
Rolf Bjarne Kvinge <rolf@xamarin.com>
Marek Safar <marek.safar@gmail.com>
Miguel de Icaza <miguel@gnome.org>

8 years ago[jit] Add native-types and enable them by default. Missing test suite.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[jit] Add native-types and enable them by default. Missing test suite.

List of original contributors:

Zoltan Varga <vargaz@gmail.com>
Rodrigo Kumpera <kumpera@gmail.com>

8 years ago[jit] Pass the type token index instead of the full type token to the throw corlib...
Zoltan Varga [Mon, 28 Mar 2016 22:33:53 +0000 (18:33 -0400)]
[jit] Pass the type token index instead of the full type token to the throw corlib exceptions functions on most platforms to reduce the size of the generated code.

8 years ago[jit] Add arm64 backend and gsharedvt code.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[jit] Add arm64 backend and gsharedvt code.

List of original contributors:

Zoltan Varga <vargaz@gmail.com>
Rodrigo Kumpera <kumpera@gmail.com>
Andi McClure <andi.mcclure@xamarin.com>
Vlad Brezae <brezaevlad@gmail.com>
Joao Matos <joao@tritao.eu>
Alex Rønne Petersen <alexrp@xamarin.com>

8 years ago[mini] Add x86 gsharedvt.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[mini] Add x86 gsharedvt.

List of original contributors:

Zoltan Varga <vargaz@gmail.com>
Joao Matos <joao@tritao.eu>

8 years ago[jit] Implement gsharedvt on arm.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[jit] Implement gsharedvt on arm.

List of original contributors:

Zoltan Varga <vargaz@gmail.com>
Joao Matos <joao@tritao.eu>

8 years ago[runtime] Move gsharedvt to public plus amd64 implementation.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Move gsharedvt to public plus amd64 implementation.

List of original contributors:

Zoltan Varga <vargaz@gmail.com>
Rodrigo Kumpera <kumpera@gmail.com>
Andi McClure <andi.mcclure@xamarin.com>

8 years ago[mini] Try to use libcorkscrew or libunwind on Android when crashing.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[mini] Try to use libcorkscrew or libunwind on Android when crashing.

List of original contributors:

Alex Rønne Petersen <alexrp@xamarin.com>

8 years agoMerge pull request #2798 from BrzVlad/fix-sgen-timestamp
monojenkins [Mon, 28 Mar 2016 20:12:07 +0000 (21:12 +0100)]
Merge pull request #2798 from BrzVlad/fix-sgen-timestamp

[sgen] Fix sgen binary protocol timestamp

TV_ELAPSED was cast to long instead of gint64, overflowing on some platforms.

8 years ago[bcl] Avoid 'sed: net_4_x_System.ServiceModel_test.dll.excludes: No such file or...
Zoltan Varga [Mon, 28 Mar 2016 20:02:05 +0000 (16:02 -0400)]
[bcl] Avoid 'sed: net_4_x_System.ServiceModel_test.dll.excludes: No such file or directory' warnings during the build.

8 years ago[arm] In the llvm throw corlib exception trampoline, use the normal caller ip instead...
Zoltan Varga [Mon, 28 Mar 2016 19:50:35 +0000 (15:50 -0400)]
[arm] In the llvm throw corlib exception trampoline, use the normal caller ip instead of the argument passed in by the caller since that might not point directly to the call instruction. Fixes #39420.

8 years ago[runtime] Add runtime support for explicit offset files.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add runtime support for explicit offset files.

Explicit offset files are provided by configuring mono with --with-cross-offsets

List of original contributors:

Joao Matos <joao@tritao.eu>
Zoltan Varga <vargaz@gmail.com>
Rolf Bjarne Kvinge <rolf@xamarin.com>
Rodrigo Kumpera <kumpera@gmail.com>

8 years ago[runtime] Add cross helpers that both check offsets and produce headers.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add cross helpers that both check offsets and produce headers.

List of original contributors:

Rodrigo Kumpera <kumpera@gmail.com>
Zoltan Varga <vargaz@gmail.com>

8 years ago[utils] Workarounds for 64bits atomics on mobile.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[utils] Workarounds for 64bits atomics on mobile.

List of original contributors:

Rodrigo Kumpera <kumpera@gmail.com>
Alex Rønne Petersen <alexrp@xamarin.com>
Zoltan Varga <vargaz@gmail.com>
Rolf Bjarne Kvinge <rolf@xamarin.com>

8 years ago[utils] Fix name clash on dlmalloc on x86 android devices. Fixes #13957
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[utils] Fix name clash on dlmalloc on x86 android devices. Fixes #13957

Android uses dlmalloc within bionic. For some reason, our x86 build
links against the libc implementation instead of our own.

This leads us allocating memory that is not executable which made
dynamic methods fail when executing.

List of original contributors:

Rodrigo Kumpera <kumpera@gmail.com>

8 years ago[runtime] Make an argument name more descriptive.
Zoltan Varga [Mon, 28 Mar 2016 19:48:01 +0000 (15:48 -0400)]
[runtime] Make an argument name more descriptive.

8 years ago[android] Add fallback for thread bounds calculation for Android.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[android] Add fallback for thread bounds calculation for Android.

On some junk Samsung x86 device, pthread_attr_getstack is completely broken.

If the returned value is not sane, we parse /proc/self/maps to find the right
memory regions for the current stack.

Fixes BXC #21550 and DESK #83333.

List of original contributors:

Rodrigo Kumpera <kumpera@gmail.com>

8 years agoMerge pull request #2797 from kumpera/android_krait_bug
Rodrigo Kumpera [Mon, 28 Mar 2016 19:08:43 +0000 (12:08 -0700)]
Merge pull request #2797 from kumpera/android_krait_bug

[android] Fix Krait CPU bug on Android.

8 years agoMerge pull request #2785 from alexanderkyte/cached_info_leak
monojenkins [Mon, 28 Mar 2016 18:56:03 +0000 (19:56 +0100)]
Merge pull request #2785 from alexanderkyte/cached_info_leak

[runtime] Free cached_info tables on cleanup

8 years ago[corlib] Two small fixes for GCHandle
Alexander Köplinger [Mon, 28 Mar 2016 17:59:06 +0000 (19:59 +0200)]
[corlib] Two small fixes for GCHandle

1) Free() throws on MS.NET when the handle was already freed, copied and adapted the referencesource implementation.

2) Explicit conversion from IntPtr to GCHandle throws InvalidOperationException when value is IntPtr.Zero on MS.NET, not ArgumentException.

This fixes two failing CoreCLR test cases.

8 years ago[sgen] Cement objects for the finishing pause
Vlad Brezae [Tue, 9 Feb 2016 09:29:56 +0000 (11:29 +0200)]
[sgen] Cement objects for the finishing pause

With the concurrent collector, we used to reset cementing at the start of the finishing pause (we can uncement since we process all the remsets when the world is stopped, through the mod union entries). This processing means cardtable scan in the finishing pause. In order to reduce pause time and overhead, we extend cementing for the finishing pause. Now we don't uncement objects (during sgen_cement_reset) that are still pinned in the roots at the start of the concurrent collection. We won't mark mod_union entries for these objects and they will survive the collection in the nursery. They can become uncemented at the start of the next major collection, given that they are no longer pinned in the roots.

8 years ago[sgen] Don't scan the roots on the worker
Vlad Brezae [Tue, 9 Feb 2016 09:31:04 +0000 (11:31 +0200)]
[sgen] Don't scan the roots on the worker

We used to enqueue the jobs on the worker only for us to wait for them to finish in the same pause.

8 years ago[runtime] MonoError-ize mono_lookup_dynamic_token
Aleksey Kliger [Wed, 16 Mar 2016 00:24:12 +0000 (17:24 -0700)]
[runtime] MonoError-ize mono_lookup_dynamic_token

8 years ago[runtime] MonoError-ize mono_lookup_dynamic_token_class
Aleksey Kliger [Wed, 16 Mar 2016 00:03:35 +0000 (17:03 -0700)]
[runtime] MonoError-ize mono_lookup_dynamic_token_class

It just calls mono_reflection_lookup_dynamic_token directly.

8 years ago[runtime] Remove MonoLookupDynamicToken indirection
Aleksey Kliger [Tue, 15 Mar 2016 23:14:07 +0000 (16:14 -0700)]
[runtime] Remove MonoLookupDynamicToken indirection

Call mono_reflection_lookup_dynamic_token directly from
mono_lookup_dynamic_token.

Delete mono_install_lookup_dynamic_token () and the
MonoLookupDynamicToken typedef.

8 years ago[reflection] MonoError-ize mono_reflection_lookup_dynamic_token
Aleksey Kliger [Tue, 15 Mar 2016 22:46:43 +0000 (15:46 -0700)]
[reflection] MonoError-ize mono_reflection_lookup_dynamic_token

Since it gets installed as a callback, update the MonoLookupDynamicToken typedef.

8 years ago[SRE] Fix compile warning in encode_cattr_value
Aleksey Kliger [Mon, 28 Mar 2016 16:30:16 +0000 (12:30 -0400)]
[SRE] Fix compile warning in encode_cattr_value

Landed mono_object_isinst_checked PR in a way that broke encode_cattr_value.

8 years ago[sgen] Fix sgen binary protocol timestamp
Vlad Brezae [Fri, 18 Mar 2016 09:05:14 +0000 (16:05 +0700)]
[sgen] Fix sgen binary protocol timestamp

TV_ELAPSED was cast to long instead of gint64, overflowing on some platforms.

8 years agoMerge pull request #2621 from BrzVlad/feature-conc-preclean
Vlad Brezae [Mon, 28 Mar 2016 16:26:08 +0000 (23:26 +0700)]
Merge pull request #2621 from BrzVlad/feature-conc-preclean

[sgen] Concurrent precleaning of card table

8 years agoMerge pull request #2795 from lambdageek/dev/marshal-no-raise
Aleksey Kliger (λgeek) [Mon, 28 Mar 2016 15:27:36 +0000 (11:27 -0400)]
Merge pull request #2795 from lambdageek/dev/marshal-no-raise

[marshal] Don't raise an exception, just assert

8 years agoMerge pull request #2770 from lambdageek/dev/monoerror-object_isinst_mbyref
monojenkins [Mon, 28 Mar 2016 14:45:22 +0000 (15:45 +0100)]
Merge pull request #2770 from lambdageek/dev/monoerror-object_isinst_mbyref

[runtime] MonoError-ize mono_object_isinst{,_mbyref}

Also mark them external only.  Runtime should use mono_object_isinst_mbyref_checked and mono_object_isinst_checked

8 years ago[aot] Emit a .subsections_via_symbols directive on arm.
Zoltan Varga [Fri, 25 Mar 2016 22:35:10 +0000 (18:35 -0400)]
[aot] Emit a .subsections_via_symbols directive on arm.

8 years ago[aot] Fix a memory leak.
Zoltan Varga [Sun, 27 Mar 2016 22:49:57 +0000 (18:49 -0400)]
[aot] Fix a memory leak.

8 years ago[runtime] Avoid setting klass->instance_size if its already set, this can happen...
Zoltan Varga [Sun, 27 Mar 2016 22:43:29 +0000 (18:43 -0400)]
[runtime] Avoid setting klass->instance_size if its already set, this can happen when loading cached class info from an AOT image. This could lead to random crashes/asserts since klass->instance_size is directly modified while it is computed.

8 years ago[runtime] Fix a memory leak in ves_icall_Type_GetNestedTypes ().
Zoltan Varga [Sun, 27 Mar 2016 22:41:11 +0000 (18:41 -0400)]
[runtime] Fix a memory leak in ves_icall_Type_GetNestedTypes ().

8 years agoMerge pull request #2779 from akoeplinger/fix-socket-closed
Alexander Köplinger [Sun, 27 Mar 2016 15:33:48 +0000 (17:33 +0200)]
Merge pull request #2779 from akoeplinger/fix-socket-closed

[System] Use Monitor.Wait/Pulse in SafeSocketHandle instead of Thread.Sleep

8 years ago[System] Use Monitor.Wait/Pulse in SafeSocketHandle instead of Thread.Sleep
Alexander Köplinger [Mon, 21 Mar 2016 15:27:19 +0000 (16:27 +0100)]
[System] Use Monitor.Wait/Pulse in SafeSocketHandle instead of Thread.Sleep

We are quite frequently seeing an error on the ARM workers on Jenkins:

```
Test Case Failures:
1) MonoTests.System.Net.Sockets.SocketTest.SendAsyncFile : System.Exception : Could not abort registered blocking threads before closing socket.
at System.Net.Sockets.SafeSocketHandle.ReleaseHandle () [0x000be] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs:77
at System.Runtime.InteropServices.SafeHandle.DangerousReleaseInternal (Boolean dispose) <0x42cb0050 + 0x0020b> in <filename unknown>:0
at System.Runtime.InteropServices.SafeHandle.InternalDispose () <0x446ba758 + 0x00023> in <filename unknown>:0
at System.Runtime.InteropServices.SafeHandle.Dispose (Boolean disposing) [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/runtime/remoting/callcontext.cs:804
at System.Runtime.InteropServices.SafeHandle.Dispose () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/runtime/remoting/callcontext.cs:795
at System.Net.Sockets.Socket.Dispose (Boolean disposing) [0x00047] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/Socket.cs:3321
at System.Net.Sockets.Socket.Dispose () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/Socket.cs:3327
at System.Net.Sockets.Socket.Close () [0x00007] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/Socket.cs:3256
at MonoTests.System.Net.Sockets.SocketTest.SendAsyncFile () [0x000e7] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs:4331
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003d] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs:103
```

Let's see if implementing the suggestion from https://github.com/mono/mono/pull/1612/files#r26393224
fixes this. I couldn't reproduce the test failure even on the same ARM machine so this is a bit of
an opportunistic change, but it feels like the more "correct" solution anyway.

I decided to inline AbortRegisteredThreads as at the only place we're calling it we already know
blocking_threads can't be null and acquired the lock.

8 years agoMerge pull request #2789 from lambdageek/dev/monoerror-threading
monojenkins [Sat, 26 Mar 2016 01:41:10 +0000 (01:41 +0000)]
Merge pull request #2789 from lambdageek/dev/monoerror-threading

[threadpool-ms] MonoError-ize

1. Convert icalls that throw `NotImplementedException` to do it via mono_error_set_pending_exception
2. Add MonoError outargs to `mono_threadpool_ms_enqueue_work_item` and `mono_threadpool_ms_begin_invoke`

8 years ago[runtime] MonoError-ize mono_object_isinst
Aleksey Kliger [Thu, 17 Mar 2016 21:41:20 +0000 (14:41 -0700)]
[runtime] MonoError-ize mono_object_isinst

Mark it external only. Runtime should use mono_object_isinst_checked.

8 years ago[threadpool-ms] MonoError-ize mono_threadpool_ms_begin_invoke
Aleksey Kliger [Wed, 23 Mar 2016 18:06:01 +0000 (14:06 -0400)]
[threadpool-ms] MonoError-ize mono_threadpool_ms_begin_invoke

8 years agoMerge pull request #2748 from lambdageek/dev/monoerror-mono_value_box
monojenkins [Fri, 25 Mar 2016 20:55:38 +0000 (20:55 +0000)]
Merge pull request #2748 from lambdageek/dev/monoerror-mono_value_box

[runtime] Make mono_value_box use MonoError

Mark it external only.  Runtime should use mono_value_box_checked.

8 years ago[runtime] MonoError-ize mono_object_isinst_mbyref
Aleksey Kliger [Wed, 16 Mar 2016 23:42:30 +0000 (16:42 -0700)]
[runtime] MonoError-ize mono_object_isinst_mbyref

Also mark it external only.  Runtime should use mono_object_isinst_mbyref_checked

8 years ago[MonoError] change mono_error_set_pending_exception to return a bool
Aleksey Kliger [Fri, 25 Mar 2016 19:23:19 +0000 (15:23 -0400)]
[MonoError] change mono_error_set_pending_exception to return a bool

Return TRUE if pending exception was set, FALSE otherwise.

The idea is that you can write:
  if (mono_error_set_pending_exception (error)) {
    /* cleanup */
    return;
  }

8 years ago[android] Fix Krait CPU bug on Android.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[android] Fix Krait CPU bug on Android.

Krait cpus don't ignore thumb ITT state in ARM mode (it's unspecified CPU behavior).
The linux kernel then didn't bother resetting that state when landing an ARM signal handler.

The end result was that Krait cpus would skip the first few instructions of the signal handler
and things would explode in the most amazing possible ways.

Patch by Mark Probst <mark.probst@gmail.com>.

8 years ago[marshal] Don't raise an exception, just assert
Aleksey Kliger [Fri, 25 Mar 2016 17:29:03 +0000 (13:29 -0400)]
[marshal] Don't raise an exception, just assert

Don't raise deep in the marshalling code, just assert.

(Raising means we'd have to convert the code to use MonoError and then
thread it out through all of the marshalling code resulting in a lot of
code churn)

8 years ago[runtime] MonoError-ize mono_nullable_box
Aleksey Kliger [Thu, 10 Mar 2016 19:23:43 +0000 (14:23 -0500)]
[runtime] MonoError-ize mono_nullable_box

8 years ago[runtime] Make mono_value_box use MonoError
Aleksey Kliger [Thu, 10 Mar 2016 15:35:04 +0000 (10:35 -0500)]
[runtime] Make mono_value_box use MonoError

Mark it external only.  Runtime should use mono_value_box_checked.

8 years ago[threadpool-ms] MonoError-ize mono_threadpool_ms_enqueue_work_item
Aleksey Kliger [Wed, 23 Mar 2016 16:56:01 +0000 (12:56 -0400)]
[threadpool-ms] MonoError-ize mono_threadpool_ms_enqueue_work_item

Take a MonoError outarg; return boolean on success/failure.

8 years ago[threadpool-ms] MonoError-ize some not implemented icalls.
Aleksey Kliger [Wed, 23 Mar 2016 16:49:51 +0000 (12:49 -0400)]
[threadpool-ms] MonoError-ize some not implemented icalls.

1. ves_icall_System_Threading_ThreadPool_ReportThreadStatus
2. ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus

8 years agoMerge pull request #2791 from lambdageek/dev/monoerror-cleanup-deadcode
Aleksey Kliger (λgeek) [Fri, 25 Mar 2016 15:33:37 +0000 (11:33 -0400)]
Merge pull request #2791 from lambdageek/dev/monoerror-cleanup-deadcode

[runtime] Remove dead code and don't throw in embedding API functions

8 years ago[sgen] Add option for enabling/disabling precleaning
Vlad Brezae [Tue, 8 Mar 2016 02:41:20 +0000 (04:41 +0200)]
[sgen] Add option for enabling/disabling precleaning

8 years ago[sgen] Preclean mod union entries before the finishing pause
Vlad Brezae [Tue, 19 Jan 2016 09:21:39 +0000 (11:21 +0200)]
[sgen] Preclean mod union entries before the finishing pause

When the concurrent mark ends, we have another concurrent phase where we scan the cardtable trying to clean as many cards as possible. The way we achieve this is by first copying all the mod union cards (for each block/los_obj) to a separate temporary card_table. When scanning we will only scan these cards. Therefore we will first preclean these cards in the actual mod_union card_tables, followed by a full memory barrier (which assures us that, when scanning, we will observe the changes that led to the corresponding card marks) and then by a normal mod_union scan, which can remark some of these cards, without any races with the preclean phase.

8 years ago[sgen] Move assert to the right place
Vlad Brezae [Tue, 8 Mar 2016 02:42:41 +0000 (04:42 +0200)]
[sgen] Move assert to the right place