mono.git
7 years agoMerge pull request #3609 from xmcclure/checked-imageset
monojenkins [Thu, 22 Sep 2016 20:15:03 +0000 (22:15 +0200)]
Merge pull request #3609 from xmcclure/checked-imageset

Fix outstanding failures in "metadata" checked build mode

Fix two problems with the checked build metadata mode which were causing spurious failures, one a bug introduced by my last commit, one of which has been present since the start:

- Check assemblies in `references[]` are non-NULL before looking up their images
- A "from" imageset only needs to reference every image in the "to" imageset, it does not need to actually contain every image.

Also added support for a checked build jenkins lane.

7 years ago[mono-threads] Move platform unregister after detach (#3604)
Ludovic Henry [Thu, 22 Sep 2016 20:09:29 +0000 (22:09 +0200)]
[mono-threads] Move platform unregister after detach (#3604)

This is important as platform unregister is where we signal the thread handle, and that should be done as late as possible, but still before we switch the thread state to DETACHED and remove it from the thread list.

The fact that we do under the suspend lock shouldn't be an issue as we shouldn't call in any other code than w32handle code.

7 years agoNew run-jenkins tags to allow a checked build job and fix partial checked build suppo...
Andi McClure [Thu, 22 Sep 2016 18:08:06 +0000 (14:08 -0400)]
New run-jenkins tags to allow a checked build job and fix partial checked build support in the coop job

7 years agoFix imageset->imageset audits in checked-build "metadata" mode
Andi McClure [Thu, 22 Sep 2016 16:27:43 +0000 (12:27 -0400)]
Fix imageset->imageset audits in checked-build "metadata" mode

An imageset can reference another imageset if every image in the "to"
imageset is referenced by some image in the "from" imageset.
Previously the checked build code was requiring the stricter criteria
of every image in the "to" imageset being present in the "from"
imageset, which was not only inconsistent with image->imageset and
imageset->image reference checking, but lead to spurious failures.

An example of a scenario where the previous check logic would fail is:
Assembly A:
class ClassA<T>
Assembly B:
class ClassB<T> extends ClassA<T>, ClassB2
Attempting to run the constructor for ClassB<ClassB2> would result in
a pointer to memory in imageset [A,B] being written into a structure
located in imageset [B]. This is valid since B references A, however
the MONO_CHECK_MODE=metadata checker would flag it as an error.

7 years ago[corcompare] Another try to make breaking change not too discruptive
Marek Safar [Thu, 22 Sep 2016 18:12:16 +0000 (20:12 +0200)]
[corcompare] Another try to make breaking change not too discruptive

7 years ago[sdb] Add a SetThis () method to StackFrame which can be used to set the fields of...
Zoltan Varga [Thu, 22 Sep 2016 14:05:52 +0000 (10:05 -0400)]
[sdb] Add a SetThis () method to StackFrame which can be used to set the fields of the receiver for valuetype instance methods. Fixes #44341. (#3605)

7 years agoMerge pull request #3600 from henricm/fix-win-network-info-tests
Henric Müller [Thu, 22 Sep 2016 13:57:26 +0000 (15:57 +0200)]
Merge pull request #3600 from henricm/fix-win-network-info-tests

Fix NetworkInformation tests on Windows

7 years agoTry to use an IPv4 address first for TCP remoting (#3507)
Joshua Peterson [Thu, 22 Sep 2016 13:49:18 +0000 (09:49 -0400)]
Try to use an IPv4 address first for TCP remoting (#3507)

* In the .NET implementation of TcpServerChannel, if IPv4 is supported, the address for the host will use the first IPv4 address.
* Even if the first address is an IPv6 address, it should be skipped, as the server side will expect and IPv4 address.
* Change this implementation to look for an IPv4 address first, then fall back to whatever the first address is (IPv4 or IPv6) if things don't work out.

7 years ago[mkbundle] - Add support for bundling native libraries.
Miguel de Icaza [Thu, 22 Sep 2016 13:28:17 +0000 (09:28 -0400)]
[mkbundle] - Add support for bundling native libraries.

* [mkbundle] add support for bundling native libraries

* [glib] add g_mkdtemp

* mono: Load the various library payloads for bundled executables

* [msvc] Export mono_dl_open and mono_loader_register_module

7 years agoAdd missing file
Marek Safar [Thu, 22 Sep 2016 12:44:42 +0000 (14:44 +0200)]
Add missing file

7 years ago[colrib] Fixes aecdb91a0628efb03d0b6578e9dcdda90904ad20 and add GC tests
Marek Safar [Thu, 22 Sep 2016 12:43:00 +0000 (14:43 +0200)]
[colrib] Fixes aecdb91a0628efb03d0b6578e9dcdda90904ad20 and add GC tests

7 years ago[corcompare] Drop ParameterAttributes from method signature
Marek Safar [Thu, 22 Sep 2016 10:26:27 +0000 (12:26 +0200)]
[corcompare] Drop ParameterAttributes from method signature

7 years agoMerge pull request #3585 from lateralusX/jlorenss/win-counter-warning
Johan Lorensson [Thu, 22 Sep 2016 06:54:23 +0000 (08:54 +0200)]
Merge pull request #3585 from lateralusX/jlorenss/win-counter-warning

Resolve "you are registering twice the same counter address" warning on Windows Release builds.

7 years ago[Mono.Security]: Add 'MonoTlsConnectionInfo.PeerDomainName'.
Martin Baulig [Thu, 22 Sep 2016 05:36:29 +0000 (07:36 +0200)]
[Mono.Security]: Add 'MonoTlsConnectionInfo.PeerDomainName'.

(cherry picked from commit 0bafe8c3c7aaa58d28bbea51fe8756e053718c68)

7 years agoRemove obsolete Mono.Security.Providers.* assemblies (#3595)
Martin Baulig [Thu, 22 Sep 2016 05:20:00 +0000 (07:20 +0200)]
Remove obsolete Mono.Security.Providers.* assemblies  (#3595)

* Remove Mono.Security.Providers.NewSystemSource and Mono.Security.Providers.NewTls.

* Remove InternalVisible for "Xamarin.BoringTls".

* Remove Mono.Security.Providers.OldTls and Mono.Security.Providers.DotNet.

(cherry picked from commit 7b7b7c9b64212843842f957f6c0b84c99fc90f26)

7 years agoBack out trivial crash when running metadata checked-build mode
Andi McClure [Wed, 21 Sep 2016 21:52:51 +0000 (17:52 -0400)]
Back out trivial crash when running metadata checked-build mode
introduced by f822445711c1

7 years ago[runtime] Fix the managed name of the ReRegisterForFinalize () icall.
Zoltan Varga [Wed, 21 Sep 2016 21:51:38 +0000 (17:51 -0400)]
[runtime] Fix the managed name of the ReRegisterForFinalize () icall.

7 years agoMerge pull request #3548 from cmp-/fix-sgen-resume-thread-win32
Niklas Therning [Wed, 21 Sep 2016 17:36:03 +0000 (19:36 +0200)]
Merge pull request #3548 from cmp-/fix-sgen-resume-thread-win32

[sgen] Fix sgen_resume_thread return value on Windows

7 years ago[sgen] Fix sgen_resume_thread return value on Windows
cmp [Fri, 9 Sep 2016 17:02:16 +0000 (18:02 +0100)]
[sgen] Fix sgen_resume_thread return value on Windows

According to sgen_resume_thread in sgen-os-mach.c, the function is
supposed to return false if the thread was not suspended.

7 years ago[gacutil] Use IKVM.Reflection instead of System.Reflection (#3582)
Aleksey Kliger (λgeek) [Wed, 21 Sep 2016 16:49:12 +0000 (12:49 -0400)]
[gacutil] Use IKVM.Reflection instead of System.Reflection (#3582)

* gacutil should use System.Reflection.Assembly.ReflectionOnlyLoadFrom() since it doesn't need to run the assemblies;
* but in fact, it could also use a managed reflection library. So in this PR we change it to use IKVM.Reflection

7 years ago[w32mutex] Move own/disown code to w32mutex-unix.c (#3599)
Ludovic Henry [Wed, 21 Sep 2016 16:10:38 +0000 (18:10 +0200)]
[w32mutex] Move own/disown code to w32mutex-unix.c (#3599)

* [w32handle] Fix race condition

* [w32mutex] Improve logging

* [w32mutex] Only add to owned mutex when we own it for the first time

* [w32mutex] Move own/disown code to w32mutex-unix.c

7 years agoMerge pull request #3583 from xmcclure/test-418-checked
Andi McClure [Wed, 21 Sep 2016 14:37:19 +0000 (10:37 -0400)]
Merge pull request #3583 from xmcclure/test-418-checked

Fix issues (leaks, possible crash) around netmodule loading

7 years agoMerge pull request #3602 from henricm/fix-configuration-symlink-removed
Alexander Köplinger [Wed, 21 Sep 2016 13:38:51 +0000 (15:38 +0200)]
Merge pull request #3602 from henricm/fix-configuration-symlink-removed

Removing symlink to make Configuration tests run on Windows

7 years agoRemoving symlink to make Configuration tests run on Windows
Henric Müller [Wed, 21 Sep 2016 13:32:05 +0000 (15:32 +0200)]
Removing symlink to make Configuration tests run on Windows

7 years ago[corlib] Simplify terminal evaluator nesting expression
Marek Safar [Wed, 21 Sep 2016 13:27:35 +0000 (15:27 +0200)]
[corlib] Simplify terminal evaluator nesting expression

7 years agoMerge pull request #3547 from cmp-/remove-obsolete-stack-checks-win32
Niklas Therning [Wed, 21 Sep 2016 12:42:49 +0000 (14:42 +0200)]
Merge pull request #3547 from cmp-/remove-obsolete-stack-checks-win32

Remove obsolete stack limit checks on Windows

7 years ago[System.Core] Expose a few more System.IO.Pipes APIs on mobile
Alexander Köplinger [Tue, 20 Sep 2016 18:02:28 +0000 (20:02 +0200)]
[System.Core] Expose a few more System.IO.Pipes APIs on mobile

Required for netstandard matching.

7 years agoImplementation of GetLoopbackInterfaceIndex on Windows
Henric Müller [Wed, 21 Sep 2016 11:54:34 +0000 (13:54 +0200)]
Implementation of GetLoopbackInterfaceIndex on Windows

7 years agoIgnoring IsDnsEnabled test on Windows
Henric Müller [Wed, 21 Sep 2016 11:45:54 +0000 (13:45 +0200)]
Ignoring IsDnsEnabled test on Windows

7 years agoUsing InternalAdd to handle read only of IPAddressCollection
Henric Müller [Wed, 21 Sep 2016 11:45:04 +0000 (13:45 +0200)]
Using InternalAdd to handle read only of IPAddressCollection

The read-only nature of Win32IPAddressCollection is handled by
the base class IPAddressCollection. Therefor removing the read-only
handling in this class and use InternalAdd from base class instead.

7 years ago[mcs] Add compilergenerated attribute for private event backing fields to match newer csc
Marek Safar [Wed, 21 Sep 2016 10:53:12 +0000 (12:53 +0200)]
[mcs] Add compilergenerated attribute for private event backing fields to match newer csc

7 years agoMerge pull request #3587 from henricm/fix-set-no-delay-tcp-only
Alexander Köplinger [Wed, 21 Sep 2016 09:37:08 +0000 (11:37 +0200)]
Merge pull request #3587 from henricm/fix-set-no-delay-tcp-only

Only set NoDelay by default for protocol TCP

7 years ago[threadpool-ms] Fix race condition on domain unload (#3592)
Ludovic Henry [Wed, 21 Sep 2016 09:16:35 +0000 (11:16 +0200)]
[threadpool-ms] Fix race condition on domain unload (#3592)

This race condition has been introduced with 348d793ebb716012326b113fcdd7d4c855ffb01e. This is because we would wait on the cleanup_semaphore outside of the threadpool->domains_lock lock.

By using a cond variable instead of a semaphore, we avoid a potential deadlock.

7 years agoMerge pull request #3588 from ntherning/fix-line-ending-issue-in-XmlReflectionImporte...
Niklas Therning [Wed, 21 Sep 2016 07:39:54 +0000 (09:39 +0200)]
Merge pull request #3588 from ntherning/fix-line-ending-issue-in-XmlReflectionImporterTests-Bug594490_SerializationOfXmlLangAttribute

Fixes line ending issue in XmlReflectionImporterTests.Bug594490_SerializationOfXmlLangAttribute

7 years agoMerge pull request #3569 from lambdageek/monodis-no-segfault
Aleksey Kliger (λgeek) [Tue, 20 Sep 2016 22:09:27 +0000 (18:09 -0400)]
Merge pull request #3569 from lambdageek/monodis-no-segfault

[monodis] Don't segfault using cooperative GC.

7 years agoFix issues in previous commit
Andi McClure [Tue, 20 Sep 2016 21:12:46 +0000 (17:12 -0400)]
Fix issues in previous commit

- mono_assembly_load_module was not following MONO_RT_EXTERNAL_ONLY
  rules
- New _checked methods were not following init rules
- module[] load code was botched

7 years ago[threads] Move thread describe code to mono_thread_internal_describe (#3590)
Ludovic Henry [Tue, 20 Sep 2016 20:39:30 +0000 (22:39 +0200)]
[threads] Move thread describe code to mono_thread_internal_describe (#3590)

7 years agoFix Linux build break due to case sensitivity
Alexander Köplinger [Tue, 20 Sep 2016 17:30:04 +0000 (19:30 +0200)]
Fix Linux build break due to case sensitivity

7 years ago[System] Add more types to mobile profile
Marek Safar [Tue, 20 Sep 2016 15:55:34 +0000 (17:55 +0200)]
[System] Add more types to mobile profile

7 years ago[corlib] Remove duplicate files entries
Marek Safar [Tue, 20 Sep 2016 15:28:49 +0000 (17:28 +0200)]
[corlib] Remove duplicate files entries

7 years ago[corlib] GC from referencesource
Marek Safar [Tue, 20 Sep 2016 15:25:35 +0000 (17:25 +0200)]
[corlib] GC from referencesource

7 years agoMerge pull request #3589 from ntherning/fix-line-ending-issues-in-System.Data-tests
Marek Safar [Tue, 20 Sep 2016 15:19:12 +0000 (17:19 +0200)]
Merge pull request #3589 from ntherning/fix-line-ending-issues-in-System.Data-tests

Fixes line ending issues in System.Data tests

7 years agoFixes line ending issues in System.Data tests
Niklas Therning [Tue, 20 Sep 2016 15:12:59 +0000 (17:12 +0200)]
Fixes line ending issues in System.Data tests

To make them run successfully on Windows.

7 years ago[threads] Detach thread in all possible cases (#3584)
Ludovic Henry [Tue, 20 Sep 2016 15:12:37 +0000 (17:12 +0200)]
[threads] Detach thread in all possible cases (#3584)

* [threads] Use mono_thread_detach_internal to factor code

* [threads] Make sure we detach the thread before exiting

* [threads] Add mono_thread_internal_current_is_attached

* [threads] Ensure we detach the thread on Boehm

7 years agoResolve "you are registering twice the same counter address" warning on Windows Relea...
lateralusX [Tue, 20 Sep 2016 15:07:02 +0000 (17:07 +0200)]
Resolve "you are registering twice the same counter address" warning on Windows Release builds.

When registering profile counters on optimized Windows build you will get the following logging twice:

"you are registering twice the same counter address"

This happens since the optimizer will collapse cpu_load_1min, cpu_load_5min and cpu_load15min into
the same function on optimized Windows builds and that is not expected by register_internal.

By preventing inlining of cpu_load we can keep the different callback methods unique and optimizer
won't fold them into one single representation in the final binary.

7 years agoFixes line ending issue in XmlReflectionImporterTests.Bug594490_SerializationOfXmlLan...
Niklas Therning [Tue, 20 Sep 2016 14:42:24 +0000 (16:42 +0200)]
Fixes line ending issue in XmlReflectionImporterTests.Bug594490_SerializationOfXmlLangAttribute

This test is sensitive to the line ending mode used by git. When LF is used by
git (which is what Cygwin's git defaults to) this test fails on Windows since
CRLF will be used as line ending in the serialized XML. This patch changes the
test to use Environment.NewLine explicitly in the expected string.

7 years agoMerge pull request #3586 from henricm/fix-win-uri-tests
Marek Safar [Tue, 20 Sep 2016 13:05:10 +0000 (15:05 +0200)]
Merge pull request #3586 from henricm/fix-win-uri-tests

Ignoring URI tests with unix path on windows

7 years agoOnly set NoDelay by default for protocol TCP
Henric Müller [Tue, 20 Sep 2016 12:00:39 +0000 (14:00 +0200)]
Only set NoDelay by default for protocol TCP

7 years agoRewrite 67cdb99 to make more sense and don't regress
Marek Safar [Tue, 20 Sep 2016 11:14:13 +0000 (13:14 +0200)]
Rewrite 67cdb99 to make more sense and don't regress

7 years agoIgnoring URI tests with unix path on windows
Henric Müller [Tue, 20 Sep 2016 09:42:09 +0000 (11:42 +0200)]
Ignoring URI tests with unix path on windows

In the .NET runtime, parsing unix paths like "/foo"
on Windows fails. Therefore ignoring tests with such paths
when running tests on Windows.

7 years agoMerge pull request #3578 from henricm/fix-win-process-test
Alexander Köplinger [Tue, 20 Sep 2016 09:12:01 +0000 (11:12 +0200)]
Merge pull request #3578 from henricm/fix-win-process-test

Fixes for ProcessTest on Windows

7 years agoAdd link to Bugzilla ticket for unifying the behavior between .NET and Mono
Alexander Köplinger [Tue, 20 Sep 2016 09:11:46 +0000 (11:11 +0200)]
Add link to Bugzilla ticket for unifying the behavior between .NET and Mono

7 years ago[corlib] Cleanup more warnings
Marek Safar [Tue, 20 Sep 2016 09:05:20 +0000 (11:05 +0200)]
[corlib] Cleanup more warnings

7 years ago[mcs] Warn about unused local constants
Marek Safar [Tue, 20 Sep 2016 08:42:17 +0000 (10:42 +0200)]
[mcs] Warn about unused local constants

7 years agoMerge pull request #3580 from esdrubal/msym_no_cecil_ref
Marek Safar [Tue, 20 Sep 2016 08:57:47 +0000 (10:57 +0200)]
Merge pull request #3580 from esdrubal/msym_no_cecil_ref

[mono-symbolicate] Added Mono.Cecil sources.

7 years agoMerge pull request #3577 from ntherning/fix-path-to-mono-exe-in-soft-debugger-tests...
Niklas Therning [Tue, 20 Sep 2016 05:50:37 +0000 (07:50 +0200)]
Merge pull request #3577 from ntherning/fix-path-to-mono-exe-in-soft-debugger-tests-on-windows

Use the path of the current executable by default in soft debugger test on Windows to launch the child mono process

7 years agoSafety check for "diamond dependencies" on netmodules
Andi McClure [Mon, 19 Sep 2016 21:55:33 +0000 (17:55 -0400)]
Safety check for "diamond dependencies" on netmodules

This is something I noticed while following up on an issue with
mcs/tests/test-418.exe. The ECMA-335 spec contains the text:

    "Usually, a module belongs only to one assembly, but it is
possible to share it across assemblies. When assembly A is loaded at
runtime, an instance of M3 will be loaded for it. When assembly B is
loaded into the same application domain, possibly simultaneously with
assembly A, M3 will be shared for both assemblies. Both assemblies
also reference F2, for which similar rules apply."

What happens in Mono when two assemblies both load the same module? We
never planned for that possibility in our architecture. Looking at our
current code, when an assembly image loads a module image into its
modules[] or files[] array, it immediately sets the "assembly" field
of that module to its own MonoAssembly. This field is a plain C
pointer with no safety on it whatsoever, and is references in various
places including by icalls. Consider the following scenario:

- Assembly A is loaded, references module M3, sets M3->assembly to
  A->assembly.
- Assembly B is loaded, references module M3, sets M3->assembly to
  b->assembly.
- Assembly B is unloaded.

At this point the image for B is unloaded, but M3 is still alive
because A keeps it alive, and its image contains a C pointer to freed
memory. There is likely some way to trigger a crash from this point.

Because the above scenario is fairly exotic, I dealt with it by just
causing the module loader to detect when multiple assemblies are
referencing the same module and throwing an exception in this case. I
also added a test to verify the exception is thrown. Allowing the
module load to raise an exception required adding _checked versions of
several functions.

7 years agoFix leaks, checked build support around netmodules loaded as "files"
Andi McClure [Mon, 19 Sep 2016 21:55:08 +0000 (17:55 -0400)]
Fix leaks, checked build support around netmodules loaded as "files"

Test mcs/tests/test-418.exe was failing when running a checked build
with MONO_CHECK_MODE=metadata. I audited how images track their
modules and fixed the following issues:

1. The checked build metadata "reference audit" was following
references stored in the "modules" field, but not the "files" field. I
changed the audit code to follow both.
2. Loading a module into the "modules[]" field was causing a leak
because mono_image_addref() was being called after
mono_image_open_full(), even though mono_image_open_full itself
returns the module +1. I removed the addref.
3. Loading a module into the "files[]" field was causing a leak
because we were opening the module with mono_image_open_full and then
never attempting to close it. I modified our image close to do the
same thing to "files[]" we do to "modules[]".

In order for 1 and 3 to work, I modified MonoImages to track the size
of the "files[]" field.

7 years agoMerge pull request #3567 from BrzVlad/fix-conc-memusage2
Vlad Brezae [Mon, 19 Sep 2016 18:05:27 +0000 (21:05 +0300)]
Merge pull request #3567 from BrzVlad/fix-conc-memusage2

[sgen] Fix concurrent memory usage

7 years ago[Facades] Another define fix
Alexander Köplinger [Mon, 19 Sep 2016 17:57:45 +0000 (19:57 +0200)]
[Facades] Another define fix

It was missed in https://github.com/mono/mono/commit/c84760250884989e10d707c049fd0aacae79c93e.

7 years ago[Facades] Use correct define
Marek Safar [Mon, 19 Sep 2016 16:55:11 +0000 (18:55 +0200)]
[Facades] Use correct define

7 years agoMerge pull request #3522 from henricm/fix-csharp-compiler-path-windows
Alexander Köplinger [Mon, 19 Sep 2016 16:25:10 +0000 (18:25 +0200)]
Merge pull request #3522 from henricm/fix-csharp-compiler-path-windows

Using running process to determine mono exe path on windows

7 years ago[mono-symbolicate] Added Mono.Cecil sources.
Marcos Henrich [Mon, 19 Sep 2016 15:44:33 +0000 (16:44 +0100)]
[mono-symbolicate] Added Mono.Cecil sources.

Mono.Cecil.Mdb is not installed with mono.
Instead of reference Mono.Cecil.Mdb we now add its sources directly.
Mono.Cecil internals are visible to Mono.Cecil.Mdb, but not to
mono-symbolicate so we add Mono.Cecil source too.

Fixes mono-symbolicate not working with installed mono.

7 years agoMerge pull request #3579 from radical/mcs-ignore-args
Alexander Köplinger [Mon, 19 Sep 2016 15:15:25 +0000 (17:15 +0200)]
Merge pull request #3579 from radical/mcs-ignore-args

[mcs] Accept and ignore command line args supported by csc that we don't

7 years ago[mcs] Accept and ignore command line args supported by csc that we don't
Ankit Jain [Mon, 19 Sep 2016 15:09:55 +0000 (11:09 -0400)]
[mcs] Accept and ignore command line args supported by csc that we don't

.. support:

/publicsign+
/publicsign-

7 years ago[mcs] Fixes codegen of predefined pointer arithmetic operators with user defined...
Marek Safar [Mon, 19 Sep 2016 14:47:21 +0000 (16:47 +0200)]
[mcs] Fixes codegen of predefined pointer arithmetic operators with user defined operator conversion for one of operands. Fixes #44440

7 years agoFixes for ProcessTest on Windows
Henric Müller [Mon, 19 Sep 2016 14:28:30 +0000 (16:28 +0200)]
Fixes for ProcessTest on Windows

* Checking more error codes on whitespace tests.
* Using findstr instead of type to enable stdin/out pipes.

7 years agoUse the path of the current executable by default in soft debugger tests on
Niklas Therning [Mon, 19 Sep 2016 12:11:54 +0000 (14:11 +0200)]
Use the path of the current executable by default in soft debugger tests on
Windows to launch the child mono process

The 'mono' shell script generated by the Cygwin make file system doesn't work
when running the soft debugger tests against an MSVC built mono executable.
This patch first tries with the main module of the current process when
running on Windows (and mono is built using MSVC). If it looks like a mono
executable the tests will use it before falling back to the shell script.

7 years ago[bcl] Add more reflection types to monotouch
Marek Safar [Mon, 19 Sep 2016 11:20:41 +0000 (13:20 +0200)]
[bcl] Add more reflection types to monotouch

7 years agoMerge pull request #3576 from ntherning/ignore-FileSecurityTest.EveryoneMayNotBeOwner...
Marek Safar [Mon, 19 Sep 2016 10:48:19 +0000 (12:48 +0200)]
Merge pull request #3576 from ntherning/ignore-FileSecurityTest.EveryoneMayNotBeOwner-when-Administrator

Ignore the FileSecurityTest.EveryoneMayNotBeOwner test when running as Administrator

7 years ago[mkbundle] support satellite assemblies (#3448)
Marek Habersack [Mon, 19 Sep 2016 09:51:24 +0000 (11:51 +0200)]
[mkbundle] support satellite assemblies (#3448)

Satellite assemblies are special in that they all share the same file
name, but they live in separate directories named after the locale the
satellite assemblies pack. mkbundle currently doesn't support "clashing"
assembly filenames and will not be able to store the satellite
assemblies in the bundle for that reason.

This patch adds support for storing satellite assemblies with their
culture path prefix (e.g. en-US/MyAssembly.resources.dll) in the bundle
and also special code in the assembly loader to support such filenames
in the code which loads assemblies from the bundle.

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

7 years agoIgnore the FileSecurityTest.EveryoneMayNotBeOwner test when running as
Niklas Therning [Mon, 19 Sep 2016 09:01:41 +0000 (11:01 +0200)]
Ignore the FileSecurityTest.EveryoneMayNotBeOwner test when running as
Administrator

This test fails when running as Administrator since Administrator CAN set the
owner to Everyone. This patch ignores the test when running as Administrator.
The check has to be done after the File.SetAccessControl() call that is
expected to fail since when we aren't running as Administrator the IsInRole()
check will trigger UAC which we need to prevent when possible.

7 years agoMerge pull request #3573 from ntherning/replace-NUnit-Culture-with-SetCulture
Marek Safar [Fri, 16 Sep 2016 18:01:08 +0000 (20:01 +0200)]
Merge pull request #3573 from ntherning/replace-NUnit-Culture-with-SetCulture

Use NUnit's SetCulture attribute rather than Culture

7 years ago[sgen] Trim worker gray queue after finishing concurrent mark
Vlad Brezae [Tue, 13 Sep 2016 20:04:40 +0000 (23:04 +0300)]
[sgen] Trim worker gray queue after finishing concurrent mark

This was keeping around potentially many unused gray queue sections, or even constantly leaking in the case of many majors since every time we start a concurrent major we redirect some additional gray queue sections from main to worker thread gray queues, leading to unbounded growth. The gc thread always trims its gray queues at the end of the collection.

On graph8 this reduces memory usage by 5%. Fixes mem leak from #41995

7 years ago[sgen] We don't need to trim the free list when finishing gray stack
Vlad Brezae [Thu, 15 Sep 2016 13:24:20 +0000 (16:24 +0300)]
[sgen] We don't need to trim the free list when finishing gray stack

We always dispose the gray queue at the end of the collection, which implies its trimming.

7 years ago[sgen] Increase counter when actually allocating gray sections
Vlad Brezae [Tue, 13 Sep 2016 19:59:41 +0000 (22:59 +0300)]
[sgen] Increase counter when actually allocating gray sections

7 years agoMerge pull request #3562 from BrzVlad/fix-reverse-wbarrier
Vlad Brezae [Fri, 16 Sep 2016 17:43:46 +0000 (20:43 +0300)]
Merge pull request #3562 from BrzVlad/fix-reverse-wbarrier

[jit] Fix missing wbarrier for array generic setter

7 years agoMerge pull request #3565 from vargaz/no-free-imt-thunks
Rodrigo Kumpera [Fri, 16 Sep 2016 17:13:54 +0000 (10:13 -0700)]
Merge pull request #3565 from vargaz/no-free-imt-thunks

[runtime] Avoid freeing IMT thunks, some threads might still be execu…

7 years ago[corlib] Add missing apis
Marek Safar [Fri, 16 Sep 2016 16:05:34 +0000 (18:05 +0200)]
[corlib] Add missing apis

7 years agoMerge pull request #3574 from ntherning/disable-tests-with-com-instantiation-on-mono...
Niklas Therning [Fri, 16 Sep 2016 15:04:13 +0000 (17:04 +0200)]
Merge pull request #3574 from ntherning/disable-tests-with-com-instantiation-on-mono-on-windows

Disable tests which instantiate COM objects on Windows

7 years agoDisable tests which instantiate COM objects on Windows
Niklas Therning [Fri, 16 Sep 2016 14:59:03 +0000 (16:59 +0200)]
Disable tests which instantiate COM objects on Windows

COM is not working on Mono on Windows and adding support for it is not a
priority at the moment.

7 years ago[System.Net.Http] Show invalid values added to HttpHeaderValueCollection. to Fixes...
Marek Safar [Fri, 16 Sep 2016 13:47:50 +0000 (15:47 +0200)]
[System.Net.Http] Show invalid values added to HttpHeaderValueCollection. to Fixes #44413.

7 years ago[mcs] Delay array base type interfaces initialization. Fixes #44402
Marek Safar [Fri, 16 Sep 2016 11:12:34 +0000 (13:12 +0200)]
[mcs] Delay array base type interfaces initialization. Fixes #44402

7 years agoMerge pull request #3564 from henricm/thread-safe-win32eventlog-notifications
Marek Safar [Fri, 16 Sep 2016 12:58:29 +0000 (14:58 +0200)]
Merge pull request #3564 from henricm/thread-safe-win32eventlog-notifications

Making Win32EventLog notification thread safe

7 years agoMerge pull request #3545 from ntherning/throw-AbandonedMutexException-on-unix
Niklas Therning [Fri, 16 Sep 2016 12:57:21 +0000 (14:57 +0200)]
Merge pull request #3545 from ntherning/throw-AbandonedMutexException-on-unix

Correctly handle abandoned mutexes on non-Windows platforms

7 years agoUse NUnit's SetCulture attribute rather than Culture
Niklas Therning [Fri, 16 Sep 2016 12:47:47 +0000 (14:47 +0200)]
Use NUnit's SetCulture attribute rather than Culture

A few tests are currently ignored when running on a system where the default
culture isn't "en" or "en-US". This patch changes Culture attributes to
SetCulture attributes instead to make those tests run on all system and make
NUnit set the culture to the required one during the test run.

Also found and fixed a test failure in one of these methods,
DateTimeTest.ToUniversalTime_TimeZoneOffsetShouldNotOverflow(), which assumed
the minimum year is 0 while it's actually 1. Confirmed that this is the case
on .NET as well.

7 years agoMaking Win32EventLog notification thread safe
Henric Müller [Fri, 16 Sep 2016 12:17:17 +0000 (14:17 +0200)]
Making Win32EventLog notification thread safe

The _notifyResetEvent could be closed and nulled and the
NotifyEventThread would still try to read from the event log.
Also multiple calls to EnableNotification would cause issues.
With this fix, we make sure only one notify event thread is
running and that we thread safe the disabling of notifications.

7 years ago[runtime] Fix build
Ludovic Henry [Fri, 16 Sep 2016 09:48:47 +0000 (11:48 +0200)]
[runtime] Fix build

7 years ago[threads] Check InternalThread.last just after checking corlib version
Ludovic Henry [Fri, 16 Sep 2016 09:46:46 +0000 (11:46 +0200)]
[threads] Check InternalThread.last just after checking corlib version

7 years ago[io-layer] include `w32mutex-utils.h` (#3568)
Bernhard Urban [Fri, 16 Sep 2016 09:24:27 +0000 (02:24 -0700)]
[io-layer] include `w32mutex-utils.h` (#3568)

7 years agoCorrectly handle abandoned mutexes on non-Windows platforms
Niklas Therning [Thu, 15 Sep 2016 11:39:03 +0000 (13:39 +0200)]
Correctly handle abandoned mutexes on non-Windows platforms

When a thread owning a mutex doesn't release it before it exits and a second
thread tries to take it using e.g. Mutex.WaitOne() an AbandonedMutexException
should be thrown. This is what .NET and Mono on Windows does.

This commit builds on the work done in PR #2267, which modifies the Win32
emulation of WaitForSingleObjectEx(), SignalObjectAndWait() and
WaitForMultipleObjectsEx() to return WAIT_ABANDONED_0 when expected, and
updates it to the current HEAD. It also adds a few test methods to
WaitHandleTest that test that WaitHandle.WaitAny() and WaitHandle.WaitAll()
follows the .NET behaviour.

7 years agoCorrectly handle abandoned mutexes on non-Windows platforms
Niklas Therning [Thu, 15 Sep 2016 10:51:09 +0000 (12:51 +0200)]
Correctly handle abandoned mutexes on non-Windows platforms

When a thread owning a mutex doesn't release it before it exits and a second
thread tries to take it using e.g. Mutex.WaitOne() an AbandonedMutexException
should be thrown. This is what .NET and Mono on Windows does.

This commit adds the infrastructure needed in the Win32 emulation layer to
coomunicate that a mutex has been abandoned. It builds on the work done in
PR #2267 and updates it to the current HEAD.

7 years ago[mcs] Report more errors for nameof expressions. Fixes #44168
Marek Safar [Fri, 16 Sep 2016 08:55:41 +0000 (10:55 +0200)]
[mcs] Report more errors for nameof expressions. Fixes #44168

7 years agoMerge pull request #3566 from ntherning/fix-time-zone-issues-on-windows
Marek Safar [Fri, 16 Sep 2016 08:26:38 +0000 (10:26 +0200)]
Merge pull request #3566 from ntherning/fix-time-zone-issues-on-windows

Fixes time zone issues when running on Windows

7 years agoRevert "[loader] Tests for RefereceAssemblyAttribute support"
Zoltan Varga [Thu, 15 Sep 2016 23:44:10 +0000 (19:44 -0400)]
Revert "[loader] Tests for RefereceAssemblyAttribute support"

This reverts commit 31de4df835d27ec750fc81739bdd84a87a2efaa7.

Revert this as the corresponding fix was reverted.

7 years ago[monodis] Don't segfault using cooperative GC.
Aleksey Kliger [Thu, 15 Sep 2016 22:04:54 +0000 (18:04 -0400)]
[monodis] Don't segfault using cooperative GC.

monodis with coop enabled segfaulted in mono_thread_info_attach

7 years ago[winx64] Mark some inline functions static to hopefully fix the mxe build.
Zoltan Varga [Thu, 15 Sep 2016 18:06:21 +0000 (14:06 -0400)]
[winx64] Mark some inline functions static to hopefully fix the mxe build.

7 years ago[runtime] Add a counter for the number of freed IMT trampolines.
Zoltan Varga [Thu, 15 Sep 2016 16:30:25 +0000 (12:30 -0400)]
[runtime] Add a counter for the number of freed IMT trampolines.

7 years ago[corlib] Use simple BinaryCompatibility as anywhere else
Marek Safar [Thu, 15 Sep 2016 15:22:23 +0000 (17:22 +0200)]
[corlib] Use simple BinaryCompatibility as anywhere else

7 years ago[bcl] Fix few warnings
Marek Safar [Thu, 15 Sep 2016 15:12:38 +0000 (17:12 +0200)]
[bcl] Fix few warnings