mono.git
8 years agoMerge pull request #2983 from akoeplinger/fix-bug40462
Aleksey Kliger (λgeek) [Tue, 10 May 2016 21:06:54 +0000 (17:06 -0400)]
Merge pull request #2983 from akoeplinger/fix-bug40462

[corlib] Ignore DirectoryNotFoundException in FileStreamTest.OpenCharDeviceRepeatedly test

8 years ago[corlib] Ignore DirectoryNotFoundException in FileStreamTest.OpenCharDeviceRepeatedly...
Alexander Köplinger [Tue, 10 May 2016 19:05:32 +0000 (21:05 +0200)]
[corlib] Ignore DirectoryNotFoundException in FileStreamTest.OpenCharDeviceRepeatedly test

It seems that older iOS6 devices don't allow access to /dev, as a DirectoryNotFoundException is
thrown when accessing /dev/zero in the FileStreamTest.OpenCharDeviceRepeatedly test there.

Ignore this exception and the test in those cases.

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

8 years agoMerge pull request #2981 from rolfbjarne/fix-rebuild-offsets-tool
Marek Safar [Tue, 10 May 2016 18:12:51 +0000 (20:12 +0200)]
Merge pull request #2981 from rolfbjarne/fix-rebuild-offsets-tool

[offsets-tool] Only create the .stamp-clone file if the clone succeeds.

8 years ago[offsets-tool] Only create the .stamp-clone file if the clone succeeds.
Rolf Bjarne Kvinge [Tue, 10 May 2016 17:43:13 +0000 (19:43 +0200)]
[offsets-tool] Only create the .stamp-clone file if the clone succeeds.

This makes rebuilds work if the clone was cancelled.

8 years ago[System]: Lazy-init X509ChainPolicy.ExtraStore when called from SystemCertificateVali...
Martin Baulig [Tue, 10 May 2016 17:37:51 +0000 (13:37 -0400)]
[System]: Lazy-init X509ChainPolicy.ExtraStore when called from SystemCertificateValidator.  Fixes #40899.

AppleTLS supports a lazily-initialized X509Certificate, but not X509Certificate2 so
we need to fall-back to using Mono.Security.X509 whenever we need an X509Certificate2.
To avoid unnecessary fallbacks, the private Mono.Net.Security APIs use X509Certificate
instead of X509Certificate2.

Since 'ExtraStore' returns X509Certificate2Collection, we need to convert these to
X509Certificate2.

(cherry picked from commit 05e2372339b8d0b6065376096216b91098c88a8b)

8 years agoMerge pull request #2978 from ludovic-henry/coop-fix-reset-blocking
Ludovic Henry [Tue, 10 May 2016 17:38:02 +0000 (13:38 -0400)]
Merge pull request #2978 from ludovic-henry/coop-fix-reset-blocking

[threads] Fix reset blocking state transition

8 years agoMerge pull request #2933 from ludovic-henry/referencesource-monitor
Marek Safar [Tue, 10 May 2016 15:50:11 +0000 (17:50 +0200)]
Merge pull request #2933 from ludovic-henry/referencesource-monitor

[corlib] Import System.Threading.Monitor

8 years ago[mcs] More tweaks to undefined tie-breaking rules. Fixes #40945
Marek Safar [Tue, 10 May 2016 15:37:10 +0000 (17:37 +0200)]
[mcs] More tweaks to undefined tie-breaking rules. Fixes #40945

8 years ago[llvmonly] Avoid sharing refs and intptrs in gsharedvt wrappers, it doesn't work...
Zoltan Varga [Tue, 10 May 2016 09:59:51 +0000 (05:59 -0400)]
[llvmonly] Avoid sharing refs and intptrs in gsharedvt wrappers, it doesn't work yet.

8 years ago[llvmonly] Disable linkonce methods, they don't work yet.
Zoltan Varga [Tue, 10 May 2016 09:57:25 +0000 (05:57 -0400)]
[llvmonly] Disable linkonce methods, they don't work yet.

8 years ago[runtime] Check for a null argument in mono_monitor_enter_v4_fast () before calling...
Zoltan Varga [Tue, 10 May 2016 06:17:49 +0000 (02:17 -0400)]
[runtime] Check for a null argument in mono_monitor_enter_v4_fast () before calling mono_monitor_try_enter_internal (), the latter would set a pending exception, but the JITted code calling enter_v4_fast () doesn't check for it.

8 years ago[jit] Set the real_offset of inlined bblocks to the il offset where the method was...
Zoltan Varga [Tue, 10 May 2016 05:58:00 +0000 (01:58 -0400)]
[jit] Set the real_offset of inlined bblocks to the il offset where the method was inlined, so get_most_deep_clause () in llvm works correctly with inlined methods.

8 years ago[llvmonly] Transform the error returned by init_method () into an exception and throw...
Zoltan Varga [Tue, 10 May 2016 05:43:21 +0000 (01:43 -0400)]
[llvmonly] Transform the error returned by init_method () into an exception and throw it, it can be an exception thrown by a cctor.

8 years ago[threads] Fix reset blocking state transition
Ludovic Henry [Mon, 9 May 2016 22:32:50 +0000 (18:32 -0400)]
[threads] Fix reset blocking state transition

There would previously be a race between reset blocking and a STW, that would happen as follow:
 - T1 goes into blocking - T1 state is BLOCKING(0)
 - T2 suspends T1  - T1 state is BLOCKING(1)
 - T1 does a reset blocking -> T1 state is SELF SUSPEND REQUESTED
 - T2 calls `mono_thread_info_get_suspend_state` on T1 --- SIGABRT as we cannot get suspend state when state is SELF SUSPEND REQUESTED
 - T1 does polling -> T1 state is SELF SUSPENDED

The fix is for reset blocking to work like done blocking: switch to BLOCKING AND SUSPENDED.

8 years agoUse available memory instead of physical memory as metric for allocation-heavy tests
Alexander Köplinger [Mon, 9 May 2016 22:25:23 +0000 (00:25 +0200)]
Use available memory instead of physical memory as metric for allocation-heavy tests

We were seeing issues on the new Jenkins Azure boxes which had 7GB of physical memory but only about 1GB free at the time of the test, so it'd fail.
Checking the available memory should fix this.

8 years agoMerge pull request #2967 from lambdageek/dev/coop-threadpool-exceptions5
Aleksey Kliger (λgeek) [Mon, 9 May 2016 19:11:47 +0000 (15:11 -0400)]
Merge pull request #2967 from lambdageek/dev/coop-threadpool-exceptions5

[runtime] Pending exception takes precedence over Thread.Abort ()

8 years agoMerge pull request #2954 from lambdageek/dev/monoerror-field_static_get_value
Aleksey Kliger (λgeek) [Mon, 9 May 2016 18:56:50 +0000 (14:56 -0400)]
Merge pull request #2954 from lambdageek/dev/monoerror-field_static_get_value

MonoError for mono_field_static_get_value

8 years ago[runtime] Pending exception takes precedence over Thread.Abort ()
Aleksey Kliger [Wed, 4 May 2016 23:10:29 +0000 (19:10 -0400)]
[runtime] Pending exception takes precedence over Thread.Abort ()

If there's a pending exception and an AbortRequested, the pending
excpetion should be thrown.

This fixes threadpool-exceptions5.cs in coop mode.

There are two situations where this could happen.

1. Like threadpool-exception5.cs we have a threadpool worker thread
  request an abort and then its async callback runs and throws an
  exception.  In this case apparently the async callback's exception
  should be allowed to unwind and hit the unhandled exception handler.

2. A thread catches ThreadAbortException and then posts a pending
  exception of some other excpetion from the catch clause.  In this case
  we unwind that other exception, and when it's caught we rethrow the
  abort.

8 years ago[System] Cleanup uri tests
Marek Safar [Mon, 9 May 2016 15:39:13 +0000 (17:39 +0200)]
[System] Cleanup uri tests

8 years ago[runtime] MonoError-ize mono_field_static_get_value
Aleksey Kliger [Thu, 21 Apr 2016 16:34:45 +0000 (12:34 -0400)]
[runtime] MonoError-ize mono_field_static_get_value

Mark it external only.  Runtime should use mono_field_static_get_value_checked.

8 years ago[runtime] MonoError-ize mono_field_static_get_value_for_thread
Aleksey Kliger [Thu, 21 Apr 2016 15:59:56 +0000 (11:59 -0400)]
[runtime] MonoError-ize mono_field_static_get_value_for_thread

8 years ago[runtime] MonoError-ize get_default_field_value
Aleksey Kliger [Thu, 21 Apr 2016 15:48:00 +0000 (11:48 -0400)]
[runtime] MonoError-ize get_default_field_value

8 years ago[runtime] MonoError-ize mono_get_constant_value_from_blob
Aleksey Kliger [Thu, 21 Apr 2016 15:45:23 +0000 (11:45 -0400)]
[runtime] MonoError-ize mono_get_constant_value_from_blob

8 years ago[arm] Enable native types for Xamarin.WatchOS.dll too. Enable Unwind_Backtrace suppor...
Zoltan Varga [Mon, 9 May 2016 11:15:51 +0000 (07:15 -0400)]
[arm] Enable native types for Xamarin.WatchOS.dll too. Enable Unwind_Backtrace support on watchos.

8 years ago[llvm] Enable OP_LADD_OVF opcodes on 32 bit platforms too. Avoid optimizing long...
Zoltan Varga [Mon, 9 May 2016 11:14:12 +0000 (07:14 -0400)]
[llvm] Enable OP_LADD_OVF opcodes on 32 bit platforms too. Avoid optimizing long shift opcodes when using llvm. Enable support for hardfp calling conventions on arm.

8 years ago[arm] Use the hardfp abi on watchos.
Zoltan Varga [Mon, 9 May 2016 11:11:21 +0000 (07:11 -0400)]
[arm] Use the hardfp abi on watchos.

8 years ago[ppdb] Avoid using pdb files for assemblies which are not compiled by csc using ...
Zoltan Varga [Mon, 9 May 2016 01:13:38 +0000 (21:13 -0400)]
[ppdb] Avoid using pdb files for assemblies which are not compiled by csc using /debug:portable. Fixes #40886.

8 years ago[llvm] Add support for OP_GC_SAFE_POINT.
Zoltan Varga [Sun, 8 May 2016 22:51:45 +0000 (18:51 -0400)]
[llvm] Add support for OP_GC_SAFE_POINT.

8 years ago[arm] Align the stack correctly in the gsharedvt trampoline on platforms with frame...
Zoltan Varga [Fri, 6 May 2016 22:22:09 +0000 (18:22 -0400)]
[arm] Align the stack correctly in the gsharedvt trampoline on platforms with frame alignment greater than 8 (watchos).

8 years ago[arm] Define MONO_ARCH_DISABLE_HW_TRAPS on watchos.
Zoltan Varga [Fri, 6 May 2016 22:20:52 +0000 (18:20 -0400)]
[arm] Define MONO_ARCH_DISABLE_HW_TRAPS on watchos.

8 years ago[System]: Fix certificate validation with empty hostname.
Martin Baulig [Fri, 6 May 2016 20:09:54 +0000 (16:09 -0400)]
[System]: Fix certificate validation with empty hostname.

When the system certificate validator is invoked with an empty hostname
(caller does not want us to validate the hostname), then we need to pass
null to SecPolicyCreateSSL() and not the empty string.

(cherry picked from commit f29804d149bed8032dabd862c9823bf5e74b0db4)

8 years ago[System]: Add comment to the obsoletion of Mono-specific ServicePointManager APIs.
Martin Baulig [Fri, 6 May 2016 19:50:33 +0000 (15:50 -0400)]
[System]: Add comment to the obsoletion of Mono-specific ServicePointManager APIs.

(cherry picked from commit 1b4921b57321cbb353951e23c9841d7c7b6ce3b7)

8 years ago[System]: Obsolete the Mono-specific cipher suite callbacks in ServicePointManager.
Martin Baulig [Thu, 5 May 2016 21:19:20 +0000 (17:19 -0400)]
[System]: Obsolete the Mono-specific cipher suite callbacks in ServicePointManager.

(cherry picked from commit fa75386bb88de96d58487673885b969c9d784f30)

8 years ago[corlib]: Cleanup X509Helper.Import().
Martin Baulig [Thu, 5 May 2016 19:55:54 +0000 (15:55 -0400)]
[corlib]: Cleanup X509Helper.Import().

Only attempt the automatic PEM->DER conversion when no password was given
and make this version of X509Helper.Import() also take care of the fallback.

(cherry picked from commit 63a214c3f02c6ac28d19a8ca95f7f39c1e31a072)

8 years agoMerge pull request #2968 from lambdageek/dev/coop-unify-jit_thread_attach
Aleksey Kliger (λgeek) [Fri, 6 May 2016 17:33:38 +0000 (13:33 -0400)]
Merge pull request #2968 from lambdageek/dev/coop-unify-jit_thread_attach

[runtime] Unify codepath in mono_jit_thread_attach

8 years ago[runtime] Unify codepath in mono_jit_thread_attach
Aleksey Kliger [Thu, 5 May 2016 22:09:28 +0000 (18:09 -0400)]
[runtime] Unify codepath in mono_jit_thread_attach

Previously we had separate codepaths in mono_jit_thread_attach for coop
and non-coop modes.

Now there's a common codepath for attaching the thread, and separate
code paths for performing coop state machine transitions and computing
the return value cookie.

Fixes Mono.Debugger.Soft tests under coop.

8 years agoMerge pull request #2963 from ludovic-henry/fix-unified-suspend
Rodrigo Kumpera [Thu, 5 May 2016 23:21:56 +0000 (19:21 -0400)]
Merge pull request #2963 from ludovic-henry/fix-unified-suspend

[threads] Fix some unified suspend bugs

8 years ago[sgen] Fix possible race condition between world stop and restart
Ludovic Henry [Tue, 3 May 2016 18:56:49 +0000 (14:56 -0400)]
[sgen] Fix possible race condition between world stop and restart

8 years ago[sgen] Do not skip starting and detaching thread during suspend
Ludovic Henry [Mon, 2 May 2016 21:58:16 +0000 (17:58 -0400)]
[sgen] Do not skip starting and detaching thread during suspend

By skipping thread which have a NULL domain or lmf, we would also skip threads which are in RUNNING mode, but which are still attaching to the runtime. They could have in practice called `mono_thread_info_attach`, without having executed any managed code or set a domain yet. Because we would simply discard the suspending for these threads, we could potentially not suspend them, meaning they would keep running, even potentially run some managed code, while the GC is still running.

To fix that, we need to slightly modify the expectation of sgen STW when using unified suspend. The non-unified expectation of sgen STW would be that even if a thread has a non-initialized domain or lmf, it should still be suspended, but not scanned. The unified expectation of sgen STW would be that if a thread has a non-initialized domain or lmf, then the thread shouldn't be suspended. That second behaviour works well if we only consider that the domain or lmf could be non-initialized when the thread is detaching, but that consideration is just wrong. The main example is the beginning of `start_wrapper_internal` (in threads.c:637), where we have non-initialized domain and lmf, but where the thread is in RUNNING state, and about to access some managed memory.

8 years ago[threads] Correct comment
Ludovic Henry [Wed, 6 Apr 2016 08:34:24 +0000 (09:34 +0100)]
[threads] Correct comment

8 years ago[sgen] Improve STW debugging output
Ludovic Henry [Fri, 1 Apr 2016 16:09:50 +0000 (17:09 +0100)]
[sgen] Improve STW debugging output

8 years ago[threads] Make debugging output consistent
Ludovic Henry [Fri, 1 Apr 2016 17:28:42 +0000 (18:28 +0100)]
[threads] Make debugging output consistent

Other THREAD_SUSPEND_DEBUG would print the native thread TID, instead of the MonoThreadInfo*

8 years ago[threads] Increase state machine verbosity when crashing
Ludovic Henry [Fri, 1 Apr 2016 17:19:17 +0000 (18:19 +0100)]
[threads] Increase state machine verbosity when crashing

8 years ago[threads] Fix segfault
Ludovic Henry [Fri, 1 Apr 2016 10:59:26 +0000 (11:59 +0100)]
[threads] Fix segfault

8 years ago[suspend] Don't try to suspend an already suspended thread
Ludovic Henry [Thu, 31 Mar 2016 19:05:05 +0000 (20:05 +0100)]
[suspend] Don't try to suspend an already suspended thread

8 years ago[threads] Fix compilation warning
Ludovic Henry [Tue, 8 Dec 2015 05:23:44 +0000 (00:23 -0500)]
[threads] Fix compilation warning

8 years ago[sgen] Add some assertion for stack start and end
Ludovic Henry [Mon, 7 Dec 2015 15:45:29 +0000 (10:45 -0500)]
[sgen] Add some assertion for stack start and end

8 years ago[tests] Add sgen-new-threads-dont-join-stw-2
Ludovic Henry [Mon, 7 Dec 2015 15:25:57 +0000 (10:25 -0500)]
[tests] Add sgen-new-threads-dont-join-stw-2

8 years ago[threads] Be more verbose in the case of an error
Ludovic Henry [Thu, 31 Mar 2016 13:00:49 +0000 (14:00 +0100)]
[threads] Be more verbose in the case of an error

8 years ago[runtime] Use utils mono_thread_info_yield
Ludovic Henry [Thu, 31 Mar 2016 11:51:25 +0000 (12:51 +0100)]
[runtime] Use utils mono_thread_info_yield

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 ago[corlib] Import System.Threading.Monitor
Ludovic Henry [Wed, 20 Apr 2016 17:19:02 +0000 (19:19 +0200)]
[corlib] Import System.Threading.Monitor

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