mono.git
7 years ago[sre] Fix s390x build (#3427)
Aleksey Kliger (λgeek) [Mon, 22 Aug 2016 16:28:18 +0000 (12:28 -0400)]
[sre] Fix s390x build (#3427)

Followup for 6be008c409153a82e80394b98c93564e2cdb2309 to fix the s390x build.

7 years ago[mcs] Fix arguments to nunit-lite when FIXTURE or TESTNAME is set
Alexander Köplinger [Mon, 22 Aug 2016 16:20:05 +0000 (18:20 +0200)]
[mcs] Fix arguments to nunit-lite when FIXTURE or TESTNAME is set

nunit used -fixture for running all tests of a fixture and -run for running a single test,
but nunit-lite uses just -test for both.

7 years agoMerge pull request #3428 from ntherning/fix-missing-libc-in-FileStreamTest-on-windows
Alexander Köplinger [Mon, 22 Aug 2016 15:30:04 +0000 (17:30 +0200)]
Merge pull request #3428 from ntherning/fix-missing-libc-in-FileStreamTest-on-windows

Fixes DllNotFoundException in FileStreamTest.SetUp() on Windows

7 years agoFixes DllNotFoundException in FileStreamTest.SetUp() on Windows
Niklas Therning [Mon, 22 Aug 2016 15:21:58 +0000 (17:21 +0200)]
Fixes DllNotFoundException in FileStreamTest.SetUp() on Windows

SetUp() calls uname() in libc to check whether the test is running on OS X. On
Windows this fails since libc isn't available.

This patch removes the call to uname() completely since the result wasn't used
by the test anyway.

7 years ago[mcs] Move more eager references version mismatch checks. Fixes #30821
Marek Safar [Mon, 22 Aug 2016 15:04:11 +0000 (17:04 +0200)]
[mcs] Move more eager references version mismatch checks. Fixes #30821

7 years ago[corlib] Fix exposed public APIs
Marek Safar [Mon, 22 Aug 2016 11:27:53 +0000 (13:27 +0200)]
[corlib] Fix exposed public APIs

7 years agoUpdate ms-test-suite
Marek Safar [Mon, 22 Aug 2016 11:27:04 +0000 (13:27 +0200)]
Update ms-test-suite

7 years agoFix NetBSD build in proclib.c (#3378)
Kamil Rytarowski [Mon, 22 Aug 2016 06:45:17 +0000 (08:45 +0200)]
Fix NetBSD build in proclib.c (#3378)

7 years ago[corlib] More sources from referencesource
Marek Safar [Sat, 20 Aug 2016 21:16:48 +0000 (23:16 +0200)]
[corlib] More sources from referencesource

7 years ago[corlib] Print some info on FailFast
Marek Safar [Sat, 20 Aug 2016 20:34:35 +0000 (22:34 +0200)]
[corlib] Print some info on FailFast

7 years ago[runtime] Use a coop semaphore instead of an io layer one to wait for thread start...
Zoltan Varga [Sat, 20 Aug 2016 09:36:20 +0000 (11:36 +0200)]
[runtime] Use a coop semaphore instead of an io layer one to wait for thread start. (#3383)

7 years ago[corlib] Interning of utc literals in TimeZoneInfo conversion. Fixes #43512
Marek Safar [Sat, 20 Aug 2016 09:02:30 +0000 (11:02 +0200)]
[corlib] Interning of utc literals in TimeZoneInfo conversion. Fixes #43512

7 years agoVisual Studio project updates and enhancements to support static libmono and addition...
Johan Lorensson [Sat, 20 Aug 2016 03:20:38 +0000 (05:20 +0200)]
Visual Studio project updates and enhancements to support static libmono and additional test/debug projects. (#3420)

* Fixing linker warning when building libmono DLL.

After splitting mono runtime into a static library used when building libmono
DLL, we got a linker warning since there were no object files left in the
libmono project. There was also a sematic issue with the current organization
of DllMain since it is located in driver.c that will be compiled into the static
library and then consumed by the linker building the DLL. In cases where the
static library was consumed directly it would still include DllMain entry point.

By splitting the DllMain method implementation into a separate specific windows file
we can both resolve the linker warning and remove the DllMain method implementation from the static
library and only include it when building the libmono DLL.

* Visual Studio projects support to optimally link mono applications using static libmono library.

Added a new property, MONO_USE_STATIC_LIBMONO that can be used to link some
mono applications, for example mono(-sgen).exe, towards static version of libmono.

This gives us the option to build a binary without dependencies on other runtime binaries
minimizing what’s needs to be deployed in order to run mono. This in combination with static linked c-runtime
(another option available through a VS property) will produce a mono runtime binary without
addition dependencies except .NET assemblies deployed by mono runtime users.

The default is still using the dynamic version of libmono as before.

* Visual Studio project to test/debug testdriver tests from within Visual Studio.

Added an additional Visual Studio project preconfigured to run testdriver related tests
directly from within Visual Studio.

Commit also includes an additional configuration script that can be used test projects in order
to setup a mono config file. The testdriver project uses this to create a unique configuration
files pointing to the build libtest.dll for running configuration. The configuration file will then
be used when the tests are executed to make sure the correct libtest.dll for current build configuration
gets used when running test different tests from within the Visual Studio debugger.

The project comes with a number of user macros as well that can be used in order to tailor how the tests are run.
Most of the values are preconfigured and shouldn't need to be changed in order to use
current build. In order to change the test that is executed, use the following user macro
defined in mono-testdriver-test property sheet added to the project:

MONO_TESTDRIVER_RUN_TARGET

and point it to the assembly hosting the tests to execute from within Visual Studio.

* Visual Studio project to test/debug nunit tests from within Visual Studio.

Added an additional Visual Studio project preconfigured to run nunit related tests
directly from within Visual Studio.

The project comes with a number of user macros as well that can be used in order to tailor how the tests are run.
Most of the values are preconfigured and shouldn't need to be changed in order to use
current build. In order to change the test that is executed, use the following user macro
defined in mono-nunit-test property sheet added to the project:

MONO_NUNIT_RUN_TARGET

and point it to the assembly hosting the tests to execute from within Visual Studio.

There is also an additional user macro defined:

MONO_NUNIT_FIXTURE

This can be used to limit the number of nunit test run within a test suite.

7 years agoMerge pull request #3413 from lambdageek/reflection-split
Aleksey Kliger (λgeek) [Fri, 19 Aug 2016 22:40:08 +0000 (18:40 -0400)]
Merge pull request #3413 from lambdageek/reflection-split

[reflection] Divide reflection.c into multiple files. NFC

7 years ago[win32] Add sre-encode.c and sre-save.c to libmonoruntime project
Aleksey Kliger [Fri, 19 Aug 2016 18:34:27 +0000 (14:34 -0400)]
[win32] Add sre-encode.c and sre-save.c to libmonoruntime project

7 years ago[sre] Separate SRE MonoDynamicImage encoding and SRE Save functions to separate files...
Aleksey Kliger [Fri, 19 Aug 2016 17:51:33 +0000 (13:51 -0400)]
[sre] Separate SRE MonoDynamicImage encoding and SRE Save functions to separate files. NFC

- (sre-encode.c) Encoding SRE builders into a MonoDynamicImage and token creation.

- (sre-save.c) Everything for saving SRE images to disk.

7 years agoAllocate handle stack for Boehm GC (#3421)
Jonathan Chambers [Fri, 19 Aug 2016 17:14:46 +0000 (13:14 -0400)]
Allocate handle stack for Boehm GC (#3421)

7 years agoMerge pull request #3419 from ntherning/fix-MonoTests.System.IO.DirectoryTest.DeleteD...
Niklas Therning [Fri, 19 Aug 2016 14:21:40 +0000 (16:21 +0200)]
Merge pull request #3419 from ntherning/fix-MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName-on-win

Fixes MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName on  Windows

7 years agoFixes MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName on
Niklas Therning [Fri, 19 Aug 2016 13:54:55 +0000 (15:54 +0200)]
Fixes MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName on
Windows

The error (ERROR_DIRECTORY) wasn't recognized in MonoIO so the error message
became "Win32 IO returned 267. Path: C:\foo\bar" which includes the path. The
test tests that the path isn't include in the message in the thrown
IOException.

7 years agoMerge pull request #3416 from ludovic-henry/iolayer-extract-wait
Ludovic Henry [Fri, 19 Aug 2016 09:16:35 +0000 (11:16 +0200)]
Merge pull request #3416 from ludovic-henry/iolayer-extract-wait

[io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAndWait

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 ago[sre] Split out MonoDynamicImage and MonoDynamicStream functions
Aleksey Kliger [Thu, 18 Aug 2016 18:27:32 +0000 (14:27 -0400)]
[sre] Split out MonoDynamicImage and MonoDynamicStream functions

7 years ago[io-layer] Remove unused WaitForInputIdle
Ludovic Henry [Mon, 25 Jul 2016 15:47:52 +0000 (17:47 +0200)]
[io-layer] Remove unused WaitForInputIdle

7 years ago[io-layer] Remove unused WaitForMultipleObjects
Ludovic Henry [Mon, 25 Jul 2016 15:44:55 +0000 (17:44 +0200)]
[io-layer] Remove unused WaitForMultipleObjects

7 years ago[io-layer] Replace use of WaitForSingleObject by WaitForSingleObjectEx
Ludovic Henry [Tue, 19 Jul 2016 23:02:21 +0000 (01:02 +0200)]
[io-layer] Replace use of WaitForSingleObject by WaitForSingleObjectEx

7 years ago[io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAn...
Ludovic Henry [Tue, 19 Jul 2016 21:51:39 +0000 (23:51 +0200)]
[io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAndWait

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[win32] Add new reflection files to vcxproj
Aleksey Kliger [Thu, 18 Aug 2016 14:44:55 +0000 (10:44 -0400)]
[win32] Add new reflection files to vcxproj

7 years ago[reflection] Rename files; adjust comments.
Aleksey Kliger [Thu, 18 Aug 2016 14:39:55 +0000 (10:39 -0400)]
[reflection] Rename files; adjust comments.

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[reflection] Divide reflection.c into multiple files. NFC
Aleksey Kliger [Wed, 17 Aug 2016 17:26:20 +0000 (13:26 -0400)]
[reflection] Divide reflection.c into multiple files. NFC

Split up reflection.c into three separate files:

1. reflection-query.c: This contains System.Type and  the interrogative System.Reflection APIs.
2. reflection.c: This contains the System.Reflection.Emit APIs
3. reflection-custom-attrs.c: All about dealing with custom attributes.

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