Ludovic Henry [Wed, 13 Jul 2016 15:19:36 +0000 (17:19 +0200)]
[mono-threads] Create Win32 handle when attaching the thread
This guarantee that a MonoThreadInfo always has a handle.
Ludovic Henry [Wed, 24 Aug 2016 13:45:08 +0000 (15:45 +0200)]
[w32handle] Remove unused assertions
Ludovic Henry [Wed, 24 Aug 2016 10:09:08 +0000 (12:09 +0200)]
[w32handle] Initialize them earlier
If we happen to have the debugger or the log profiler enabled, we would run into a use before initialization case for the w32handle. The debugger or profiler would call `mono_gc_base_init` which would attach the current thread, and that would crash in `mono_w32handle_new` at w32handle.c:437 with `scan_mutex` being an invalid value (EINVAL).
Zoltan Varga [Tue, 23 Aug 2016 13:09:21 +0000 (15:09 +0200)]
[jit] Avoid strengh reducing divisions when using llvm, llvm can do it by itself.
Niklas Therning [Tue, 23 Aug 2016 11:55:25 +0000 (13:55 +0200)]
Merge pull request #3426 from ntherning/fix-handle-leak-in-DirectoryInfo.EnumerateFileSystemInfos-on-windows
Fixes a handle leak in DirectoryInfo.EnumerateFileSystemInfos()
Niklas Therning [Tue, 23 Aug 2016 10:22:50 +0000 (12:22 +0200)]
Merge pull request #3433 from ntherning/fix-DoubleTest.Parse-assumes-en-US
Don't assume "3 5" is unparseable in the current culture in DoubleTest.Parse()
Niklas Therning [Tue, 23 Aug 2016 09:32:41 +0000 (11:32 +0200)]
Don't assume "3 5" is unparseable in the current culture in DoubleTest.Parse()
DoubleTest.Parse() expects "3 5" to be unparseable in the current culture and
expects an exception to be thrown. In sv-SE however "3 5" parses to 35 and
this test fails.
This patch sets the current culture to en-US when the DoubleTest.Parse() test
is run.
Niklas Therning [Mon, 22 Aug 2016 14:54:03 +0000 (16:54 +0200)]
Fixes a handle leak in DirectoryInfo.EnumerateFileSystemInfos()
When running DirectoryInfo.EnumerateFileSystemInfos() on an empty directory
MonoIO.FindFirst() will return null and the method returns without closing the
handle which is opened by FindFirst(). This patch makes sure the finally block
which closes the handle is run even when FindFirst() returns null.
Also added a call to FindClose() and some more cleanup in the native
implementation of MonoIO.FindFirst() when an allocation fails.
This bug caused an exception in DirectyoryInfoTest.TearDown() and several
other TearDown() methods in the MonoTests.System.IO tests on Windows due to
RemoveDirectory() failing on an empty directory which still had an open handle
associated with it.
Marek Safar [Tue, 23 Aug 2016 07:17:43 +0000 (09:17 +0200)]
Merge pull request #3103 from marek-safar/rs-Threading
[corlib] EventWaitHandle from referencesource
Alexander Köplinger [Tue, 23 Aug 2016 00:35:44 +0000 (02:35 +0200)]
Merge pull request #3429 from akoeplinger/fix-signaturedescription
[corlib] Add new values for RSAPKCS1SHA(256/384/512)SignatureDescription to CryptoConfig and fix SignatureDescriptionTest in FullAOT
Alexander Köplinger [Mon, 22 Aug 2016 23:24:39 +0000 (01:24 +0200)]
Merge pull request #3381 from krytarowski/netbsd-support-20
Resurrect NetBSD support in mono-perfcounters.c
Marek Safar [Fri, 3 Jun 2016 13:18:42 +0000 (15:18 +0200)]
[corlib] EventWaitHandle from referencesource
Vlad Brezae [Mon, 22 Aug 2016 21:06:23 +0000 (14:06 -0700)]
[arm64] Bump instruction sizes for atomic ops to match the emmited code
Alexander Köplinger [Mon, 22 Aug 2016 18:04:57 +0000 (20:04 +0200)]
[corlib] Add new values for RSAPKCS1SHA(256/384/512)SignatureDescription to CryptoConfig and fix SignatureDescriptionTest in FullAOT
With the .NET 4.6.2 merge in https://github.com/mono/mono/commit/
b6a30059db8319348ebb454cc303633dfabd6a29#diff-799d44d25450b5b84906cbe7095708a0L86
the RSAPKCS1SignatureDescription class switched from using SHA1CryptoServiceProvider as the DigestAlgorithm to SHA1Cng.
This uncovered an issue when running SignatureDescriptionTest in FullAOT, as we were missing an entry for SHA1Cng
in CryptoConfig.fullaot.cs and so we didn't find the algorithm.
Additionally, 4.6.2 added new variants of the SignatureDescription class using SHA256, SHA384 and 512 which
had to be added alongside the corresponding digest/signature URLs defined by https://msdn.microsoft.com/en-us/library/windows/desktop/
dd979768(v=vs.85).aspx
Note that on mobile/FullAOT we're falling back to the *Managed variants of the SHA algorithms as the *Cng/*CryptoServiceProvider variants
aren't exposed there (except for SHA1CryptoServiceProvider since it was in the framework from the beginning) so we need to special case these in the tests.
Aleksey Kliger [Mon, 22 Aug 2016 18:07:59 +0000 (14:07 -0400)]
[s390x] Fix compilation of sre-save.c
Alexander Köplinger [Mon, 22 Aug 2016 17:15:50 +0000 (19:15 +0200)]
[corlib] Simplify monotouch_*_corlib.dll.sources
They were all using the same .cs source files so just including the generic monotouch .sources
makes it easier to reason about and reduces the risk of forgetting to update one of the lists.
Alexander Köplinger [Mon, 22 Aug 2016 17:02:34 +0000 (19:02 +0200)]
[corlib] Rename CryptoConfig_2_1.cs to CryptoConfig.common.cs
The file is actually used in all profiles so the 2.1 naming was confusing.
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.
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.
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
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.
Marek Safar [Mon, 22 Aug 2016 15:04:11 +0000 (17:04 +0200)]
[mcs] Move more eager references version mismatch checks. Fixes #30821
Marek Safar [Mon, 22 Aug 2016 11:27:53 +0000 (13:27 +0200)]
[corlib] Fix exposed public APIs
Marek Safar [Mon, 22 Aug 2016 11:27:04 +0000 (13:27 +0200)]
Update ms-test-suite
Kamil Rytarowski [Mon, 22 Aug 2016 06:45:17 +0000 (08:45 +0200)]
Fix NetBSD build in proclib.c (#3378)
Marek Safar [Sat, 20 Aug 2016 21:16:48 +0000 (23:16 +0200)]
[corlib] More sources from referencesource
Marek Safar [Sat, 20 Aug 2016 20:34:35 +0000 (22:34 +0200)]
[corlib] Print some info on FailFast
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)
Marek Safar [Sat, 20 Aug 2016 09:02:30 +0000 (11:02 +0200)]
[corlib] Interning of utc literals in TimeZoneInfo conversion. Fixes #43512
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.
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
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
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.
Jonathan Chambers [Fri, 19 Aug 2016 17:14:46 +0000 (13:14 -0400)]
Allocate handle stack for Boehm GC (#3421)
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
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.
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
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
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.
Marek Safar [Thu, 18 Aug 2016 21:04:32 +0000 (23:04 +0200)]
[mcs] Fix wrong range check for pragma warning CSxxx. Fixes #43471
Aleksey Kliger [Thu, 18 Aug 2016 18:27:32 +0000 (14:27 -0400)]
[sre] Split out MonoDynamicImage and MonoDynamicStream functions
Ludovic Henry [Mon, 25 Jul 2016 15:47:52 +0000 (17:47 +0200)]
[io-layer] Remove unused WaitForInputIdle
Ludovic Henry [Mon, 25 Jul 2016 15:44:55 +0000 (17:44 +0200)]
[io-layer] Remove unused WaitForMultipleObjects
Ludovic Henry [Tue, 19 Jul 2016 23:02:21 +0000 (01:02 +0200)]
[io-layer] Replace use of WaitForSingleObject by WaitForSingleObjectEx
Ludovic Henry [Tue, 19 Jul 2016 21:51:39 +0000 (23:51 +0200)]
[io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAndWait
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
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.
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.
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
Aleksey Kliger [Thu, 18 Aug 2016 14:44:55 +0000 (10:44 -0400)]
[win32] Add new reflection files to vcxproj
Aleksey Kliger [Thu, 18 Aug 2016 14:39:55 +0000 (10:39 -0400)]
[reflection] Rename files; adjust comments.
Ludovic Henry [Thu, 18 Aug 2016 14:38:50 +0000 (16:38 +0200)]
[mcs] Remove dead code
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.
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.
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
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.
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
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.
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.
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.
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.
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
Marek Safar [Wed, 17 Aug 2016 15:49:46 +0000 (17:49 +0200)]
Bump binary-reference-assemblies
Marek Safar [Wed, 17 Aug 2016 13:15:47 +0000 (15:15 +0200)]
[bcl] Remove wrong ReferenceAssemblyAttribute(s)
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.
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
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.
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.)
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.
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
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
Zoltan Varga [Tue, 16 Aug 2016 17:21:31 +0000 (19:21 +0200)]
Fix the full-aot build.
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
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
Marek Safar [Tue, 16 Aug 2016 11:57:23 +0000 (13:57 +0200)]
[mcs] Avoid agressive generic members inflation from using static. Fixes #43400
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.
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
Miguel de Icaza [Tue, 16 Aug 2016 03:39:30 +0000 (23:39 -0400)]
[linker] Update descriptors for mscorlib to include the new _ThreadPoolWaitCallback
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.
Marek Safar [Mon, 15 Aug 2016 18:59:41 +0000 (20:59 +0200)]
[mcs] Don't reset temporary stack fields too early. Fixes #43265
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.
Zoltan Varga [Mon, 15 Aug 2016 14:30:04 +0000 (16:30 +0200)]
[runtime] Fix warnings.
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.
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
Henric Müller [Mon, 15 Aug 2016 02:05:32 +0000 (04:05 +0200)]
Fix empty hostname in GetHostByName on windows (#3397)
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).
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
Henric Müller [Fri, 12 Aug 2016 12:11:57 +0000 (14:11 +0200)]
Removing symlink of TestHelpers.cs
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.
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.
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
Alexander Köplinger [Fri, 12 Aug 2016 00:36:28 +0000 (02:36 +0200)]
[bcl] Define NETSTANDARD in xammac profile as well
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
Marek Safar [Wed, 10 Aug 2016 15:28:44 +0000 (17:28 +0200)]
[Facades] Remove wrong facades
Marek Safar [Wed, 10 Aug 2016 15:14:55 +0000 (17:14 +0200)]
[Facades] Update version numbers
Marek Safar [Thu, 11 Aug 2016 08:27:36 +0000 (10:27 +0200)]
[Facades] System.Security.Cryptography.Algorithms on netstandard profiles only
Alexander Köplinger [Tue, 26 Jul 2016 16:06:54 +0000 (18:06 +0200)]
[bcl] Update to match NETStandard 1.6 members
Vlad Brezae [Mon, 4 Apr 2016 16:10:54 +0000 (09:10 -0700)]
[jit] Enable division by constant optimization on 32 bit
Vlad Brezae [Sun, 13 Dec 2015 23:58:02 +0000 (01:58 +0200)]
[arm] Implement OP_BIGMUL
Vlad Brezae [Thu, 10 Dec 2015 05:02:38 +0000 (07:02 +0200)]
[tests] Add random immediate division test