mono.git
7 years agoMerge pull request #2998 from lateralusX/jlorenss/win-x64-full-aot-support
Alexander Köplinger [Thu, 19 May 2016 11:36:19 +0000 (13:36 +0200)]
Merge pull request #2998 from lateralusX/jlorenss/win-x64-full-aot-support

Windows x64 full AOT support for mono/mini regression tests.

7 years agoMerge pull request #3020 from akoeplinger/fix-ttl
Marek Safar [Thu, 19 May 2016 08:42:24 +0000 (10:42 +0200)]
Merge pull request #3020 from akoeplinger/fix-ttl

[System] Raise ArgumentOutOfRangeException for values > 255 in Socket.Ttl setter

7 years agoUpdate .gitignore, remove stale file
Miguel de Icaza [Thu, 19 May 2016 03:49:26 +0000 (23:49 -0400)]
Update .gitignore, remove stale file

7 years ago[System.Windows.Forms] Fix incorrect compare of IntPtr to null
Miguel de Icaza [Thu, 19 May 2016 03:42:10 +0000 (23:42 -0400)]
[System.Windows.Forms] Fix incorrect compare of IntPtr to null

7 years ago[genproj] Fix THISDIR location in a few projects, so genproj can generate MSBuild...
Miguel de Icaza [Thu, 19 May 2016 03:35:45 +0000 (23:35 -0400)]
[genproj] Fix THISDIR location in a few projects, so genproj can generate MSBuild files

7 years ago[System.Web] Remove duplicate file listings which break msbuild and update csprojs
Miguel de Icaza [Thu, 19 May 2016 02:51:25 +0000 (22:51 -0400)]
[System.Web] Remove duplicate file listings which break msbuild and update csprojs

7 years ago[System] Raise ArgumentOutOfRangeException for values > 255 in Socket.Ttl setter
Alexander Köplinger [Thu, 19 May 2016 02:27:12 +0000 (04:27 +0200)]
[System] Raise ArgumentOutOfRangeException for values > 255 in Socket.Ttl setter

This is consistent with the .NET implementation: https://github.com/mono/mono/blob/8054793e5bc158015154fb8cdcdd56777a0c8351/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs#L734-L737 (sadly, MSDN says SocketException should be thrown in this case...).

It fixes the SocketTest.TtlChangeoverflow test that started failing after https://github.com/mono/mono/pull/2250.
The reason is we refactored the SetSocketOption () overload the Ttl setter is using so that it now
checks for `error == (int) SocketError.InvalidArgument` instead of just falling through to raising
a SocketException with the error code.

7 years agoMerge pull request #2992 from lambdageek/dev/monoerror-other-invokes
Rodrigo Kumpera [Wed, 18 May 2016 23:44:52 +0000 (16:44 -0700)]
Merge pull request #2992 from lambdageek/dev/monoerror-other-invokes

[runtime] MonoError mono_runtime_invoke_{array,delegate}

7 years agoMerge pull request #2989 from lambdageek/dev/monoerror-message
Rodrigo Kumpera [Wed, 18 May 2016 23:43:05 +0000 (16:43 -0700)]
Merge pull request #2989 from lambdageek/dev/monoerror-message

[runtime] MonoError for mono_message_init

7 years agoMerge pull request #2977 from BrzVlad/fix-major-log2
Rodrigo Kumpera [Wed, 18 May 2016 23:41:50 +0000 (16:41 -0700)]
Merge pull request #2977 from BrzVlad/fix-major-log2

[sgen] Improve logging

7 years ago[genproj] Sync with latest set of changes to Makefiles
Miguel de Icaza [Wed, 18 May 2016 22:08:38 +0000 (18:08 -0400)]
[genproj] Sync with latest set of changes to Makefiles

7 years ago[genproj] Use an explicit IntermediateOutputPath to prevent rebuilds on cyclic assemblies
Miguel de Icaza [Wed, 18 May 2016 21:59:19 +0000 (17:59 -0400)]
[genproj] Use an explicit IntermediateOutputPath to prevent rebuilds on cyclic assemblies

7 years ago[sgen] Fix warnings at printing 64bit ints
Vlad Brezae [Mon, 9 May 2016 15:34:46 +0000 (18:34 +0300)]
[sgen] Fix warnings at printing 64bit ints

7 years ago[sgen] Refactor sgen_perform_collection
Vlad Brezae [Mon, 9 May 2016 15:19:03 +0000 (18:19 +0300)]
[sgen] Refactor sgen_perform_collection

This enables logging for major concurrent collections and for nursery collections while a concurrent collection is running.

7 years ago[sgen] Log also the real size used by the major objects
Vlad Brezae [Mon, 9 May 2016 11:38:32 +0000 (14:38 +0300)]
[sgen] Log also the real size used by the major objects

Due to performance concerns, we don't account for the space wasted in blocks, since it would require dereferencing all vtables. We also don't account for allocation that might happen during sweep.

7 years ago[sgen] Log also the total los memory usage
Vlad Brezae [Mon, 9 May 2016 10:55:56 +0000 (13:55 +0300)]
[sgen] Log also the total los memory usage

7 years ago[sgen] Don't log previous collection memory size
Vlad Brezae [Mon, 9 May 2016 10:32:27 +0000 (13:32 +0300)]
[sgen] Don't log previous collection memory size

This information can be found in the previous log entries.

7 years ago[sgen] Precisely log the size of the promoted objects during minors
Vlad Brezae [Sun, 8 May 2016 23:24:54 +0000 (02:24 +0300)]
[sgen] Precisely log the size of the promoted objects during minors

7 years agoMerge pull request #3008 from lateralusX/jlorenss/win-x64-shutdown-crash
Rodrigo Kumpera [Wed, 18 May 2016 20:45:22 +0000 (13:45 -0700)]
Merge pull request #3008 from lateralusX/jlorenss/win-x64-shutdown-crash

[runtime] Fix for random, timing dependent, mono runtime crash during shutdown on Windows.

7 years agoMerge pull request #3012 from marek-safar/rs-Net
Marek Safar [Wed, 18 May 2016 19:58:06 +0000 (21:58 +0200)]
Merge pull request #3012 from marek-safar/rs-Net

[System] WebHeaderCollection from referencesource

7 years ago[runtime] MonoError-ize mono_message_invoke
Aleksey Kliger [Thu, 12 May 2016 20:45:35 +0000 (16:45 -0400)]
[runtime] MonoError-ize mono_message_invoke

7 years ago[runtime] MonoError-ize mono_runtime_invoke_array
Aleksey Kliger [Thu, 12 May 2016 20:00:36 +0000 (16:00 -0400)]
[runtime] MonoError-ize mono_runtime_invoke_array

As with mono_runtime_invoke, we split up into three functions:
1. mono_runtime_invoke_array is external only.  Runtime should use
   one of the other two.
2. mono_runtime_invoke_array_checked threads exceptions and failures through
  MonoError in coop mode.  In non-coop managed exceptions unwind the
  stack as before.
3. mono_runtime_try_invoke_array sends exceptions from method invocation
through a MonoException* outarg, and other errors through MonoError.

7 years ago[runtime] Refactor mono_runtime_invoke_array
Aleksey Kliger [Thu, 12 May 2016 17:05:34 +0000 (13:05 -0400)]
[runtime] Refactor mono_runtime_invoke_array

Pull a helper function invoke_array_extract_argument out to simplify
error handling.

7 years ago[runtime] MonoError-ize mono_runtime_delegate_invoke
Aleksey Kliger [Fri, 13 May 2016 21:35:40 +0000 (17:35 -0400)]
[runtime] MonoError-ize mono_runtime_delegate_invoke

Mark it external only.  Runtime can use
mono_runtime_delegate_invoke_checked or mono_runtime_delegate_try_invoke.

7 years ago[runtime] Don't raise while calling unhandled exception delegate.
Aleksey Kliger [Fri, 13 May 2016 16:37:10 +0000 (12:37 -0400)]
[runtime] Don't raise while calling unhandled exception delegate.

7 years ago[runtime] Remove an unused variable.
Zoltan Varga [Wed, 18 May 2016 19:40:20 +0000 (15:40 -0400)]
[runtime] Remove an unused variable.

7 years agoMerge pull request #2994 from ludovic-henry/remove-nacl
Ludovic Henry [Wed, 18 May 2016 19:36:45 +0000 (15:36 -0400)]
Merge pull request #2994 from ludovic-henry/remove-nacl

[runtime] Remove support for NaCl

7 years ago[runtime] MonoError-ize mono_message_init
Aleksey Kliger [Wed, 11 May 2016 21:22:42 +0000 (17:22 -0400)]
[runtime] MonoError-ize mono_message_init

7 years ago[runtime] MonoError-ize mono_marshal_xdomain_copy_value
Aleksey Kliger [Wed, 11 May 2016 21:14:57 +0000 (17:14 -0400)]
[runtime] MonoError-ize mono_marshal_xdomain_copy_value

7 years ago[runtime] MonoError-ize mono_method_call_message_new
Aleksey Kliger [Wed, 11 May 2016 20:41:24 +0000 (16:41 -0400)]
[runtime] MonoError-ize mono_method_call_message_new

7 years ago[runtime] MonoError-ize mono_delegate_ctor
Aleksey Kliger [Wed, 11 May 2016 20:22:14 +0000 (16:22 -0400)]
[runtime] MonoError-ize mono_delegate_ctor

7 years ago[runtime] MonoError-ize mono_async_result_new
Aleksey Kliger [Wed, 11 May 2016 19:51:20 +0000 (15:51 -0400)]
[runtime] MonoError-ize mono_async_result_new

7 years ago[runtime] MonoError-ize mono_ldstr
Aleksey Kliger [Wed, 11 May 2016 19:39:22 +0000 (15:39 -0400)]
[runtime] MonoError-ize mono_ldstr

Mark it external only.  Runtime should use mono_ldstr_checked.

7 years agoRemove more deprecated stuff
Miguel de Icaza [Wed, 18 May 2016 19:30:25 +0000 (15:30 -0400)]
Remove more deprecated stuff

7 years agoRemove dead code, update solution files
Miguel de Icaza [Wed, 18 May 2016 19:26:07 +0000 (15:26 -0400)]
Remove dead code, update solution files

7 years agogenproj: Improve handling of executables and projects with build dependencies
Miguel de Icaza [Wed, 18 May 2016 19:19:16 +0000 (15:19 -0400)]
genproj: Improve handling of executables and projects with build dependencies

7 years agoMerge pull request #2815 from lambdageek/dev/monoerror-mono_compile_method
Aleksey Kliger (λgeek) [Wed, 18 May 2016 19:15:16 +0000 (15:15 -0400)]
Merge pull request #2815 from lambdageek/dev/monoerror-mono_compile_method

[runtime] MonoError-ize mono_compile_method

7 years agoMerge pull request #3014 from lambdageek/dev/coop-enabled
Aleksey Kliger (λgeek) [Wed, 18 May 2016 17:15:03 +0000 (13:15 -0400)]
Merge pull request #3014 from lambdageek/dev/coop-enabled

[coop] Make mono_threads_is_coop_enabled a normal function

7 years agoMerge pull request #3007 from directhex/use-mingw64
Alexander Köplinger [Wed, 18 May 2016 15:40:15 +0000 (17:40 +0200)]
Merge pull request #3007 from directhex/use-mingw64

[jenkins] Use mingw64 to build, not 32

7 years ago[coop] Make mono_threads_is_coop_enabled a normal function
Aleksey Kliger [Wed, 18 May 2016 15:19:23 +0000 (11:19 -0400)]
[coop] Make mono_threads_is_coop_enabled a normal function

It doesn't need to live in the header.

In particular is_coop_enabled variable used to be in every translation
unit instead of just a single flag.

7 years agoMerge pull request #3011 from akoeplinger/ci-fixes
Alexander Köplinger [Wed, 18 May 2016 15:18:38 +0000 (17:18 +0200)]
Merge pull request #3011 from akoeplinger/ci-fixes

[ci] Move setting CFLAGS and MONO_CHECK_MODE into the run-jenkins.sh script

7 years agoMerge pull request #3003 from marek-safar/rs-NetworkInformation
Marek Safar [Wed, 18 May 2016 14:18:28 +0000 (16:18 +0200)]
Merge pull request #3003 from marek-safar/rs-NetworkInformation

[System] Common NetworkInformation code from referencesource

7 years agoGraduate the csproj/solution to completed - you can now build with the toplevel net_4...
Miguel de Icaza [Wed, 18 May 2016 14:14:17 +0000 (10:14 -0400)]
Graduate the csproj/solution to completed - you can now build with the toplevel net_4_x.sln

7 years agoMerge pull request #3009 from akoeplinger/fix-sockettest-catch
Alexander Köplinger [Wed, 18 May 2016 14:06:11 +0000 (16:06 +0200)]
Merge pull request #3009 from akoeplinger/fix-sockettest-catch

[System] Get rid of useless catch-all clauses in SocketTest

7 years ago[System] Common NetworkInformation code from referencesource
Marek Safar [Tue, 17 May 2016 10:00:24 +0000 (12:00 +0200)]
[System] Common NetworkInformation code from referencesource

7 years ago[jenkins] Use VS2015, not 2013
Jo Shields [Wed, 18 May 2016 13:56:44 +0000 (14:56 +0100)]
[jenkins] Use VS2015, not 2013

7 years agoRemove [assembly:TargetFramework] as no other assembly uses it, and causes our msbuil...
Miguel de Icaza [Wed, 18 May 2016 13:45:18 +0000 (09:45 -0400)]
Remove [assembly:TargetFramework] as no other assembly uses it, and causes our msbuild to fail

7 years ago[WIP] Important change: more comprehensive Makefile to support csproj-local on System...
Miguel de Icaza [Wed, 18 May 2016 13:28:42 +0000 (09:28 -0400)]
[WIP] Important change: more comprehensive Makefile to support csproj-local on System.Design (#3006)

* Important change: more comprehensive Makefile to support csproj-local on System.Design

* Change the dependency

* update

7 years ago[System] WebHeaderCollection from referencesource
Marek Safar [Wed, 18 May 2016 12:44:07 +0000 (14:44 +0200)]
[System] WebHeaderCollection from referencesource

7 years ago[System] Throw PlatformNotSupportedException if NetworkInformation.NetworkChange...
Rolf Bjarne Kvinge [Wed, 18 May 2016 12:21:23 +0000 (14:21 +0200)]
[System] Throw PlatformNotSupportedException if NetworkInformation.NetworkChange is used on watchOS. (#3010)

NetworkInformation.NetworkChange requires the SystemConfiguration framework,
which isn't available on watchOS.

7 years ago[ci] Move setting CFLAGS and MONO_CHECK_MODE into the run-jenkins.sh script
Alexander Köplinger [Wed, 18 May 2016 12:16:12 +0000 (14:16 +0200)]
[ci] Move setting CFLAGS and MONO_CHECK_MODE into the run-jenkins.sh script

So we can further reduce the state we keep on Jenkins itself.

7 years ago[System] Get rid of useless catch-all clauses in SocketTest
Alexander Köplinger [Wed, 18 May 2016 11:38:48 +0000 (13:38 +0200)]
[System] Get rid of useless catch-all clauses in SocketTest

When one of the tests doesn't fail with the expected exception, we'd get just a useless message
like "TtlChangeoverflow #3" instead of the much more useful exception info + stacktrace that
NUnit catches when an unhandled exception is thrown.

7 years agoFix for rare mono runtime crash during shutdown sequence on Windows.
lateralusX [Wed, 18 May 2016 10:20:55 +0000 (12:20 +0200)]
Fix for rare mono runtime crash during shutdown sequence on Windows.

During mono shutdown on windows there is, on rare occasions, an exception
in CloseHandle indicating the closure of an invalid handle. This exception
is normally a strong indication of a much more severe underlying problem,
a doubled close on a handle, that could lead to random data corruptions
and very hard to track bugs in random areas of the code. If the system reused
the handle for a different object that silently gets incorrectly closed by above
call, the above bug could manifest itself into some completely different issues,
so getting a consistent repro with the above exception with CloseHandle was a good
point to start tracking down the bug.

The exception throwed in CloseHandle boils down to the fact that threads
in thread pool's that have their finalizer run on shutdown can end up in
a scenario where the thread handle has already been closed elsewhere.

When the threads are finalized in mono_gc_finialize_threadpool_threads,
the handle on the internal thread object, stored in MonoInternalThread,
will be closed by the thread objects finializer in ves_icall_System_Threading_InternalThread_Thread_free_internal.
Under some rare occasions, one of the handles are not valid and will cause
the exception in CloseHandle or even worse, pointing to a complete different
kind of object, potentially closed by the threads finalizer, causing an instable
process with random behavior related to WIN32 objects (files, mutexes, threads, events etc).

The reason why it rarely manifests itself is due to a race between the finializer thread and the
main thread during shutdown. Main thread gives finalizer thread 2000 ms to complete its work and
if it’s time outs, the main thread won’t call the code that will run the finalizers,
mono_gc_finalize_threadpool_threads for the thread objects added to an internal list
by the finalizer thread, so if the finalizer takes more than 2000 ms to complete during shutdown
the bug won’t manifest itself. By increasing the wait time in mono_domain_finalize to for example INFINITE,
the repro of this bug will be 100% and not timing dependent anymore.

Turns out that the offending CloseHandle on the thread object happens at an
earlier point in time during shutdown, when mono_thread_manage tries to wait for
threads to complete manage thread it will do remove_and_abort_threads for background
threads still around. The way this works is that it will setup a list of thread handles
that it will wait for using WaitForMultipleObjects and then close the handles.
It turns out that the implementation of remove_and_abort_threads adds the wrong
handle to the list, not the duplicated handle but the original thread handle,
and that will trigger this bug, since the original thread handle will be closed
(and the duplicated handle will leak). The fix is to use the duplicated thread
handle instead of the original, similar to how it was already done in other similar methods, like build_wait_tids.
Sinces this bug seems to been around for quite some time and is a race related to managed threads and mono
shutdown sequence it could give other weird side effects on windows during shutdown
(since it could have closed a random WIN32 object instead of the intended thread).

Looking at Bugzilla, there is one bug that very well could be related to this specific problem, 10108:

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

This bug should most likely be retested with this fix to see if it still reproducible once merged into master.

7 years ago[jenkins] Use mingw64 to build, not 32
Jo Shields [Wed, 18 May 2016 09:48:01 +0000 (10:48 +0100)]
[jenkins] Use mingw64 to build, not 32

7 years ago[genproj] Updates to project generator and csproj files.
Miguel de Icaza [Wed, 18 May 2016 00:40:47 +0000 (20:40 -0400)]
[genproj] Updates to project generator and csproj files.

* Adds support for a handful of new command line arguments that we now use in the build.

* Always attempts to match to a project name, to get the proper project dependency.

* Update to support .exe and .dll in the generation.

* Remove warnings and some dead code

* Update the resulting csproj files based on running:

make update-csproj
make package-inputs
mono genproj.exe

7 years agoMerge pull request #3004 from xmcclure/gc-bridge-various
Rodrigo Kumpera [Tue, 17 May 2016 23:49:12 +0000 (16:49 -0700)]
Merge pull request #3004 from xmcclure/gc-bridge-various

Various GC bridge cleanup from looking at bug #40844

7 years ago[runtime] Remove support for NaCl
Ludovic Henry [Fri, 13 May 2016 21:33:06 +0000 (17:33 -0400)]
[runtime] Remove support for NaCl

7 years agoMerge pull request #2250 from esdrubal/master
Alexis Christoforides [Tue, 17 May 2016 20:36:14 +0000 (16:36 -0400)]
Merge pull request #2250 from esdrubal/master

[System] Check SocketOptionName.ReuseAddress support.

7 years agoAdd some comments in new/old gc bridges
Andi McClure [Tue, 17 May 2016 17:23:02 +0000 (13:23 -0400)]
Add some comments in new/old gc bridges

7 years agoFix error message in sgen-bridge which does not list all options
Andi McClure [Tue, 17 May 2016 16:47:35 +0000 (12:47 -0400)]
Fix error message in sgen-bridge which does not list all options

7 years agoRemove redundant flag set in sgen-tarjan-bridge
Andi McClure [Tue, 17 May 2016 16:47:05 +0000 (12:47 -0400)]
Remove redundant flag set in sgen-tarjan-bridge

bridge_processing_in_progress is set by sgen-tarjan-bridge.c at the
start and end of each bridge, although sgen-bridge sets this flag at
the same time.

7 years agoMore accurate trace reporting duration of android gc bridge
Andi McClure [Tue, 17 May 2016 16:45:49 +0000 (12:45 -0400)]
More accurate trace reporting duration of android gc bridge

There is some code that reports the length of a gc bridge operation in
sgen-stw. This is dead code dating from a period when gc bridges
occurred synchronously as part of a stop the world operation. The new
code globally tracks the end of the last stw and reports time since
then when the bridge thread completes.

7 years agoMerge pull request #2979 from akoeplinger/tests-simplify
Alexander Köplinger [Tue, 17 May 2016 16:09:38 +0000 (18:09 +0200)]
Merge pull request #2979 from akoeplinger/tests-simplify

[tests] Simplify 'test-sgen' target logic in Makefile.am

7 years agoMerge pull request #2988 from radical/xbuild-fix-processwrapper
Marek Habersack [Tue, 17 May 2016 15:54:11 +0000 (17:54 +0200)]
Merge pull request #2988 from radical/xbuild-fix-processwrapper

[xbuild] Fix ProcessWrapper to WaitForExit(..) before accessing ExitCode

7 years agoChange Url for raw runtimes
Miguel de Icaza [Tue, 17 May 2016 02:05:31 +0000 (22:05 -0400)]
Change Url for raw runtimes

7 years agoFix man page
Miguel de Icaza [Tue, 17 May 2016 02:03:33 +0000 (22:03 -0400)]
Fix man page

7 years ago[runtime] MonoError-ize mono_compile_method
Aleksey Kliger [Wed, 30 Mar 2016 21:36:47 +0000 (17:36 -0400)]
[runtime] MonoError-ize mono_compile_method

Mark it external only.  Runtime should use mono_compile_method_checked.

7 years agoMerge pull request #3001 from ludovic-henry/coop-blocking-rename
Aleksey Kliger (λgeek) [Mon, 16 May 2016 22:33:18 +0000 (18:33 -0400)]
Merge pull request #3001 from ludovic-henry/coop-blocking-rename

[coop] Use GC safe/unsafe macros inside the runtime

7 years agoMerge pull request #2987 from spouliot/ipv6only
Alexander Köplinger [Mon, 16 May 2016 21:33:14 +0000 (23:33 +0200)]
Merge pull request #2987 from spouliot/ipv6only

[System][tests] Tweak Dns unit tests so it does not fail on an IPv6 only network

7 years ago[arm] Align the stack to 16 bytes in mono_arch_get_call_filter () so it works on...
Zoltan Varga [Mon, 16 May 2016 21:01:58 +0000 (17:01 -0400)]
[arm] Align the stack to 16 bytes in mono_arch_get_call_filter () so it works on watchos.

7 years ago[coop] Use GC safe/unsafe macros inside the runtime
Ludovic Henry [Mon, 16 May 2016 20:26:52 +0000 (16:26 -0400)]
[coop] Use GC safe/unsafe macros inside the runtime

This allow the removal of MONO_(PREPARE|FINISH)BLOCKING and MONO(PREPARE|FINISH)_RESET_BLOCKING, which were not explicit in their intent, leading to confusion. This also harmonize how the product and the runtime transition between thread states.

7 years agoMerge pull request #2969 from ludovic-henry/coop-no-try-finally
Rodrigo Kumpera [Mon, 16 May 2016 20:05:53 +0000 (13:05 -0700)]
Merge pull request #2969 from ludovic-henry/coop-no-try-finally

[coop] Remove try { ... } finally { ... } blocks from wrappers + Fix state transitions in trampolines

7 years agoMerge pull request #2999 from marek-safar/rs-FileWeb
Marek Safar [Mon, 16 May 2016 19:42:51 +0000 (21:42 +0200)]
Merge pull request #2999 from marek-safar/rs-FileWeb

[System] FileWebResponse/FileWebRequest from referencesource

7 years ago[System] Use common assertion api in IPAdressTest to fix monodroid build
Alexander Köplinger [Mon, 16 May 2016 19:05:58 +0000 (21:05 +0200)]
[System] Use common assertion api in IPAdressTest to fix monodroid build

`Assertion.Fail` isn't supported by NUnitLite in monodroid, use `Assert` instead to fix the build:

```
[12:29:46] /Users/builder/data/lanes/1845/88dbce4e/source/monodroid/tests/bcl-test/BclTests.csproj (default targets) ->
[12:29:46] /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.CSharp.Targets (CoreCompile target) ->
[12:29:46]
[12:29:46]  src/System/Test/System.Net/IPAddressTest.cs(282,4): error CS0103: The name `Assertion' does not exist in the current context
[12:29:46]
[12:29:46]   14 Warning(s)
[12:29:46]   1 Error(s)
```

7 years ago[System] FileWebResponse/FileWebRequest from referencesource
Marek Safar [Mon, 16 May 2016 09:18:12 +0000 (11:18 +0200)]
[System] FileWebResponse/FileWebRequest from referencesource

7 years ago[coop] Ensure exception handling is done in GC unsafe mode
Ludovic Henry [Wed, 11 May 2016 16:50:49 +0000 (12:50 -0400)]
[coop] Ensure exception handling is done in GC unsafe mode

7 years ago[debug] Print MonoMethod pointer in mono_pmip output
Ludovic Henry [Fri, 6 May 2016 14:54:55 +0000 (10:54 -0400)]
[debug] Print MonoMethod pointer in mono_pmip output

7 years ago[coop] Assert that trampolines are called from GC unsafe code
Ludovic Henry [Thu, 12 May 2016 15:21:35 +0000 (11:21 -0400)]
[coop] Assert that trampolines are called from GC unsafe code

7 years ago[coop] The magic trampoline might be called from BLOCKING state
Ludovic Henry [Fri, 13 May 2016 14:56:47 +0000 (10:56 -0400)]
[coop] The magic trampoline might be called from BLOCKING state

7 years ago[coop] Add default ftnptr eh callback
Ludovic Henry [Wed, 4 May 2016 21:01:27 +0000 (17:01 -0400)]
[coop] Add default ftnptr eh callback

7 years ago[coop] Use unbalanced state switching functions for managed-to-native wrapper
Ludovic Henry [Fri, 6 May 2016 17:38:02 +0000 (13:38 -0400)]
[coop] Use unbalanced state switching functions for managed-to-native wrapper

7 years ago[coop] Add possibly unbalanced state switching functions
Ludovic Henry [Wed, 4 May 2016 18:56:15 +0000 (14:56 -0400)]
[coop] Add possibly unbalanced state switching functions

This will be used by managed-to-native and native-to-managed wrappers, as well as trampolines, to switch between states. This is necessary as their calls might be unbalanced (a prepare blocking, without the corresponding finish blocking).

7 years ago[coop] Throw exception from finally clause in native-to-managed wrapper
Ludovic Henry [Mon, 9 May 2016 15:57:51 +0000 (11:57 -0400)]
[coop] Throw exception from finally clause in native-to-managed wrapper

If we do not throw it from the finally clause, then in case of a Thread.Abort, we will not rethrow the catched exception, but the ThreadAbortException, and this without using the callback, leading to native stack unwinding.

7 years ago[coop] Remove try { ... } finally { ... } from managed-to-native wrapper
Ludovic Henry [Wed, 4 May 2016 18:38:38 +0000 (14:38 -0400)]
[coop] Remove try { ... } finally { ... } from managed-to-native wrapper

7 years ago[coop] Remove support for invoke thunk wrapper
Ludovic Henry [Wed, 4 May 2016 17:58:26 +0000 (13:58 -0400)]
[coop] Remove support for invoke thunk wrapper

The support will be broken when we will introduce MonoHandle, as we can't pass the exception naked object ref around, but need to wrap it in a MonoHandle, while still in RUNNING mode.

7 years agoMerge pull request #2993 from lambdageek/dev/monoerror-mono_string_from_utf16
Aleksey Kliger (λgeek) [Mon, 16 May 2016 14:13:19 +0000 (10:13 -0400)]
Merge pull request #2993 from lambdageek/dev/monoerror-mono_string_from_utf16

[runtime] MonoError-ize mono_string_from_utf16

7 years ago[System] Fixes build
Marek Safar [Mon, 16 May 2016 11:38:17 +0000 (13:38 +0200)]
[System] Fixes build

7 years ago[System] Authorization from referencesource
Marek Safar [Mon, 16 May 2016 10:13:52 +0000 (12:13 +0200)]
[System] Authorization from referencesource

7 years agoMerge pull request #2995 from marek-safar/rs-IPAddress
Marek Safar [Mon, 16 May 2016 09:07:38 +0000 (11:07 +0200)]
Merge pull request #2995 from marek-safar/rs-IPAddress

[System] IPAddress from referencesource

7 years agoWindows x64 full AOT support for mono/mini regression tests.
lateralusX [Mon, 16 May 2016 08:31:38 +0000 (10:31 +0200)]
Windows x64 full AOT support for mono/mini regression tests.

Fixes needed in order to get full AOT working for mono/mini regression tests on windows x64 builds (currently disabling the gsharedvt and dyncall tests).

Fixes are done in two main areas, exception and thread local storage support.

SEH exception handling enabled in order to catch CPU generated exceptions. All exception related regression tests pass with fix and runtime won't attempt to JIT any code since it is prevented when running with --full-aot startup argument.

Thread local storage (TLS) support was not complete on windows x64. When running full AOT the sgen allocator uses TLS for its allocator. AOT compiler will issues OP_TLS_GET_REG operations when compiling the “Alloc” methods. On win x64 this was not implemented, just the default OP_TLS_GET, meaning that methods compiled using OP_TLS_GET_REG was "silently" dropped when full AOT:ed compiled. At runtime, the sgen allocator would tried to locate the “Alloc” method but fails to find it and since this will cause an exception (that also needs the allocator to be used) and the program entered a loop that will end in a stack overflow crashing the program.

The fix implements OP_TLS_GET_REG and other needed support for win x64. It also fixes the offset calculation needed by full AOT builds (translating to correct runtime TLS key) for keys used by mono/mini regression tests. Since windows TLS support is a little more complex (two different conditions depending on where the TLS key gets allocated) the max size of tls_get_reg for amd64 has been increased from 32 to 64 byte as well.

7 years ago[reflection] Avoid force-setting klass->has_finalize for dynamic classes, compute...
Zoltan Varga [Sun, 15 May 2016 09:18:21 +0000 (05:18 -0400)]
[reflection] Avoid force-setting klass->has_finalize for dynamic classes, compute it normally. Fixes #40953. (#2997)

7 years ago[llvmonly] Avoid generating gsharedvt out wrappers for non-generic signatures.
Zoltan Varga [Sat, 14 May 2016 21:44:51 +0000 (17:44 -0400)]
[llvmonly] Avoid generating gsharedvt out wrappers for non-generic signatures.

7 years agomkbundle commands for cross compilation. (#2970)
Miguel de Icaza [Sat, 14 May 2016 04:32:14 +0000 (21:32 -0700)]
mkbundle commands for cross compilation. (#2970)

* Start of packager for mkbundle

* [mkbundle] Add fingerprint and directory at end of package

* [mkbundle] Update embedding file format, add support for --options, support for --runtime, chmod +x

* [driver] Add a way to parse arbitrary command line options

* [mkbundle] Align the assemblies on a page boundary, do not release directory buffer

* Work-around odd compiler error by using memcpy

* Update makefile

* Fix the windows build

* [Windows] Export the new mono_parse_options_from API

* Implement the various cross-compiler target fetching commands

* Clean

7 years ago[System] IPAddress from referencesource
Marek Safar [Fri, 13 May 2016 11:10:47 +0000 (13:10 +0200)]
[System] IPAddress from referencesource

7 years ago[System] Replace few System.Net types with referencesource
Marek Safar [Fri, 13 May 2016 16:09:13 +0000 (18:09 +0200)]
[System] Replace few System.Net types with referencesource

7 years ago[coop] Avoid calling mono_marshal_set_last_error () in the managed-to-native wrapper...
Zoltan Varga [Fri, 13 May 2016 15:35:20 +0000 (11:35 -0400)]
[coop] Avoid calling mono_marshal_set_last_error () in the managed-to-native wrapper inside the blocking block. Also make sure the prepare/finish_blocking jit icalls have no wrappers, so calling them doesn't involve trampolines.

7 years agoMerge pull request #2974 from lambdageek/dev/monoerror-misc_fixes
Aleksey Kliger (λgeek) [Fri, 13 May 2016 15:07:00 +0000 (11:07 -0400)]
Merge pull request #2974 from lambdageek/dev/monoerror-misc_fixes

[runtime] Eliminate some mono_error_raise_exception calls

7 years agoFix a warning.
Zoltan Varga [Fri, 13 May 2016 14:11:01 +0000 (10:11 -0400)]
Fix a warning.

7 years ago[llvmonly] Make sure that linkonce methods need no initialization since they could...
Zoltan Varga [Fri, 13 May 2016 14:09:32 +0000 (10:09 -0400)]
[llvmonly] Make sure that linkonce methods need no initialization since they could be called before the AOT module they belong to is loaded. Still not enabled, since they seem to actually increase executable size.

7 years ago[System] Remove unused files
Marek Safar [Fri, 13 May 2016 12:06:15 +0000 (14:06 +0200)]
[System] Remove unused files