mono.git
7 years ago[sgen] Fix mod union consistency check
Vlad Brezae [Tue, 6 Sep 2016 16:57:48 +0000 (19:57 +0300)]
[sgen] Fix mod union consistency check

We don't need a mod union to mark an object with concurrent mark&sweep.

7 years ago[sgen] Don't do remset consistency checks during majors
Vlad Brezae [Tue, 6 Sep 2016 16:30:31 +0000 (19:30 +0300)]
[sgen] Don't do remset consistency checks during majors

It doesn't make sense to check the remset during a major since majors dont use the cardtable and we clear it at the start. So we will obviously have missing remsets. For the debugging concurrent case, we should use the mod union consistency checks instead.

7 years ago[sgen] Don't verify the heap after a major
Vlad Brezae [Tue, 6 Sep 2016 15:20:54 +0000 (18:20 +0300)]
[sgen] Don't verify the heap after a major

We would need to deal with scanning forwarded objects and dead objects which is not worth it. Only verify the heap at the start of a collection, as indicated by the name of the flag.

7 years ago[sgen] Fix missing remsets with verify before collections
Vlad Brezae [Tue, 6 Sep 2016 13:43:54 +0000 (16:43 +0300)]
[sgen] Fix missing remsets with verify before collections

When verifying the heap we need to have the set of pinned objects otherwise we can observe missing remsets if suspended between the store and the write barrier. If we don't have the set of pinned objects, allow missing remsets.

7 years ago[sgen] Remove unused parameter
Vlad Brezae [Mon, 5 Sep 2016 11:12:00 +0000 (14:12 +0300)]
[sgen] Remove unused parameter

We never do nursery collections as part of the concurrent finishing pause

7 years agoMerge pull request #3418 from BrzVlad/fix-arm64-finalizer-wait
Vlad Brezae [Fri, 19 Aug 2016 08:28:54 +0000 (11:28 +0300)]
Merge pull request #3418 from BrzVlad/fix-arm64-finalizer-wait

[arm64] Fix atomics

7 years ago[arm64] Add sequential memory constraint to swap, cas and add
Vlad Brezae [Thu, 18 Aug 2016 20:11:06 +0000 (13:11 -0700)]
[arm64] Add sequential memory constraint to swap, cas and add

Previously we were wrongly trying to achieve this by doing a load-acq followed by a store-rel. Assuming we have memory access on address A (before) and C (after) while the atomic operation happens on address B, the order of the instructions would look like this :

[A], [B]load, load-acq, store-rel, [B]store, [C]

In this case a reordering of memory accesses like the following is possible, which clearly breaks the desired constraints :

[B]load, load-acq, [C], [A], store-rel, [B]store

In order to provide the sequential memory constraint we could emit the barriers like this instead :

[A], membar, [B]load, [B]store, membar, [C]

We can additionally save an instruction and emit the barriers like this instead (this is also what gcc does) :

[A], [B]load, store-rel, [B]store, membar, [C]

In this case we only need to worry about the relation between memory accesses on A and the loading of B. We need to consider what happens if B is loaded before the access on A is fulfilled. This only matters if we load an older value for B (rather than the one visible by other threads) before A. In that case the erroneous store will fail due to using exclusive stores. At the retry the value read from B will be the right one.

7 years ago[mcs] Fix wrong range check for pragma warning CSxxx. Fixes #43471
Marek Safar [Thu, 18 Aug 2016 21:04:32 +0000 (23:04 +0200)]
[mcs] Fix wrong range check for pragma warning CSxxx. Fixes #43471

7 years agoMerge pull request #3415 from ludovic-henry/net_2_1-to-mobile
Ludovic Henry [Thu, 18 Aug 2016 19:39:39 +0000 (21:39 +0200)]
Merge pull request #3415 from ludovic-henry/net_2_1-to-mobile

[mcs] Replace NET_2_1 by MOBILE

7 years ago[arm64] Add full memory sequencing to atomic loads when necessary
Vlad Brezae [Thu, 18 Aug 2016 19:28:59 +0000 (12:28 -0700)]
[arm64] Add full memory sequencing to atomic loads when necessary

Loads with acquire semantics guarantee that following memory accesses are not reordered with the load. Add full membar before it to ensure full sequencing.

7 years ago[arm64] Add full memory sequencing to atomic stores when necessary
Vlad Brezae [Thu, 18 Aug 2016 19:15:24 +0000 (12:15 -0700)]
[arm64] Add full memory sequencing to atomic stores when necessary

Stores with release semantics guarantee that previous memory accesses are not reordered with the store. Add a full membar after it to ensure full sequencing.

7 years agoMerge pull request #3412 from ntherning/fix-stack-alignment-issue-in-handler-block...
Niklas Therning [Thu, 18 Aug 2016 16:16:18 +0000 (18:16 +0200)]
Merge pull request #3412 from ntherning/fix-stack-alignment-issue-in-handler-block-trampoline-on-win64

Fixes stack alignment issue in handler_block_trampoline on Win64

7 years ago[mcs] Remove dead code
Ludovic Henry [Thu, 18 Aug 2016 14:38:50 +0000 (16:38 +0200)]
[mcs] Remove dead code

7 years ago[mcs] Replace NET_2_1 by MOBILE
Ludovic Henry [Wed, 17 Aug 2016 15:40:30 +0000 (17:40 +0200)]
[mcs] Replace NET_2_1 by MOBILE

NET_2_1 is also defined whenever we define MOBILE, so they have the same effect. Silverlight was 2.1 but it's been dead for a while now, and we do not even support it.

7 years agoFixes stack alignment issue in handler_block_trampoline on Win64
Niklas Therning [Thu, 18 Aug 2016 09:00:50 +0000 (11:00 +0200)]
Fixes stack alignment issue in handler_block_trampoline on Win64

On Win64 Mono doesn't (yet) implement fast JIT TLS (mono_get_jit_tls_offset()
returns -1). This means that the code in
mono_arch_create_handler_block_trampoline() takes the code path in the "else"
which is the same code path taken when AOT compiling. The code generated in
this code path manipulates the stack pointer to ensure it's aligned properly
according to the ABI (RSP-8 is 16-byte aligned on function entry) for the AOT
case where the mono_handler_block_guard_trampoline() C function is called
directly from the handler_block_trampoline.

This patch unifies the JIT and AOT generated code to be as similar as possible
and gets rid of the fast path. There's no need for this code to be fast. The
handler_block_trampoline will after this patch call
mono_handler_block_guard_trampoline() directly, both in JIT and in AOT mode,
and then jump back to the saved return address itself rather than let the
MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD generic trampoline do this.

The tests mono/tests/finally_block_ending_in_dead_bb.exe and
mono/tests/block_guard_restore_aligment_on_exit.exe trigger this bug.

7 years agoMerge pull request #3401 from BrzVlad/fix-managed-alloc2
Vlad Brezae [Thu, 18 Aug 2016 08:29:49 +0000 (11:29 +0300)]
Merge pull request #3401 from BrzVlad/fix-managed-alloc2

[sgen] Fix managed alloc

7 years agoMerge pull request #3410 from lateralusX/jlorenss/vs2015-test-debug-projects
Niklas Therning [Thu, 18 Aug 2016 06:49:42 +0000 (08:49 +0200)]
Merge pull request #3410 from lateralusX/jlorenss/vs2015-test-debug-projects

Visual Studio test/debug mono runtime utility projects.

7 years ago[mkbundle] add support for distributing I18N encoding files and improved the man...
Miguel de Icaza [Thu, 18 Aug 2016 02:49:56 +0000 (22:49 -0400)]
[mkbundle] add support for distributing I18N encoding files and improved the man page

7 years ago[aot] Fallback to slowpath managed alloc if we fail to create the normal one
Vlad Brezae [Fri, 12 Aug 2016 19:03:13 +0000 (22:03 +0300)]
[aot] Fallback to slowpath managed alloc if we fail to create the normal one

The slowpath managed allocator doesn't require any tls support.

Fixes #42169.

7 years ago[sgen] Unify tls access across with/without HAVE_KW_THREAD platforms
Vlad Brezae [Fri, 12 Aug 2016 16:29:45 +0000 (19:29 +0300)]
[sgen] Unify tls access across with/without HAVE_KW_THREAD platforms

Simplify code by always accessing tlab information and inside_critial_region through the SgenThreadInfo pointer. This also fixes potential failure to detect that we are in a critical region within the managed allocator.

7 years ago[aot] Don't aot methods that use tls on HAVE_KW_THREAD platforms
Vlad Brezae [Thu, 11 Aug 2016 20:28:49 +0000 (23:28 +0300)]
[aot] Don't aot methods that use tls on HAVE_KW_THREAD platforms

MONO_THREAD_VAR_OFFSET definitions don't work when loading mono as a dynamic library. This means that we need to be conservative and don't aot code that contains these tls chunks.

In the future, we should remove HAVE_KW_THREAD altogether and use only pthread since it simplifies the code alot.

7 years ago[runtime] Fix unhandled exception fatal error message. Fixes #43410 (#3404)
Aleksey Kliger (λgeek) [Wed, 17 Aug 2016 19:33:03 +0000 (15:33 -0400)]
[runtime] Fix unhandled exception fatal error message. Fixes #43410 (#3404)

Partially revert bcbd0ac0c018b0a68caa63ac1135052b2082f468

7 years agoBump binary-reference-assemblies
Marek Safar [Wed, 17 Aug 2016 15:49:46 +0000 (17:49 +0200)]
Bump binary-reference-assemblies

7 years ago[bcl] Remove wrong ReferenceAssemblyAttribute(s)
Marek Safar [Wed, 17 Aug 2016 13:15:47 +0000 (15:15 +0200)]
[bcl] Remove wrong ReferenceAssemblyAttribute(s)

7 years agoVisual Studio test/debug mono runtime utility projects.
lateralusX [Wed, 17 Aug 2016 11:49:23 +0000 (13:49 +0200)]
Visual Studio test/debug mono runtime utility projects.

Added a couple of new/updated test/debug Visual Studio utility projects.
These projects can be used to quicker get up to speed when there is a need
to run/test/debug mono runtime tests inside Visual Studio debugger.

Added utility projects can be used to run mini regression tests using JIT as
well as compile/run full AOT:ed versions of mini regression tests or other assemblies.
The different .prop files are also organized so they can be reused when adding additional
run/test/debug projects going forward.

7 years ago[System] Change WebRequest::BeginGetRequestStream driven IAsyncResult::CompletedSynch...
Marek Safar [Wed, 17 Aug 2016 11:46:42 +0000 (13:46 +0200)]
[System] Change WebRequest::BeginGetRequestStream driven IAsyncResult::CompletedSynchronously to match .net. Fixes #32374

7 years ago[tests] Move constant-division.cs to the BASE_TEST_MOBILE_STATIC_NOT_SUPPORTED group
Alexander Köplinger [Wed, 17 Aug 2016 09:28:45 +0000 (11:28 +0200)]
[tests] Move constant-division.cs to the BASE_TEST_MOBILE_STATIC_NOT_SUPPORTED group

It relies on System.Reflection.Emit which means it doesn't work on mobile_static.

7 years agomono_os_cond_timedwait: fix function name in g_error string (#3407)
Craig McQueen [Wed, 17 Aug 2016 07:42:48 +0000 (17:42 +1000)]
mono_os_cond_timedwait: fix function name in g_error string (#3407)

It should say gettimeofday, not pthread_cond_timedwait. (This appears to
be a copy-and-paste error.)

7 years ago[ServiceModel] Don't throw in dummy InstanceContext constructor on mobile/xammac_4_5
Alexander Köplinger [Tue, 16 Aug 2016 20:10:42 +0000 (22:10 +0200)]
[ServiceModel] Don't throw in dummy InstanceContext constructor on mobile/xammac_4_5

Otherwise the NotImplementedException would prevent instantiating the class even though
we just use it as a dummy object on mobile.

7 years ago[System] Report an error instead of success when proxy authentication is required...
Marek Safar [Tue, 16 Aug 2016 20:21:05 +0000 (22:21 +0200)]
[System] Report an error instead of success when proxy authentication is required. Fixes #19594

7 years ago[linker] Update mscorlib.xml to include some Mono.RuntimeStructs
Aleksey Kliger [Tue, 16 Aug 2016 20:06:35 +0000 (16:06 -0400)]
[linker] Update mscorlib.xml to include some Mono.RuntimeStructs

Followup to
https://github.com/mono/mono/commit/70d7f5e35059bdb64d3c6b7e42d7ad5120b476d6

7 years agoFix the full-aot build.
Zoltan Varga [Tue, 16 Aug 2016 17:21:31 +0000 (19:21 +0200)]
Fix the full-aot build.

7 years agoMerge pull request #3403 from ntherning/fix-handler-block-trampoline-crash-on-win64
Niklas Therning [Tue, 16 Aug 2016 15:26:06 +0000 (17:26 +0200)]
Merge pull request #3403 from ntherning/fix-handler-block-trampoline-crash-on-win64

Fixes illegal CALL emitted in handler_block_trampoline on Win64

7 years ago[System] Put back handling of direct ip addresses to ServicePoint::HostEntry (removed...
Marek Safar [Tue, 16 Aug 2016 13:15:05 +0000 (15:15 +0200)]
[System] Put back handling of direct ip addresses to ServicePoint::HostEntry (removed in 932359f). Fixes #42864

7 years ago[mcs] Avoid agressive generic members inflation from using static. Fixes #43400
Marek Safar [Tue, 16 Aug 2016 11:57:23 +0000 (13:57 +0200)]
[mcs] Avoid agressive generic members inflation from using static. Fixes #43400

7 years agoFixes illegal CALL emitted in handler_block_trampoline on Win64.
Niklas Therning [Tue, 16 Aug 2016 08:46:36 +0000 (10:46 +0200)]
Fixes illegal CALL emitted in handler_block_trampoline on Win64.

The code in mono_arch_create_handler_block_trampoline() in tramp-amd64.c emits
a relative CALL which calls the mono_amd64_handler_block_trampoline_helper()
functions via:

  amd64_call_code (code, mono_amd64_handler_block_trampoline_helper)

This macro however only works properly for offsets less than 32-bits. For
64-bit offsets it truncates the offset to a 32-bit number. On Win64 the offset
in this case is always a number larger than 2^32. The emitted CALL will jump
to an illegal address causing a crash.

This patch changes the emitted code sequence to load the address of
mono_amd64_handler_block_trampoline_helper() to RAX and then calls the address
in RAX.

The test mono/tests/finally_block_ending_in_dead_bb.exe triggered this bug.
After this patch the test still crashes but in a new way related to another
bug.

7 years ago[linker] Bring various descriptors that were updated in iOS, but not on desktop Mono
Miguel de Icaza [Tue, 16 Aug 2016 03:56:01 +0000 (23:56 -0400)]
[linker] Bring various descriptors that were updated in iOS, but not on desktop Mono

7 years ago[linker] Update descriptors for mscorlib to include the new _ThreadPoolWaitCallback
Miguel de Icaza [Tue, 16 Aug 2016 03:39:30 +0000 (23:39 -0400)]
[linker] Update descriptors for mscorlib to include the new _ThreadPoolWaitCallback

7 years ago[runtime] Cleanup naming of SRE icalls. NFC. (#3402)
Zoltan Varga [Mon, 15 Aug 2016 21:24:19 +0000 (23:24 +0200)]
[runtime] Cleanup naming of SRE icalls. NFC. (#3402)

Name the icall functions ves_icall_<TypeName>_<MethodName>. Move the SRE icalls to reflection.c from icall.c.

7 years ago[mcs] Don't reset temporary stack fields too early. Fixes #43265
Marek Safar [Mon, 15 Aug 2016 18:59:41 +0000 (20:59 +0200)]
[mcs] Don't reset temporary stack fields too early. Fixes #43265

7 years ago[reflection] Don't crash when building dynamic custom attributes on dynamic types...
Aleksey Kliger (λgeek) [Mon, 15 Aug 2016 19:05:14 +0000 (15:05 -0400)]
[reflection] Don't crash when building dynamic custom attributes on dynamic types (Fixes #43291) (#3399)

* [corlib] Regression test for non-visible custom attributes.

See https://bugzilla.xamarin.com/show_bug.cgi?id=43291

* [reflection] Don't crash when building dynamic custom attributes on dynamic types (Fixes #43291)

1. Don't dereference a NULL custom attribute ctor, throw a type load
   exception.
2. When building MonoCustomAttrInfo from an array of
   MonoReflectinoCustomAttr*, compute the number of
   non-visible (non-public) attributes correctly, and make sure to
   iterate over all the attributes when populating the result array.

Fixes [#43291](https://bugzilla.xamarin.com/show_bug.cgi?id=43291)

* [reflection] Marginally better TLE for custom attrs

At least include a message about what went wrong when trying to
construct a custom attribute from a type that isn't finished yet.

7 years ago[runtime] Fix warnings.
Zoltan Varga [Mon, 15 Aug 2016 14:30:04 +0000 (16:30 +0200)]
[runtime] Fix warnings.

7 years agoFix the build.
Martin Baulig [Mon, 15 Aug 2016 13:57:13 +0000 (15:57 +0200)]
Fix the build.

Use the desktop version of MonoTlsProviderFactory.CreateDefaultProviderImpl()
in the 'mobile_static' profile.

7 years agoMerge pull request #3396 from ntherning/fix-async-exc-compilation-on-windows
Niklas Therning [Mon, 15 Aug 2016 07:59:46 +0000 (09:59 +0200)]
Merge pull request #3396 from ntherning/fix-async-exc-compilation-on-windows

Fix the failure of the async-exc-compilation.exe test on Windows

7 years agoFix empty hostname in GetHostByName on windows (#3397)
Henric Müller [Mon, 15 Aug 2016 02:05:32 +0000 (04:05 +0200)]
Fix empty hostname in GetHostByName on windows (#3397)

7 years ago[bcl] Fix netstandard mistake in WebHeaderCollection
Alexander Köplinger [Fri, 12 Aug 2016 14:43:15 +0000 (16:43 +0200)]
[bcl] Fix netstandard mistake in WebHeaderCollection

I accidentally added this in 3c3ef17376f5b4e71ac024210672e2d0484f3419 because I missed that on
full .NET this class inherits from NameValueCollection which provides `this[string name]` already
(the diff tool showed it as missing because it didn't take this into account).

7 years agoMerge pull request #3398 from henricm/fix-for-test-helpers-symlink
Marek Safar [Fri, 12 Aug 2016 13:55:35 +0000 (15:55 +0200)]
Merge pull request #3398 from henricm/fix-for-test-helpers-symlink

Removing symlink of TestHelpers.cs

7 years agoRemoving symlink of TestHelpers.cs
Henric Müller [Fri, 12 Aug 2016 12:11:57 +0000 (14:11 +0200)]
Removing symlink of TestHelpers.cs

7 years ago[jit] Add missing special case for div with mul optimization
Vlad Brezae [Fri, 12 Aug 2016 11:56:44 +0000 (14:56 +0300)]
[jit] Add missing special case for div with mul optimization

The algorithm does not handle the -1, 0 and 1 special divisors.

7 years agoFix the failure of the async-exc-compilation.exe test on Windows.
Niklas Therning [Fri, 12 Aug 2016 09:16:00 +0000 (11:16 +0200)]
Fix the failure of the async-exc-compilation.exe test on Windows.

The test fails due an ArgumentException being thrown when the catch handler in
the test's Run() method tries to write to the console. The ArgumentException
is thrown in EncodingTable.GetCodePageFromName(string) since the encoding name
passed to it is null. Normally this exception would be caught and the default
encoding would fall back to UTF8. However, since the thread is aborted the
ThreadAbortException will be rethrown and terminates the test with an uncaught
exception. I have verified that the same behavior is seen on OS X if I mock up
the default encoding code to throw the same ArgumentException.

This patch adds a call to Thread.ResetAbort() just before the call to
Console.WriteLine() in the catch handler. This removes the abort status of the
thread and avoids the rethrow of the ThreadAbortException.

7 years agoMerge pull request #3394 from mono/netstandard
Marek Safar [Fri, 12 Aug 2016 07:54:24 +0000 (09:54 +0200)]
Merge pull request #3394 from mono/netstandard

NetStandard 1.6 members matching

7 years ago[bcl] Define NETSTANDARD in xammac profile as well
Alexander Köplinger [Fri, 12 Aug 2016 00:36:28 +0000 (02:36 +0200)]
[bcl] Define NETSTANDARD in xammac profile as well

7 years agoMerge pull request #2332 from BrzVlad/feature-div-with-mul
Vlad Brezae [Thu, 11 Aug 2016 21:44:00 +0000 (00:44 +0300)]
Merge pull request #2332 from BrzVlad/feature-div-with-mul

[jit] Optimize divisions by immediate

7 years ago[Facades] Remove wrong facades
Marek Safar [Wed, 10 Aug 2016 15:28:44 +0000 (17:28 +0200)]
[Facades] Remove wrong facades

7 years ago[Facades] Update version numbers
Marek Safar [Wed, 10 Aug 2016 15:14:55 +0000 (17:14 +0200)]
[Facades] Update version numbers

7 years ago[Facades] System.Security.Cryptography.Algorithms on netstandard profiles only
Marek Safar [Thu, 11 Aug 2016 08:27:36 +0000 (10:27 +0200)]
[Facades] System.Security.Cryptography.Algorithms on netstandard profiles only

7 years ago[bcl] Update to match NETStandard 1.6 members
Alexander Köplinger [Tue, 26 Jul 2016 16:06:54 +0000 (18:06 +0200)]
[bcl] Update to match NETStandard 1.6 members

7 years ago[jit] Enable division by constant optimization on 32 bit
Vlad Brezae [Mon, 4 Apr 2016 16:10:54 +0000 (09:10 -0700)]
[jit] Enable division by constant optimization on 32 bit

7 years ago[arm] Implement OP_BIGMUL
Vlad Brezae [Sun, 13 Dec 2015 23:58:02 +0000 (01:58 +0200)]
[arm] Implement OP_BIGMUL

7 years ago[tests] Add random immediate division test
Vlad Brezae [Thu, 10 Dec 2015 05:02:38 +0000 (07:02 +0200)]
[tests] Add random immediate division test

7 years ago[jit] Register counter for number of optimized divisions
Vlad Brezae [Thu, 10 Dec 2015 03:53:35 +0000 (05:53 +0200)]
[jit] Register counter for number of optimized divisions

7 years ago[jit] Optimize signed division by constant
Vlad Brezae [Thu, 10 Dec 2015 02:49:47 +0000 (04:49 +0200)]
[jit] Optimize signed division by constant

7 years ago[jit] Optimize unsigned division by constant
Vlad Brezae [Tue, 1 Dec 2015 23:24:50 +0000 (01:24 +0200)]
[jit] Optimize unsigned division by constant

7 years ago[corcompare] Use only C# known parameter type attributes for methods signatures
Marek Safar [Thu, 11 Aug 2016 16:05:51 +0000 (18:05 +0200)]
[corcompare] Use only C# known parameter type attributes for methods signatures

7 years ago[System]: Use 'HttpWebRequest.Host' for certificate host name validation.
Martin Baulig [Tue, 9 Aug 2016 14:47:30 +0000 (16:47 +0200)]
[System]: Use 'HttpWebRequest.Host' for certificate host name validation.

(cherry picked from commit 5200955033c4319de06d83df32be62199a2654c2)

7 years ago[System]: Add new internal X509Certificate2Impl.IntermediateCertificates.
Martin Baulig [Sun, 19 Jun 2016 11:15:29 +0000 (13:15 +0200)]
[System]: Add new internal X509Certificate2Impl.IntermediateCertificates.

(cherry picked from commit 8ed20455a569513c49d69bc3fd2f618ae184faac)

7 years ago[System]: Add private Mono.Net.Security APIs which will be shared between AppleTls...
Martin Baulig [Tue, 26 Jul 2016 19:03:45 +0000 (15:03 -0400)]
[System]: Add private Mono.Net.Security APIs which will be shared between AppleTls and BoringTls.

(cherry picked from commit 934a577a943e2195974b2e631d6f833f894ad227)

7 years ago[System]: Cleanup the internal MonoTlsProviderFactory and prepare for BTLS.
Martin Baulig [Tue, 26 Jul 2016 18:58:29 +0000 (14:58 -0400)]
[System]: Cleanup the internal MonoTlsProviderFactory and prepare for BTLS.

(cherry picked from commit b919768e1af329ad56e034239dcc91dd634df9d9)

7 years agoMerge pull request #3389 from lambdageek/bug-43099
Aleksey Kliger (λgeek) [Thu, 11 Aug 2016 14:43:08 +0000 (10:43 -0400)]
Merge pull request #3389 from lambdageek/bug-43099

[coop] Temporarily restore MonoThreadInfo when TLS destructor runs.  Fixes #43099

7 years ago[mcs] More reliable tests
Marek Safar [Thu, 11 Aug 2016 07:54:55 +0000 (09:54 +0200)]
[mcs] More reliable tests

7 years agoMerge pull request #3388 from ntherning/fix-thread-priority-on-windows
Niklas Therning [Thu, 11 Aug 2016 07:20:54 +0000 (09:20 +0200)]
Merge pull request #3388 from ntherning/fix-thread-priority-on-windows

Fix getting/setting thread priority on Windows

7 years ago[mkbundle] Fix --fetch-target to not require an assembly, embed the proper assembly...
Miguel de Icaza [Thu, 11 Aug 2016 04:33:53 +0000 (00:33 -0400)]
[mkbundle] Fix --fetch-target to not require an assembly, embed the proper assembly when --cross RUNTIME is used

7 years ago[handles] offsets-tool should include MonoObjectHandlePayload
Aleksey Kliger [Wed, 10 Aug 2016 22:47:43 +0000 (18:47 -0400)]
[handles] offsets-tool should include MonoObjectHandlePayload

Complements 3c053143903c9927e7a31b4341f5a11f06cef69f

7 years agoMerge pull request #3390 from alexanderkyte/fix_nunitlite_build_state
Alexander Kyte [Wed, 10 Aug 2016 20:36:13 +0000 (16:36 -0400)]
Merge pull request #3390 from alexanderkyte/fix_nunitlite_build_state

[nunitlite] Pass greedily, not fail greedily

7 years ago[nunitlite] Pass greedily, not fail greedily
Alexander Kyte [Wed, 10 Aug 2016 20:29:16 +0000 (16:29 -0400)]
[nunitlite] Pass greedily, not fail greedily

7 years ago[coop] Fix MONO_HANDLE_PAYLOAD_OFFSET() for cross-compilation
Aleksey Kliger [Wed, 10 Aug 2016 20:27:09 +0000 (16:27 -0400)]
[coop] Fix MONO_HANDLE_PAYLOAD_OFFSET() for cross-compilation

- fix MONO_HANDLE_PAYLOAD_OFFSET when MONO_STRUCT_OFFSET expands to
 token-pasting
- add MonoObjectPayloadHandle decl to object-offset.h machinery.

7 years agoMerge pull request #2780 from alexanderkyte/seq_point_optimize
Alexander Kyte [Wed, 10 Aug 2016 19:47:59 +0000 (15:47 -0400)]
Merge pull request #2780 from alexanderkyte/seq_point_optimize

[runtime] Implement performant unbounded-depth sequence point search

7 years ago[marshal] Ensure uses_handles is initialized.
Aleksey Kliger [Wed, 10 Aug 2016 18:56:09 +0000 (14:56 -0400)]
[marshal] Ensure uses_handles is initialized.

7 years ago[coop] Temporarily restore MonoThreadInfo when TLS destructor runs. Fixes #43099
Aleksey Kliger [Wed, 10 Aug 2016 16:14:52 +0000 (12:14 -0400)]
[coop] Temporarily restore MonoThreadInfo when TLS destructor runs.  Fixes #43099

We need a valid MonoThreadInfo in the TLS key while we run
unregister_thread because we may need to block the thread when it tries
to take the sgen GC mutex.

Fixes [#43099](https://bugzilla.xamarin.com/show_bug.cgi?id=43099)

7 years ago[mono-api-html] Show assembly version differences
Marek Safar [Wed, 10 Aug 2016 14:48:18 +0000 (16:48 +0200)]
[mono-api-html] Show assembly version differences

7 years agoMerge pull request #3213 from henricm/fix-for-win-securestring-to-bstr
Niklas Therning [Wed, 10 Aug 2016 15:04:53 +0000 (17:04 +0200)]
Merge pull request #3213 from henricm/fix-for-win-securestring-to-bstr

Fix for win securestring to bstr

7 years agoFix getting/setting thread priority on Windows
Niklas Therning [Wed, 10 Aug 2016 14:47:33 +0000 (16:47 +0200)]
Fix getting/setting thread priority on Windows

The mono_threads_platform_get_priority()/mono_threads_platform_set_priority()
functions in mono-threads-windows.c assume the "handle" member has been set in
the MonoThreadInfo struct passed to it but it's always NULL. This patch
implements mono_threads_suspend_register() in the same file which sets the
"handle" member at thread registration time, like it's done in
mono-threads-posix.c.

This patch also makes sure the priority of a new thread is set as expected
when the Thread.Priority property has been changed prior to the thread being
started.

Also added a test method to mono/tests/priority.cs which tests that the
priority of the main thread is Normal by default and that it can be changed as
expected.

The changes in this patch fixes the failures in mono/tests/priority.exe on
Windows i386 and x64.

7 years ago[mcs] Report second level references mismatch only for really used references. Fixes...
Marek Safar [Wed, 10 Aug 2016 13:54:04 +0000 (15:54 +0200)]
[mcs] Report second level references mismatch only for really used references. Fixes #42702

7 years agoMerge pull request #3387 from xmcclure/test-suite-bump
monojenkins [Tue, 9 Aug 2016 22:30:10 +0000 (00:30 +0200)]
Merge pull request #3387 from xmcclure/test-suite-bump

Update ms-test-suite to fix broken test

7 years ago[WinForms] Fix a test to correctly check for Mono
Alexander Köplinger [Tue, 9 Aug 2016 19:50:44 +0000 (21:50 +0200)]
[WinForms] Fix a test to correctly check for Mono

typeof (int).GetType ().GetType ().Name is now RuntimeType since https://github.com/mono/mono/pull/3045.
We did not notice this since most of our bots don't run with en-US locale set which this test requires.

7 years ago[mono] Use -size 0 instead of -empty as find argument
Alexander Köplinger [Tue, 9 Aug 2016 13:08:06 +0000 (15:08 +0200)]
[mono] Use -size 0 instead of -empty as find argument

The latter is not supported by the "find" binary in Alpine. The former works everywhere.

7 years ago[mini] Fix mktemp argument in test_op_il_seq_point.sh
Alexander Köplinger [Tue, 9 Aug 2016 12:45:18 +0000 (14:45 +0200)]
[mini] Fix mktemp argument in test_op_il_seq_point.sh

mktemp on e.g. Alpine requires at least six 'X' characters in the template argument.

7 years ago[mdoc] Remove --exclude=.svn from diff arguments
Alexander Köplinger [Tue, 9 Aug 2016 11:50:02 +0000 (13:50 +0200)]
[mdoc] Remove --exclude=.svn from diff arguments

We don't use svn anymore since a very long time and some diff implementations (e.g. in Alpine) don't support --exclude.
Removing the argument is an easy fix.

7 years ago[acceptance-tests] Run ms-test-suite with debug symbols
Alexander Köplinger [Tue, 9 Aug 2016 11:46:37 +0000 (13:46 +0200)]
[acceptance-tests] Run ms-test-suite with debug symbols

So we get line numbers in stack traces.

7 years ago[runtime] Use a coop semaphore instead of the io-layer one in the monitor code. ...
Zoltan Varga [Tue, 9 Aug 2016 20:51:30 +0000 (22:51 +0200)]
[runtime] Use a coop semaphore instead of the io-layer one in the monitor code. (#3382)

7 years agoUpdate ms-test-suite to fix broken test
Andi McClure [Tue, 9 Aug 2016 20:45:24 +0000 (16:45 -0400)]
Update ms-test-suite to fix broken test

7 years agoMerge pull request #3386 from alexanderkyte/nunit_lite_return_status
Alexander Kyte [Tue, 9 Aug 2016 19:03:27 +0000 (15:03 -0400)]
Merge pull request #3386 from alexanderkyte/nunit_lite_return_status

[runtime] Make nunitlite return failure exit code when tests fail

7 years agoMerge pull request #3373 from marek-safar/net-4.6.2
Marek Safar [Tue, 9 Aug 2016 19:02:27 +0000 (21:02 +0200)]
Merge pull request #3373 from marek-safar/net-4.6.2

[bcl] Update Reference Source to .NET Framework 4.6.2

7 years ago[runtime] Return failure return status if nunit-lite test suite fails
Alexander Kyte [Tue, 9 Aug 2016 18:35:48 +0000 (14:35 -0400)]
[runtime] Return failure return status if nunit-lite test suite fails

7 years ago[runtime] Bump nunit-lite dependency for runner change
Alexander Kyte [Tue, 9 Aug 2016 18:45:02 +0000 (14:45 -0400)]
[runtime] Bump nunit-lite dependency for runner change

7 years ago[System] Remove one no longer needed uri workaround. Fixes #43032
Marek Safar [Tue, 9 Aug 2016 17:44:45 +0000 (19:44 +0200)]
[System] Remove one no longer needed uri workaround. Fixes #43032

7 years ago[bcl] Update Reference Source to .NET Framework 4.6.2
Marek Safar [Mon, 8 Aug 2016 16:30:44 +0000 (18:30 +0200)]
[bcl] Update Reference Source to .NET Framework 4.6.2

7 years agoMoving BSTR conv to native code in SecureStringToBSTR.
Henric Müller [Fri, 10 Jun 2016 12:33:17 +0000 (14:33 +0200)]
Moving BSTR conv to native code in SecureStringToBSTR.

Previous implementation laid out the BSTR structure
in directly memory in C# code. This layout was not correct
for windows.
Furthermore memory was allocated using AllocCoTaskMem but later freed
using SysFreeString which on windows are different memory areas.
Third issue is that SecureString asumes big-endian when copying the chars
to its internal byte buffer. So on little-endian environments,
a swap of bytes is needed before the buffer is sent to native side
for BSTR conversion. This should probably be handled internally in
SecureString instead.

7 years agoHandle NetBSD specific iconv(3) call prototype (#3376)
Kamil Rytarowski [Tue, 9 Aug 2016 10:41:54 +0000 (12:41 +0200)]
Handle NetBSD specific iconv(3) call prototype (#3376)

In the past there were wars between constified and unconstified
second parameter.. NetBSD went with constifying it. POSIX went without
const and most other OSes standarized. NetBSD is still having
incompatible function prototype.

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <iconv.h>

     size_t
     iconv(iconv_t cd, const char ** restrict src, size_t * restrict srcleft,
           char ** restrict dst, size_t * restrict dstleft);

7 years agoMerge pull request #3353 from esdrubal/st-format
Marcos Henrich [Tue, 9 Aug 2016 09:34:06 +0000 (10:34 +0100)]
Merge pull request #3353 from esdrubal/st-format

[corlib] Removed MVID and AOTID metadata.