mono.git
8 years agoMerge pull request #2948 from ludovic-henry/coop-n2m-eh-callback
Ludovic Henry [Thu, 5 May 2016 19:18:44 +0000 (15:18 -0400)]
Merge pull request #2948 from ludovic-henry/coop-n2m-eh-callback

[marshal] Add EH callback for native-to-managed wrapper

8 years agoMerge pull request #2965 from lambdageek/dev/checked-pinvoke3
Aleksey Kliger (λgeek) [Thu, 5 May 2016 17:18:47 +0000 (13:18 -0400)]
Merge pull request #2965 from lambdageek/dev/checked-pinvoke3

[coop] Allow BLOCKING->DETACHED transition

8 years agoFix the cross compiler build.
Zoltan Varga [Thu, 5 May 2016 17:10:41 +0000 (13:10 -0400)]
Fix the cross compiler build.

8 years agoMerge pull request #2964 from ludovic-henry/sgen-monocontext
Ludovic Henry [Thu, 5 May 2016 12:46:12 +0000 (08:46 -0400)]
Merge pull request #2964 from ludovic-henry/sgen-monocontext

[MonoContext] Migrate remaining architectures + [sgen] Kill USE_MONO_CTX and ARCH_NUM_REGS

8 years agoMerge pull request #2966 from marek-safar/oid
Marek Safar [Thu, 5 May 2016 07:15:14 +0000 (09:15 +0200)]
Merge pull request #2966 from marek-safar/oid

[System] Oid from referencesource

8 years ago[corlib]: Try to convert the certificate from PEM to DER in X509Helper.Import().
Martin Baulig [Thu, 5 May 2016 00:02:50 +0000 (20:02 -0400)]
[corlib]: Try to convert the certificate from PEM to DER in X509Helper.Import().

8 years agoMerge pull request #2928 from alexrp/master
Alex Rønne Petersen [Wed, 4 May 2016 22:52:19 +0000 (00:52 +0200)]
Merge pull request #2928 from alexrp/master

[profiler] Fix profiler compilation under bitcode.

8 years ago[System] Oid from referencesource. Fixes #40646 and other incompabilities
Marek Safar [Wed, 4 May 2016 21:59:22 +0000 (23:59 +0200)]
[System] Oid from referencesource. Fixes #40646 and other incompabilities

8 years agoMerge pull request #2955 from ludovic-henry/mono_msec_ticks-overflow
Ludovic Henry [Wed, 4 May 2016 20:01:16 +0000 (16:01 -0400)]
Merge pull request #2955 from ludovic-henry/mono_msec_ticks-overflow

[runtime] Fix potential overflow when using mono_msec_ticks

8 years ago[coop] Allow BLOCKING->DETACHED transition.
Aleksey Kliger [Wed, 4 May 2016 14:41:44 +0000 (10:41 -0400)]
[coop] Allow BLOCKING->DETACHED transition.

On coop, an OS thread can go
STARTING->BLOCKING->RUNNING->BLOCKING->DETACHED.

For ordinary managed threads BLOCKING->DETACHED is still a bug like
before, but hopefully the checked build machinery will help us to catch
those situations.

8 years ago[checked] Use correct reset blocking cookie when attaching OS threads
Aleksey Kliger [Wed, 4 May 2016 14:15:05 +0000 (10:15 -0400)]
[checked] Use correct reset blocking cookie when attaching OS threads

When checked build is running with GC checking, it uses a non-zero
integer cookie instead of the thread info pointer.

This fixes pinvoke3.cs test_43_thread_attach() in checked coop builds.

8 years ago[marshal] Add EH callback for native-to-managed wrapper
Ludovic Henry [Mon, 25 Apr 2016 13:42:26 +0000 (09:42 -0400)]
[marshal] Add EH callback for native-to-managed wrapper

This is going to be used by Xamarin.iOS to convert a managed exception to an Obj-C exception. We need this as if we don't do that, the managed exception mechanism will unwind native stack, which can lead to undefined behavior. By converting to an Obj-C exception, we let the native exception mechanism do what it's supposed to do.

8 years ago[marhsal] Always generate try { ... } finally { ... } in native-to-managed wrapper
Ludovic Henry [Mon, 25 Apr 2016 13:33:24 +0000 (09:33 -0400)]
[marhsal] Always generate try { ... } finally { ... } in native-to-managed wrapper

8 years ago[corlib] Update locale tables. Fixes #40697
Marek Safar [Wed, 4 May 2016 11:22:30 +0000 (13:22 +0200)]
[corlib] Update locale tables. Fixes #40697

8 years agoMerge pull request #2962 from marek-safar/referencesource-submodule-move
Marek Safar [Wed, 4 May 2016 06:16:55 +0000 (08:16 +0200)]
Merge pull request #2962 from marek-safar/referencesource-submodule-move

Submodule referencesource removal

8 years ago[aot] Emit EmptyArray<enum>:.cctor () instances since mcs now generates accesses...
Zoltan Varga [Tue, 3 May 2016 21:37:51 +0000 (17:37 -0400)]
[aot] Emit EmptyArray<enum>:.cctor () instances since mcs now generates accesses to EmptyArray<enum>.Value for new enum[0] expressions.

8 years ago[sgen] Kill USE_MONO_CTX and ARCH_NUM_REGS
Ludovic Henry [Tue, 3 May 2016 21:28:59 +0000 (17:28 -0400)]
[sgen] Kill USE_MONO_CTX and ARCH_NUM_REGS

8 years ago[MonoContext] Make cross compiler a specific case
Ludovic Henry [Tue, 3 May 2016 20:57:35 +0000 (16:57 -0400)]
[MonoContext] Make cross compiler a specific case

8 years ago[sgen] Make Sparc use MonoContext
Ludovic Henry [Tue, 3 May 2016 20:56:19 +0000 (16:56 -0400)]
[sgen] Make Sparc use MonoContext

8 years ago[sgen] Make PowerPC use MonoContext
Ludovic Henry [Tue, 3 May 2016 20:42:59 +0000 (16:42 -0400)]
[sgen] Make PowerPC use MonoContext

8 years ago[runtime] Fix potential overflow when using mono_msec_ticks
Ludovic Henry [Fri, 4 Mar 2016 11:37:38 +0000 (11:37 +0000)]
[runtime] Fix potential overflow when using mono_msec_ticks

Because mono_msec_ticks would previously return the number of milliseconds since boot time, it would overflow after ~49 days. That would mean that anywhere you would use it, you would need to be careful of arithmetic overflow.

By simply returning a gint64 we will not overflow before ~30k years.

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

8 years agoRemove referencesource submodule and move sources to mcs/class/referencesource
Marek Safar [Tue, 3 May 2016 10:52:11 +0000 (12:52 +0200)]
Remove referencesource submodule and move sources to mcs/class/referencesource

This simplified PR workflow and makes branching easier

8 years agoUpdate after merge conflicts
Marek Safar [Tue, 3 May 2016 10:49:05 +0000 (12:49 +0200)]
Update after merge conflicts

8 years agoUnify error handling added in fdebd8a4d709002bb499555c35e1dfd3834e2f4f
Marek Safar [Mon, 2 May 2016 14:50:04 +0000 (16:50 +0200)]
Unify error handling added in fdebd8a4d709002bb499555c35e1dfd3834e2f4f

8 years agoRaise an UnauthorizedAccessException on FileInfo.Delete with a directory
Alexander Köplinger [Mon, 25 Apr 2016 15:30:52 +0000 (11:30 -0400)]
Raise an UnauthorizedAccessException on FileInfo.Delete with a directory

When FileInfo was imported in https://github.com/mono/mono/commit/bdd0de7ee52d9675dada0d19985b9daf4edab5bc the check in Delete()
got removed that raised an UnauthorizedAccessException when the FileInfo object holds a path to a directory instead of a file.

It happened to pass the MonoTests.System.IO.FileInfoTest.Delete_Directory test on OSX because unlink returns EPERM there
which got turned into the expected UnauthorizedAccessException, but on Linux it returns EISDIR so the test would fail.

Fix is to put the explicit check for directory back.

8 years agoMono friendly FileInfo
Marek Safar [Fri, 22 Apr 2016 15:09:32 +0000 (17:09 +0200)]
Mono friendly FileInfo

8 years agoMono friendly FileSystemInfo
Marek Safar [Fri, 22 Apr 2016 08:07:33 +0000 (10:07 +0200)]
Mono friendly FileSystemInfo

8 years agoFix WaitHandle.Wait{One,Any,All} when runtime returns WAIT_FAILED
Ludovic Henry [Fri, 15 Apr 2016 15:37:35 +0000 (17:37 +0200)]
Fix WaitHandle.Wait{One,Any,All} when runtime returns WAIT_FAILED

In case the runtime would fail to wait on the wait handle(s), we would still return true, as if the WaitHandle was successfully signaled.

8 years agoRemove MONO_X509_ALIAS
Marek Safar [Sat, 16 Apr 2016 06:53:32 +0000 (08:53 +0200)]
Remove MONO_X509_ALIAS

8 years agoRe-apply compatibility fix from 42504b8af5a0bf7f012e6c40668659ca45fd4e22, it was...
Alexis Christoforides [Thu, 14 Apr 2016 19:30:40 +0000 (15:30 -0400)]
Re-apply compatibility fix from 42504b8af5a0bf7f012e6c40668659ca45fd4e22, it was eaten up by the .NET 4.6 merge. Fixes #38712

8 years agoFix HasExited for non-child process
Ludovic Henry [Thu, 14 Apr 2016 09:48:11 +0000 (11:48 +0200)]
Fix HasExited for non-child process

NativeMethods.GetExitCodeProcess would inherently be broken on Unix platforms for non-child processes as it can't succesfully get the exit code. This would in turn break Process.HasExited, which should not break, as it is possible to check if a non-child process is alive or dead.

8 years agoAdapt System.Exception to be usable by Mono
Andi McClure [Wed, 13 Apr 2016 22:32:44 +0000 (18:32 -0400)]
Adapt System.Exception to be usable by Mono

8 years agoSymbolType in reflection only profiles
Marek Safar [Tue, 12 Apr 2016 14:06:53 +0000 (16:06 +0200)]
SymbolType in reflection only profiles

8 years agoMono friendly SymbolType
Marek Safar [Tue, 12 Apr 2016 12:45:04 +0000 (14:45 +0200)]
Mono friendly SymbolType

8 years agoBetter error message for missing codeset assembly
Marek Safar [Tue, 12 Apr 2016 09:28:22 +0000 (11:28 +0200)]
Better error message for missing codeset assembly

8 years agoFixes hardcoded Windows path in Serialization compiler
Marek Safar [Tue, 5 Apr 2016 13:53:44 +0000 (15:53 +0200)]
Fixes hardcoded Windows path in Serialization compiler

8 years agoMore DISABLE_CAS_USE tweaks
Marek Safar [Tue, 29 Mar 2016 11:13:43 +0000 (13:13 +0200)]
More DISABLE_CAS_USE tweaks

8 years agoAdd CSC_SDK_PATH_DISABLED workaround
Marek Safar [Thu, 17 Mar 2016 09:21:54 +0000 (10:21 +0100)]
Add CSC_SDK_PATH_DISABLED workaround

8 years agoMono friendly RuntimeEnvironment
Marek Safar [Wed, 16 Mar 2016 09:42:58 +0000 (10:42 +0100)]
Mono friendly RuntimeEnvironment

8 years agoAdd feature option to build without System.Runtime.Serialization
Marek Safar [Tue, 15 Mar 2016 12:51:18 +0000 (13:51 +0100)]
Add feature option to build without System.Runtime.Serialization

8 years agoReplace string resource key names with local constants
Marek Safar [Fri, 4 Mar 2016 12:38:25 +0000 (13:38 +0100)]
Replace string resource key names with local constants

8 years agoImport System.Threading.WaitHandle
Ludovic Henry [Mon, 15 Feb 2016 19:26:33 +0000 (19:26 +0000)]
Import System.Threading.WaitHandle

8 years agoRemove Marshal.GetHRForLastWin32Error call from Diagnostics.Process
Andi McClure [Wed, 17 Feb 2016 15:38:50 +0000 (10:38 -0500)]
Remove Marshal.GetHRForLastWin32Error call from Diagnostics.Process

GetHRForLastWin32Error breaks the build on AOT, and even on non-AOT is unimplemented.

8 years agoRevert "[mscorlib] Undo part 3d0e1b71993dd236db78290852a62e9ed3218216 of which breaks...
Ludovic Henry [Tue, 16 Feb 2016 14:26:53 +0000 (14:26 +0000)]
Revert "[mscorlib] Undo part 3d0e1b71993dd236db78290852a62e9ed3218216 of which breaks build"

This reverts commit 0cb499950a7ae61c62c433c8cce353d535dbd09e.

8 years agoUndo part 3d0e1b71993dd236db78290852a62e9ed3218216 of which breaks build
Marek Safar [Mon, 15 Feb 2016 19:22:22 +0000 (20:22 +0100)]
Undo part 3d0e1b71993dd236db78290852a62e9ed3218216 of which breaks build

8 years agoMono friendly MethodInfo
Marek Safar [Mon, 15 Feb 2016 17:13:37 +0000 (18:13 +0100)]
Mono friendly MethodInfo

8 years agoImport System.Diagnostics.Process
Ludovic Henry [Mon, 8 Feb 2016 18:42:45 +0000 (18:42 +0000)]
Import System.Diagnostics.Process

8 years agoDisable AppContextDefaults
Marek Safar [Tue, 9 Feb 2016 10:33:31 +0000 (11:33 +0100)]
Disable AppContextDefaults

8 years agofixing display of asmx help page (#37137)
Timotheus Pokorra [Mon, 8 Feb 2016 20:55:36 +0000 (21:55 +0100)]
fixing display of asmx help page (#37137)

if MONO_BROKEN_CONFIGURATION_DLL is defined, make sure that actualPath always gets set

8 years agoUnix paths fix
Marcos Henrich [Sat, 30 Jan 2016 11:55:17 +0000 (11:55 +0000)]
Unix paths fix

DiscoveryClientProtocol.GetRelativePath was harcoded to use '\\'.

Fixes #36116

8 years agoOnly use patched AesManaged on MONOTOUCH
Alexander Kyte [Wed, 20 Jan 2016 17:19:49 +0000 (12:19 -0500)]
Only use patched AesManaged on MONOTOUCH

8 years agoFixes a race in CancellationTokenSource with no logic change. Fixes #32768
Marek Safar [Fri, 15 Jan 2016 14:18:06 +0000 (15:18 +0100)]
Fixes a race in CancellationTokenSource with no logic change. Fixes #32768

It's not easy to trigger but following repro works fairly reliably

using System;
using System.Threading;

class MainClass
{
public static void Main (string [] args)
{
var r = new Random ();
for (int i = 0, total = 10000000; i < total; ++i) {
if (i % 50 == 0)
Console.WriteLine ("{0}/{1}", i, total);

var c1 = new CancellationTokenSource ();
var wh = c1.Token.WaitHandle;
GC.Collect ();
c1.CancelAfter (r.Next(5));
c1.Dispose ();
}
}
}

It crashes like

Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ManualResetEvent'.
  at System.Threading.WaitHandle.CheckDisposed () <0x1f95be0 + 0x0005c> in <filename unknown>:0
  at System.Threading.EventWaitHandle.Set () <0x1f8d320 + 0x0007d> in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
  at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) <0x1d92c70 + 0x00084> in <filename unknown>:0
  at System.Threading.CancellationTokenSource.Cancel (Boolean throwOnFirstException) <0x1d92330 + 0x00030> in <filename unknown>:0
  at System.Threading.CancellationTokenSource.Cancel () <0x1d92300 + 0x00025> in <filename unknown>:0
  at System.Threading.CancellationTokenSource.TimerCallbackLogic (System.Object obj) <0x1d925c0 + 0x0005d> in <filename unknown>:0

8 years agoCompute InvariantCaseInsensitiveHashCode without any culture data initialization...
Marek Safar [Thu, 14 Jan 2016 13:37:27 +0000 (14:37 +0100)]
Compute InvariantCaseInsensitiveHashCode without any culture data initialization. Fixes #37583

8 years agoAdd support for intercepting threadpool work.
Rolf Bjarne Kvinge [Fri, 8 Jan 2016 18:49:06 +0000 (19:49 +0100)]
Add support for intercepting threadpool work.

This is used to Xamarin.iOS to wrap threadpool work in an NSAutoreleasePool.

8 years agoAdd feature define for multiple appdomains.
Rolf Bjarne Kvinge [Wed, 16 Dec 2015 18:16:31 +0000 (19:16 +0100)]
Add feature define for multiple appdomains.

8 years agoRemove WindowsBase type forwarders from mobile profile
Marek Safar [Mon, 4 Jan 2016 13:53:39 +0000 (14:53 +0100)]
Remove WindowsBase type forwarders from mobile profile

8 years agoRevert "[System] Mono friendly QEncodedStream"
Alexander Köplinger [Thu, 24 Dec 2015 12:21:36 +0000 (13:21 +0100)]
Revert "[System] Mono friendly QEncodedStream"

This reverts commit 5a7abfc46054c02fabde6398b7514a0fcff06cb7.

The code should be added to Mono's Uri instead.

8 years agoAdd a few MONO comments for System.Net.Sockets
Alexander Köplinger [Thu, 24 Dec 2015 02:24:12 +0000 (03:24 +0100)]
Add a few MONO comments for System.Net.Sockets

8 years agoMono friendly QEncodedStream
Alexander Köplinger [Thu, 24 Dec 2015 00:25:25 +0000 (01:25 +0100)]
Mono friendly QEncodedStream

Mono's Uri class doesn't have IsAsciiLetter, so we need to copy the MS implementation into QEncodedStream.

8 years agoFix invariant text info hashcode builder. Fixes #36786
Marek Safar [Mon, 14 Dec 2015 12:27:08 +0000 (13:27 +0100)]
Fix invariant text info hashcode builder. Fixes #36786

8 years agoCannot use regex fallback as its implementations is incompatible
Marek Safar [Mon, 7 Dec 2015 08:17:13 +0000 (09:17 +0100)]
Cannot use regex fallback as its implementations is incompatible

8 years agoDisable regex fallback on Mono
Marek Safar [Fri, 4 Dec 2015 22:24:49 +0000 (17:24 -0500)]
Disable regex fallback on Mono

8 years agoUpdate Reference Sources to .NET Framework 4.6.1
dotnet-bot [Fri, 4 Dec 2015 19:31:10 +0000 (11:31 -0800)]
Update Reference Sources to .NET Framework 4.6.1

8 years agoMono exception to SocketException
Marek Safar [Thu, 3 Dec 2015 19:11:54 +0000 (14:11 -0500)]
Mono exception to SocketException

8 years agoRemove a workaround for a JIT limitation which doesn't exist any more.
Zoltan Varga [Thu, 3 Dec 2015 02:59:22 +0000 (21:59 -0500)]
Remove a workaround for a JIT limitation which doesn't exist any more.

8 years agoDisable use of Win32 specific p/invokes when built for the mobile profile
Sebastien Pouliot [Fri, 27 Nov 2015 21:23:28 +0000 (16:23 -0500)]
Disable use of Win32 specific p/invokes when built for the mobile profile

8 years agoDo not include a win32-p/invoke call (RegCloseKey) for the mobile profile
Sebastien Pouliot [Thu, 26 Nov 2015 16:21:47 +0000 (11:21 -0500)]
Do not include a win32-p/invoke call (RegCloseKey) for the mobile profile

8 years agoUse DISABLE_CAS_USE to remove the use of several *Permission calls (forcibly removed...
Sebastien Pouliot [Wed, 25 Nov 2015 22:08:21 +0000 (17:08 -0500)]
Use DISABLE_CAS_USE to remove the use of several *Permission calls (forcibly removed by the linker on XI) [#36255]

8 years agoPort the DateTime parser fix from the Desktop
Tarek Mahmoud Sayed [Wed, 12 Aug 2015 19:50:14 +0000 (12:50 -0700)]
Port the DateTime parser fix from the Desktop

This change is fixing the DateTime parser in cases of date/time strings for cultures which has the date and time separators are same. This happen with Norway, Serbia and Finland cultures

[tfs-changeset: 1513801]

8 years agoBring from CoreFX the f813aa2e9a5d927d121d6bdca467e10e9a6e0c9b fix for Asin and Acos
Miguel de Icaza [Thu, 19 Nov 2015 14:09:57 +0000 (09:09 -0500)]
Bring from CoreFX the f813aa2e9a5d927d121d6bdca467e10e9a6e0c9b fix for Asin and Acos

8 years agoThread.Interrupt is not dependent on MONO_FEATURE_THREAD_SUSPEND_RESUME.
Rolf Bjarne Kvinge [Wed, 18 Nov 2015 13:11:48 +0000 (14:11 +0100)]
Thread.Interrupt is not dependent on MONO_FEATURE_THREAD_SUSPEND_RESUME.

8 years agoMake Thread.Abort and Thread.Suspend/Resume configurable features.
Rolf Bjarne Kvinge [Tue, 6 Oct 2015 11:31:54 +0000 (13:31 +0200)]
Make Thread.Abort and Thread.Suspend/Resume configurable features.

8 years agoAdd legacy mobile api to synchronizationcontext
Marek Safar [Fri, 13 Nov 2015 08:26:01 +0000 (09:26 +0100)]
Add legacy mobile api to synchronizationcontext

8 years agoMono friendly StringUtil
Marek Safar [Tue, 10 Nov 2015 15:32:14 +0000 (16:32 +0100)]
Mono friendly StringUtil

8 years agoTweaks for mobile profile
Marek Safar [Tue, 20 Oct 2015 12:51:52 +0000 (14:51 +0200)]
Tweaks for mobile profile

8 years agoAttempt to fix the build.
Martin Baulig [Mon, 19 Oct 2015 17:49:13 +0000 (13:49 -0400)]
Attempt to fix the build.

8 years agoMake it more obvious that Reference Source is read-only
Immo Landwerth [Sat, 17 Oct 2015 16:18:01 +0000 (09:18 -0700)]
Make it more obvious that Reference Source is read-only

8 years agoFixes com api
Marek Safar [Sat, 17 Oct 2015 07:11:39 +0000 (09:11 +0200)]
Fixes com api

8 years agoDisable optimized comparer for byte, ushort enums
Marek Safar [Fri, 16 Oct 2015 22:09:03 +0000 (00:09 +0200)]
Disable optimized comparer for byte, ushort enums

8 years agoDisable encryption column certificate error message
Marek Safar [Fri, 16 Oct 2015 21:16:38 +0000 (23:16 +0200)]
Disable encryption column certificate error message

8 years agoMore tweaks to mscorlib updates
Marek Safar [Fri, 16 Oct 2015 18:43:00 +0000 (20:43 +0200)]
More tweaks to mscorlib updates

8 years agoMake updated mscorlib mono friendly
Marek Safar [Fri, 16 Oct 2015 15:52:58 +0000 (17:52 +0200)]
Make updated mscorlib mono friendly

8 years agoRevert "[corlib] Fix dispose race condition in CancellationTokenSource"
Marek Safar [Fri, 16 Oct 2015 15:37:44 +0000 (17:37 +0200)]
Revert "[corlib] Fix dispose race condition in CancellationTokenSource"

This reverts commit 5f5ac0a87b65941f5377a1ba06614d22281b015f.

8 years agoUpdate Reference Sources to .NET Framework 4.6
dotnet-bot [Thu, 15 Oct 2015 21:43:47 +0000 (14:43 -0700)]
Update Reference Sources to .NET Framework 4.6

8 years agoDateTime, DateTimeOffset, bring Unix time APIs from CoreCLR
Miguel de Icaza [Wed, 14 Oct 2015 03:03:43 +0000 (23:03 -0400)]
DateTime, DateTimeOffset, bring Unix time APIs from CoreCLR

8 years agoChange Page_Error resource key to workaround collision with Page_Error method name
Marek Safar [Mon, 5 Oct 2015 14:00:18 +0000 (16:00 +0200)]
Change Page_Error resource key to workaround collision with Page_Error method name

8 years agoFix dispose race condition in CancellationTokenSource
Ludovic Henry [Tue, 29 Sep 2015 11:46:31 +0000 (12:46 +0100)]
Fix dispose race condition in CancellationTokenSource

The race condition would manifest in the following code:

```
for (int i = 0, total = 100000; i < total; ++i) {
if (i % 50 == 0)
Console.WriteLine ("{0}/{1}", i, total);

var c1 = new CancellationTokenSource ();
var wh = c1.Token.WaitHandle;
c1.CancelAfter (1);
Thread.Sleep (1);
c1.Dispose ();
}
```

And we would observe the following exception:
```
Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ManualResetEvent'.
 at System.Threading.WaitHandle.CheckDisposed () [0x00016] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:426
 at System.Threading.EventWaitHandle.Set () [0x0000c] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/EventWaitHandle.cs:205
 at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
 at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) [0x00051] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:723
 at System.Threading.CancellationTokenSource.Cancel (Boolean throwOnFirstException) [0x00006] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:409
 at System.Threading.CancellationTokenSource.Cancel () <0x7d75ada8 + 0x00017> in <filename unknown>:0
 at System.Threading.CancellationTokenSource.TimerCallbackLogic (System.Object obj) [0x00012] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:538
```

This would be a race condition between the TimerCallbackLogic call to Cancel and the call to Dispose on another thread. You could trigger it more reliably by putting a Thread.Sleep at CancellationTokenSource.cs:599.

8 years agoSslState.AsyncResumeHandshake(): Fix resumption of pending handshake.
Martin Baulig [Wed, 15 Jul 2015 04:06:01 +0000 (06:06 +0200)]
SslState.AsyncResumeHandshake(): Fix resumption of pending handshake.

(cherry picked from commit 8f3cae56e1586ff9709ca78e1b3000da5860d132)

(cherry picked from commit a56d585fa65efcb7ef734dcd40248a4872e424a5)

8 years agoUse optimized qword path in System.String::EqualsHelper () on 64-bit.
Alex Rønne Petersen [Tue, 1 Sep 2015 19:39:58 +0000 (21:39 +0200)]
Use optimized qword path in System.String::EqualsHelper () on 64-bit.

8 years agoAdd BE support for Doubles, missed from 41a6d3d6a5432b964b6f8439b6375ffad6f2e6cb
Lennart Sorensen [Tue, 1 Sep 2015 10:28:20 +0000 (11:28 +0100)]
Add BE support for Doubles, missed from 41a6d3d6a5432b964b6f8439b6375ffad6f2e6cb

8 years agoMono friendly WebUtility
Marek Safar [Mon, 31 Aug 2015 11:29:01 +0000 (13:29 +0200)]
Mono friendly WebUtility

8 years agoAdjust to updated StackTrace
Marek Safar [Fri, 21 Aug 2015 19:00:57 +0000 (21:00 +0200)]
Adjust to updated StackTrace

8 years agoRemove unused using
Marek Safar [Wed, 22 Jul 2015 15:17:06 +0000 (17:17 +0200)]
Remove unused using

8 years agoAdd mono tweaks
Marek Safar [Thu, 16 Jul 2015 15:02:38 +0000 (17:02 +0200)]
Add mono tweaks

8 years agoFix and actually use the '_PendingReHandshake' logic in _SslState.cs
Martin Baulig [Mon, 13 Jul 2015 20:26:16 +0000 (22:26 +0200)]
Fix and actually use the '_PendingReHandshake' logic in _SslState.cs

8 years agoAdd more missing strings
Marek Safar [Thu, 9 Jul 2015 15:15:08 +0000 (17:15 +0200)]
Add more missing strings

8 years agoKeep Mono's old default provider type value for RSA. The value isn't used for the...
Alexis Christoforides [Thu, 2 Jul 2015 13:51:14 +0000 (16:51 +0300)]
Keep Mono's old default provider type value for RSA. The value isn't used for the managed crypto code and is still validfor CryptoAPI, but if it changes Mono can't find keypairs made with earlier versions.

8 years agoIfdefed out some methods from methodbody.cs and methodbuilder.cs
Marcos Henrich [Wed, 1 Jul 2015 20:19:36 +0000 (21:19 +0100)]
Ifdefed out some methods from methodbody.cs and methodbuilder.cs

Mono now uses ExceptionHandlingClauseOptions from methodbody.cs and ExceptionHandler from methobuilder.cs.
Remaining types from thoses files were ignored with ifdef.

8 years agoMove ThreadPool from System.Threading.Microsoft to System.Threading
Ludovic Henry [Tue, 21 Apr 2015 10:17:35 +0000 (11:17 +0100)]
Move ThreadPool from System.Threading.Microsoft to System.Threading

8 years agoAdd NET_4_6 defines for .NET 4.6 changes
Dylan Borg [Tue, 30 Jun 2015 06:20:36 +0000 (08:20 +0200)]
Add NET_4_6 defines for .NET 4.6 changes