João Matos [Sun, 1 Mar 2015 20:36:42 +0000 (20:36 +0000)]
Merge pull request #1514 from directhex/master
Workaround for X509Certificate.RSA throwing an unhandled exception
Zoltan Varga [Sun, 1 Mar 2015 05:47:02 +0000 (00:47 -0500)]
[jit] Move aot method loading to mono_jit_compile_method_with_opt ().
Zoltan Varga [Sun, 1 Mar 2015 05:17:38 +0000 (00:17 -0500)]
[jit] Remove some dead code/includes.
Zoltan Varga [Sun, 1 Mar 2015 05:03:07 +0000 (00:03 -0500)]
[runtime] Split mini.c into two files: mini.c contains the JIT code, while mini-runtime.c contains the runtime code, i.e. startup/shutdown, threading, tls, etc.
Zoltan Varga [Sun, 1 Mar 2015 03:56:31 +0000 (22:56 -0500)]
Fix a warning.
Zoltan Varga [Sun, 1 Mar 2015 01:56:52 +0000 (20:56 -0500)]
[build] Avoid changing System.Xml.Linq references to System.XML.Linq during parallel build dependency calculation.
Zoltan Varga [Sat, 28 Feb 2015 22:01:19 +0000 (17:01 -0500)]
[jit] Remove some dead code.
Zoltan Varga [Sat, 28 Feb 2015 21:19:26 +0000 (16:19 -0500)]
Merge pull request #1607 from davidmoore1/bug-27529
Bug 27529 Tool Tip appears behind menu
David Moore [Sat, 28 Feb 2015 16:00:05 +0000 (11:00 -0500)]
Bug 27529 Tool Tip appears behind menu
In certain cases, hovering over a ToolStripMenuItem
that has a tool tip defined will result in the tool
tip appearing behind, and hidden by, the context
menu containing the item. The change is to cause
the tool tip to be pushed to the front when it is
displayed.
Jo Shields [Mon, 19 Jan 2015 14:32:22 +0000 (14:32 +0000)]
Workaround for X509Certificate.RSA throwing an unhandled exception in ASN1 parsing of certificates with ECC public keys only.
Zoltan Varga [Sat, 28 Feb 2015 00:46:29 +0000 (19:46 -0500)]
[bcl] Enable parallel build for parts of the 4.5 class libs/tools.
Zoltan Varga [Fri, 27 Feb 2015 18:33:23 +0000 (13:33 -0500)]
[llvm] Increase the size of a parameter array which was too small for some arm64 calling conventions.
Marek Safar [Fri, 27 Feb 2015 18:08:33 +0000 (19:08 +0100)]
[Microsoft.Build.Engine] Update missing method exception type
Marek Safar [Fri, 27 Feb 2015 17:58:23 +0000 (18:58 +0100)]
[corlib] Throw correct exception for missing properties called via InvokeMember
João Matos [Fri, 27 Feb 2015 17:24:24 +0000 (17:24 +0000)]
Added "ld-flags" to pass extra linker flags to the AOT linker pipeline.
Rodrigo Kumpera [Fri, 27 Feb 2015 16:07:14 +0000 (11:07 -0500)]
Remove explicit support for 2.0, it will now use 4.5
Marek Safar [Fri, 27 Feb 2015 15:56:33 +0000 (16:56 +0100)]
[mcs] Better error reporting for wrong unexpected escaped characters. Fixes #27441
Zoltan Varga [Fri, 27 Feb 2015 15:41:07 +0000 (10:41 -0500)]
Merge pull request #1605 from iainx/cov-install-coverage-filter
Check the coverage hash exists before accessing it
iain holmes [Fri, 27 Feb 2015 15:25:59 +0000 (15:25 +0000)]
Check the coverage hash exists before accessing it
If a profiler has not installed a coverage filter, or the coverage filter has returned FALSE, then calls to mono_profiler_coverage_get trigger a assertion failed warning in g_hash_table_lookup.
Zoltan Varga [Fri, 27 Feb 2015 15:25:02 +0000 (10:25 -0500)]
Merge pull request #1604 from iainx/cov-install-coverage-filter
[cov] Install a coverage filter
Marek Safar [Fri, 27 Feb 2015 13:42:38 +0000 (14:42 +0100)]
[corlib] Implement Activator invocation on params constructor with conversion from object
Zoltan Varga [Fri, 27 Feb 2015 13:07:48 +0000 (08:07 -0500)]
Merge pull request #1603 from iainx/coverage-null-protect
Check for valid coverage info before dereferencing it.
iain holmes [Fri, 27 Feb 2015 12:35:40 +0000 (12:35 +0000)]
Check for valid coverage info before dereferencing it.
If a profiler had requested MONO_PROFILE_COVERAGE events and not installed a
coverage filter, then the coverage info is NULL and a crash quickly followed
Marek Safar [Fri, 27 Feb 2015 12:13:01 +0000 (13:13 +0100)]
Bump reference sources to fix #27492
Marek Safar [Fri, 27 Feb 2015 12:02:35 +0000 (13:02 +0100)]
[corlib] Add DefaultDllImportSearchPathsAttribute
Marek Safar [Fri, 27 Feb 2015 11:06:17 +0000 (12:06 +0100)]
[corlib] Binder from reference sources
Marek Safar [Fri, 27 Feb 2015 10:26:04 +0000 (11:26 +0100)]
[build] Use resource strings for library builds only
iain holmes [Fri, 27 Feb 2015 10:13:54 +0000 (10:13 +0000)]
[cov] Install a coverage filter
Zoltan Varga [Fri, 27 Feb 2015 04:30:35 +0000 (23:30 -0500)]
Zoltan Varga [Fri, 27 Feb 2015 03:27:27 +0000 (22:27 -0500)]
[build] Add dependency information for class libraries using a LIB_REFS variable which lists the assemblies a given assembly depends on to build.
Zoltan Varga [Thu, 26 Feb 2015 23:06:21 +0000 (18:06 -0500)]
[bcl] Remove some net 1.0 stuff from Makefiles.
Zoltan Varga [Thu, 26 Feb 2015 22:54:40 +0000 (17:54 -0500)]
Merge pull request #1602 from cdettmering/master
Fixing ToolStripManager.RevertMerge
Chad Dettmering [Thu, 26 Feb 2015 22:47:03 +0000 (17:47 -0500)]
Fixed up formatting to comply with Mono coding guidelines
Chad Dettmering [Thu, 26 Feb 2015 22:31:49 +0000 (17:31 -0500)]
Changed System.Windows.Forms.ToolStripManager.RevertMerge to return
false when given a null argument instead of throwing an exception.
According to the msdn here:
https://msdn.microsoft.com/en-us/library/b4e35dwy%28v=vs.110%29.aspx
this method should never throw an exception. This was also confirmed
with the official Microsoft runtime.
This change is released under the MIT license.
Zoltan Varga [Thu, 26 Feb 2015 19:56:57 +0000 (14:56 -0500)]
[jit] Disable direct calls to icalls when using llvm, llvm can't handle direct calls to 64 bit addresses (tests/jit-float.exe fails).
Rolf Bjarne Kvinge [Thu, 26 Feb 2015 18:57:51 +0000 (19:57 +0100)]
Ignore a few decimal tests on mobile, according to #27269
https://bugzilla.xamarin.com/show_bug.cgi?id=27269
Zoltan Varga [Thu, 26 Feb 2015 18:08:34 +0000 (13:08 -0500)]
[runtime] Use mono_set_pending_exception () in some places in icalls. Avoid using it for throwing exceptions returned by mono_thread_execute_interruption (), since that seems to cause problems.
Zoltan Varga [Thu, 26 Feb 2015 17:57:14 +0000 (12:57 -0500)]
[runtime] Disable the "bridge-implementation=tarjan,major=marksweep-conc|ms-conc-tarjan-bridge" sgen tests which currently fail.
Rolf Bjarne Kvinge [Thu, 26 Feb 2015 12:34:19 +0000 (13:34 +0100)]
Don't use _NSGetEnviron on arm64.
Rolf Bjarne Kvinge [Thu, 26 Feb 2015 10:32:54 +0000 (11:32 +0100)]
Restrict IOKit usage to desktop OSX.
IOKit is a private framework in iOS, so it can't be used (and
no headers are provided, so it doesn't even compile).
João Matos [Thu, 26 Feb 2015 12:04:44 +0000 (12:04 +0000)]
Fixed compilation on Linux targets without `linux/serial.h`.
/Users/builder/data/lanes/monodroid-mavericks-master/
7de6731a/source/mono/support/serial.c:25:26: fatal error: linux/serial.h: No such file or directory
#include <linux/serial.h>
The header is only available on Android NDK API level >= 21.
Zoltan Varga [Thu, 26 Feb 2015 00:49:27 +0000 (19:49 -0500)]
Merge pull request #1599 from StephenMcConnel/bug-26887-A
Prevent right click from triggering ToolStrip.OnItemClicked
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[sgen-bridge] Fix all the bridges after the change to have descriptor loading happen outside of scanning.
This changes all bridges to use the _safe variant of sgen_obj_get_descriptor. Bridge processing happens in
the post-scan world, before objects get untagged.
Stephen McConnel [Wed, 25 Feb 2015 23:00:30 +0000 (17:00 -0600)]
Prevent right click from triggering ToolStrip.OnItemClicked
This addresses https://bugzilla.xamarin.com/show_bug.cgi?id=26887
(along with a previous fix).
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
Fix my last commit to properly include the tarjan test suite.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
Add the tarjan bridge to the test matrix.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[sgen] Fix the sgen bridge test suite. Oh my.
Rodrigo Kumpera [Wed, 25 Feb 2015 22:39:59 +0000 (16:39 -0600)]
Merge pull request #1598 from mono/revert-1593-new_suspend
Revert "This introduces the new suspend machinery. Right now the unified...
Rodrigo Kumpera [Wed, 25 Feb 2015 22:39:26 +0000 (17:39 -0500)]
Revert "This introduces the new suspend machinery. Right now the unified STW is disabled for sgen."
Atsushi Eno [Wed, 25 Feb 2015 21:16:13 +0000 (05:16 +0800)]
bump referencesource.
Rodrigo Kumpera [Wed, 25 Feb 2015 21:01:28 +0000 (15:01 -0600)]
Merge pull request #1597 from akoeplinger/remove-ef
Remove EntityFramework from class libs
Zoltan Varga [Wed, 25 Feb 2015 20:45:17 +0000 (15:45 -0500)]
[runtime] Remove definitions of MONO_SHARED_DIR from scripts, its not needed anymore.
Alexander Köplinger [Tue, 24 Feb 2015 23:11:36 +0000 (00:11 +0100)]
Remove EntityFramework from class libs
We currently ship a horribly outdated version of EF. This is unnecessary since EF is on NuGet and has an active set of users using it on Unix.
Miguel gave his +1 on the mailing list already.
Rodrigo Kumpera [Wed, 25 Feb 2015 19:53:36 +0000 (13:53 -0600)]
Merge pull request #1593 from kumpera/new_suspend
This introduces the new suspend machinery. Right now the unified STW is disabled for sgen.
Zoltan Varga [Wed, 25 Feb 2015 19:48:40 +0000 (14:48 -0500)]
[jit] Make the opcode emulation jit icalls callable without a wrapper in some cases.
Miguel de Icaza [Wed, 25 Feb 2015 17:00:32 +0000 (12:00 -0500)]
[SslClientStream] Prevent crashes when a connection is closed
When a socket has been closed as part of the negotiation, the
SendAlert method would crash when trying to reuse the socket.
Add try/catch around this to prevent this.
Fixes #19334
Miguel de Icaza [Wed, 25 Feb 2015 15:32:00 +0000 (10:32 -0500)]
Merge pull request #1584 from zevane/patch-2
Limit the lock to the writing operation
Miguel de Icaza [Wed, 25 Feb 2015 15:27:43 +0000 (10:27 -0500)]
[Serial] Add support for high baud rates to MacOS
Miguel de Icaza [Wed, 25 Feb 2015 15:20:30 +0000 (10:20 -0500)]
[serial,signal] Add support for Linux arbitrary baud rates + drop Apple legacy poll support
This patch brings support for arbitrary baud rates in Linux, from patch:
https://bugzilla.xamarin.com/show_bug.cgi?id=8207
Which has been MIT licensed (see mono-devel-list).
In addition, while testing the patch, discovered that we are using
fakepoll.h on MacOS which was there to support Tiger-era broken poll
implementations.
The details about the lack of poll support come from this document
that is now only available on web.archive.org:
http://web.archive.org/web/
20030604064847/http://developer.apple.com/technotes/tn2002/tn2071.html
And the original Mono bug that reported the problem in 2008, followed
by the fixes is reported and discussed here:
https://bugzilla.novell.com/show_bug.cgi?id=384227
The source of the problem, confirmed by an Apple employee at the time
(form the bug) is that poll sometimes results in returning POLLHUP
when a POLLIN was expected:
http://curl.haxx.se/mail/lib-2005-05/0122.html
This web site tracks the behavior of poll (POLLHUP and POLLIN) across
Posix implementations when you reach an end of file:
http://www.greenend.org.uk/rjk/tech/poll.html
Marek Safar [Wed, 25 Feb 2015 11:28:47 +0000 (12:28 +0100)]
[system.net.http] Add another workaround for incompatible mono Uri handling. Fixes #27386
Marek Safar [Wed, 25 Feb 2015 07:44:21 +0000 (08:44 +0100)]
[System.Net.Http] Change relative uri test to not require internet access
Atsushi Eno [Wed, 25 Feb 2015 07:20:23 +0000 (15:20 +0800)]
remove replaced and unused Encoding code.
Atsushi Eno [Wed, 25 Feb 2015 07:14:53 +0000 (15:14 +0800)]
Merge pull request #1590 from atsushieno/import-diagnostics-trace
Import System.Diagnostics.Trace from referencesource
Atsushi Eno [Wed, 25 Feb 2015 07:13:27 +0000 (15:13 +0800)]
remove replaced System.Diagnostics.Trace family code.
Zoltan Varga [Tue, 24 Feb 2015 23:20:41 +0000 (18:20 -0500)]
Revert "[runtime] Use mono_set_pending_exception () in some places in icalls."
This reverts commit
d0d0d29320d5e433136eff90bdc527848d64eef7.
Revert this as it caused too many test failures.
Atsushi Eno [Tue, 24 Feb 2015 23:18:34 +0000 (07:18 +0800)]
[xml] add missing CONFIGURATION_DEP
Zoltan Varga [Tue, 24 Feb 2015 23:07:15 +0000 (18:07 -0500)]
[runtime] Declare ICALL_EXPORT as MONO_API so it works with -fvisibility=hidden.
Zoltan Varga [Tue, 24 Feb 2015 22:26:23 +0000 (17:26 -0500)]
Fix a warning.
Zoltan Varga [Tue, 24 Feb 2015 22:26:15 +0000 (17:26 -0500)]
[runtime] Remove some dead definitions.
Marek Safar [Tue, 24 Feb 2015 23:03:49 +0000 (00:03 +0100)]
[Mono.XBuild.Tasks] Fixes versioning with newer than 4.0 special msbuild profiles
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
bump master version of mono.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[threading] Rework suspend code to be based on a state machine and eliminate known races in the process.
The new suspend machinery is based around a single word state machine that is manipulated using CAS.
This solves the first set of problems with the current approach, the lack of atomicity and the impossibility of
doing race free manipulation of protected state. This is specially acute when doing a self suspend.
Suspend data must be atomically protected while we prepare to self suspend so a resume request won't race with the current
thread putting itself to sleep. This is a classical problem that calls for a mutex/conditional variable pair. Except that all
locks in the suspend path must be suspend safe. Wait, WHAT?
A Suspend Safe Lock is a primitive that is obstruction free in the face of the kernel suspending a thread either performing a
lock operation or waiting on a lock to become available. This, unfortunately, is not possible with pthread_mutex on OSX. The
only safe primitive are kernel semaphores, for which doesn't exist conditional variables for.
So back to locking and self-suspend. We need a lock because the existing thread state is not atomic but we can't use a
mutex/condvar pair so we're left with racy code. Yay! The fix is using CAS over a single variable.
Another change was the hardening of the suspend/resume code on posix targets. First we replace a semaphore wait with
sigsuspend for async suspend. This is needed since sem_wait is not async-signal safe (yet sem_post is). Second, we now
respect interruption requests by having a pair of suspend signals, one with SA_RESTART and one without.
Onto the design of the suspension system, a few concepts that are useful looking around.
* Self suspend: This is when the thread decides to suspend itself.
* Async suspend: This is when a thread decides to suspend another thread.
* Suspend Initiator: This the name of a thread that decided to suspend one or more other threads. This is important
since all suspending threads will notify it when they are suspended. There can be only one initiator in the system
at a given time.
* Suspension count: Number of resume calls before a thread is back to running state.
There are 7 states that can happen while a thread is runnable:
* Running: just running...
* (Async|Self) Suspended: Suspended, the difference comes into play when resuming.
* (Async|Self) Suspend Requested: Suspend requested, but not completed. See more below for the discussion on why the request state is needed.
* Suspend In Progress: Self suspend started saving its state thus async suspend should not modify it.
* Suspend Promoted to Async: Async tried to suspend a thread in the middle of a self suspend, it wants to be notified.
Now to the suspension protocol and how it happens on a high level view.
Suspension starts with a suspend request, which bumps the suspend count by one. This suspend request can be fulfilled either
by an async or self suspend action. This is confusing as there's only one initiator but any number of threads can be self suspending.
Async suspend then performs a platform specific action such as posix signals that forces a transition on the target. In the case
of self suspend, it depends on the thread polling its state and trigger the transition.
This works fine except that the suspend state is one huge struct with tons of fields. To control concurrent access to it we use a
single initiator in the case of async suspend and we put the thread in a transitional "saving my state" in the case of self suspend.
In the case of async suspend, the initiator must wait for all 1+ threads to notify back that they have suspended. Only after that
it's possible to know if the async suspend request actually worked or not (we might have hit a dying thread).
Together with this, there's an optional implementation of STW in sgen that can use this new machinery. To enable it set the
MONO_ENABLE_UNIFIED_SUSPEND env var for now while it gets more testing.
Zoltan Varga [Tue, 24 Feb 2015 21:42:01 +0000 (16:42 -0500)]
[runtime] Use mono_set_pending_exception () in some places in icalls.
Rodrigo Kumpera [Tue, 24 Feb 2015 20:41:16 +0000 (14:41 -0600)]
Merge pull request #1591 from akoeplinger/remove-npgsql
Remove Npgsql from class libs
Alexis Christoforides [Tue, 24 Feb 2015 20:21:24 +0000 (12:21 -0800)]
[Decimal] Fix C89 compliance in decimal-ms.c
Marek Safar [Tue, 24 Feb 2015 19:29:34 +0000 (20:29 +0100)]
[facades] Add missing System.ServiceModel.Primitives forwarders to MT profile. Fixes #27338
Marek Safar [Tue, 24 Feb 2015 19:15:27 +0000 (20:15 +0100)]
[corlib] Use HGlobalUnmanagedMemoryStream directly from MonoTouch timezoneinfo
Alexander Köplinger [Tue, 24 Feb 2015 00:40:45 +0000 (01:40 +0100)]
Remove Npgsql from class libs
This has been requested by the maintainers of Npgsql a few times already (https://bugzilla.xamarin.com/show_bug.cgi?id=23119) and we should do it for Mono 4.0.
Miguel gave his +1 on the mailing list already.
João Matos [Tue, 24 Feb 2015 18:45:20 +0000 (18:45 +0000)]
[runtime] Upgraded Jay MSVC project to VS 2013.
João Matos [Tue, 24 Feb 2015 18:43:46 +0000 (18:43 +0000)]
[runtime] Fixed the MSVC build.
Even though this seems like it's just moving the files around in the project, for some reason it makes a difference to VS.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[sgen] Introduce SgenThreadInfo::suspend_done.
This variable must be set to all threads that have been properly suspended. This is
an initial step to simplify suspend state and use explicitly named variables instead
of hiding state in stopped_ip / stopped_domain.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
Add suspend done everywhere else.
Atsushi Eno [Tue, 24 Feb 2015 17:23:35 +0000 (01:23 +0800)]
Bring back DefaultTraceListener because it already works better for mono.
Atsushi Eno [Tue, 24 Feb 2015 16:54:38 +0000 (00:54 +0800)]
import System.Diagnostics.Trace etc. from referencesource.
Atsushi Eno [Tue, 24 Feb 2015 16:04:49 +0000 (00:04 +0800)]
bump referencesource to include System.Diagnostics changes.
Marek Safar [Tue, 24 Feb 2015 15:54:21 +0000 (16:54 +0100)]
[system.net.http] Accept header with multiple values. Fixes #27352
Rodrigo Kumpera [Tue, 24 Feb 2015 15:02:24 +0000 (09:02 -0600)]
Merge pull request #1587 from kumpera/cleanup_threading
This is a small cleanup of the threading API.
Marek Safar [Tue, 24 Feb 2015 09:33:45 +0000 (10:33 +0100)]
[corlib] BinaryWriter/BinaryReader from reference sources
Marek Safar [Tue, 24 Feb 2015 09:28:35 +0000 (10:28 +0100)]
[corlib] UnmanagedMemoryStream from reference sources
Atsushi Eno [Tue, 24 Feb 2015 04:56:17 +0000 (12:56 +0800)]
bump referencesource (more BIGENDIAN fixes for UnicodeEncoding).
Zoltan Varga [Tue, 24 Feb 2015 01:41:30 +0000 (20:41 -0500)]
[runtime] Fix the non-msvc build.
Zoltan Varga [Tue, 24 Feb 2015 01:05:40 +0000 (20:05 -0500)]
[runtime] Mark mono_set_pending_exception () as a cold function, so calling code is generated out-of-line.
Zoltan Varga [Tue, 24 Feb 2015 01:05:05 +0000 (20:05 -0500)]
[jit] Use mono_set_pending_exception () instead of throwing exceptions in JIT icalls.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[threading] Don't suspend a thread running out of its thread bounds.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[threading] compute thread boulds on thread registration.
Zoltan Varga [Mon, 23 Feb 2015 21:52:36 +0000 (16:52 -0500)]
[runtime] Disable some dyncall/gsharedvt fullaot tests on amd64.
Zoltan Varga [Mon, 23 Feb 2015 21:08:39 +0000 (16:08 -0500)]
[bcl] Fix Console support on ios, the TextWriter class from the reference sources called TextWriter:Write(char), so stdout was never flushed.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[threading] When checking if a thread is in a critical region, ask the GC too.
MonoThreads was previously ignoring sgen's in_critical_region, which could lead
to a thread suspended inside a gc critical region leading to the GC not been able
to STW.
Rodrigo Kumpera [Mon, 2 Feb 2015 16:04:37 +0000 (11:04 -0500)]
[threading] Introduce mono_thread_info_is_live and move all thread state testing to inside MonoThread.
Zoltan Varga [Mon, 23 Feb 2015 19:19:02 +0000 (14:19 -0500)]
[jit] Make mono_thread_interruption_checkpoint () return the exception which needs to be thrown and throw it from the managed method/wrapper which called it.