mono.git
8 years ago[mcs] Accept and ignore command line args supported by csc that we don't
Ankit Jain [Fri, 19 Feb 2016 17:13:35 +0000 (12:13 -0500)]
[mcs] Accept and ignore command line args supported by csc that we don't

support:

/win32manifest
/nowin32manifest

8 years ago[bcl] Add workaround for csc bug
Marek Safar [Fri, 19 Feb 2016 12:26:09 +0000 (13:26 +0100)]
[bcl] Add workaround for csc bug

8 years ago[jit] Fix a regression introduced by c0b9be3e03ac5001dffd6dd13ca16ef361ee79ee.
Zoltan Varga [Fri, 19 Feb 2016 05:25:42 +0000 (00:25 -0500)]
[jit] Fix a regression introduced by c0b9be3e03ac5001dffd6dd13ca16ef361ee79ee.

8 years ago[runtime] Avoid a crash when trying to load a non-assembly file as an assembly. Fixes...
Zoltan Varga [Fri, 19 Feb 2016 04:33:32 +0000 (23:33 -0500)]
[runtime] Avoid a crash when trying to load a non-assembly file as an assembly. Fixes #38825.

8 years agoRevert accidental change to submodule from 40017f9
Alexander Köplinger [Fri, 19 Feb 2016 01:49:44 +0000 (02:49 +0100)]
Revert accidental change to submodule from 40017f9

8 years agoMerge pull request #2643 from xmcclure/disable-hw-traps
monojenkins [Fri, 19 Feb 2016 00:10:18 +0000 (00:10 +0000)]
Merge pull request #2643 from xmcclure/disable-hw-traps

DISABLE_HW_TRAPS flag to disable signal reliance

Single switch for both explicit null checks and explicit illegal-divide checks.

8 years ago[jit] Add missing div check to OP_IREM_IMM.
Zoltan Varga [Thu, 18 Feb 2016 23:36:05 +0000 (18:36 -0500)]
[jit] Add missing div check to OP_IREM_IMM.

8 years agoMerge pull request #2626 from lewurm/jit-time-track
monojenkins [Thu, 18 Feb 2016 23:08:36 +0000 (23:08 +0000)]
Merge pull request #2626 from lewurm/jit-time-track

[jit] add more detailed statistics for single phases

@vargaz: can I have a review on that please? :)

8 years ago[jit] Add div checks to OP_LDIV etc. opcodes.
Zoltan Varga [Thu, 18 Feb 2016 22:53:16 +0000 (17:53 -0500)]
[jit] Add div checks to OP_LDIV etc. opcodes.

8 years agoMerge pull request #2642 from kumpera/monodis_fix
monojenkins [Thu, 18 Feb 2016 22:40:24 +0000 (22:40 +0000)]
Merge pull request #2642 from kumpera/monodis_fix

[monodis] Improve error handling so it can survive the broken assembly from #37393.

8 years agoDISABLE_HW_TRAPS flag to disable signal reliance
Andi McClure [Thu, 18 Feb 2016 22:16:29 +0000 (17:16 -0500)]
DISABLE_HW_TRAPS flag to disable signal reliance

Single switch for both explicit null checks and explicit illegal-divide checks

8 years ago[mkbundle] Small fixes under Windows
Alexis Christoforides [Wed, 27 Jan 2016 20:26:58 +0000 (15:26 -0500)]
[mkbundle] Small fixes under Windows
* Quote source files before passing to cl.exe
* Use Windows subsystem instead of console but still use main() entry point and not WinMain()

8 years ago[jit] Add div checks to the OP_IDIV_IMM etc. opcodes if needed.
Zoltan Varga [Thu, 18 Feb 2016 20:56:09 +0000 (15:56 -0500)]
[jit] Add div checks to the OP_IDIV_IMM etc. opcodes if needed.

8 years ago[Mainsoft] Remove deprecated code: the Mainsoft code has not been maintained in years
Miguel de Icaza [Thu, 18 Feb 2016 19:49:40 +0000 (14:49 -0500)]
[Mainsoft] Remove deprecated code: the Mainsoft code has not been maintained in years

8 years ago[monodis] Improve error handling so it can survive the broken assembly from #37393.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[monodis] Improve error handling so it can survive the broken assembly from #37393.

8 years agoMerge pull request #2609 from directhex/xambug-30902
Alexander Köplinger [Thu, 18 Feb 2016 11:45:52 +0000 (12:45 +0100)]
Merge pull request #2609 from directhex/xambug-30902

Use X509 serial number in Mono cert store filename

8 years agoMerge pull request #2624 from ludovic-henry/monoerror-appdomain
Ludovic Henry [Thu, 18 Feb 2016 11:11:41 +0000 (11:11 +0000)]
Merge pull request #2624 from ludovic-henry/monoerror-appdomain

[runtime] Use MonoError for appdomain.c functions

8 years agoMerge pull request #2630 from ludovic-henry/fix-registeredwaithandle-leak
Ludovic Henry [Thu, 18 Feb 2016 10:53:37 +0000 (10:53 +0000)]
Merge pull request #2630 from ludovic-henry/fix-registeredwaithandle-leak

[corlib] Fix potential RegisteredWaitHandle resource leak

8 years agoMerge pull request #2635 from xmcclure/timezoneinfo
Rodrigo Kumpera [Thu, 18 Feb 2016 04:12:15 +0000 (23:12 -0500)]
Merge pull request #2635 from xmcclure/timezoneinfo

Broaden readlink load failure check in TimeZoneInfo

8 years ago[jit] Get rid of the non-checked variant of mono_resolve_patch_target (), its not...
Zoltan Varga [Thu, 18 Feb 2016 03:23:25 +0000 (22:23 -0500)]
[jit] Get rid of the non-checked variant of mono_resolve_patch_target (), its not used any more.

8 years agoBump Makefile to trigger full build.
Martin Baulig [Thu, 18 Feb 2016 01:35:10 +0000 (20:35 -0500)]
Bump Makefile to trigger full build.

(cherry picked from commit 905088bb90a7b8c0e66767af41aa636bc180da30)

8 years ago[System]: 'ServicePointManager.CertificatePolicy': lazily initialize.
Martin Baulig [Thu, 18 Feb 2016 01:29:15 +0000 (20:29 -0500)]
[System]: 'ServicePointManager.CertificatePolicy': lazily initialize.

The internal GetLegacyCertificatePolicy() now returns null unless this
property has explicitly been assigned to, so the legacy handler will not
be used in ChainValidationHelper.

(cherry picked from commit e69e8784059f7635f91910af71f5a19bd1d0e392)

8 years ago[Mono.Security]: Make 'MonoTlsSettings.UseServicePointManagerCallback' a 'bool?'.
Martin Baulig [Thu, 18 Feb 2016 01:03:04 +0000 (20:03 -0500)]
[Mono.Security]: Make 'MonoTlsSettings.UseServicePointManagerCallback' a 'bool?'.

The default value is 'true' when using HttpWebRequest, but false when using SslStream
directly.

(cherry picked from commit c871ff63ff09e0472fe268373237373df9739837)

8 years ago[System]: 'HttpWebRequest.Proxy' - update ServicePoint on assignment.
Martin Baulig [Wed, 17 Feb 2016 23:11:31 +0000 (18:11 -0500)]
[System]: 'HttpWebRequest.Proxy' - update ServicePoint on assignment.

(cherry picked from commit 08e3a4120ca5dd315df1422c027228ee8729650c)

8 years ago[System]: Properly propage exceptions in HttpWebRequest.BeginGetResponse().
Martin Baulig [Wed, 17 Feb 2016 22:44:00 +0000 (17:44 -0500)]
[System]: Properly propage exceptions in HttpWebRequest.BeginGetResponse().

(cherry picked from commit acf6c4bd3718265bc62aafc6338d024db1a4e950)

8 years ago[System]: Disallow "https" proxies in ServicePointManager.FindServicePoint().
Martin Baulig [Wed, 17 Feb 2016 21:07:37 +0000 (16:07 -0500)]
[System]: Disallow "https" proxies in ServicePointManager.FindServicePoint().

(cherry picked from commit e734cd8b598a0c2d036db66c049f7b7c1f5fda2c)

8 years ago[System]: Use correct default value for `ServicePointManager.SecurityProtocol`.
Martin Baulig [Tue, 16 Feb 2016 20:50:56 +0000 (15:50 -0500)]
[System]: Use correct default value for `ServicePointManager.SecurityProtocol`.

(cherry picked from commit ddf47829d94db85f8b1fb7c391654e3329c132b9)

8 years ago[System]: Clone the X509Certificate instance that's stored in ServicePoint.
Martin Baulig [Fri, 12 Feb 2016 19:29:53 +0000 (14:29 -0500)]
[System]: Clone the X509Certificate instance that's stored in ServicePoint.

(cherry picked from commit 65afb9f6407b5b3e4864eb04ae81ed4732ffaa77)

8 years agoBroaden readlink load failure check in TimeZoneInfo
Andi McClure [Wed, 17 Feb 2016 21:49:15 +0000 (16:49 -0500)]
Broaden readlink load failure check in TimeZoneInfo

Previously this caught only cases where libc was absent, now it catches cases where libc is present but does not contain readlink

8 years agoMerge pull request #2633 from xmcclure/fixmobile
monojenkins [Wed, 17 Feb 2016 21:35:34 +0000 (21:35 +0000)]
Merge pull request #2633 from xmcclure/fixmobile

Fix mobile/AOT build following System.Diagnostics.Process import

System.Diagnostics.Process was recently added to Mono. This introduced two problems for mobile builds:

- Support classes were not added to the mobile profile .sources.
- The imported referencesource code did not build on fullaot.

This PR fixes both issues.

8 years agoPrepare XM for Http additions
Chris Hamons [Wed, 17 Feb 2016 20:19:44 +0000 (14:19 -0600)]
Prepare XM for Http additions

8 years ago[jit] Fix build on ppc
Alexander Köplinger [Wed, 17 Feb 2016 20:20:03 +0000 (21:20 +0100)]
[jit] Fix build on ppc

Declaration of the 'error' variable was missed in 3b438cfce3f8f63402ebeff68cc93944e8d54e38

8 years ago[jit] add timers for several phases
Bernhard Urban [Wed, 17 Feb 2016 18:53:13 +0000 (10:53 -0800)]
[jit] add timers for several phases

8 years ago[jit] refactor branch fixups between basic blocks into function
Bernhard Urban [Wed, 17 Feb 2016 00:53:36 +0000 (16:53 -0800)]
[jit] refactor branch fixups between basic blocks into function

8 years ago[jit] refactor basic block ordering in separate function
Bernhard Urban [Wed, 17 Feb 2016 00:53:29 +0000 (16:53 -0800)]
[jit] refactor basic block ordering in separate function

8 years ago[jit] update jit statistics during aot compilation
Bernhard Urban [Wed, 17 Feb 2016 18:40:01 +0000 (10:40 -0800)]
[jit] update jit statistics during aot compilation

8 years ago[jit] refactor out time tracking function
Bernhard Urban [Wed, 17 Feb 2016 18:34:37 +0000 (10:34 -0800)]
[jit] refactor out time tracking function

8 years ago[man] Updated Mono man page with AOT gen-seq-points-file option.
João Matos [Wed, 17 Feb 2016 17:41:48 +0000 (17:41 +0000)]
[man] Updated Mono man page with AOT gen-seq-points-file option.

8 years ago[aot] Remove debugging print.
João Matos [Wed, 17 Feb 2016 17:18:06 +0000 (17:18 +0000)]
[aot] Remove debugging print.

8 years agoMerge pull request #2631 from ludovic-henry/fix-microsoftbuild
monojenkins [Wed, 17 Feb 2016 17:25:30 +0000 (17:25 +0000)]
Merge pull request #2631 from ludovic-henry/fix-microsoftbuild

[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelBuilds

The previous implementation of ProcessWrapper would launch its own threads to read on the process stdout and stderr. We can more simply use OutputDataReceived and ErrorDataReceived which will do the same under the hood. We use as well the Exited event to track the end of the Process.

8 years agoUpdate referencesources (to fix full-aot build)
Andi McClure [Wed, 17 Feb 2016 16:25:19 +0000 (11:25 -0500)]
Update referencesources (to fix full-aot build)

8 years ago[aot] Reworked sequence points file AOT option to allow an explicit path passed.
João Matos [Wed, 17 Feb 2016 15:49:19 +0000 (15:49 +0000)]
[aot] Reworked sequence points file AOT option to allow an explicit path passed.

This will be used to fix msym files being overwritten per ABI compilation in AOT compilation driven by Monodroid.

8 years ago[tests] List files from the repo intead of / for process-stress-3.cs
Ludovic Henry [Wed, 17 Feb 2016 15:46:21 +0000 (15:46 +0000)]
[tests] List files from the repo intead of / for process-stress-3.cs

On some machines, slow remote devices can be attached, leading to very slow find commands, leading to timeouts.

8 years agoMerge pull request #2628 from kumpera/misc-loader-error
monojenkins [Wed, 17 Feb 2016 15:38:52 +0000 (15:38 +0000)]
Merge pull request #2628 from kumpera/misc-loader-error

[runtime] Small set of cleanups to the loader code.

8 years ago[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelB...
Ludovic Henry [Wed, 17 Feb 2016 12:48:37 +0000 (12:48 +0000)]
[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelBuilds

The previous implementation of ProcessWrapper would launch its own threads to read on the process stdout and stderr. We can more simply use OutputDataReceived and ErrorDataReceived which will do the same under the hood. We use as well the Exited event to track the end of the Process.

8 years ago[runtime] Use MonoError for mono_context_init
Ludovic Henry [Tue, 16 Feb 2016 11:46:15 +0000 (11:46 +0000)]
[runtime] Use MonoError for mono_context_init

8 years ago[runtime] Use MonoError for mono_runtime_init
Ludovic Henry [Tue, 16 Feb 2016 11:42:47 +0000 (11:42 +0000)]
[runtime] Use MonoError for mono_runtime_init

8 years ago[runtime] Use MonoError for mono_domain_try_type_resolve
Ludovic Henry [Tue, 16 Feb 2016 11:37:59 +0000 (11:37 +0000)]
[runtime] Use MonoError for mono_domain_try_type_resolve

8 years ago[runtime] Mark mono_domain_create_appdomain as MONO_RT_EXTERNAL_ONLY
Ludovic Henry [Tue, 16 Feb 2016 11:22:08 +0000 (11:22 +0000)]
[runtime] Mark mono_domain_create_appdomain as MONO_RT_EXTERNAL_ONLY

8 years ago[runtime] Use MonoError for mono_try_assembly_resolve
Ludovic Henry [Tue, 16 Feb 2016 11:04:23 +0000 (11:04 +0000)]
[runtime] Use MonoError for mono_try_assembly_resolve

8 years ago[runtime] Use MonoError for copy_app_domain_setup
Ludovic Henry [Tue, 16 Feb 2016 10:55:03 +0000 (10:55 +0000)]
[runtime] Use MonoError for copy_app_domain_setup

8 years ago[corlib] Fix potential RegisteredWaitHandle resource leak
Ludovic Henry [Tue, 16 Feb 2016 20:46:23 +0000 (20:46 +0000)]
[corlib] Fix potential RegisteredWaitHandle resource leak

If we construct RegisteredWaitHandle with executeOnlyOnce = true, and never call Unregister, we will keep _waitObject.SafeWaitHandle reference count unbalanced. This will lead to never releasing the waitObject handle.

As we only need to ensure that the waitObject handle is alive while in the Wait method, we use the SafeHandle mechanism only there. The 2 possibles scenarios in the Wait method are:
 - waitObject has not been closed: we increment its ref count, so we ensure that it's alive as long as we use it here
 - waitObject has been closed: a ObjectDisposedException is thrown, we catch it and keep on without trying to wait on the handle

8 years agoMerge pull request #2627 from kasthack/sysweb-import
Marek Safar [Wed, 17 Feb 2016 09:33:21 +0000 (10:33 +0100)]
Merge pull request #2627 from kasthack/sysweb-import

[System.Web] Reference source import

8 years agoMerge pull request #2629 from gofman/fixtimezoneinfo
Marek Safar [Wed, 17 Feb 2016 09:31:11 +0000 (10:31 +0100)]
Merge pull request #2629 from gofman/fixtimezoneinfo

[System.TimeZoneInfo] Fix finding system time zone when /etc/localtim…

8 years ago[System.TimeZoneInfo] Fix finding system time zone when /etc/localtime has a relative...
Paul Gofman [Wed, 17 Feb 2016 08:46:09 +0000 (11:46 +0300)]
[System.TimeZoneInfo] Fix finding system time zone when /etc/localtime has a relative path.

8 years ago[jit] Use mono_resolve_patch_target_checked () in more places.
Zoltan Varga [Wed, 17 Feb 2016 04:57:55 +0000 (23:57 -0500)]
[jit] Use mono_resolve_patch_target_checked () in more places.

8 years ago[jit] Use mono_resolve_patch_target_checked () in more places.
Zoltan Varga [Wed, 17 Feb 2016 04:20:02 +0000 (23:20 -0500)]
[jit] Use mono_resolve_patch_target_checked () in more places.

8 years ago[System.Web] Reference source import: System.Web.Util internal classes
kasthack [Wed, 17 Feb 2016 04:08:56 +0000 (07:08 +0300)]
[System.Web] Reference source import: System.Web.Util internal classes

8 years ago[System.Web] Reference source import: System.Web.Routing internal classes
kasthack [Wed, 17 Feb 2016 03:35:31 +0000 (06:35 +0300)]
[System.Web] Reference source import: System.Web.Routing internal classes

8 years ago[System.Web] Reference source import
kasthack [Wed, 17 Feb 2016 03:15:30 +0000 (06:15 +0300)]
[System.Web] Reference source import

8 years agoFix the build.
Zoltan Varga [Wed, 17 Feb 2016 02:56:23 +0000 (21:56 -0500)]
Fix the build.

8 years ago[llvm] Remove some unfinished code committed by mistake.
Zoltan Varga [Wed, 17 Feb 2016 02:56:03 +0000 (21:56 -0500)]
[llvm] Remove some unfinished code committed by mistake.

8 years agoMerge pull request #2625 from xmcclure/tinymemoryleak
monojenkins [Wed, 17 Feb 2016 02:45:17 +0000 (02:45 +0000)]
Merge pull request #2625 from xmcclure/tinymemoryleak

Fix memory leak in mono_aot_plt_resolve when exiting with exception

We were not cleaning up our allocated memory on all code paths.

8 years ago[mono-error] Replace mono_metadata_parse_type_full with mono_metadata_parse_type_checked.
Rodrigo Kumpera [Wed, 27 Jan 2016 23:10:12 +0000 (18:10 -0500)]
[mono-error] Replace mono_metadata_parse_type_full with mono_metadata_parse_type_checked.

8 years ago[metadata] Introduce MonoError into mono_metadata_parse_type_internal.
Rodrigo Kumpera [Wed, 27 Jan 2016 21:39:30 +0000 (16:39 -0500)]
[metadata] Introduce MonoError into mono_metadata_parse_type_internal.

8 years ago[metadata] Remove mono_metadata_parse_array_full, nothing uses it.
Rodrigo Kumpera [Wed, 27 Jan 2016 21:12:33 +0000 (16:12 -0500)]
[metadata] Remove mono_metadata_parse_array_full, nothing uses it.

8 years ago[llvm] Fix a crash when a simd argument is returned from a method by reference.
Zoltan Varga [Wed, 17 Feb 2016 01:09:41 +0000 (20:09 -0500)]
[llvm] Fix a crash when a simd argument is returned from a method by reference.

8 years ago[runtime] Fix the build.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Fix the build.

8 years ago[System.Web] Reference source import
kasthack [Wed, 17 Feb 2016 01:08:57 +0000 (04:08 +0300)]
[System.Web] Reference source import

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in method-to-ir.c and mini-exceptions.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in threads.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in verify.c and remoting.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in security-core-clr.c and security-manager.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in reflection.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in object.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in marshal.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in locale.c.

The macro generates the right form of corlib type lookup & caching.

8 years ago[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACH...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in icall.c.

The macro generates the right form of corlib type lookup & caching. Plus it's shorter.

8 years agoImport System.Diagnostics.Process changes to mobile profile
Andi McClure [Tue, 16 Feb 2016 23:04:18 +0000 (18:04 -0500)]
Import System.Diagnostics.Process changes to mobile profile

Changes modeled on ludovic-henry commit 00b5517dd3. Fixes build.

8 years agoFix memory leak in mono_aot_plt_resolve when exiting with exception
Andi McClure [Tue, 16 Feb 2016 21:45:53 +0000 (16:45 -0500)]
Fix memory leak in mono_aot_plt_resolve when exiting with exception

8 years ago[linker] do not set scope of non-marked typerefs
Radek Doulik [Tue, 16 Feb 2016 21:21:58 +0000 (22:21 +0100)]
[linker] do not set scope of non-marked typerefs

 - fixes #38818

 - setting the *unchanged* scope to non-marked types is harmful,
   because in case the type has declaring type, the scope of declaring
   type is set as well. see
   https://github.com/mono/cecil/blob/master/Mono.Cecil/TypeReference.cs#L132

   public virtual IMetadataScope Scope {
      get ...
      set {
          var declaring_type = this.DeclaringType;
          if (declaring_type != null) {
              declaring_type.Scope = value;
              return;
          }
          scope = value;
      }
   }

   so in our case, we first set correctly scope of
   System.Collections.Generic.Dictionary`2 to mscorlib, then (re)set
   scope of System.Collections.Generic.Dictionary`2/ValueCollection
   and
   System.Collections.Generic.Dictionary`2/ValueCollection/Enumerator
   to System.Collection (note that these types are not marked and are
   swept away by linker), which sets scope of its declaring type
   System.Collections.Generic.Dictionary`2 back to System.Collection

   and because the System.Collection is linked-out, the typeref is
   incorrectly written with the scope set to System later

8 years ago[runtime] Bump corlib version
Ludovic Henry [Tue, 16 Feb 2016 20:42:57 +0000 (20:42 +0000)]
[runtime] Bump corlib version

8 years ago[Process] Add stress tests
Ludovic Henry [Thu, 11 Feb 2016 15:55:21 +0000 (15:55 +0000)]
[Process] Add stress tests

That's to ensure we do not have regression in the Process implementation.

8 years ago[System] Import System.Diagnostics.Process
Ludovic Henry [Mon, 8 Feb 2016 18:56:29 +0000 (18:56 +0000)]
[System] Import System.Diagnostics.Process

8 years ago[corlib] Fix race condition between RegisteredWaitHandle Wait and Unregister methods
Ludovic Henry [Tue, 16 Feb 2016 17:03:45 +0000 (17:03 +0000)]
[corlib] Fix race condition between RegisteredWaitHandle Wait and Unregister methods

In the following case we would have a race between Wait and Unregister methods:
 - T1 calls ThreadPool.RegisterWaitForSingleObject to wait on waitHandle
 - registeredWaitHandle is constructed to wait on waitHandle
 - registeredWaitHandle.Wait method is enqueued on the ThreadPool
 - T1 calls registeredWaitHandle.Unregister
 - T1 calls waitHandle.Close (happens in Process.StopWatchingForExit)
 - TTP (the threadpool thread) calls registeredWaitHandle.Wait
  - TTP calls WaitHandle.WaitAny (waitHandle, ...)

The last step try to access the waitHandle that has been previously closed, leading to a _wapi_handle_ref / _wapi_handle_unref_full error message.

The fix is to ensure that the RegisteredWaitHandle keeps the WaitHandle alive. To achieve this, we simply use the SafeWaitHandle inside the WaitHandle by: increasing its ref count when constructing the RegisteredWaitHandle, and decrementing it when unregistering it.
We also increase the count when using it in Wait, so if we execute Unregister and Wait concurrently, we guarantee that the WaitHandle is still valid in Wait, or get an exception if not.

8 years ago[mcs] Add more known sdk paths redirections
Marek Safar [Tue, 16 Feb 2016 16:39:00 +0000 (17:39 +0100)]
[mcs] Add more known sdk paths redirections

8 years agoMerge pull request #2603 from kumpera/fix_set_pending_exception
Rodrigo Kumpera [Tue, 16 Feb 2016 16:02:23 +0000 (08:02 -0800)]
Merge pull request #2603 from kumpera/fix_set_pending_exception

[runtime] Move pending_exception from InternalThread to Thread to avoid crashing on domain unload.

8 years agoMerge pull request #2548 from esdrubal/discovery
Marcos Henrich [Tue, 16 Feb 2016 15:54:54 +0000 (15:54 +0000)]
Merge pull request #2548 from esdrubal/discovery

[System.Web.Services] Fix DiscoveryClientProtocol

8 years agoMerge pull request #2623 from esdrubal/fileinfo_moveto
Marcos Henrich [Tue, 16 Feb 2016 13:57:08 +0000 (13:57 +0000)]
Merge pull request #2623 from esdrubal/fileinfo_moveto

[corlib] Fix FileInfo.MoveTo with same name.

8 years agoMerge pull request #2615 from akoeplinger/fix-perfcounter-free-mem-calculation
Alexander Köplinger [Tue, 16 Feb 2016 12:08:55 +0000 (13:08 +0100)]
Merge pull request #2615 from akoeplinger/fix-perfcounter-free-mem-calculation

[perfcounters] Fix calculation of free memory in mono_determine_physical_ram_available_size ()

8 years ago[System.Web.Services] Test DiscoveryClientProtocol
Marcos Henrich [Sat, 30 Jan 2016 11:58:12 +0000 (11:58 +0000)]
[System.Web.Services] Test DiscoveryClientProtocol

Covers #36116

8 years ago[corlib] Fix FileInfo.MoveTo with same name.
Marcos Henrich [Tue, 16 Feb 2016 11:17:19 +0000 (11:17 +0000)]
[corlib] Fix FileInfo.MoveTo with same name.

FileInfo.MoveTo was not moving a file from one directory to another when
the file name did not change.

Fixes #18361.

An ArgumentException when destFileName is an empty array was added,
otherwise FileInfoTest.MoveTo_DestFileName_Empty would fail. Both
Path.GetFullPath and File.Move throw similar exceptions but
MoveTo_DestFileName_Empty expects the one from File.Move so it was added
to this method.

8 years ago[corlib] Test FileInfo.MoveTo with files with same name
Marcos Henrich [Tue, 16 Feb 2016 10:34:08 +0000 (10:34 +0000)]
[corlib] Test FileInfo.MoveTo with files with same name

Covers #18361

8 years agoBump reference source to fix the build
Marek Safar [Mon, 15 Feb 2016 19:29:05 +0000 (20:29 +0100)]
Bump reference source to fix the build

8 years agoMerge pull request #2562 from BrzVlad/fix-drainstack-stats
Vlad Brezae [Mon, 15 Feb 2016 19:04:55 +0000 (02:04 +0700)]
Merge pull request #2562 from BrzVlad/fix-drainstack-stats

[sgen] Drain the gray stack only in finish gray stack

8 years ago[corlib] MethodInfo from reference source
Marek Safar [Mon, 15 Feb 2016 17:15:34 +0000 (18:15 +0100)]
[corlib] MethodInfo from reference source

8 years ago[mcs] Update expression tree generator to use .net 4.5 api when available. Fixes...
Marek Safar [Mon, 15 Feb 2016 15:56:29 +0000 (16:56 +0100)]
[mcs] Update expression tree generator to use .net 4.5 api when available. Fixes #38703

8 years ago[io-layer] Add Get/SetThreadPriority to wapi-remap.h
Alexander Köplinger [Mon, 15 Feb 2016 14:18:40 +0000 (15:18 +0100)]
[io-layer] Add Get/SetThreadPriority to wapi-remap.h

The new functions were added in d5768a7f141e2a579cbca26f76c791c215f4aabf but not remapped.

8 years agoMerge pull request #2619 from directhex/dont_remap_npgsql
Marek Safar [Mon, 15 Feb 2016 14:20:59 +0000 (15:20 +0100)]
Merge pull request #2619 from directhex/dont_remap_npgsql

Don't remap all versions of Npgsql to 4.0.0.0

8 years agoDon't remap all versions of Npgsql to 4.0.0.0
Jo Shields [Mon, 15 Feb 2016 14:12:52 +0000 (14:12 +0000)]
Don't remap all versions of Npgsql to 4.0.0.0

Mono has a list of assemblies considered "internal", whose versions are automatically remapped to the distro default version.

Since we no longer bundle Npgsql, it is up to individual distributions to package their own Npgsql - but Mono cannot load any version other than 4.0.0.0 from the GAC, due to this remapping:

Mono: Assembly Ref addref npghello[0x17e2fd0] -> mscorlib[0x1789c00]: 2
Mono: The request to load the assembly Npgsql v2.2.7.0 was remapped to v4.0.0.0
Mono: Assembly Loader probing location: '/usr/lib/mono/gac/Npgsql/4.0.0.0__5d8b90d52f46fda7/Npgsql.dll'.

Npgsql, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7