Compare commits

..
1027 Commits
Author SHA1 Message Date
Alexander Köplinger 297c25787b Merge pull request #3779 from akoeplinger/fix-aot-only-reference
[mini] Fix mention of --aot-only option, it no longer exists
2016-10-17 17:56:03 +02:00
Lluis Sanchez 0701399a88 Implement some missing methods in RSACryptoServiceProvider
(cherry picked from commit d4e09f5c35)
2016-10-17 17:47:40 +02:00
Lluis Sanchez a92792300b Implemented System.Security.Cryptography.X509Certificates.RSACertificateExtensions
(cherry picked from commit 04a376b2ab)
2016-10-17 17:47:34 +02:00
Alexander Köplinger 524d79758a [mini] Fix mention of --aot-only option, it no longer exists
It was replaced with --full-aot in ba99fd8334,
but there were still two places left that talked about the old option which leads to confusion.

Also updated the link to Xamarin docs to the current URL.
2016-10-17 17:18:43 +02:00
Alexander Köplinger 03ea8b5a62 [build] Regenerate .csproj files
Note: DISABLE_CAS_USE was removed in ed989a8e9e
2016-10-17 16:34:16 +02:00
Marek Safar c143e55c45 [System] More Socket methods from referencesource 2016-10-17 15:04:39 +02:00
Zoltan Varga 1be62d5e2a [WP] [runtime] Rewrite field loading and layout (#3722)
* [runtime] Improve the locking in mono_class_setup_basic_field_info ().

Compute all the required information outside the lock and install it inside the lock. Remove mono_class_setup_basic_field_info_locking () function which is no longer needed.

* [runtime] Move the special case of no fields from mono_class_setup_fields () to mono_class_layout_fields ().

* [runtime] Move the computation of klass->blittable and klass->element_class/cast_class for enums to mono_class_layout_fields () so it can be used for dynamic types as well.

* [runtime] Make typebuilder_setup_fields () initilize the same data as mono_class_setup_fields ().

* [runtime] Move more common code into mono_class_layout_fields () from mono_class_setup_fields () and typebuilder_setup_fields ().

* [runtime] Avoid infinite recursion in mono_class_setup_fields () by storing the classes under initialization in a TLS list instead of using the racy klass->setup_fields_called flag.

* [runtime] Reduce the amount of locking in mono_class_setup_fields () to the call to mono_class_layout_fields (). Remove mono_class_setup_fields_locking ().

* [runtime] Remove a special case for no fields from mono_class_layout_fields (), the normal code can handle it.

* [runtime] Reorganize mono_class_layout_fields () so it makes all modifications to the MonoClass instance in one place.

* [runtime] Reduce the amounrt of locking in mono_class_layout_fields ().

* [runtime] Remove some compiler context code.
2016-10-16 00:35:16 -04:00
Alexander Köplinger 056d58cf04 [corlib] Don't emit symbol information in ModuleBuilderTest.GetType()
It doesn't work on Android and the test doesn't need it.
2016-10-15 03:13:59 +02:00
Alexander Köplinger dcf4ddd097 [System] Fix expected default value in test for ServicePointManager.ConnectionLimit on XA
The default was aligned with XI on https://github.com/mono/mono/commit/d06354174070d01394f5e75ffcfc9c1110a1e7db
2016-10-15 01:09:10 +02:00
Alex Rønne Petersen f729626e72 Merge pull request #3775 from alexrp/main-thread-name
[runtime] Don't change the native name of the main thread.
2016-10-14 23:16:15 +02:00
Miguel de Icaza fb2908ef74 Revert "UTF8, with build fixed"
This reverts commit 50d119be5d.
2016-10-14 14:39:22 -04:00
Miguel de Icaza 2ab2feb43f Revert "Revert "UTF8 Marshaling APIs (#3736)""
This reverts commit 2a01bde545a47e287977637a4a08f8f965ca45dc.t push
:
2016-10-14 14:36:42 -04:00
Miguel de Icaza 50d119be5d UTF8, with build fixed 2016-10-14 14:35:46 -04:00
Miguel de Icaza 2a01bde545 Revert "UTF8 Marshaling APIs (#3736)"
This reverts commit 4056e80006.
2016-10-14 14:26:40 -04:00
Miguel de Icaza 4056e80006 UTF8 Marshaling APIs (#3736)
Adds support for the new UTF8 marshaling functionality in .NET, there is support for the new MarshalAs(UnmanagedType.LPUTF8St) as well as a handful of convenience methods in Marshal.cs

In Mono, this is mostly a pass-through as we have historically only done
UTF8, so this merely adds the constant processing to the runtime.

This fixes a few bugs that the new test suite exhibited: when we marshaled UTF8 strings, we assumed Chars() == Bytes() and we would end up chopping when marshaling out, and marshaling in.

There is also an additional behavioral bug that was fixed in Marshal.cs, unlike the rest of the runtime that treated Ansi as Utf8, StringToCoTaskMemAnsi behaved as ascii. This brings the API in line with the rest of the runtime.

The equivalent CoreCLR changes were:

dotnet/coreclr#4793
dotnet/coreclr#6561

This has also surfaced two limitations in Mono's marshaling code, which is why two sets of tests are disabled: StringBuilder return types are not handled specially (char * needs to be turned into a new StringBuilder when present) and StringBuilders with an Out attribute should update the StringBuilder in place, not make a new copy of it.
2016-10-14 14:23:23 -04:00
Alex Rønne Petersen 99a678e72e [runtime] Don't change the native name of the main thread.
This makes it hard to differentiate multiple Mono processes in `top`.

We still report the name of the main thread as "Main" to the profiler.
2016-10-14 18:18:57 +02:00
Marek Safar fbc8e9daaf [System.ServiceModel] Hide only relevant exceptions in TcpChannelListener.cs 2016-10-14 16:24:21 +02:00
Marek Safar d70b715a96 [System] Use mono specific payload type for EndAccept of TCPListener 2016-10-14 16:24:21 +02:00
Alexander Köplinger a1af439223 Merge pull request #3763 from akoeplinger/move-type
[System.ServiceModel] Move a few types into System.IdentityModel
2016-10-14 16:17:39 +02:00
Niklas Therning 429eb3bb96 Merge pull request #3771 from henricm/enable-system-tests-on-windows
Enable System tests for PR builds on Windows
2016-10-14 14:29:31 +02:00
Henric Müller 081610e669 Enable System tests for PR builds on Windows 2016-10-14 10:09:25 +02:00
Marek Safar d19e5c42a5 [System.Xml] Update supported time formats for mobile version of XML deserializer. Fixes #42843 2016-10-14 09:10:17 +02:00
Marek Safar 398675d21a [System.Xml] Enable more tests 2016-10-14 09:10:17 +02:00
Henric Müller 20c72671c1 Merge pull request #3756 from henricm/named-pipe-alertable-on-windows
Making named pipe connects alertable on Windows
2016-10-14 08:48:39 +02:00
Vlad Brezae 0b65fb9d99 Merge pull request #3766 from BrzVlad/feature-default-conc
[sgen] Switch to default concurrent on desktop
2016-10-14 01:35:49 +03:00
Rodrigo Kumpera d0fb7a1240 Merge pull request #3761 from kumpera/fix-maccore-linking-regression
[icalls] Change get_bundled_machine_config to ICALL_EXPORT so maccore can link it.
2016-10-13 14:24:48 -04:00
Rodrigo Kumpera 85c73568b0 Merge pull request #3716 from vargaz/unbox-stobj-null
[jit] Add a small optimization for unbox.any+stobj called with a null…
2016-10-13 14:00:58 -04:00
Marek Safar 4d3402deed [System] SocketAsyncEventArgs::Dispose does not free any managed resources. Fixes #44757 2016-10-13 16:44:39 +02:00
Bernhard Urban a342bb00ca Merge pull request #3591 from directhex/mono_libdir_fallback
Handle relocatable libMonoPosixHelper.so when --libdir= isn't lib/
2016-10-13 16:39:38 +02:00
Martin Baulig 5109914276 [System]: Move MonoBtlsProvider.IsSupported() -> MonoTlsProviderFactory.IsBtlsSupported() (#3760)
* [System]: Move MonoBtlsProvider.IsSupported() -> MonoTlsProviderFactory.IsBtlsSupported().

Move the intern-call which is used to determine whether we're using BTLS out of MonoBtlsProvider
to allow the managed linker to eliminate the Mono.Btls.* classes when it's not supported.

* Fix Android build.

(cherry picked from commit 90699022b6)
2016-10-13 16:27:08 +02:00
Vlad Brezae 2b08b7c451 [tests] Select sgen major explicitly in tests
On configurations where we were only testing serial (using the default collector), we now explicitly test concurrent to put emphasis on it.
2016-10-13 17:06:59 +03:00
Vlad Brezae 74d6305ac7 [sgen] Enable concurrent gc by default on desktop
Linux (except android), MacOS and Windows.
2016-10-13 16:53:02 +03:00
Alexander Köplinger 213499eb63 Merge pull request #3762 from akoeplinger/fix-ftp-ipv6
[System] Add IPv6 support to FtpWebRequest
2016-10-13 13:48:40 +02:00
Johan Lorensson f458d55ec2 Merge pull request #3738 from lateralusX/jlorenss/win-api-family-support-libmonoruntime
Build libmonoruntime under none desktop Windows API family.
2016-10-13 12:47:29 +02:00
lateralusX 058f4dc12b Build libmonoruntime under none desktop Windows API family.
Initial work to build libmonoruntime under none desktop Windows API families.
2016-10-13 09:41:12 +02:00
Rodrigo Kumpera 1c7fa71a4a [icalls] Multiple fixes to get_bundled_machine_config.
Enviroment::get_bundled_machine_config icall should be ves_icall_System_Environment_get_bundled_machine_config.

Mark all icalls doing get_bundled_machine_config as ICALL_EXPORT so maccore can link them in/out.
2016-10-12 15:30:11 -07:00
Alexander Köplinger 34f6aab87e [System.ServiceModel] Move a few types into System.IdentityModel
They were moved there in MS.NET 4.5. Added typeforwards so existing references continue to work.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=35662
2016-10-12 23:20:57 +02:00
Rodrigo Kumpera b40bfda0e2 Merge pull request #3755 from kumpera/async-reader-hardering-2
[System] Another round of hardening around disposal of Process while doing async reads.
2016-10-12 12:46:46 -04:00
Alexander Köplinger d91796e39c [System] Add tests for IPv6-enabled FtpWebRequest 2016-10-12 18:43:47 +02:00
Alexander Köplinger aebed51257 [System] Add IPv6 support to FtpWebRequest
When connecting to an FTP server we weren't handling the RFC2428
extension to the FTP protocol which allows connections over IPv6
for the data channel.

We'd try to connect via IPv4 and the server would return an error
saying that this protocol is not supported.

The fix is to add handling for the protocol extension, namely
to use EPSV (for passive FTP) or EPRT (for active FTP) when opening
the data channel and send/parse the IPv6 addresses.

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

Note: we're now using the IP address of the the control channel we connected to for the
data channel instead of the address that is returned by the server in the FTP response message.
The reason is that for EPSV there's no IP returned by the server, and it should be
more reliable for normal PASV as well since the server might not know the
correct external address. This is also what MS does in referencesource.
2016-10-12 18:43:46 +02:00
Marek Safar b57f33ba97 [mcs] Handle interpolated strings with escaped quotes. Fixes #45286 2016-10-12 17:31:47 +02:00
Alexander Köplinger 26f23dbde3 [System] Make sure FtpWebRequest processing happens in a background thread
We don't want it to block app shutdown.
2016-10-12 16:16:29 +02:00
Marek Safar 224985a156 Bump ikvm for mcs fixes 2016-10-12 15:51:49 +02:00
Henric Müller bcbe894d3d Enable System.Runtime.Remoting tests on Windows 2016-10-12 15:18:08 +02:00
Henric Müller 0aed701c96 Making named pipe connects alertable on Windows
This fix makes sure that an aborted thread will wake up
a blocking named pipe connect.
2016-10-12 15:07:04 +02:00
Marek Safar 77541d8c1f Merge pull request #3754 from marek-safar/rs-sockets
[System] More Socket types from referencesource
2016-10-12 14:53:16 +02:00
Marek Safar 095701df57 [Mono.Data.Sqlite] Regression introduced by 04162ffbbd which changed _datetimeFormats order. Fixes #40603 2016-10-12 12:06:30 +02:00
Marek Safar eb76ec5782 [Mono.Data.Sqlite] Enable more tests 2016-10-12 12:06:30 +02:00
Vlad Brezae c866c3eefb Merge pull request #3749 from BrzVlad/fix-mips-fix
[mips] Fix mips
2016-10-12 11:56:10 +03:00
Niklas Therning 6271985201 Merge pull request #3753 from henricm/enable-windowsbase-tests-on-windows
Enable WinowsBase tests on Windows
2016-10-12 10:40:09 +02:00
Marek Safar 092279ecd6 [System] Warnings cleanup 2016-10-12 10:19:18 +02:00
Marek Safar c79b08d83c [System] More Socket types from referencesource 2016-10-12 10:14:03 +02:00
Marek Safar e95a1d4a00 Merge pull request #3750 from marek-safar/socket
[System] More Socket pieces from referencesource
2016-10-12 10:09:18 +02:00
Vlad Brezae 95fd910972 [mips] Disable div with mul on 32bit mips 2016-10-12 00:19:48 +03:00
Zoltan Varga 6332448df8 [llvm] Avoid generating invalid IL for valuetypes+vphi+volatile variables in gsharedvt methods. Fixes part of #45270. 2016-10-11 16:04:00 -04:00
Alexander Köplinger 2fdbce718b [corlib] Fix UdpClient tests on watchos
They were reenabled in 1fa85ad4af,
but UdpClient throws PlatformNotSupportedException on watchos.
2016-10-11 21:25:50 +02:00
Rodrigo Kumpera a5fc1343a3 Merge pull request #3715 from kumpera/fix-44707
[corlib] Don't load the machine config file if it's missing. Fixes #44707
2016-10-11 14:31:04 -04:00
Rodrigo Kumpera 879d682775 [System] Another round of hardening around disposal of Process while doing async reads.
This round ensures stream and decoder are protected from dispose and that we properly
bail out to the EOS case.
2016-10-11 11:25:51 -07:00
Martin Baulig fe2dedafba [cert-sync]: Change back to using the '--btls' argument.
Without arguments, 'cert-sync' now operates on the old certificate store
again, like it was before.  To test BTLS, you need to explicitly run it
with '--btls'.

(cherry picked from commit 46379bda6d)
2016-10-11 18:14:51 +02:00
Alexander Köplinger f7b73f070a Merge pull request #3745 from akoeplinger/fix-bug44937
[io-layer] Correctly detect a PE32+ assembly as managed when starting process
2016-10-11 17:28:08 +02:00
Marek Safar 2ed3257a23 [System.ServiceModel] Split unreliable tests 2016-10-11 16:56:16 +02:00
Marek Safar bb0a415101 [System] Set more error details on failed https proxy connect. Fixes #45108 2016-10-11 16:45:22 +02:00
Marek Safar 34fd8d0ff7 [mono] Fixes hardcoded stack limit in EnsureSufficientExecutionStack check 2016-10-11 16:34:14 +02:00
Marek Safar de10cef32c [System] More Socket pieces from referencesource 2016-10-11 15:45:53 +02:00
Henric Müller cdf9d5103b Enable WinowsBase tests on Windows 2016-10-11 14:37:14 +02:00
Henric Müller b1e7cf18a9 Merge pull request #3662 from henricm/fix-windowsbase-on-win
WindowsBase zlib, ZipSharp and Package fixes for Windows
2016-10-11 14:02:10 +02:00
Henric Müller fd76523f6a Making sure stream is closed when exception is thrown
Stream will never be closed if we throw exception in Open
which leads to file being locked in Windows and that we
leak file handles.
2016-10-11 13:25:48 +02:00
Henric Müller 6676f790a8 Setting Culture to en-us for ToStringTest 2016-10-11 13:25:29 +02:00
Henric Müller fe5fceab9c Make ZipSharp work on Windows
This patch adds the zlib functions needed by ZipSharp to the VS
MonoPosixHelper.def export file.

This patch also changes the ZipSharp code to use different code paths
depending on the size of the C long type on the underlying platform. On
gcc/clang the C long type follows the bitness of the targeted architecture,
it's 32-bit on 32-bit systems and 64-bit on 64-bit systems. With the VS
compiler however, the C long type is always 32-bit regardless of the target
architecture. zlib and minizip uses C long in a number of different function
signatures and structs.
2016-10-11 13:09:15 +02:00
Alexander Köplinger 0f3d08adfb Merge pull request #3746 from ntherning/fix-SocketResponder-on-windows
Fix SocketResponder on Windows
2016-10-11 12:22:37 +02:00
Marek Safar 528e5d2ef4 Merge pull request #3747 from marek-safar/updclient
UpdClient from referencesource
2016-10-11 11:23:58 +02:00
Vlad Brezae ea0e95eec1 [mips] Add missing define 2016-10-10 23:27:52 +03:00
Vlad Brezae bd25dd17d8 [mips] Don't assert when decomposing longs
There is no point in asserting if we encounter an unhandled long op. These ops may still get removed, if emulated later on, or maybe from other passes. Asserting happens as a last resort when emitting the native code for the method.
2016-10-10 23:20:15 +03:00
Alexander Köplinger dac829dbe9 [corlib] Add missing constructors to RNGCryptoServiceProvider on monotouch
Those were missed in cb46f78eef because there's a separate
implementation for monotouch in an unrelated file.
2016-10-10 20:13:55 +02:00
Martin Baulig 83aa0a6f39 [System]: Fix a typo in X500DistinguishedName.AreEqual().
(cherry picked from commit 1ac809aad7)
2016-10-10 18:30:39 +02:00
Alexander Köplinger 8d1a65128a [btls] Use UTC for the Unix epoch in the managed BTLS code (#3702)
The epoch is specified as being in UTC, but the DateTime(int, int, int) constructor
creates a DateTime with an 'Unspecified' timezone, which could lead to problems later on.
2016-10-10 18:03:39 +02:00
Martin Baulig bc8582c84d [BTLS]: Correctly handle certificates with negative serial numbers. (#3719)
In mono_btls_x509_get_serial_number(), first call i2c_ASN1_INTEGER()
which takes care of padding and computing the 2s complement for negative
numbers, then reverse the buffer.
(cherry picked from commit 1a55680bfa)
2016-10-10 18:03:00 +02:00
Marek Safar e0be7efd61 [System.Core] Remove unused files 2016-10-10 17:39:33 +02:00
Niklas Therning 9e4a4ff90e Fix SocketResponder on Windows
There seems to be a race in some tests in the System test suite that use
SocketResponder on Windows. Some tests fail with an exception that the socket
has been closed before they get a chance to see the response sent by the
SocketResponder. The same happens occasionally when using SocketResponder on
.NET. This patch changes the order of the Socket.Shutdown() calls and adds a
Socket.Receive() before Shutdown() is called to give the sender a chance to
actually send any data before the responder shuts down and closes its side of
the connection.
2016-10-10 17:06:43 +02:00
Marek Safar 1fa85ad4af [System] Enable more tests 2016-10-10 17:04:31 +02:00
Marek Safar 97901a252d [System] UdpClient from referencesource 2016-10-10 16:52:03 +02:00
Marek Safar 54900936b6 [System.Data] Use same socket family for data receiver as it has its client. Fixes #44624 2016-10-10 16:25:17 +02:00
Vlad Brezae 38f607b059 Merge pull request #3740 from Unity-Technologies/gc-options-command-line
GC debug and params command line options
2016-10-10 16:43:54 +03:00
Alexander Köplinger 68bcbb4b77 [io-layer] Correctly detect a PE32+ assembly as managed when starting process
We weren't checking whether a PE file is in PE32 or PE32+ format,
causing us to use the PE32 offsets on the newer format as well.

This means that using Process.Start() on a managed assembly didn't
always work when a PE32+ file was in play. Such a file is created
when targeting x64 e.g. via the -platform:x64 csc.exe/mcs option.

The reason why we probably didn't notice until now is that in an
assembly produced by mcs there happens to be some data at the PE32
CLR header offset even in a PE32+ file, causing the check to "work".

This doesn't apply to csc.exe/roslyn though and so we couldn't
execute those assemblies via Process.Start() even though they're
perfectly managed. Since the .NET Core project.json toolchain
produces x64-targeted assemblies by default more people ran into
the issue trying to run those on Mono: https://github.com/cake-build/cake/issues/1247

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

PE/COFF spec at https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx
2016-10-10 14:00:07 +02:00
Alexander Köplinger 7ca51073c6 Merge pull request #3739 from akoeplinger/add-more-netstandard-api
[bcl] Expose a few more APIs on mobile to match with netstandard
2016-10-10 13:39:06 +02:00
Alexander Köplinger cb46f78eef [bcl] Expose a few more APIs on mobile to match with netstandard
See https://github.com/dotnet/standard/issues/47.
2016-10-10 13:35:33 +02:00
Niklas Therning 082057e3d7 Merge pull request #3653 from ntherning/alertable-socket-wait
Make blocking socket calls on Windows interruptible
2016-10-10 13:30:31 +02:00
Niklas Therning 50d7cf0daf Merge pull request #3744 from ntherning/enable-system-security-tests-in-pr-builds-on-windows
Enable System.Security tests in PR builds on Windows
2016-10-10 13:20:35 +02:00
Niklas Therning 46a3201f93 Enable System.Security tests in PR builds on Windows 2016-10-10 10:27:41 +02:00
Alex Rønne Petersen 044afdad5c Merge pull request #3742 from alexrp/profiler-c9-fixes
[profiler] Start the helper thread before the writer thread.
2016-10-08 13:23:10 +02:00
Alex Rønne Petersen 2ab8d8b692 [profiler] Start the helper thread before the writer thread.
This fixes a regression introduced in 0db428169a
which caused the profiler to not report the correct command port in the file
header on startup.
2016-10-08 11:55:31 +02:00
Zoltan Varga 9a3f1672d2 [SRE] Set the wastypebuilder flag on completed generic param builder … (#3712)
* [SRE] Set the wastypebuilder flag on completed generic param builder classes to remove a workaround from mono_type_get_object_checked ().

* [SRE] Remove unused verify_safe_for_managed_space () function.
2016-10-07 20:43:04 -04:00
Zoltan Varga c47a2991f9 [llvm] Make sure the initlocals_bb is not treated as part of a try block if one starts at IL offset 0, since it could mess up the control flow if it contains calls. (#3718) 2016-10-07 20:42:32 -04:00
Alexander Köplinger a201b2ac42 Merge pull request #3741 from akoeplinger/fix-aot-DoAssemblyResolve
[aot] Fix AppDomain.DoAssemblyResolve runtime invoke wrapper
2016-10-08 00:17:22 +02:00
Alexander Köplinger efd8c822c2 [aot] Fix AppDomain.DoAssemblyResolve runtime invoke wrapper
In https://github.com/mono/mono/pull/1528 the DoAssemblyResolve method was changed
from two parameters to three, but the code in aot-compiler.c was not updated to match.
2016-10-07 22:06:22 +02:00
Jonathan Chambers d602c64c2c Document --gc-debug and --gc-params command line options 2016-10-07 13:54:00 -04:00
Jonathan Chambers 3f234cb6ad Add --gc-params and --gc-debug command line options 2016-10-07 13:31:58 -04:00
Aleksey Kliger (λgeek) e1b0a37135 Merge pull request #3731 from lambdageek/dev-handles-gbmc
[runtime] System.Configuration.InternalConfigurationHost:get_bundled_machine_config  needs HANDLES
2016-10-07 13:13:44 -04:00
Niklas Therning 906bad4382 Merge pull request #3729 from ntherning/fix-failures-in-msbuild-tests-on-windows
Fix failures in MSBuild tests on Windows
2016-10-07 19:08:01 +02:00
Zoltan Varga 7de083be0b [runtime] Fix the blittable flag and the instance size for pointer types. Fixes #45131. (#3735) 2016-10-07 11:37:19 -04:00
Alexander Köplinger 8f181779a7 Merge pull request #3737 from akoeplinger/fix-babysitter
[ci] Set the env var in a new subshell to fix babysitter processing
2016-10-07 15:30:19 +02:00
Niklas Therning 149c4509f1 Fix failures in MSBuild tests on Windows 2016-10-07 15:29:04 +02:00
Marek Safar d3c8ea0191 Merge pull request #3727 from henricm/fix-system-web-on-windows
Fixes for System.Web to work on windows
2016-10-07 15:03:34 +02:00
Henric Müller 08367f0476 Enabling System.Web tests on Windows 2016-10-07 14:45:11 +02:00
Niklas Therning 53af53ae59 Make blocking socket calls on Windows interruptible
This second commit adds functions to socket-io.c which uses
WSAEventSelect()/WSAWaitForMultipleEvents() or overlapped I/O to make
potentielly blocking socket calls interruptible (alertable).
2016-10-07 14:30:28 +02:00
Henric Müller 33263bd790 Calling directly into Win API to get current process exe
On Windows the MonoToolsLocator tries to determine which mono.exe
to use by looking at the current process. Due to problems with
AppDomains and shadow copying (which happens in System.Web) we
could not use this approach. Instead we now call GetModuleFileName
directly using p-invoke to get the exe file of the running process.
This is only used when running on Windows.
2016-10-07 14:23:23 +02:00
Marek Safar 65162fe034 [System] Use default parsing rules for Uri.IsWellFormedUriString. Fixes #45129 2016-10-07 13:56:29 +02:00
Niklas Therning b612056c4e Make blocking socket calls on Windows interruptible
This first commit changes the signatures of the icalls for blocking socket
calls in Socket to propagate whether the socket call should block or not. This
is required since it's not possible on Windows through any native API to
determine whether a socket is in blocking or non-blocking mode.

This commit also adds the necessary RegisterForBlockingSyscall() guards to the
Socket.SendFile_internal() method which takes a WSABUF array. Without this
calls to this method won't be signaled when the Socket is closed.

This commit also fixes the error handling in the Socket.SendFile() method to
not rely on WSAGetLastError(). It's likely to have been overwritten between
when the error is generated and the WSAGetLastError() call from managed code.
2016-10-07 11:45:04 +02:00
Alexander Köplinger d622c39b89 [ci] Set the env var in a new subshell to fix babysitter processing
Setting the MONO_TLS_PROVIDER env var in the testing script makes it opaque to the
babysitter and other processing scripts. By setting it in a new subshell we can
ensure that the scripts see the whole invocation.
2016-10-07 11:08:15 +02:00
Rodrigo Kumpera ff4bc7c445 Merge pull request #3730 from kumpera/async-reader-dispose-hardening
[System] Add some hardening when disposing a AsyncStreamReader as it will have things happening concurrently.
2016-10-06 18:53:15 -04:00
Rodrigo Kumpera bd61765189 [corlib] RemotingConfiguration now try to use the bundled machine.config first. 2016-10-06 15:04:48 -07:00
Aleksey Kliger (λgeek) a4c8184708 Merge pull request #3660 from lambdageek/bug-42271
[coop] Switch to GC SAFE for backtrace() and backtrace_symbols()
2016-10-06 17:53:33 -04:00
Aleksey Kliger 636ba50ff7 [runtime] give get_bundled_machine_config ves_icall_Class_Method-style names 2016-10-06 16:58:46 -04:00
Aleksey Kliger 4315e43278 [runtime] System.Configuration.InternalConfigurationHost:get_bundled_machine_config
needs HANDLES

The method (which also goes by
System.Configuration.DefaultConfig:get_bundled_machine_config) was
converted to use coop handles earlier, but we missed this declaration.
2016-10-06 16:35:55 -04:00
Rodrigo Kumpera ddfb6bab08 [System] Add some hardening when disposing a AsyncStreamReader as it will have things happening concurrently. 2016-10-06 13:19:59 -07:00
Zoltan Varga cb17a4f8fd [SRE] Fixup the tokens in subtypes too. (#3721) 2016-10-06 16:12:23 -04:00
Niklas Therning 67f9c76caa Merge pull request #3725 from ntherning/fix-symbolicate-tests-stack-trace-diff-on-windows
Fix symbolicate tests stack trace diff on Windows
2016-10-06 20:04:32 +02:00
Aleksey Kliger c033a02e8a [mempool] Fix indentation in mono_backtrace () 2016-10-06 13:54:40 -04:00
Aleksey Kliger b1e13dd3c9 [coop] Switch to GC SAFE for backtrace() and backtrace_symbols()
Fixes [#42271](https://bugzilla.xamarin.com/show_bug.cgi?id=42271)
2016-10-06 13:54:39 -04:00
Marek Safar 0a515cf13b [corlib] Add ValueTuple 2016-10-06 17:52:23 +02:00
Niklas Therning c467c938dd Fix symbolicate tests stack trace diff on Windows
The symbolicate tests compare stack traces generated by the mono-symbolicate
tool against expected stack traces. The expected stack trace files have been
preprocessed to remove absolute paths and the Makefile does the same with the
output from the tool. However, the preprocessing doesn't take different
directory separator characters into account. This patch adds a 'tr' command to
the Makefile which converts \ -> / before the absolute paths are filtered out
from the actual output from the tool to make the comparison succeed on Windows
as well.
2016-10-06 14:22:49 +02:00
Henric Müller 629da62c52 Ignoring CR in WebControls tests 2016-10-06 11:20:28 +02:00
Johan Lorensson 390697c8b2 Merge pull request #3707 from lateralusX/jlorenss/win-api-family-support-libmonoutils
Build libmonoutils under none desktop Windows API family.
2016-10-06 09:07:41 +02:00
Niklas Therning 5022f7de41 Merge pull request #3720 from ntherning/fix-monodoc-tests-on-windows
Fix monodoc tests on Windows
2016-10-06 08:40:30 +02:00
Zoltan Varga 6ead72475f Fix a typo. 2016-10-05 17:59:29 -04:00
Rodrigo Kumpera 57d37f690e Merge pull request #3714 from kumpera/fix_process_stream_dispose
[System] Fix Process::Dispose resource leak due to RS import.
2016-10-05 14:54:41 -07:00
Rodrigo Kumpera 67d44f8ebf [System] Dispose all streams in Process::Close if they were not exposed to the user. Fixes a RS import regression.
RS takes the stance that redirected streams should not be closed by the Process class because they might
be referenced from the outside.

That would be ok if it was true. If you use Process::BeginOutputReadLine, the output stream becomes inaccessible
with no way to dispose them by any mean but GC.Collect. You get an exception when accessing Process::StandardOutput
once async reading starts.

This change addresses the case where the streams are not accessible. This is tracked by the *StreamReadMode variables
that are set on stream getters or Begin*ReadLine.
2016-10-05 14:51:01 -07:00
Zoltan Varga 69045343ca [jit] Use MONO_INS_IS_PCONST_NULL () macro in more places. 2016-10-05 12:22:33 -04:00
Marek Safar 73e95c3863 [System.Net.Http] Wrap certain exceptions into HttpRequestException. Fixes #44978 2016-10-05 17:56:56 +02:00
Aleksey Kliger (λgeek) 6dd95a6fdf Merge pull request #3684 from lambdageek/dev-monoerror-poolbox
[runtime] Use boxed MonoError for class failure.
2016-10-05 11:09:49 -04:00
Niklas Therning 8fcad5b4bd Fix monodoc tests on Windows
These tests are sensitive to differences in line endings between Windows and
other platforms. This patch changes the diff commands used on Windows to
ignore changes in whitespaces at end of lines.
2016-10-05 16:40:43 +02:00
Johan Lorensson e09aab25bd Merge pull request #3692 from lateralusX/jlorenss/win-api-family-support-libmono
Build libmono under none desktop Windows API family.
2016-10-05 16:10:10 +02:00
Marek Safar 7ddb079a47 [mcs] Don't report version mismatch error for FX assemblies 2016-10-05 15:02:44 +02:00
Alexander Köplinger 7d8ef14d5b Merge pull request #3709 from rolfbjarne/linker-mark-nested-types
[linker] We need to mark nested types even if the declaring type isn't marked.
2016-10-05 13:51:00 +02:00
Alexander Köplinger a394a0e9b6 [ci] Test System.dll with both the legacy and btls TLS provider 2016-10-05 13:19:06 +02:00
Martin Baulig dd03bb0abe [BTLS]: Certificate cleanups and fixes. (#3706)
* [BTLS]: Allow fallback to MX.X509Certificate in X509CertificateImplBtls.

* [BTLS]: Fix X509Certificate2.MonoCertificate.

* X509Certificate2Impl.FallbackImpl: make abstract.

* X509Helper2.GetMonoCertificate(): new internal helper method.

* X509Certificate2.MonoCertificate: use X509Helper2.GetMonoCertificate().
  This is only used by X509ChainImplMono; we should investigate whether we
  could implement the missing APIs in BTLS.

* [BTLS]: Fully implement X509CertificateImplBtls.Import() and use correct semantics.

.NET's X509Certificate2.Import() uses several implicit fallbacks which we previously
did not handle in BTLS.

* you may provide a (unused) password when importing an unencrypted PKCS#8.

* when using null as password, it will attempt to use string.Empty if importing
  without password fails.

* [BTLS]: Implement X509CertificateImplBtls.PrivateKey.

* [BTLS]: Implement X509CertificateImplBtls.Export().

* [BTLS]: Implement X509CertificateImplBtls.Verify().

* [BTLS]: Fix X500DistinguishedName quoting.

* MonoBtlsUtils: don't quote special chars in UTF-16 strings.

* X500DistinguishedName: don't decode raw data when passed in a name.

* [ci] Test System.dll with both the legacy and btls TLS provider

* [ci] Only run the additional btls System.dll test run on OSX for now

Otherwise we might run it on platforms where btls isn't supported yet and get errors.

(cherry picked from commit 9638ee9ece)
2016-10-05 13:07:21 +02:00
Marek Safar f2e0fc3f7f [System.Net.Htpp] Add test for large content range headers 2016-10-05 10:18:09 +02:00
Cinerar fe6fb22691 Nowdays Content-Range From could be much more than 2147483647 2016-10-05 10:16:14 +02:00
Zoltan Varga 952a8d634d [jit] Add a small optimization for unbox.any+stobj called with a null on the stack. 2016-10-04 23:51:58 -04:00
Rodrigo Kumpera 10aae2da45 [corlib] Don't load the machine config file if it's missing. Fixes #44707 2016-10-04 18:16:23 -07:00
Vlad Brezae d6f7d6199c Merge pull request #3705 from BrzVlad/fix-sgen-internal-alloc
[sgen] Fix block size computation for allocation size
2016-10-05 03:30:26 +03:00
Alexander Köplinger ead4213eaf Merge pull request #3697 from directhex/fix-make-dist-missing-basic.exe
When basic.exe isn't in DISTFILES, it gets excluded from `make dist`
2016-10-05 01:23:36 +02:00
Alexander Köplinger 7af506b0c3 Merge pull request #3711 from akoeplinger/fix-fullaot-tests
Fix two test failures in the FullAOT Jenkins job
2016-10-05 00:55:07 +02:00
Rodrigo Kumpera d60084ccdc [runtime] Don't do logging from a signal handler. It's not signal safe.
I found this while trying to MONO_LOG_LEVEL=debug an process way bug and the removed log statements
would hang mono in a matter of seconds.
2016-10-04 15:53:36 -07:00
Aleksey Kliger 3a9e18e540 [MonoError] Don't overwrite computed TypeLoadException message with empty string
Fixes [#44729](https://bugzilla.xamarin.com/show_bug.cgi?id=44729).
2016-10-04 17:24:05 -04:00
Aleksey Kliger 0a73f4eef4 [loader] Add descriptive error messages to class failure.
In cases where a class fails to load due to a related class failure,
extract the message from the related failure.
2016-10-04 17:08:15 -04:00
Aleksey Kliger e77ba5ed3d [runtime] Change how class failure is represented.
Use a single bit MonoClass::has_failure to represent whether a class has
failed.  Store detailed error message in MONO_CLASS_PROP_EXCEPTION_DATA property
in the MonoImage of the class.
2016-10-04 17:08:12 -04:00
Alexander Köplinger ff8af9c12b Fix two test failures in the FullAOT Jenkins job
Disable WebOperationsContextTest.Current like on monotouch, it relies on dynamic code generation.
The namedmutex-destroy-race.cs runtime test doesn't work on mobile_static since we don't have named Mutexes.
2016-10-04 22:25:42 +02:00
Alexander Köplinger 844b800098 Add mono-package-runtime to EXTRA_DIST
The file was added in 15b6ef60e4
2016-10-04 20:25:53 +02:00
Marek Safar a5971ec78c [corlib] Enable more RuntimeHelpers tests 2016-10-04 18:53:51 +02:00
Rolf Bjarne Kvinge 2d5815183c [linker] We don't need to mark nested types more than once. 2016-10-04 18:52:26 +02:00
Alexander Köplinger f16c0866a8 Merge pull request #3693 from rolfbjarne/watchos-simplify-http-message-handler-selection
[System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value.
2016-10-04 18:39:18 +02:00
Alexander Köplinger 9ca4e133ed Merge pull request #3704 from rolfbjarne/watchos-servicepointmanager
[System] Add back a few ServicePointManager properties that can be used by multiple networking stacks.
2016-10-04 18:35:48 +02:00
Rolf Bjarne Kvinge 35cbe54378 [linker] We need to mark nested types even if the declaring type isn't marked. 2016-10-04 18:16:53 +02:00
Aleksey Kliger 016b3b9a06 [loader] Make mono_class_get_failure static in class.c 2016-10-04 11:21:53 -04:00
Aleksey Kliger 5fbda1ee6e [loader] Add mono_class_set_type_load_failure ()
- Hide mono_class_set_failure as a static function in class.c
- Use a MonoErrorBoxed to represent a MONO_EXCEPTION_TYPE_LOAD.
2016-10-04 11:21:53 -04:00
Aleksey Kliger e45f8166ba [loader] Use MonoErrorBoxed for mono_class_set_failure (..., MONO_EXCEPTION_INVALID_PROGRAM, ...)
Use a MonoErrorBoxed to represent an invalid program class failure.
2016-10-04 11:21:53 -04:00
Aleksey Kliger 6c86e9794d [MonoError] add mono_error_vset_type_load_class function
A variant of mono_error_set_type_load_class that takes a va_list
argument instead of varargs.
2016-10-04 11:21:53 -04:00
Aleksey Kliger 1392837288 [MonoError] Add MonoErrorBoxed for mempool-stored errors.
The usual MonoError is suitable as a short-lived stack-allocated error
with a lifetime confined to a function call.
Internally it performs allocations using g_malloc/g_free.

The MonoErrorBoxed is a mempool-allocated error whose lifetime is tied
to the lifetime of a MonoImage.

We provide two operations:

1. MonoErrorBoxed* mono_error_box (MonoError *ierror, MonoImage *image);

  Creates a new boxed error in the given mempool from MonoError.
  It does not alter ierror, so you still have to clean it up with
  mono_error_cleanup or mono_error_convert_to_exception or another such function.

2.   gboolean mono_error_set_from_boxed (MonoError *oerror, MonoErrorBoxed *from_box);

  Sets the error condition in the oerror from the contents of the given
  boxed error.  Does not alter the boxed error, so it can be used in a
  future call to mono_error_set_from_boxed as needed.  The oerror
  should've been previously initialized with mono_error_init, as usual.
2016-10-04 11:21:53 -04:00
Vlad Brezae 5a13c41a36 [sgen] Fix block size computation for allocation size
The block size for a slot size is the minimum block size that can fit two slots. Make sure the computation accounts for the fact that even though a slot size might fit twice in the block, it still has to be allocated at aligned addresses, so it can end up using a higher block size.

Fixes 44922.
2016-10-04 18:18:49 +03:00
Aleksey Kliger (λgeek) 633af27d68 Merge pull request #3686 from lambdageek/dev-format-printf
Add MONO_ATTR_FORMAT_PRINTF macro
2016-10-04 10:05:33 -04:00
lateralusX 72a43d3355 Build libmono under none desktop Windows API family.
Initial work to build libmono under none desktop Windows API families.
2016-10-04 15:36:00 +02:00
lateralusX 5233231e65 Build libmonoutils under none desktop Windows API family.
Initial work to build libmonoutils under none desktop Windows API families.
2016-10-04 14:45:43 +02:00
Jo Shields 6843f6d61d Add EXTRA_DIST listing all the files from btls
Apparently there's no way to get CMake to just spit out its own uncached variables, so we can't do this programatically.
2016-10-04 12:27:01 +01:00
Jo Shields 503b18e07f Remove useless BTLS_DEPS variable 2016-10-04 10:48:07 +01:00
Rolf Bjarne Kvinge e41db94cb1 [System] Add back a few ServicePointManager properties that can be used by multiple networking stacks. 2016-10-04 11:13:11 +02:00
Niklas Therning 1e7e96e941 Merge pull request #3695 from ludovic-henry/fix-thread-test
[tests] Fix p/invoke test on windows
2016-10-04 10:35:14 +02:00
Zoltan Varga a6ea12ab4c [sdb] Avoid adding the first file name in the debug info to the list of file names if a method has no seq points. Fixes #44982. (#3696) 2016-10-03 23:10:31 -04:00
Alex Rønne Petersen 95117516f7 Merge pull request #3700 from alexrp/profiler-c9-fixes
[profiler] Fix a regression that caused all buffers to have a zero thread ID.
2016-10-04 04:58:37 +02:00
Alex Rønne Petersen 4a2dc82a42 [profiler] Use macro constants instead of passing a bunch of bools. 2016-10-04 04:28:26 +02:00
Alex Rønne Petersen 00754f933c [profiler] Update a stale comment. 2016-10-04 04:07:27 +02:00
Alex Rønne Petersen a5f75c0462 [profiler] Add some asserts. 2016-10-04 04:07:26 +02:00
Alex Rønne Petersen 5a5875bac0 [profiler] Simplify send_log_unsafe (). 2016-10-04 04:07:25 +02:00
Alex Rønne Petersen a081b99c55 [profiler] Fix a regression that caused all buffers to have a zero thread ID.
This was introduced in 928b840dad.
2016-10-04 04:07:18 +02:00
Zoltan Varga 4df80bc164 [SRE] Remove more dead code. 2016-10-03 22:00:31 -04:00
Zoltan Varga 0c11be9585 [SRE] Remove more unused icall declarations. 2016-10-03 21:17:25 -04:00
Zoltan Varga cea0756ebe [SRE] Remove more unused icalls. 2016-10-03 20:45:42 -04:00
Alexander Köplinger 65c849b377 [btls] Add missing icall definition for mono_btls_x509_revoked_get_revocation_date 2016-10-04 02:39:01 +02:00
Zoltan Varga cf3c15b416 [SRE] Small code cleanup. 2016-10-03 20:16:10 -04:00
Zoltan Varga 7efe967c24 [SRE] Remove unused icall from inside a DISABLE_REFLECTION_EMIT block. 2016-10-03 19:33:55 -04:00
Alex Rønne Petersen a49db8f1c6 Merge pull request #3698 from alexrp/profiler-c9-fixes
More C9 profiler fixes
2016-10-04 00:12:34 +02:00
Zoltan Varga 30c55b9343 [SRE] Delay the creation of the MonoClass for dynamic types until CreateType () is called. Remove some icalls. (#3687) 2016-10-03 17:04:34 -04:00
Ludovic Henry 607278bf6b [tests] Fix thread-native-exit test on windows 2016-10-03 22:25:51 +02:00
Martin Baulig eb0d26e11f [metadata]: Unconditionally enable ves_icall_Mono_Btls_Provider_IsSupported().
The MonoBtlsProvider.IsSupported() icalls ves_icall_Mono_Btls_Provider_IsSupported()
needs to be available whether BTLS is available or not because it is used at
runtime to decide whether or not to enable BTLS.

(cherry picked from commit 7b2a96fbd3)
2016-10-03 22:04:56 +02:00
Alex Rønne Petersen d88f911a87 [profiler] Fix BYTE_SIZE macro conflict on OS X. 2016-10-03 22:02:46 +02:00
Alex Rønne Petersen 820faaee2d [profiler] Fix PROF_TLS_FREE () on pthread TLS systems. 2016-10-03 21:53:59 +02:00
Rodrigo Kumpera 2947739179 [profiler] Fix the build on Android (missing fcntl.h include). 2016-10-03 21:47:52 +02:00
Martin Baulig 7129235d3c Oops, actually correctly revert that commit.
(cherry picked from commit 04379d5d73)
2016-10-03 21:22:00 +02:00
Martin Baulig 0debd082cc [System]: Temporarily switch the default TLS provider back to "legacy".
Also revert the Jenkins commit in c462f4e603.

(cherry picked from commit cd1b0b8edf)
2016-10-03 21:16:09 +02:00
Jo Shields bfa1a309b9 When basic.exe isn't in DISTFILES, it gets excluded from make dist 2016-10-03 20:08:17 +01:00
Marek Safar 67a454ffab [Mono.Debugger.Soft] Move TypeLoadClass types to new file to improve testing 2016-10-03 18:36:54 +02:00
Rolf Bjarne Kvinge 0c6036bcdf [System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value. 2016-10-03 18:22:12 +02:00
Alexander Köplinger 993f805cb7 [ci] Temporarily switch back to legacy TLS provider 2016-10-03 17:10:49 +02:00
Marek Safar 0034b230e8 [Mono.Debugger.Soft] Tweak ClassLocalReflection test 2016-10-03 16:10:57 +02:00
Niklas Therning 2107695a7a Merge pull request #3691 from ntherning/enable-tests-in-pr-builds-on-windows
Enable tests in Windows PR builds
2016-10-03 14:56:26 +02:00
Rolf Bjarne Kvinge 5780d872ad [System*] Throw a PlatformNotSupported exception when using the managed networking stack on watchOS. (#3683)
* [System.Data] System.Data.SqlClient is not supported in watchOS.

System.Data.SqlClient is not supported in watchOS, because it depends on a
working managed networking stack, which we don't have on watchOS.

* [System] Throw PlatformNotSupportedExceptions in the networking stack for watchOS.

* [System] Don't reference/build Mono.Security.dll when building for watchOS.

This means we can't build Mono.Data.Tds.dll either, since it uses
Mono.Security.dll extensively. In any case Mono.Data.Tds.dll is useless
without a working networking stack, and since it's a Mono-only dll (i.e. not
part of netstandard or facades), just remove the entire assembly from the
watchOS profile.

System.Security.dll uses Mono.Security.dll as well, but the required classes
are available inside mscorlib.dll (as internal classes), so just open up
mscorlib internals to System.Security.dll.

* [System] Update tests after API change for watchOS.

* [System.Data] Update tests after API change in watchOS.

* Revert "Fix build break from 81fb20737f810def6dde88d87a1b2f23cdb736c3"

This reverts commit f4475ff013.

* Fix missing trailing newline in monotouch_watch_System.dll.sources 

It breaks the build on Linux if the newline is missing.
2016-10-03 13:00:16 +02:00
Niklas Therning 72c700801d Enable tests in Windows PR builds
Also run the test suite in Windows PR builds. We disable all the test suites
in Windows PR builds that are known to fail.
2016-10-03 11:10:42 +02:00
Marek Safar 166830635e [System] Server property of HttpWebResponse should never be null 2016-10-03 09:38:23 +02:00
Alexander Köplinger aad01ff4db [btls] Fix i386 build on Linux by setting -arch on Darwin only
The -arch option is an Apple extension, it caused failures on i386 Linux: "unrecognized command line option '-arch'"
2016-10-03 00:33:15 +02:00
Alex Rønne Petersen 16e6b7770f Merge pull request #3689 from alexrp/profiler-c9-fixes
Profiler fixes for Cycle 9 (#2)
2016-10-02 21:59:26 +02:00
Alex Rønne Petersen fa4ea4cc55 [profiler] Fix GC finalize object end event not getting invoked. 2016-10-02 21:55:29 +02:00
Alex Rønne Petersen 00b1ceb8ff Revert "[domain] Report domain unloads to the profiler when finalizing the domain."
This reverts commit c8b2029080.

This caused ordering problems with app domain events: https://bugzilla.xamarin.com/show_bug.cgi?id=44552

Conflicts:

	mono/metadata/gc.c
2016-10-02 21:53:09 +02:00
Alex Rønne Petersen 30754eef7e Merge pull request #3688 from alexrp/profiler-c9-fixes
Profiler fixes for Cycle 9
2016-10-02 21:10:58 +02:00
Alex Rønne Petersen 958919f568 [profiler] Bump profiler version to v1.1. 2016-10-02 19:03:18 +02:00
Alex Rønne Petersen c42acf8bf2 [profiler] Don't emit enter/leave events in onlycoverage mode. 2016-10-02 19:03:09 +02:00
Alex Rønne Petersen 61d6684f27 [profiler] Add a nocounters option. 2016-10-02 18:56:27 +02:00
Alex Rønne Petersen cf076ebd1d [profiler] Address a couple of FIXMEs in the counters sampling code. 2016-10-02 18:56:17 +02:00
Alex Rønne Petersen d3ff7dca3e [profiler] Use eglib alloc/free functions everywhere. 2016-10-02 18:56:02 +02:00
Alex Rønne Petersen ffbf540457 [profiler] Warn if we can't detect the CPU count. 2016-10-02 18:55:50 +02:00
Alex Rønne Petersen 76c2b67207 [profiler] Use the native thread wrapper functions to manage threads. 2016-10-02 18:55:36 +02:00
Alex Rønne Petersen d78ba0e327 [utils/threads] Add and export a mono_native_thread_join () function. 2016-10-02 18:55:09 +02:00
Alex Rønne Petersen 7883db95e3 [utils/threads] Export all native thread functions. 2016-10-02 18:55:02 +02:00
Alex Rønne Petersen 36cb2ec977 [profiler] Access in_shutdown atomically. 2016-10-02 18:54:55 +02:00
Alex Rønne Petersen e998d8808f [profiler] Drop support for perf events on Linux. 2016-10-02 18:54:04 +02:00
Alex Rønne Petersen a6f95ab511 [utils/lfa] Add a missing #include to fix the profiler build. 2016-10-02 18:53:52 +02:00
Alex Rønne Petersen 3e9a0d4575 [profiler] Disable GC move events when allocation events are disabled.
They serve no purpose when allocation profiling is enabled, and just make log
files bigger than they have to be.
2016-10-02 18:53:36 +02:00
Alex Rønne Petersen b5205f797c [profiler] Clean up and improve the helper thread code.
* Don't invoke undefined behavior if an fd is >= FD_SETSIZE.
* Allow multiple command sockets.
* Close the command socket(s) on shutdown.
* Properly run cleanup logic on shutdown.
2016-10-02 18:53:20 +02:00
Alex Rønne Petersen 9127dfaf88 [profiler] Process requests in method_jitted (). 2016-10-02 18:53:00 +02:00
Alex Rønne Petersen a22f5779d2 [profiler] Remove the need to pass a MonoProfiler argument to some functions.
This is now available on the MonoProfilerThread structure.
2016-10-02 18:52:52 +02:00
Alex Rønne Petersen 1e4e265ba5 [profiler] Fix the way the profiler frees hazardous data on shutdown. 2016-10-02 18:52:08 +02:00
Alex Rønne Petersen 99af8b644b [profiler] Replace a check with an assert in coverage_filter (). 2016-10-02 18:51:36 +02:00
Alex Rønne Petersen 96f9415c5b [profiler] Add messages to most assertions. 2016-10-02 18:51:22 +02:00
Alex Rønne Petersen f9ad9d913c [profiler] Remove the ign_res () hack. 2016-10-02 18:51:08 +02:00
Alex Rønne Petersen 82f2c9bcca [profiler] Clean up the #include mess in mono-profiler-log.c.
Half of these aren't even needed - get rid of those. Sort the rest.
2016-10-02 18:51:00 +02:00
Alex Rønne Petersen b73e63c5dc [profiler] Remove mono_threads_attach_tools_thread () declaration.
We get this from mono-threads.h now.
2016-10-02 18:50:55 +02:00
Alex Rønne Petersen 9f7349c7c1 [profiler] Remove some broken, commented-out code from register_method_local (). 2016-10-02 18:50:48 +02:00
Alex Rønne Petersen 2a45034926 [profiler] assert () -> g_assert (). 2016-10-02 18:50:41 +02:00
Alex Rønne Petersen d4374ae1c3 [profiler] Always enable the helper thread.
We need it in all cases now that we use it to periodically flush all buffers.
The only platforms it was disabled on was NaCl, which we haven't bothered to
support in a while anyway.
2016-10-02 18:50:35 +02:00
Alex Rønne Petersen 99aa56a5b1 [profiler] Encapsulate some common logic in the ENTER_LOG/EXIT_LOG macros.
This also has the nice effect of reducing the amount of times we attempt to
take the reader lock. Now we take it and release it once for a single event.
2016-10-02 18:50:29 +02:00
Alex Rønne Petersen f802cbb584 [profiler] Add a missing deinit_thread () call to the helper thread. 2016-10-02 18:50:07 +02:00
Alex Rønne Petersen 51a03a7313 [profiler] Fix several race conditions in accessing MonoProfilerThread.buffer.
Only in very few situations is it okay to access this field without first
taking the reader lock or exclusive lock.

Fixes some crashes observed in the profiler stress tests.
2016-10-02 18:46:21 +02:00
Alex Rønne Petersen 4533cd91b2 [profiler] Don't flush empty log buffers. 2016-10-02 18:44:55 +02:00
Alex Rønne Petersen 348688ad75 [profiler] Add an extra assert. 2016-10-02 18:44:51 +02:00
Alex Rønne Petersen 4acc3dfeed [sgen] Always report object moves on the GC thread.
This avoids exposing the SGen worker threads through the profiler APIs. Doing
so had two main problems:

* It's easy for a user of the profiler API to accidentally mess with the state
  of the worker thread in all sorts of ways, which could break the GC.
* It's been a long-standing guarantee that any profiler API callback will be
  invoked on a thread that is, at the very least, attached to the runtime via
  the mono-threads infrastructure. This is not the case for SGen workers.

This fixes a deadlock in the log profiler when using major=marksweep-conc.
2016-10-02 18:44:41 +02:00
Alex Rønne Petersen bb1813cca6 [profiler] Rename decode.c to mprof-report.c. 2016-10-02 18:44:21 +02:00
Alex Rønne Petersen 5640531d0b [profiler] Rename proflog.{c,h} to mono-profiler-log.{c,h} for consistency with other profilers. 2016-10-02 18:44:12 +02:00
Alex Rønne Petersen f1c948536d [profiler] Remove utils.c/utils.h, move the code to proflog.c/decode.c, and clean it up.
* Drop support for fast/null timers.
* Use Mono runtime functions for getting the thread ID and allocating buffers.
2016-10-02 18:44:03 +02:00
Alex Rønne Petersen a2f06128c6 [acceptance-tests] Improve the profiler-stress test runner.
* Emit an NUnit test report file.
* Set a timeout of 6 hours per test.
* Do a thread dump for timed-out tests.
* Don't print stdout/stderr for passing tests.
2016-10-02 18:30:34 +02:00
Alex Rønne Petersen 77bf968f69 [ci] Bump the timeout of the profiler stress test suite to 24 hours. 2016-10-02 18:30:25 +02:00
Alex Rønne Petersen e9a95b9b3f [sgen] Remove bogus mono_profiler_events assert.
This variable can be changed at any time by any thread. It makes no sense to
assert that it has a particular flag.
2016-10-02 18:29:58 +02:00
Alex Rønne Petersen 39080bf5f0 [utils] Move MONO_DEPRECATED to mono-publib.h and make it imply MONO_API + MONO_RT_EXTERNAL_ONLY.
Also make it work with MSVC.
2016-10-02 18:29:15 +02:00
Alex Rønne Petersen c4f5bc9402 [profiler] Remove the long-obsolete hsmode option.
Also refactor the heap walk code a bit.
2016-10-02 18:28:24 +02:00
Alex Rønne Petersen 129560cb97 [profiler] Document and fix the onlycoverage option. 2016-10-02 18:28:04 +02:00
Alex Rønne Petersen 4199952108 [profiler] Remove the countersonly option.
It was never documented and is no longer functional.
2016-10-02 18:27:57 +02:00
Alex Rønne Petersen b9d7a08f26 [man] Update mprof-report.1 to indicate the correct default maxframes value. 2016-10-02 18:27:48 +02:00
Alex Rønne Petersen b334afdbd0 [profiler] Use the signal shutdown logic for the sampling thread for more cases. 2016-10-02 18:27:29 +02:00
Alex Rønne Petersen b6518ecfb8 [profiler] Remove some indirection in setting up GC events.
* mono_gc_enable_events: This did nothing for SGen and we called it
  unconditionally for Boehm. So no point in having it around.
* mono_gc_enable_alloc_events: The performance difference between checking
  a static alloc_events variable versus checking mono_profiler_events is
  marginal at best and doesn't justify the indirection, especially now that
  we support managed allocators while profiling.
2016-10-02 18:25:20 +02:00
Alex Rønne Petersen 46b3f65045 [profiler] Lift profiler limitation in mono_class_get_allocation_ftn ().
This has not actually been necessary since allocation reporting was moved into
the GC implementations.
2016-10-02 18:24:41 +02:00
Alex Rønne Petersen 03d6935654 [profiler] Don't leak counter data structures on shutdown. 2016-10-02 18:24:15 +02:00
Alex Rønne Petersen 0db428169a [profiler] Simplify counters initialization. 2016-10-02 18:24:04 +02:00
Alex Rønne Petersen d933617f69 [profiler] Don't emit a perf counters sample event if none are registered. 2016-10-02 18:23:49 +02:00
Alex Rønne Petersen ae0828fcee [profiler] Fix the code that synthesizes thread end events.
It could previously fail to process a newly allocated buffer.
2016-10-02 18:23:37 +02:00
Alex Rønne Petersen a91319333f [profiler] Add counters for all event types. 2016-10-02 18:23:28 +02:00
Alexander Köplinger 066372dc08 [metadata] Fix FullAOT build
The function was renamed in https://github.com/mono/mono/commit/a0ad8154f7cdca706802aa196d95686e0f8d3b7b#diff-9a532ce56888ac899468740a872fd7e0L1814, but this stub was missed.
2016-10-02 17:24:22 +02:00
Alexander Köplinger 1958bb8b34 [btls] Fix bashism in create-object-library.sh
Found by checkbashisms(1) as "unsafe echo with backslash". Some shells don't expand embedded \n in a string by default,
which broke the build on systems like ArchLinux or Alpine where /bin/sh points to those shells because the generated .lo
file contained just a single line instead of two.

Thanks to @JustArchi for researching this on the Mono Gitter channel, it made fixing the issue a lot easier!
2016-10-02 17:12:45 +02:00
Martin Baulig 8245417cb6 [System]: ChainValidationHelper: ignore port number when validating a certificate's host name.
(cherry picked from commit 4d28eb4b88)
(cherry picked from commit 7c88bf755e)
2016-10-01 21:34:01 +02:00
Martin Baulig ac9d969e40 [BTLS]: Ignore port number when validating certificates.
(cherry picked from commit baebc1d8c0)
2016-10-01 21:33:31 +02:00
Martin Baulig 7cbd69d8ea [BTLS]: Send server name extension on the client.
(cherry picked from commit 2602c52de4)
2016-10-01 21:33:22 +02:00
Alexander Köplinger f4475ff013 Fix build break from 81fb20737f
The HttpWebResponse stub that is used e.g. on the monotouch_watch profile was missing an overload that this commit was using.
2016-10-01 02:42:24 +02:00
Alexander Köplinger f057c1c071 [corlib] Fix a warning 2016-10-01 02:23:52 +02:00
Alexander Köplinger 186ab05987 Fix build break from efd53c8e2f
The new/renamed TypeBuilderInstantiation wasn't available with FULL_AOT_RUNTIME,
breaking the monotouch profile build.
2016-10-01 02:23:32 +02:00
Aleksey Kliger da859cdc93 [sgen] Fix printf-like format warnings 2016-09-30 18:54:19 -04:00
Aleksey Kliger 5ffa156af5 [runtime] Fix printf-like format warnings. 2016-09-30 18:54:17 -04:00
Aleksey Kliger d933c59c19 [runtime] Add MONO_ATTR_FORMAT_PRINTF macro
Expands to __attribute__((format(printf,X,Y))) with gcc and clang.

Use it to check that printf-like format strings get the correct number
and type of arguments.
2016-09-30 18:31:14 -04:00
Marek Safar 81fb20737f [System] Fill more WebException details when CONNECT fails. Fixes #19594 2016-10-01 00:11:23 +02:00
Zoltan Varga 6ddedbfc6d Bump corlib version for efd53c8e2f. 2016-09-30 17:27:46 -04:00
Martin Baulig 067d2f98c2 [scripts]: Add 'btls-cert-sync' script.
(cherry picked from commit 30fabaedd3)
2016-09-30 22:50:54 +02:00
Martin Baulig 1987e8217d [System]: Fix MonoTlsProviderFactory.TryDynamicLoad() logic.
If the MONO_TLS_PROVIDER environment variable is missing, use "default".

(cherry picked from commit 7002264dd2)
2016-09-30 22:47:14 +02:00
Zoltan Varga efd53c8e2f [SRE] Rename MonoGenericClass to TypeBuilderInstantiation to match MS. (#3679) 2016-09-30 13:45:30 -04:00
Zoltan Varga 44364e507d [runtime] Fix a warning. 2016-09-30 13:35:11 -04:00
Martin Baulig 069a1e4f78 [System]: Make BTLS the default TLS Provider on Desktop. 2016-09-30 17:36:50 +02:00
Martin Baulig ecdc3ef482 [cert-sync]: Make the new store the default and add '--legacy' for the old one. 2016-09-30 17:28:52 +02:00
Martin Baulig aa320774ed [BTLS]: Remove some debugging methods. 2016-09-30 17:11:09 +02:00
Alexander Köplinger e698a15af7 Merge pull request #3681 from rolfbjarne/fix-monotouch-build
[System] Fix monotouch* build.
2016-09-30 17:02:57 +02:00
Rolf Bjarne Kvinge 3870c7bab2 [System] Fix monotouch* build. 2016-09-30 16:28:00 +02:00
Martin Baulig 0b045d2b6e [System]: Enable AndroidPlatform.CertStoreLookup().
Uses reflection to call into AndroidEnvironment.CertStoreLookup()
(which as been added in https://github.com/xamarin/xamarin-android/pull/246).
2016-09-30 16:24:38 +02:00
Alexander Köplinger 2417bf1861 Bump boringssl to fix the build 2016-09-30 16:13:02 +02:00
Alexander Köplinger bd1d7650ec [btls] Only use cmake policies CMP0026/CMP0042 if cmake supports it
Some older cmake versions don't.
2016-09-30 15:57:45 +02:00
Martin Baulig f8c6505ad3 [System]: AndroidPlatform.CertStoreLookup(): add to the build, but return null.
This needs to have support added to xamarin-android before we can enable it.

(cherry picked from commit 9e46b5744b)
2016-09-30 15:18:03 +02:00
Alexander Köplinger 12db41477b Merge pull request #3676 from chamons/SignalHandlerAPI_XM45
Add Mono.Runtime to XM 4.5 profile
2016-09-30 14:56:38 +02:00
Martin Baulig 0f8f0c543c [BTLS]: Add managed BTLS sources.
* external/boringssl: unmanaged code from Google (added earlier).

* mono/btls: unmanaged BTLS lives here (added earlier).

* System/Mono.Btls: managed BTLS lives here.

* Mono.Btls.Interface: The purpose of this assembly is to allow test suites
  such as xamarin/web-tests to test parts of the BTLS APIs without making
  System.dll's internals visible.  It is not a stable and maintained API.
2016-09-30 14:07:26 +02:00
Martin Baulig fb93be4490 [Mono.Security]: Add the new certificate store.
BTLS uses a different format and naming scheme for the local certificate store.

Before using BTLS for the first time on desktop, you need to convert the local
certificate store by either using the new `btls-cert-sync` tool (which will convert
your existing certificate store to the new new format) or `cert-sync` with the
`--btls` argument.

The new format and naming scheme is identically to what you'll find in
'/system/etc/security/cacerts/' on an Android device.  It stores the certificates
in PEM format (with a human-readable text section added) using filenames which
are based on the certificate's subject name hash.

Previously, Mono stored the certificates in binary DER format, using a filename
based on either the Subject-Key-Identifier (if available) or the thumbprint.

We cannot access this from BTLS because computing these filenames requires
reading the entire X509 certificate (including the X509v3 extensions), but
their native lookup code only gives us the SubjectName.

This transitioning won't affect Android users as we're using the system
certificate store (including the user certificate store, via a Java callback).

* Mono.Security.X509.X509Store and X509Stores:
  Support both the old and the new format.  Using the new format requires BTLS.

* Mono.Security.X509.X509StoreManager:
  Add `NewCurrentUserPath` and `NewLocalMachinePath` properties for the
  new path names (~/.config/.mono/new-certs).

* Mono.Security.X509.X509StoreManager:
  Add `NewCurrentUser` and `NewLocalMachine` properties.  Requires BTLS.

* tools/security/cert-sync:
  Add new `--btls` argument to use the new store.
2016-09-30 13:38:44 +02:00
Martin Baulig 52b290680c [System]: Add AndroidPlatform.CertStoreLookup().
This is conditional to HAVE_BTLS and needs to have support added
to xamarin-android first.
2016-09-30 13:03:42 +02:00
Martin Baulig d88ce91459 [System]: New X509Helper2 APIs for BTLS.
The managed HAVE_BTLS conditionals will be removed once BTLS itself has landed.
2016-09-30 13:03:42 +02:00
Marek Safar f460c9bb83 [System.Core] Cleanup more warnings 2016-09-30 12:09:02 +02:00
Marek Safar 225ea9235f [System.Data] Cleanup warnings 2016-09-30 12:09:02 +02:00
Marek Safar aebd704d79 [System.Data] Implements SqlClient async readers. Fixes #44843 2016-09-30 12:09:02 +02:00
Martin Baulig c950be01ac [BTLS]: Add the native BTLS sources. 2016-09-30 11:46:46 +02:00
Johan Lorensson 03cf658591 Merge pull request #3663 from lateralusX/jlorenss/win-api-family-support-libgcmonosgen
Build libgcmonosgen under none desktop Windows API family.
2016-09-30 11:40:53 +02:00
lateralusX 3e6a602dd1 Build libgcmonosgen under none desktop Windows API family.
Initial work to build libgcmonosgen under none desktop Windows API families.
Changes are mainly related to header files included by libgcmonosgen sources and shared
by other libraries.
2016-09-30 08:48:00 +02:00
Zoltan Varga a0ad8154f7 Sre cleanup9 (#3661)
* [SRE] Assign pseudo tokens to SRE objects in the BCL instead of doing it in the runtime.

Real tokens are assigned after the dynamic types they depend on have been created, by creating the corresponding finished reflection object
(i.e. a MonoMethod for a MethodOnTypeBuilderInst etc.) and obtaining its token.
In Save mode, this is done in ModuleBuilder.Save ().
In Run mode, this is done on-demand when the JIT tries to resolve a token into its corresponding metadata object, by the runtime calling
the RuntimeResolve () method on the builder object.

* [SRE] Remove dead code.

* [SRE] Remove the MonoGenericMethod/MonoGenericCMethod classes, they have not needed.

* [SRE] Delay the creation of MonoClass-es for MonoGenericClass/GenericTypeParameterBuilder/SymbolType until its needed.

* [SRE] Small code cleanup.

* [SRE] Remove the TypeBuilder.IsGenericParameter () icall, it should return false.

* [SRE] Unify the calling of the various RuntimeResolve () methods by adding a RuntimeResolve () method to ModuleBuilder, and calling that from native code.

* [SRE] Remove unused TypeBuilder::get_event_info () icall.

* [SRE] Remove more unused/empty icalls.
2016-09-29 23:53:22 -04:00
Martin Baulig 2d86893ee6 [Mono.Security]: Cleanup the MonoTlsProvider's certificate validation code. (#3674)
* [Mono.Security]: Remove Mono.Security.Interface.IMonoTlsContext.

This interface is not actually used anywhere anymore, so we can also
just get rid of it.

* [System]: Removed unused private TLS classes.

* [Mono.Security]: Cleanup the MonoTlsProvider's certificate validation code.

Each TLS Provider now has its own certificate validator and there is no
automatic fallback anymore.  We only have three different TLS Providers,
"legacy", "appletls" and "btls" - and legacy is the only one which used
the managed validator.  Both AppleTls and BTLS provider their own validator,
which invokes some native API.

All of the following were internal APIs.

* MonoTlsProvider.HasCustomSystemCertificateValidator has been removed.

* MonoTlsProvider.InvokeSystemCertificateValidator() has been renamed
  into ValidateCertificate() and is now abstract.

(cherry picked from commit 63c0803b2b)
2016-09-29 22:52:10 +02:00
Marek Safar 3e735a6171 [mcs] Branch visited labels cache for conditional block. Fixes #44751 2016-09-29 22:39:47 +02:00
Chris Hamons 0c64f16bcb Add Mono.Runtime to XM 4.5 profile
- Extends https://github.com/mono/mono/pull/3624
2016-09-29 14:53:32 -05:00
Miguel de Icaza f133e22342 [mkbundle] Add diagnostics, fix crash, fix registered path to match runtime name on embedded MonoImages (#3669) 2016-09-29 15:13:41 -04:00
Aleksey Kliger (λgeek) 41a25a6aab Merge pull request #3670 from lambdageek/dev/mempool-loader-error-msg
[loader] Store MONO_EXCEPTION_TYPE_LOAD error strings in mempools
2016-09-29 14:10:52 -04:00
Henric Müller d5c972a97b Comparing pid instead of handles in GetModules_internal (#3575)
Process handles can be different for same process id.
Therefore make sure we compare the process ids instead.
2016-09-29 11:19:43 -04:00
Niklas Therning f2896fe33f Merge pull request #3671 from rolfbjarne/pr-fix-system-tests
[System] Fix tests that regressed in e6536dd.
2016-09-29 13:25:07 +02:00
Johan Lorensson 6f7798530e Merge pull request #3664 from lateralusX/jlorenss/extern-test-driver-usage
Enable reuse of eglib native test framework and test driver source.
2016-09-29 12:08:31 +02:00
Rolf Bjarne Kvinge ad6f78afec [System] Fix tests that regressed in e6536dd.
* I got confused between [TestFixtureSetup] and [Setup], so fix tests whose
  [Setup] methods were changed/removed to properly clean up after each test
  (using a [TearDown] method) so that the next time the on-demand creation of
  objects works as expected (i.e. objects created in the [Setup] method should
  be created on-demand once for each method instead of once for each class).

* Also fix SocketAcceptAsyncTest, the change to properly catch exceptions on
  background threads was incorrect.
2016-09-29 12:01:49 +02:00
Ludovic Henry ae4b2d859a [threads] Assert that every thread is detached when exiting (#3620) 2016-09-29 08:49:35 +02:00
Miguel de Icaza 15b6ef60e4 [scripts] Add script to package the basic runtime to reuse by mkbundle 2016-09-28 22:32:18 -04:00
Martin Baulig f08c2659e7 [System]: Rename MonoLegacyTlsProvider into LegacyTlsProvider. (#3666)
LegacyTlsProvider now lives in the 'Mono.Net.Security' namespace
(previously 'Mono.Net.Security.Private') and derives directly from
the public 'Mono.Security.Interface.MonoTlsProvider'.

This allows it to be used by products, for instance replacing
xamarin-macios/src/Security/Tls/OldTlsProvider.cs.

The idea is to have all 'MonoTlsProvider' implementations inside
System.dll and not access any of the private APIs from outside of it.
(cherry picked from commit 9437553e54)
2016-09-29 01:10:39 +02:00
Martin Baulig 1055069416 [configure] Add configure.ac checks for BTLS. (#3668) 2016-09-29 00:53:33 +02:00
Marek Safar 486748776c [corlib] Improve test added in 54ea12e4fa 2016-09-29 00:28:57 +02:00
Aleksey Kliger 4cc2b45bed [runtime] Use mono_error_set_for_class_failure in more places
Also assert if we see anothing other than MONO_EXCEPTION_TYPE_LOAD or
MONO_EXCEPTION_INVALID_PROGRAM in a class failure.
2016-09-28 18:25:33 -04:00
Marek Safar 0987545404 [build] Make monolite output path configurable 2016-09-28 23:34:36 +02:00
Aleksey Kliger a13dd1bdf0 [loader] Use mempool memory for MONO_EXCEPTION_TYPE_LOAD messages.
Prevent memory leaks by storing the error message strings in the same
mempool as the failing class.
2016-09-28 17:25:36 -04:00
Aleksey Kliger 6b60fb6c77 [image] Check mempool of mono_image_property_insert value
When adding an image property, check that the value belongs to the same image.

Ensure that we don't leak the values when the property hashtables are destroyed.
2016-09-28 17:24:14 -04:00
Aleksey Kliger 1e41338e8d [checked] Add CHECKED_METADATA_STORE and CHECKED_METADATA_STORE_LOCAL
When running a checked build with metadata checking enabled, these
macros check that values written to ptr occupy the apropriate mempool.
2016-09-28 17:22:31 -04:00
Aleksey Kliger 56a50a3029 [image] Add mono_image_strdup_printf and mono_image_strdup_vprintf 2016-09-28 17:21:53 -04:00
Aleksey Kliger 276c2c2588 [mempool] Add mono_mempool_strdup_printf and mono_mempool_strdup_vprintf 2016-09-28 17:21:09 -04:00
Marek Safar 9d8e1631b7 [System] Reduce duration of SendGenericExceedBuffer test 2016-09-28 18:12:23 +02:00
Martin Baulig 3c2a11dc91 [System]: Cleanup the internal MobileTlsContext.
* Add SelectClientCertificate().
* ValidateCertificate() now returns bool.
* Add ValidateCertificate() overload.

(cherry picked from commit 0d07c695b5)
2016-09-28 13:52:07 +02:00
Martin Baulig 0bdaa8421c [Mono.Security]: Cleanup the internal ICertificateValidator2.
(cherry picked from commit fcc570920d)
2016-09-28 13:52:00 +02:00
Martin Baulig 6d46c3ec0b Remove all MONO_FEATURE_NEW_TLS conditionals.
(cherry picked from commit c155563d1e)
2016-09-28 13:51:52 +02:00
Martin Baulig 3e751052f1 Cleanup; with the removal of 'PrebuiltSystemAlias', we don't need to use XX509* anymore.
(cherry picked from commit 5b412212cd)
2016-09-28 13:51:43 +02:00
Martin Baulig fa22808b26 [System]: Make Test/System.Net.Sockets compile.
(cherry picked from commit c2e7ca6c99)
2016-09-28 13:37:30 +02:00
lateralusX d4ea732e74 Enable reuse of eglib native test framework and test driver source.
In current eglib test framework there is no mechanism to specify where
the include file describing all tests is located. Current implementation also assumes it is the main
entry point of the process since it defines the main symbol. There are several scenarios
where it could make sense to reuse eglib test framework and its driver in other native unit test projects
unit testing native code. In those scenarios it would be nice to include existing driver.c
from eglib/test (no copy) and use toolchain capabilities to include needed header with test descriptions
and change main symbol name, since main will most likely be defined elsewhere.

This can be achieved by two simple defines that can be set when embedding eglib test framwork in other
native binaries. By default these defines will not be set and current behavior will be preserved.
2016-09-28 12:01:08 +02:00
Marek Safar 94cc2dea31 [build] Update bootstrap info text 2016-09-28 08:43:27 +02:00
Johan Lorensson 2c48afbc63 Merge pull request #3626 from lateralusX/jlorenss/win-api-family-support-eglib
Build eglib under none desktop Windows API family.
2016-09-28 08:40:30 +02:00
Rodrigo Kumpera 8bdce50379 Merge pull request #3658 from kumpera/fix-ios-logging
[logging] Fix logging on iOS. We lost asl redirection and it was sending to stdout instead.
2016-09-27 20:11:23 -04:00
Ludovic Henry 3ae9e2c971 [threads] Signal the w32handle later in the thread destruction process (#3652) 2016-09-27 23:44:51 +02:00
Rodrigo Kumpera 65a4d35202 [logging] Fix logging on iOS. We lost asl redirection and it was sending to stdout instead. 2016-09-27 14:39:24 -07:00
Aleksey Kliger (λgeek) 76b32f3ee3 [coop handles] Add some memory fences (#3617)
When running with async suspend (ie, not coop), a user thread might be
suspended while its manipulating the coop handle stack.  In that case,
we want to present a consitent view to mono_handle_stack_scan () by
adding memory fences to code that updates the stack chunks.  In
particular we want to ensure that the chunk size is increased after
the new slot has a valid (null) value.  Also when creating new chunks
make sure their size is initialized before the chunk stack is updated.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43921 (at least the
one stack trace observed in [comment 1](https://bugzilla.xamarin.com/show_bug.cgi?id=43921#c1)).
2016-09-27 17:02:18 -04:00
Martin Baulig fd6108736c [Mono.Security.Interface] Cleanup and simplify MonoTlsProviderFactory.
The "global" TLS Provider (returned by MonoTlsProviderFactory.GetProvider())
may only be modified at application startup (before any of the TLS / Certificate
code has been used).

* MonoTlsProviderFactory.HasProvider has been removed.

  This property used to initialize the TLS Subsystem without throwing any
  exceptions.  However, properties with side-effects is a bad design principle.

* Add MonoTlsProviderFactory.IsInitialized.

  Does not have any side-effects.

* Add MonoTlsProviderFactory.Initialize() and Initialize(string).

  May only be called at application startup and explicitly initializes the
  TLS Subsystem.

* Rename MonoTlsProviderFactory.GetDefaultProvider() into GetProvider()
  and removed MonoTlsProviderFactory.GetCurrentProvider().

  We do not distinguish between a "default" and a "current" provider anymore;
  there is only one "global" provider.

* Add MonoTlsProviderFactory.IsProviderSupported(string).

  Checks whether a specific TLS Provider is supported, without having side-effects.

* Make the old APIs [Obsolete] until products have been updated.

* Add some documentation to MonoTlsProviderFactory.

(cherry picked from commit 7c3ae83b31)
2016-09-27 22:23:10 +02:00
Zoltan Varga 80950a920f [llvm] Enable support for large basic blocks again.
llc has some performance problems with large basic blocks so we have to break them up into smaller ones. Use some hacks to prevent opt/llc from merging them back again.
2016-09-27 15:25:40 -04:00
Marek Safar ed8d5f669d Merge pull request #3656 from marek-safar/bootstrap
[build] Bootstrap extension for roslyn
2016-09-27 21:24:11 +02:00
Aleksey Kliger a02d938818 [runtime] Fix MonoMethod.get_base_method when abstract methods are not overridden
When there is an abstract class in the middle of an inheritance
hierarchy that doesn't override a method, get_base_methods needs to search
the parent class instead aborting early.

Example:

```
abstract class Root {
  public abstract void Foo ();
}
abstract class Abs : Root { }
class Derived : Abs {
  public override void Foo () { }
}
```

If we ask for the base method of Derived.Foo we used to get Derived.Foo
back because Abs did not provide an override.  Instead we should skip
abs and look in Root.
2016-09-27 15:00:21 -04:00
Marek Habersack 79b828c66d Fix trace logging on Android
Introduction of the structured trace logger accidentally broke Android
logcat logging. The reason for this is that the default logging handler
defined in eglib (in goutput.c) for Android was never called, instead it
was superseeded by the log file logger defined in mono-logger.c

The net effect was that Mono tried to write the messages to some file on
Android leaving logcat devoid of any trace of life :)

This commit fixes the issue by introducing a set of structured logging
functions for Android.

As a side note - file logging on Android is not that useful. Writing to
a file on external storage medium requires app permissions and writing
to a location on internal storage medium, while allowed, might be
subject to space limitations and should not be used for possibly
voluminous data. It's therefore not very practical on Android.
2016-09-27 20:31:19 +02:00
Marek Safar 4d17bdc54e [build] Bootstrap extension for roslyn 2016-09-27 14:27:11 +02:00
Rolf Bjarne Kvinge e6536dd5e1 [System*] Throw a PlatformNotSupported exception when using the networking stack on watchOS. (#3606)
* [System] Fix line endings for a few files.

Best reviewed by not showing whitespace changes (should be empty diff in that case).

* [System] Fix potential crash in CookieParserTests.

Socket.EndAccept can throw an exception, which will crash the process if it
happens on a threadpool. So handle any exceptions when calling
Socket.EndAccept, and propagate those exceptions out of any threadpool code.

* [System.Net.Http] Throw a PlatformNotSupported exception when using HttpClientHandler on watchOS.

* [System.Net.Http] Tweak tests after watchOS API change.

Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.

* [System] Extract the HttpListenerResponseHelper class to a separate file.

Extract the HttpListenerResponseHelper class to a separate file so that it's
easier to replace the HttpListenerResponse implementation by using a different
file.

* [System] Throw a PlatformNotSupported exception when using the networking stack on watchOS.

* [System] Tweak tests after watchOS API changes.

Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.

* [System] Fix potential crash in SocketAcceptAsyncTest.

Fix potential crash in SocketAcceptAsyncTest by catching any exceptions in
code executed on the threadpool so that we never end up with unhandled
exceptions (which may terminate the process).

* [System] Avoid logic in SetUp attributes in tests.

Any type of exception in [SetUp] attributes causes all tests to fail with that
exception.

This even happens for tests that do not need the logic in the [SetUp]
attribute.

So rewrite tests a bit to not use [SetUp] when we can reasonably avoid it, and
instead instantiate class-level variables on first use. This ensures that any
exceptions that occur when initializing those variables are attributed to the
corresponding test, and not all of them.

* [System] Make exception handler (for test) catch more exceptions to avoid unhandled exceptions causing process termination.

* [System] Remove Obsolete attribute on API that throws PNSE.
2016-09-27 13:13:38 +02:00
Rolf Bjarne Kvinge 59b6fde1b3 [corlib] Add API to uninstall/reinstall signal handlers.
This API is provided to be used by libraries providing crash reporting, so
that those libraries can install signal handlers and at the same time not
interfere with Mono's signals.

The intended pattern is this:

    Mono.Runtime.RemoveSignalHandlers ();
    InstallThirdPartySignalHandlers ();
    Mono.Runtime.InstallSignalHandlers ();

This ensures that Mono is always notified first of any signals, and will then
chain to the third-party signal handlers if the signal did not originate in
managed code.

Mono's signals must first be removed, so that if third-party signal handler
does signal chaining, we don't end up in Mono's signal handler again.

Mailing-list thread: http://lists.dot.net/pipermail/macios-devel/2016-September/000016.html [Signal-chaining & crash reporters]
Example usage: https://github.com/rolfbjarne/HockeySDK-Xamarin/commit/862721199f1adec210bfc7b1943f975ffb8048a9
2016-09-27 12:35:14 +02:00
Rolf Bjarne Kvinge 14bb051f36 [mini] Provide a free function to the saved signal handler hash table.
This makes the cleanup code simpler, and also makes it easier to
replace saved signal handlers without having to worry about
leaking memory.
2016-09-27 12:35:14 +02:00
Vlad Brezae 4df88aea4b Merge pull request #3647 from BrzVlad/fix-sgen-internal-alloc
[sgen] Fix sgen internal alloc
2016-09-27 13:10:01 +03:00
Martin Baulig 61d76d9642 [Mono.Security]: Cleanup Mono.Security.Interface.CertificateValidationHelper.
* CertificateValidationHelper.GetDefaultValidator(): rename this internal method into
  GetInternalValidator() (keeping the old as [Obsolete] until products have been updated).

* CertificateValidationHelper.GetValidator(): remove the 'provider' argument.

This is part of a set of cleanups and simplifications for the upcoming BTLS integration.
2016-09-27 11:39:07 +02:00
lateralusX 109d34b9c0 Build eglib under none desktop Windows API family.
Initial work to build eglib under none desktop Windows API family. Classic
Windows API have been split into families and partitions in order to support
different subsets on different Windows platforms. In order to build against
other Windows targets/platforms Mono needs to follow these families/partitions
in order to successfully build where API’s have been removed/replaced. Since most
Mono platforms uses the Windows API signatures a new defined has been added to all
platforms, HAVE_CLASSIC_WINAPI_SUPPORT, used to decide what implementation to include.
On none Windows platforms this is always defined and on Windows platforms it follows the
winapifamily.h. In order to keep down regressions, the existing API’s are kept for HAVE_CLASSIC_WINAPI_SUPPORT
even if there are more modern replacements available.
2016-09-27 11:28:57 +02:00
Ludovic Henry 1f15519152 [w32handle] Ensure we initialize begore the gc attach the current thread (#3644) 2016-09-27 10:43:59 +02:00
Marek Safar a064ce84e0 Merge pull request #3643 from marek-safar/bootstrap
[build] Bump mono bootstrap dependency to Mono 4.0+
2016-09-27 08:20:05 +02:00
Miguel de Icaza aae997259a [mini] Add some documentation comments to some IR generating macros 2016-09-26 22:16:49 -04:00
Vlad Brezae 43f369a107 [sgen] Untag the vtable during concurrent mark
For now, concurrent mark runs concurrently with bridge during minors. Since bridge processing might tag object vtables, make sure we don't crash when we scan such objects.
2016-09-27 00:38:43 +03:00
Vlad Brezae 837d12bfc6 [sgen] Fix internal allocation
After recent header size change in 883e0a2d89, we had some slot sizes unaligned which was leading to unaligned memory allocation and therefore SIGBUS-es on some ARMs.

We used to have all allocators use 16k blocks and slot sizes optimized for this. After we switched to allocating in 4k, 8k and 16k blocks the slot sizes were not optimized for the new format.

This commit fixes unaligned problems, at the same time optimizing the size of allocator slots.
2016-09-27 00:38:41 +03:00
Zoltan Varga 8994ce8a09 [aot] Make sure generic wrappers are unique by creating shared versions of the them in the same order that AOT creates them (shared method -> wrapper). 2016-09-26 14:54:45 -04:00
Marek Safar 8a7ff203c8 [System] Fixes SendGenericExceedBuffer test 2016-09-26 20:46:28 +02:00
Zoltan Varga 628d9dac90 [aot] Fix the linux bitcode build. 2016-09-26 13:24:51 -04:00
Marek Safar cbd4cff826 [build] Bump mono bootstrap dependency to Mono 4.0+ 2016-09-26 19:19:23 +02:00
Marek Safar 1306fa1237 [System] Revert copyright change in 8e4a52a374 2016-09-26 16:56:19 +02:00
Marek Safar 8e4a52a374 [System] netstandard compatible Process collections 2016-09-26 16:52:25 +02:00
Alexander Köplinger 3687b18b3d Restructure and update build status section in README
Add links to Windows/OSX builds on Jenkins.
2016-09-26 15:46:03 +02:00
Alexander Köplinger 7fd68f813d Remove appveyor.yml from repository
We now have our own set of Windows bots on our Jenkins CI for building and testing Mono on Windows.

Special thanks to AppVeyor for providing us with build capacity over the last two years <3
2016-09-26 15:45:03 +02:00
Zoltan Varga 43ba3b7a22 [runtime] Make a copy of the wrapper date when instantiating generic wrapper methods, to be able to store a different WrapperInfo for them. (#3634) 2016-09-26 01:21:58 -04:00
Ludovic Henry 13c15c25fb [Socket] Use SemaphoreSlim instead of Queue (#3633)
This uses the same approach as corefx's FileStream. This simplifies the code, as well as make the intent of the queue clearer.
2016-09-25 19:54:07 +02:00
Alexander Köplinger 3a3d080e17 [corlib] Remove unnecessary net_4_x_corlib.dll.sources
It only imports corlib.dll.sources, removing the file has the same effect.
2016-09-25 17:01:55 +02:00
Alexander Köplinger 4d325a0674 [System] Add ISupportInitialize on mobile FileSystemWatcher
The interface was missing on the mobile stub.
2016-09-25 13:59:53 +02:00
Alexander Köplinger 566f0a78b0 [System] Remove obsolete HttpWebRequest/Response constructors again
They were removed from a later revision of netstandard2.0 so we don't need to add them.
2016-09-25 13:02:48 +02:00
Zoltan Varga 47561c7053 [jit] Resurrect the Monitor.Enter () v4 optimization. (#3632) 2016-09-25 03:15:48 -04:00
Alexander Köplinger 015de5d245 Merge pull request #3631 from slide/bz44714
Fix issue with VB projects
2016-09-25 01:54:27 +02:00
Alexander Köplinger 3d0799107b Fix tarball build 2016-09-25 01:45:21 +02:00
Ludovic Henry c5df7e9669 [referencesource] Import parts of System.Net.Sockets.Socket (#3618) 2016-09-24 20:10:01 +02:00
Alexander Köplinger 6a82e9a890 Fix tarball build
The file was removed in 18ada43d3d.
2016-09-24 19:17:16 +02:00
Alex Earl d6bb144980 Fix issue with VB projects
Fixed GenerateFullPathToTool for Vbc task to match behavior of the Csc
task. This allows VB.NET projects to build successfully.

See https://bugzilla.xamarin.com/show_bug.cgi?id=44714
2016-09-24 08:44:33 -07:00
Zoltan Varga 972b78f8bf [SRE] Implement the ModuleBuilder:create_modified_icall () in managed code. Use user types instead of creating derived types of unfinished typebuilders. (#3629) 2016-09-24 09:41:14 -04:00
Alexander Köplinger d0d6b2a33a Bump corlib version
18ada43d3d didn't bump the corlib version and this breaks building with monolite.
2016-09-24 12:20:40 +02:00
Marek Safar a8c8cc7a3f Merge pull request #3625 from slide/master
Fix 16628
2016-09-24 09:33:19 +02:00
Martin Baulig 2cc1b887c1 [AppleTls]: Flush the write queue before finishing the handshake.
It is possible for SSLHandshake() to return SslStatus.Success while we're still
having a pending write (AsyncOperationStatus.WantWrite).

This is because our managed write callback must never return 'WouldBlock', so
SSLHandshake() things that all data have been sent while we still have them in
our write queue.

When this happens, we currently flush the write queue then call SSLHandshake()
again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.

This returns SslStatus.Protocol on iOS 10.
2016-09-24 07:38:18 +02:00
Vlad Brezae f726e1bcf0 [gc] Warn if we fail to switch gc 2016-09-23 23:15:44 +03:00
Zoltan Varga 0faf536739 [aot] Fix aot support on android.
Disable the binary writer in llc since it doesn't seem to work. Use $tool_prefix/ld for linking if the tool prefix is set.
2016-09-23 15:40:48 -04:00
Alexander Köplinger 112631f5c6 [bcl] Add missing APIs for netstandard parity and expose a few APIs on mobile
This ensures we're compliant with the upcoming netstandard2.0 API surface area.
2016-09-23 17:50:06 +02:00
Alexander Köplinger fa986f1e36 [bcl] Add CLSComplaint(false) to a few types/methods that aren't compliant 2016-09-23 17:17:59 +02:00
Alex Earl bde7699722 Fix 16628
This changes the IL parser to have the same behavior as ilasm.exe from
MS

https://bugzilla.xamarin.com/show_bug.cgi?id=16628
2016-09-23 07:47:35 -07:00
Zoltan Varga 91014ffb91 [llvm] Add static rgctx trampolines to array access methods in the aot+llvm case too. (#3616) 2016-09-23 09:49:51 -04:00
Alexander Köplinger 7f51d473ef Merge pull request #3622 from rolfbjarne/remove-stray-file
Remove stray file.
2016-09-23 14:31:43 +02:00
Marek Safar 4ec076ab6b [corcompare] More hacks to make breaking change not too disruptive 2016-09-23 14:17:55 +02:00
Rolf Bjarne Kvinge ef972deb08 Remove stray file. 2016-09-23 14:14:47 +02:00
Marek Safar 775c082236 [System.Core] Fixes warnings 2016-09-23 13:36:41 +02:00
Marek Safar 8c7f99a8fe Merge pull request #3621 from kloun/patch-9
fix Another Typo
2016-09-23 13:29:03 +02:00
kloun e9b9b53811 fix Another Typo 2016-09-23 14:26:51 +03:00
Marek Safar 7ba748c8b8 [bcl] Base type update to match netstandard apis 2016-09-23 12:10:11 +02:00
Marek Safar b1b62469da [mono-symbolicate] Include pdb debug symbols support file 2016-09-23 10:27:30 +02:00
Marek Safar 2cba858cb7 Merge pull request #3615 from kloun/patch-8
fix typo, "j-j"
2016-09-23 08:47:21 +02:00
Marek Safar e297a5d2b6 Merge pull request #3614 from kloun/patch-6
fix identical sub-expressions
2016-09-23 08:46:36 +02:00
Zoltan Varga c0e91ae252 [arm64] Handle thunks with ARM64_B relocations as well. 2016-09-22 19:29:53 -04:00
Marek Safar cdf0a4c29f Merge pull request #3613 from kloun/patch-4
fix another ERIC
2016-09-22 23:37:47 +02:00
kloun 90601ba4cf fix typo, "j-j" 2016-09-23 00:24:37 +03:00
kloun ad48ddf483 Update generic.cs 2016-09-23 00:17:38 +03:00
kloun f14f87f1cd Update generic.cs 2016-09-23 00:15:47 +03:00
kloun 7eeb7a9e61 fix identical sub-expressions 2016-09-23 00:12:05 +03:00
Marek Safar b1b28a15d6 Merge pull request #3603 from ninjarobot/socket-write
Send all data to a socket before exit from Socket.Send.
2016-09-22 22:58:57 +02:00
kloun 11022626f0 fix another ERIC 2016-09-22 23:54:36 +03:00
Alexander Köplinger dbb7547576 Merge pull request #3611 from kloun/patch-2
Fix copy-paste error in WinForms DataGrid
2016-09-22 22:29:21 +02:00
kloun fe0643cb31 fix copy-paste ERIC error) 2016-09-22 23:22:54 +03:00
monojenkins 2b26601921 Merge pull request #3609 from xmcclure/checked-imageset
Fix outstanding failures in "metadata" checked build mode

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

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

Also added support for a checked build jenkins lane.
2016-09-22 22:15:03 +02:00
Ludovic Henry 828045d259 [mono-threads] Move platform unregister after detach (#3604)
This is important as platform unregister is where we signal the thread handle, and that should be done as late as possible, but still before we switch the thread state to DETACHED and remove it from the thread list.

The fact that we do under the suspend lock shouldn't be an issue as we shouldn't call in any other code than w32handle code.
2016-09-22 22:09:29 +02:00
Andi McClure a3a93f69d1 New run-jenkins tags to allow a checked build job and fix partial checked build support in the coop job 2016-09-22 14:31:58 -04:00
Andi McClure 6ae1985688 Fix imageset->imageset audits in checked-build "metadata" mode
An imageset can reference another imageset if every image in the "to"
imageset is referenced by some image in the "from" imageset.
Previously the checked build code was requiring the stricter criteria
of every image in the "to" imageset being present in the "from"
imageset, which was not only inconsistent with image->imageset and
imageset->image reference checking, but lead to spurious failures.

An example of a scenario where the previous check logic would fail is:
Assembly A:
	class ClassA<T>
Assembly B:
	class ClassB<T> extends ClassA<T>, ClassB2
Attempting to run the constructor for ClassB<ClassB2> would result in
a pointer to memory in imageset [A,B] being written into a structure
located in imageset [B]. This is valid since B references A, however
the MONO_CHECK_MODE=metadata checker would flag it as an error.
2016-09-22 14:27:23 -04:00
Marek Safar 9ed7ac5125 [corcompare] Another try to make breaking change not too discruptive 2016-09-22 20:13:44 +02:00
Zoltan Varga e0f96a41c6 [sdb] Add a SetThis () method to StackFrame which can be used to set the fields of the receiver for valuetype instance methods. Fixes #44341. (#3605) 2016-09-22 10:05:52 -04:00
Henric Müller e2602e1d4a Merge pull request #3600 from henricm/fix-win-network-info-tests
Fix NetworkInformation tests on Windows
2016-09-22 15:57:26 +02:00
Joshua Peterson 087c016f5c Try to use an IPv4 address first for TCP remoting (#3507)
* In the .NET implementation of TcpServerChannel, if IPv4 is supported, the address for the host will use the first IPv4 address.
* Even if the first address is an IPv6 address, it should be skipped, as the server side will expect and IPv4 address.
* Change this implementation to look for an IPv4 address first, then fall back to whatever the first address is (IPv4 or IPv6) if things don't work out.
2016-09-22 09:49:18 -04:00
Miguel de Icaza 2f1e6655e2 [mkbundle] - Add support for bundling native libraries.
* [mkbundle] add support for bundling native libraries

* [glib] add g_mkdtemp

* mono: Load the various library payloads for bundled executables

* [msvc] Export mono_dl_open and mono_loader_register_module
2016-09-22 09:28:17 -04:00
Marek Safar de952507c2 Add missing file 2016-09-22 14:44:42 +02:00
Marek Safar 24867d108c [colrib] Fixes aecdb91a06 and add GC tests 2016-09-22 14:43:00 +02:00
Marek Safar c00853e14b [corcompare] Drop ParameterAttributes from method signature 2016-09-22 12:27:12 +02:00
Johan Lorensson bf29fd5955 Merge pull request #3585 from lateralusX/jlorenss/win-counter-warning
Resolve "you are registering twice the same counter address" warning on Windows Release builds.
2016-09-22 08:54:23 +02:00
Martin Baulig c3db8b00ab [Mono.Security]: Add 'MonoTlsConnectionInfo.PeerDomainName'.
(cherry picked from commit 0bafe8c3c7)
2016-09-22 07:38:41 +02:00
Martin Baulig 32c5acbefd Remove obsolete Mono.Security.Providers.* assemblies (#3595)
* Remove Mono.Security.Providers.NewSystemSource and Mono.Security.Providers.NewTls.

* Remove InternalVisible for "Xamarin.BoringTls".

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

(cherry picked from commit 7b7b7c9b64)
2016-09-22 07:35:48 +02:00
Andi McClure fe9ac011d4 Back out trivial crash when running metadata checked-build mode
introduced by f822445711
2016-09-21 17:52:51 -04:00
Zoltan Varga 7f95267f8a [runtime] Fix the managed name of the ReRegisterForFinalize () icall. 2016-09-21 17:51:38 -04:00
Dave Curylo bf58ae6aae Returning during Send in case of error. Splitting send and receive into separate tasks in test. 2016-09-21 14:18:38 -04:00
Niklas Therning 3d023ebb02 Merge pull request #3548 from cmp-/fix-sgen-resume-thread-win32
[sgen] Fix sgen_resume_thread return value on Windows
2016-09-21 19:36:03 +02:00
cmp ba30dc0a96 [sgen] Fix sgen_resume_thread return value on Windows
According to sgen_resume_thread in sgen-os-mach.c, the function is
supposed to return false if the thread was not suspended.
2016-09-21 18:20:17 +01:00
Aleksey Kliger (λgeek) 31d66d692f [gacutil] Use IKVM.Reflection instead of System.Reflection (#3582)
* gacutil should use System.Reflection.Assembly.ReflectionOnlyLoadFrom() since it doesn't need to run the assemblies;
* but in fact, it could also use a managed reflection library. So in this PR we change it to use IKVM.Reflection
2016-09-21 12:49:12 -04:00
Ludovic Henry 18ada43d3d [w32mutex] Move own/disown code to w32mutex-unix.c (#3599)
* [w32handle] Fix race condition

* [w32mutex] Improve logging

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

* [w32mutex] Move own/disown code to w32mutex-unix.c
2016-09-21 18:10:38 +02:00
Dave Curylo a1b1a7c8db Send all data to a socket before exit from Socket.Send. 2016-09-21 11:31:53 -04:00
Andi McClure 3319d6a5a7 Merge pull request #3583 from xmcclure/test-418-checked
Fix issues (leaks, possible crash) around netmodule loading
2016-09-21 10:37:19 -04:00
Alexander Köplinger 626c697b29 Merge pull request #3602 from henricm/fix-configuration-symlink-removed
Removing symlink to make Configuration tests run on Windows
2016-09-21 15:38:51 +02:00
Henric Müller 154e729860 Removing symlink to make Configuration tests run on Windows 2016-09-21 15:32:05 +02:00
Marek Safar 480a8e0d95 [corlib] Simplify terminal evaluator nesting expression 2016-09-21 15:28:13 +02:00
Niklas Therning f6b8e1f10d Merge pull request #3547 from cmp-/remove-obsolete-stack-checks-win32
Remove obsolete stack limit checks on Windows
2016-09-21 14:42:49 +02:00
Alexander Köplinger f5836956c6 [System.Core] Expose a few more System.IO.Pipes APIs on mobile
Required for netstandard matching.
2016-09-21 13:56:03 +02:00
Henric Müller 2cb3807146 Implementation of GetLoopbackInterfaceIndex on Windows 2016-09-21 13:54:34 +02:00
Henric Müller 26d95892e3 Ignoring IsDnsEnabled test on Windows 2016-09-21 13:45:54 +02:00
Henric Müller 03823d39f4 Using InternalAdd to handle read only of IPAddressCollection
The read-only nature of Win32IPAddressCollection is handled by
the base class IPAddressCollection. Therefor removing the read-only
handling in this class and use InternalAdd from base class instead.
2016-09-21 13:45:04 +02:00
Marek Safar 76f97e3073 [mcs] Add compilergenerated attribute for private event backing fields to match newer csc 2016-09-21 12:54:08 +02:00
Alexander Köplinger 87dfebcb22 Merge pull request #3587 from henricm/fix-set-no-delay-tcp-only
Only set NoDelay by default for protocol TCP
2016-09-21 11:37:08 +02:00
Ludovic Henry d62c2c5fa5 [threadpool-ms] Fix race condition on domain unload (#3592)
This race condition has been introduced with 348d793ebb. This is because we would wait on the cleanup_semaphore outside of the threadpool->domains_lock lock.

By using a cond variable instead of a semaphore, we avoid a potential deadlock.
2016-09-21 11:16:35 +02:00
Niklas Therning f66549c12d Merge pull request #3588 from ntherning/fix-line-ending-issue-in-XmlReflectionImporterTests-Bug594490_SerializationOfXmlLangAttribute
Fixes line ending issue in XmlReflectionImporterTests.Bug594490_SerializationOfXmlLangAttribute
2016-09-21 09:39:54 +02:00
Aleksey Kliger (λgeek) 3589fcd39a Merge pull request #3569 from lambdageek/monodis-no-segfault
[monodis] Don't segfault using cooperative GC.
2016-09-20 18:09:27 -04:00
Andi McClure cc522292ae Fix issues in previous commit
- mono_assembly_load_module was not following MONO_RT_EXTERNAL_ONLY
  rules
- New _checked methods were not following init rules
- module[] load code was botched
2016-09-20 17:12:46 -04:00
Ludovic Henry 4b44d9fad8 [threads] Move thread describe code to mono_thread_internal_describe (#3590) 2016-09-20 22:39:30 +02:00
Alexander Köplinger de8a76a1c1 Fix Linux build break due to case sensitivity 2016-09-20 19:30:04 +02:00
Jo Shields 41a1c19ec8 Handle relocatable libMonoPosixHelper.so when --libdir= isn't lib/
Right now, we use a special token in mono/config which replaces $mono_libdir with the runtime-detected assemblies lib dir - e.g. /usr/lib

Unfortunately, this does not handle cases where a --libdir= value is passed to configure, such as on Red Hat where they use --libdir=/usr/lib64 on AMD64

We already have a variable from configure - reloc_libdir - so introduce some helpers to use it in the $mono_libdir replacement.

This assumes the value of --libdir is a subdirectory of --prefix, but I doubt we have ever worked at all when that is not the case.

Fixes: #41953
2016-09-20 17:02:36 +01:00
Marek Safar 9abe4d86d7 [System] Add more types to mobile profile 2016-09-20 17:55:34 +02:00
Marek Safar 7fadb5f6b3 [corlib] Remove duplicate files entries 2016-09-20 17:29:13 +02:00
Marek Safar aecdb91a06 [corlib] GC from referencesource 2016-09-20 17:29:13 +02:00
Marek Safar a83c5fba9e Merge pull request #3589 from ntherning/fix-line-ending-issues-in-System.Data-tests
Fixes line ending issues in System.Data tests
2016-09-20 17:19:12 +02:00
Niklas Therning c0584ca8ee Fixes line ending issues in System.Data tests
To make them run successfully on Windows.
2016-09-20 17:12:59 +02:00
Ludovic Henry 031bb67812 [threads] Detach thread in all possible cases (#3584)
* [threads] Use mono_thread_detach_internal to factor code

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

* [threads] Add mono_thread_internal_current_is_attached

* [threads] Ensure we detach the thread on Boehm
2016-09-20 17:12:37 +02:00
lateralusX b0a7eca6fd Resolve "you are registering twice the same counter address" warning on Windows Release builds.
When registering profile counters on optimized Windows build you will get the following logging twice:

"you are registering twice the same counter address"

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

By preventing inlining of cpu_load we can keep the different callback methods unique and optimizer
won't fold them into one single representation in the final binary.
2016-09-20 17:07:02 +02:00
Niklas Therning bf8fc72e1b Fixes line ending issue in XmlReflectionImporterTests.Bug594490_SerializationOfXmlLangAttribute
This test is sensitive to the line ending mode used by git. When LF is used by
git (which is what Cygwin's git defaults to) this test fails on Windows since
CRLF will be used as line ending in the serialized XML. This patch changes the
test to use Environment.NewLine explicitly in the expected string.
2016-09-20 16:42:24 +02:00
Marek Safar 38bf986142 Merge pull request #3586 from henricm/fix-win-uri-tests
Ignoring URI tests with unix path on windows
2016-09-20 15:05:10 +02:00
Henric Müller cd40eb318e Only set NoDelay by default for protocol TCP 2016-09-20 14:00:39 +02:00
Marek Safar 97ede66a07 Rewrite 67cdb99 to make more sense and don't regress 2016-09-20 13:15:11 +02:00
Henric Müller 99f2a62240 Ignoring URI tests with unix path on windows
In the .NET runtime, parsing unix paths like "/foo"
on Windows fails. Therefore ignoring tests with such paths
when running tests on Windows.
2016-09-20 11:42:09 +02:00
Alexander Köplinger df39947352 Merge pull request #3578 from henricm/fix-win-process-test
Fixes for ProcessTest on Windows
2016-09-20 11:12:01 +02:00
Alexander Köplinger 443b755fbc Add link to Bugzilla ticket for unifying the behavior between .NET and Mono 2016-09-20 11:11:46 +02:00
Marek Safar ce90aa3fb3 [corlib] Cleanup more warnings 2016-09-20 11:05:39 +02:00
Marek Safar 4c90327da2 [mcs] Warn about unused local constants 2016-09-20 11:05:39 +02:00
Marek Safar e24985c6ce Merge pull request #3580 from esdrubal/msym_no_cecil_ref
[mono-symbolicate] Added Mono.Cecil sources.
2016-09-20 10:57:47 +02:00
Niklas Therning 97ed6df1e2 Merge pull request #3577 from ntherning/fix-path-to-mono-exe-in-soft-debugger-tests-on-windows
Use the path of the current executable by default in soft debugger test on Windows to launch the child mono process
2016-09-20 07:50:37 +02:00
Andi McClure 1dc438307e Safety check for "diamond dependencies" on netmodules
This is something I noticed while following up on an issue with
mcs/tests/test-418.exe. The ECMA-335 spec contains the text:

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

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

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

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

Because the above scenario is fairly exotic, I dealt with it by just
causing the module loader to detect when multiple assemblies are
referencing the same module and throwing an exception in this case. I
also added a test to verify the exception is thrown. Allowing the
module load to raise an exception required adding _checked versions of
several functions.
2016-09-19 17:55:33 -04:00
Andi McClure f822445711 Fix leaks, checked build support around netmodules loaded as "files"
Test mcs/tests/test-418.exe was failing when running a checked build
with MONO_CHECK_MODE=metadata. I audited how images track their
modules and fixed the following issues:

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

In order for 1 and 3 to work, I modified MonoImages to track the size
of the "files[]" field.
2016-09-19 17:55:08 -04:00
Vlad Brezae c1051b7029 Merge pull request #3567 from BrzVlad/fix-conc-memusage2
[sgen] Fix concurrent memory usage
2016-09-19 21:05:27 +03:00
Alexander Köplinger f9db34e0cc [Facades] Another define fix
It was missed in https://github.com/mono/mono/commit/c84760250884989e10d707c049fd0aacae79c93e.
2016-09-19 19:57:45 +02:00
Marek Safar c847602508 [Facades] Use correct define 2016-09-19 18:55:49 +02:00
Alexander Köplinger fcca9846c8 Merge pull request #3522 from henricm/fix-csharp-compiler-path-windows
Using running process to determine mono exe path on windows
2016-09-19 18:25:10 +02:00
Marcos Henrich 4c99f5a645 [mono-symbolicate] Added Mono.Cecil sources.
Mono.Cecil.Mdb is not installed with mono.
Instead of reference Mono.Cecil.Mdb we now add its sources directly.
Mono.Cecil internals are visible to Mono.Cecil.Mdb, but not to
mono-symbolicate so we add Mono.Cecil source too.

Fixes mono-symbolicate not working with installed mono.
2016-09-19 17:02:54 +01:00
Alexander Köplinger a1ffb48bdf Merge pull request #3579 from radical/mcs-ignore-args
[mcs] Accept and ignore command line args supported by csc that we don't
2016-09-19 17:15:25 +02:00
Ankit Jain bbb050d0bd [mcs] Accept and ignore command line args supported by csc that we don't
.. support:

	/publicsign+
	/publicsign-
2016-09-19 11:09:55 -04:00
Marek Safar 2b2e902700 [mcs] Fixes codegen of predefined pointer arithmetic operators with user defined operator conversion for one of operands. Fixes #44440 2016-09-19 16:47:21 +02:00
Henric Müller ce1993f362 Fixes for ProcessTest on Windows
* Checking more error codes on whitespace tests.
* Using findstr instead of type to enable stdin/out pipes.
2016-09-19 16:28:30 +02:00
Niklas Therning 7de12c0fed Use the path of the current executable by default in soft debugger tests on
Windows to launch the child mono process

The 'mono' shell script generated by the Cygwin make file system doesn't work
when running the soft debugger tests against an MSVC built mono executable.
This patch first tries with the main module of the current process when
running on Windows (and mono is built using MSVC). If it looks like a mono
executable the tests will use it before falling back to the shell script.
2016-09-19 14:27:35 +02:00
Marek Safar b13b4c3e51 [bcl] Add more reflection types to monotouch 2016-09-19 13:23:16 +02:00
Marek Safar 293efaf0ac Merge pull request #3576 from ntherning/ignore-FileSecurityTest.EveryoneMayNotBeOwner-when-Administrator
Ignore the FileSecurityTest.EveryoneMayNotBeOwner test when running as Administrator
2016-09-19 12:48:19 +02:00
Marek Habersack 787b047886 [mkbundle] support satellite assemblies (#3448)
Satellite assemblies are special in that they all share the same file
name, but they live in separate directories named after the locale the
satellite assemblies pack. mkbundle currently doesn't support "clashing"
assembly filenames and will not be able to store the satellite
assemblies in the bundle for that reason.

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

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=27061
2016-09-19 11:51:24 +02:00
Niklas Therning c32dafe7d7 Ignore the FileSecurityTest.EveryoneMayNotBeOwner test when running as
Administrator

This test fails when running as Administrator since Administrator CAN set the
owner to Everyone. This patch ignores the test when running as Administrator.
The check has to be done after the File.SetAccessControl() call that is
expected to fail since when we aren't running as Administrator the IsInRole()
check will trigger UAC which we need to prevent when possible.
2016-09-19 11:08:27 +02:00
Marek Safar 55d0f3f3ec Merge pull request #3573 from ntherning/replace-NUnit-Culture-with-SetCulture
Use NUnit's SetCulture attribute rather than Culture
2016-09-16 20:01:08 +02:00
Vlad Brezae 86044c84c2 [sgen] Trim worker gray queue after finishing concurrent mark
This was keeping around potentially many unused gray queue sections, or even constantly leaking in the case of many majors since every time we start a concurrent major we redirect some additional gray queue sections from main to worker thread gray queues, leading to unbounded growth. The gc thread always trims its gray queues at the end of the collection.

On graph8 this reduces memory usage by 5%. Fixes mem leak from #41995
2016-09-16 20:45:14 +03:00
Vlad Brezae 1a82fb7d51 [sgen] We don't need to trim the free list when finishing gray stack
We always dispose the gray queue at the end of the collection, which implies its trimming.
2016-09-16 20:45:14 +03:00
Vlad Brezae b39bc2adbb [sgen] Increase counter when actually allocating gray sections 2016-09-16 20:45:14 +03:00
Vlad Brezae 889b71116d Merge pull request #3562 from BrzVlad/fix-reverse-wbarrier
[jit] Fix missing wbarrier for array generic setter
2016-09-16 20:43:46 +03:00
Rodrigo Kumpera 1777aff514 Merge pull request #3565 from vargaz/no-free-imt-thunks
[runtime] Avoid freeing IMT thunks, some threads might still be execu…
2016-09-16 10:13:54 -07:00
Marek Safar 86a0c69448 [corlib] Add missing apis 2016-09-16 18:06:06 +02:00
Niklas Therning 5d51431e47 Merge pull request #3574 from ntherning/disable-tests-with-com-instantiation-on-mono-on-windows
Disable tests which instantiate COM objects on Windows
2016-09-16 17:04:13 +02:00
Niklas Therning 7357e0b738 Disable tests which instantiate COM objects on Windows
COM is not working on Mono on Windows and adding support for it is not a
priority at the moment.
2016-09-16 16:59:03 +02:00
Marek Safar 9cab66800c [System.Net.Http] Show invalid values added to HttpHeaderValueCollection. to Fixes #44413. 2016-09-16 15:48:44 +02:00
Marek Safar 0dfef7b345 [mcs] Delay array base type interfaces initialization. Fixes #44402 2016-09-16 15:48:44 +02:00
Marek Safar f1b81b256d Merge pull request #3564 from henricm/thread-safe-win32eventlog-notifications
Making Win32EventLog notification thread safe
2016-09-16 14:58:29 +02:00
Niklas Therning cd277c2a7b Merge pull request #3545 from ntherning/throw-AbandonedMutexException-on-unix
Correctly handle abandoned mutexes on non-Windows platforms
2016-09-16 14:57:21 +02:00
Niklas Therning 7f78849444 Use NUnit's SetCulture attribute rather than Culture
A few tests are currently ignored when running on a system where the default
culture isn't "en" or "en-US". This patch changes Culture attributes to
SetCulture attributes instead to make those tests run on all system and make
NUnit set the culture to the required one during the test run.

Also found and fixed a test failure in one of these methods,
DateTimeTest.ToUniversalTime_TimeZoneOffsetShouldNotOverflow(), which assumed
the minimum year is 0 while it's actually 1. Confirmed that this is the case
on .NET as well.
2016-09-16 14:55:24 +02:00
Henric Müller ab274967bc Making Win32EventLog notification thread safe
The _notifyResetEvent could be closed and nulled and the
NotifyEventThread would still try to read from the event log.
Also multiple calls to EnableNotification would cause issues.
With this fix, we make sure only one notify event thread is
running and that we thread safe the disabling of notifications.
2016-09-16 14:17:17 +02:00
Ludovic Henry dbb5d536e8 [runtime] Fix build 2016-09-16 11:48:47 +02:00
Ludovic Henry 1c9e34cce5 [threads] Check InternalThread.last just after checking corlib version 2016-09-16 11:46:46 +02:00
Bernhard Urban f11615a21d [io-layer] include w32mutex-utils.h (#3568) 2016-09-16 11:24:27 +02:00
Niklas Therning b8fadb959a Correctly handle abandoned mutexes on non-Windows platforms
When a thread owning a mutex doesn't release it before it exits and a second
thread tries to take it using e.g. Mutex.WaitOne() an AbandonedMutexException
should be thrown. This is what .NET and Mono on Windows does.

This commit builds on the work done in PR #2267, which modifies the Win32
emulation of WaitForSingleObjectEx(), SignalObjectAndWait() and
WaitForMultipleObjectsEx() to return WAIT_ABANDONED_0 when expected, and
updates it to the current HEAD. It also adds a few test methods to
WaitHandleTest that test that WaitHandle.WaitAny() and WaitHandle.WaitAll()
follows the .NET behaviour.
2016-09-16 11:07:38 +02:00
Niklas Therning 5dcbbab04e Correctly handle abandoned mutexes on non-Windows platforms
When a thread owning a mutex doesn't release it before it exits and a second
thread tries to take it using e.g. Mutex.WaitOne() an AbandonedMutexException
should be thrown. This is what .NET and Mono on Windows does.

This commit adds the infrastructure needed in the Win32 emulation layer to
coomunicate that a mutex has been abandoned. It builds on the work done in
PR #2267 and updates it to the current HEAD.
2016-09-16 11:06:38 +02:00
Marek Safar 9ed7e83881 [mcs] Report more errors for nameof expressions. Fixes #44168 2016-09-16 10:57:42 +02:00
Marek Safar 1e05158c3c Merge pull request #3566 from ntherning/fix-time-zone-issues-on-windows
Fixes time zone issues when running on Windows
2016-09-16 10:26:38 +02:00
Zoltan Varga 8612b548ee Revert "[loader] Tests for RefereceAssemblyAttribute support"
This reverts commit 31de4df835.

Revert this as the corresponding fix was reverted.
2016-09-15 19:44:10 -04:00
Aleksey Kliger 9f5115a343 [monodis] Don't segfault using cooperative GC.
monodis with coop enabled segfaulted in mono_thread_info_attach
2016-09-15 18:20:06 -04:00
Zoltan Varga 96006931db [winx64] Mark some inline functions static to hopefully fix the mxe build. 2016-09-15 14:06:25 -04:00
Zoltan Varga f732cb997b [runtime] Add a counter for the number of freed IMT trampolines. 2016-09-15 12:30:25 -04:00
Marek Safar 5e245bed38 [corlib] Use simple BinaryCompatibility as anywhere else 2016-09-15 17:22:23 +02:00
Marek Safar 39d34f4c0d [bcl] Fix few warnings 2016-09-15 17:12:38 +02:00
Marek Safar 9e1a781ab8 [man] Update few mcs sections 2016-09-15 17:11:53 +02:00
Niklas Therning c6e0d5d706 Fixes time zone issues when running on Windows
TimeZoneInfo.GetDaylightChanges() didn't work as expected when run against the
time zone data available in Windows.

This patch also enables most of the time zone related tests that were
previously ignored when not run on Unix platforms. Time zone ids will now be
mapped from tz db time zone names to Windows time zone names when needed so
that most of the tests can be run on Mono on Windows as well.
2016-09-15 16:18:05 +02:00
Marek Safar 14c783f1ec [build] Add System.Numerics.Vectors to xammac profile 2016-09-15 14:16:46 +02:00
Marek Safar b37ec02e2b [mcs] Improve member lookup rules when type parameter has both non-object effective base class and interface constraint(s) 2016-09-15 13:40:15 +02:00
Zoltan Varga 354d26c852 Revert "[runtime] Check for ReferenceAssemblyAttribute when loading for execution."
This reverts commit bc9461168e.

Revert this to see if it fixes the wrench build.
2016-09-15 07:37:46 -04:00
Zoltan Varga a36b4b2d82 [runtime] Avoid freeing IMT thunks, some threads might still be executing them. This creates a memory leak, but its bounded. Fixes #39832. 2016-09-15 07:35:18 -04:00
Ludovic Henry 6e25454765 [w32handle] Remove case where mutex and cond are busy (#3561)
This code path has not been used for a while now, as mono_os_(mutex|cond)_destroy return -1 in case of error, and not EBUSY.

This is also the only code path that would check the return value, so we can simply remove the returned value, and assert on the error.
2016-09-15 10:12:07 +02:00
Marek Safar a2ee7a92be Merge pull request #3559 from mistressofjellyfish/httpcookie
[System.Web] HttpCookie load defaults from Web.config
2016-09-15 08:55:06 +02:00
Marek Safar 4c788d5d19 Merge pull request #3558 from rolfbjarne/tests-system-dns-make-failures-not-crash-app
[System] Rewrite Dns tests so that failures don't cause the process to crash.
2016-09-15 08:52:44 +02:00
Vlad Brezae 59448e9b7a [jit] Fix missing wbarrier for array generic setter
The generic setter receives the element by reference which means we will never emit the write barrier since a reference to a reference is not a reference (mini_type_is_reference). Check the actual value instead. Fixes #42903.
2016-09-15 01:16:03 +03:00
Ludovic Henry 7eb2ea6476 [w32handle] Fix race condition when creating named mutex/event/semaphore (#3560)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=41914
2016-09-14 23:18:50 +02:00
Marek Safar 9006b7ac98 Merge pull request #3557 from ntherning/fix-time-zone-dst-in-delta-behaviour
Replicate .NET's TimeZoneInfo.IsDaylightSavingTime() and GetUtcOffset() behaviour when passed times within the lost period at DST start
2016-09-14 18:39:26 +02:00
Katharina Bogad 3f665b84fe [System.Web] HttpCookie load defaults from Web.config
HttpCookie now loads default values from the Web.config,
just like the reference source does.
2016-09-14 17:57:55 +02:00
Rolf Bjarne Kvinge c213a51b70 [System] Rewrite Dns tests so that failures don't cause the process to crash.
Previously the tests were written so that some failures might occur on the
threadpool in methods that did not catch exceptions. In that case the process
would terminate due to an unhandled exception. So rewrite the tests to catch
exceptions in any code that doesn't run on the main thread, and forward those
exceptions to the main thread.

Also wait for async operations to complete on the main thread, and remove
asserts that are not supposed to be hit.
2016-09-14 17:37:42 +02:00
Marek Safar 8f7a1683c2 [mcs] Move type constraints checks after base type definition. Fixes #44212 2016-09-14 15:42:26 +02:00
Niklas Therning 25e0b39715 Merge pull request #3536 from henricm/fix-machinename-ignorecase
Ignoring case for MachineName in EventLogTest
2016-09-14 14:57:03 +02:00
Niklas Therning 4f070dea31 Replicate .NET's TimeZoneInfo.IsDaylightSavingTime() and GetUtcOffset()
behaviour when passed times within the lost period at DST start

When passed a time within this period .NET's IsDaylightSavingTime() returns
true while GetUtcOffset() returns the BaseUtcOffset without the DST delta
added. This patch changes the behaviour in Mono to do what .NET does.
2016-09-14 12:00:07 +02:00
Marek Habersack d063541740 Set DefaultPersistentConnectionLimit to 10 for Xamarin.Android
This is to make it the same as the Xamarin.iOS setting and
fixes https://bugzilla.xamarin.com/show_bug.cgi?id=7467
2016-09-14 11:18:13 +02:00
Zoltan Varga 0bcbe39b14 [runtime] Rename IMT thunks to 'trampolines'. NFC. (#3555) 2016-09-14 02:56:20 +02:00
Ludovic Henry 7421216052 [io-layer] Extract Mutex, Semaphore and Event (#3553)
* [metadata] Move mutex managed support to seperate file

* [mutex] Extract CreateMutex

* [mutex] Extract ReleaseMutex

* [mutex] Extract OpenMutex

* [mutex] Extract wapi_mutex_abandon

* [mutex] Extract MonoW32HandleOps for mutex and named mutex

* [io-layer] Extract wapi_search_handle_namespace

* [metadata] Move semaphore managed support to seperate file

* [semaphore] Move _WapiHandle_sem and _WapiHandle_namedsem to semaphores.h

* [semaphore] Extract CreateSemaphore

* [semaphore] Extract ReleaseSemaphore

* [semaphore] Extract OpenSemaphore

* [semaphore] Extract MonoW32HandleOps

* [metadata] Move event managed support to seperate file

* [event] Extract CreateEvent

* [event] Remove dead code PulseEvent

* [event] Extract SetEvent

* [event] Extract ResetEvent

* [event] Extract OpenHandle

* [event] Extract MonoW32HandleOps

* [w32handle] Extract namespace locking

* [io-layer] Inline only use of wapi_shm_sem_lock/wapi_shm_sem_unlock
2016-09-13 23:40:58 +02:00
Ludovic Henry 334494de14 [hybrid-aot] Add runtime support (#3556)
* [aot-compiler] Add generic class and gsharedvt for hybrid AOT mode

* [aot-compiler] Remove dead code

* [hybrid-aot] Add --hybrid-aot for future use
2016-09-13 23:40:01 +02:00
Ludovic Henry bdaef1e697 [threads] Import mono_thread_info_set_priority (#3543)
* [mono-threads] Remove MonoThreadParm.creation_flags

* [mono-threads] Remove MonoThreadParm.priority and set to MONO_THREAD_PRIORITY_NORMAL by default

* [threads] Wrap use of mono_thread_info_(get|set)_priority

* [threads] Store priority on MonoInternalThread

* [threads] Import mono_thread_info_set_priority

* [mono-threads] Remove MonoThreadParm
2016-09-13 18:41:29 +02:00
Marek Safar a26fda4e8c [System] Don't compress custom http headers in httplistener response. Fixes #34715 2016-09-13 16:11:43 +02:00
Zoltan Varga 2ffa920376 [runtime] Pass the initial context to mono_walk_stack_with_ctx () in mono_stack_walk_async_safe (). Hopefully fixes #44164. 2016-09-13 08:58:17 -04:00
Vlad Brezae fd3f90982a Merge pull request #3534 from BrzVlad/fix-conc-gcstress-mem
[sgen] Fix conc gcstress mem
2016-09-12 23:27:39 +03:00
Rodrigo Kumpera 3470747e29 Merge pull request #3541 from kumpera/add-tas-to-threading
[abort] Reduce the race window when doing Monitor:Enter.
2016-09-12 16:05:28 -04:00
Zoltan Varga 5a3736606e Bump version to 4.9.0 2016-09-12 20:59:46 +02:00
monojenkins 4e441ecc2a Merge pull request #3549 from lewurm/arm64-icache-big-little-fix
[arm64] fixes around icache flushing


This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39859

The problem in `emit_thunk` and the workarounds for the Cortex A53 errata are unrelated to the bug above, but they don't hurt either.

The basic problem that we see is that the Exynos 8890 SoC (shipped for example in the world edition of the Samsung Galaxy S7) is a big.LITTLE architecture with two different CPUs, four of each. `__clear_cache` of GCC [1], the built-in that we use to flush the instruction cache, correctly reads the cache line sizes for data- and instruction cache from the CPU and then caches that result. However, the two CPUs on the Exynos 8890 have two different cache line sizes for the instruction cache (128 bytes vs. 64 bytes): If we happen to initialize the cache line sizes with the larger one, we only flush every other cache line if the code runs on the second CPU model.

Neither V8 [2] and LLVM [3] do caching of the cache line sizes, but just read it every time from the register.  We have a slightly different solution, where we cache _and_ read the value every time and try to determine a global minimum across CPUs, in case we get scheduled to a different CPU by the kernel during the flushing loop.


[1] https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.9/libgcc/config/aarch64/sync-cache.c#33
[2] https://github.com/v8/v8/commit/fec99c689b8587b863df4a5c4793c601772ef663
[3] https://github.com/llvm-mirror/compiler-rt/blob/ff75f2a0260b1940436a483413091c5770427c04/lib/builtins/clear_cache.c#L146
2016-09-12 18:30:08 +01:00
Marek Safar 104fd9c638 Merge pull request #3535 from henricm/fix-always-use-preamble-length
Removing hard coded preamble length
2016-09-12 16:52:30 +02:00
Vlad Brezae ed81b4bd0a [sgen] Free major sections in bulk also on 64bit
On coreclr-gcstress this reduces the OS vmem maps by more than half.
2016-09-12 17:28:52 +03:00
Vlad Brezae f8c983b0e8 [sgen] Adjust free-ing of empty blocks
After sweep, depending on the computed allowance, we are freeing empty blocks so that we still keep around enough blocks to fill that allowance (to avoid repeated vmaps).

On both collectors this had the problem that the allowance also accounts for LOS space, which we shouldn't account for in major section heuristics (which means that in LOS intensive benchmarks we only free major sections after the LOS shrinks).

On the concurrent collector, where we have a negative allowance adjustment depending on the duration of the concurrent mark (in order to mimic serial memory usage), we can have very small allowances at the end of a major collection, even 0. This means that we would reserve no empty blocks for later use.

We solve these issues by reserving empty blocks relative to the amount of current alive blocks, which is also the basis of how we compute the allowance in the first place.
2016-09-12 17:28:52 +03:00
Vlad Brezae e6cec7897e [runtime] Replace uses of alloc functions with glib variants 2016-09-12 17:28:52 +03:00
Mark Probst 883e0a2d89 [utils] Fix internal allocator header size.
The header is always just a pointer.
2016-09-12 17:28:52 +03:00
Mark Probst 56226f83f5 [runtime] Counters for allocated virtual memory. 2016-09-12 17:28:52 +03:00
David Karlaš 8576b11c77 Merge pull request #3552 from DavidKarlas/getScopeChanges
[Debugger] GetLocals was throwing NullReferenceException(li.scopes_start) if ran against older runtime
2016-09-12 14:58:54 +02:00
David Karlaš ca1db0bc7e [Debugger] GetLocals was throwing NullReferenceException(li.scopes_start) if ran against older runtime
Added logic to make sure user of API handles version checking when calling GetScope
Made properties in LocalScope class public
2016-09-12 13:01:27 +02:00
Emil Sandstø 5a4a9a0e8a [threads] Correct the spin waiting in 'sleep_interruptable' (#3544)
After https://github.com/mono/mono/commit/089c47f1c07bf250d76c36e04675569fc6f5b4ba#diff-e7e458b6256eaa730c145f14a666652aR1141
the code started to use nanoseconds instead of milliseconds. The problem was that this caused 'sleep_interruptable' to spin wait the last millisecond before the wait was over, https://bugzilla.xamarin.com/show_bug.cgi?id=44132.

Fix https://bugzilla.xamarin.com/show_bug.cgi?id=44132
2016-09-12 12:19:00 +02:00
Alex Rønne Petersen 0a0be23e6f Merge pull request #3550 from alexrp/revert-tp-monitor
Revert "[threadpool-ms] Switch Monitor thread to a MonoThreadInfo (#3538)"
2016-09-11 16:19:41 +02:00
Alex Rønne Petersen 6f6987a257 Revert "[threadpool-ms] Switch Monitor thread to a MonoThreadInfo (#3538)"
This reverts commit 2f88b8eb5a.

There is a subtle problem with turning the monitor thread into a simple
MonoThreadInfo: It creates worker threads via mono_thread_create_internal (),
which allocates the thread object from the GC. No thread can allocate from
the GC unless it's actually attached, which the worker thread is not when
created with just mono_threads_create ().
2016-09-11 15:44:56 +02:00
Zoltan Varga ea15e2c577 [runtime] Remove some dead code. 2016-09-10 00:51:15 +02:00
Bernhard Urban 44520cdd9c [arm64] use dc civac instead of dc cvau
suggested workaround for some Cortex A53 bugs, inspired by V8:
https://github.com/v8/v8/commit/fec99c689b8587b863df4a5c4793c601772ef663
2016-09-10 00:43:40 +02:00
Bernhard Urban 802cf1dfbe [arm64] manually flush icache
should fix https://bugzilla.xamarin.com/show_bug.cgi?id=39859
2016-09-10 00:42:58 +02:00
Bernhard Urban 48c3c08e30 [arm64] flush whole emitted thunk 2016-09-09 23:53:41 +02:00
Ludovic Henry 2f88b8eb5a [threadpool-ms] Switch Monitor thread to a MonoThreadInfo (#3538) 2016-09-09 23:41:34 +02:00
Zoltan Varga aaed951757 Remove a debug printf. 2016-09-09 20:08:06 +02:00
Zoltan Varga 038def9851 Add missing file. 2016-09-09 19:59:45 +02:00
Zoltan Varga 7e3028c2c8 [sdb] Add a MethodMirror:GetScopes () method which returns scope information. 2016-09-09 19:58:59 +02:00
cmp 55125d38c9 Remove obsolete stack limit checks on Windows
mono_thread_info_get_stack_bounds has been updated to correctly report
the stack reserved base address quite some time ago.
Remove a couple of checks that still assume the old behavior of
reporting the committed base address.
2016-09-09 18:25:40 +01:00
Ludovic Henry a81a6173b8 [threads] Add specific field to check size (#3542) 2016-09-09 16:23:34 +02:00
Ludovic Henry 348d793ebb [threadpool-ms] Replace win32 semaphore by coop semaphore (#3519) 2016-09-09 12:09:18 +02:00
Ludovic Henry 299b257efb [mono-threads] Fix lifetime of MonoThreadInfo->handle (#3539)
This handle should have a total of maximum 3 copies:
 - in MonoThreadInfo->handle
 - in the return value of mono_threads_create_thread
 - in MonoInternalThread->handle (if it's a managed thread)

Before, there would always be 2 references (in MonoThreadInfo->handle and another another for MonoInternalThread->handle), even if it would be referenced at one place only (MonoThreadInfo->handle), which would lead to a handle leak.

We also need to duplicate the returned handle, to avoid having a use-after-free of the handle (in case the thread exits before we access that handle)
2016-09-09 11:38:30 +02:00
Zoltan Varga 2acdc49ff6 [llvm] Disable llvm again for methods with large basic blocks in non-llvm-only mode, the workaround doesn't seem to work. Fixes #42395. 2016-09-09 03:14:24 +02:00
monojenkins c8ab84a20a Merge pull request #3540 from kumpera/abort-on-gerror
[logging] Fix g_error not aborting.

Once we enabled g_log redirection, we stopped aborting as the new handlers didn't behave like eglib.
2016-09-09 01:45:04 +01:00
Vlad Brezae 3fd54893bc Merge pull request #3528 from BrzVlad/fix-sgen-check-before-collections
[sgen] Fix sgen debug flags
2016-09-09 02:54:48 +03:00
Rodrigo Kumpera 60e0a82be2 [runtime] Reduce the race window when aborting Monitor:Enter.
If you abort a thread that is doing a Monitor:Enter, if the syscall abort lands before
the target thread start waiting it will block in a non aletable way.

To address that, we start by waiting in an alertable way and if interrupted we
decide to continue or not based on whether an abort can start.

Additionally, when alertable, we CAS the thread state to catch early Thread:Abort
calls that set the state by did not managed to init it.

This fixes a rare deadlock on tests/monitor-abort.exe.
2016-09-08 16:08:40 -07:00
Rodrigo Kumpera 6040e79f92 [threads] Add mono_threads_is_ready_to_be_interrupted helper to figure out whether a thread is ready to be interrupted. 2016-09-08 16:08:40 -07:00
Rodrigo Kumpera cfeda495ea [threading] Introduce mono_thread_test_and_set_state to manipulate thread state.
Unconditional state transitions are really bad since they don't allow threads
to coordinate between themselves.
2016-09-08 16:08:39 -07:00
Rodrigo Kumpera 045c8d9982 [logging] Fix g_error not aborting. 2016-09-08 15:58:08 -07:00
Ludovic Henry 668ee608eb [threads] Factor common attach code in mono_thread_attach_internal (#3530)
* [threads] Allocate StartInfo in create_thread

* [threads] Put start_notify semaphore in StartInfo

* [threads] Factor common attach code in mono_thread_attach_internal

* [threads] Use same registered mechanism as mono-threads
2016-09-08 17:17:28 +02:00
Niklas Therning 8468603a7c Merge pull request #3537 from ntherning/fix-failing-ThreadTest-tests-on-windows
Remove Assert.Fail() calls in ThreadTest when running on Windows
2016-09-08 16:31:58 +02:00
Niklas Therning 17d5e53ac8 Remove Assert.Fail() calls in ThreadTest when running on Windows
The tests that fail like this actually work just fine on Mono on Windows.
Added the NotDotNet category to the CurrentThread_Domains() test since it
fails on .NET.
2016-09-08 15:28:34 +02:00
Henric Müller 8fd49882a5 Ignoring case for MachineName in EventLogTest 2016-09-08 14:57:44 +02:00
Jonathan Chambers 12d1d63b8a Avoid race condition between domain unload and threadpool. (#3491)
* Avoid race condition between domain unload and threadpool.

Previous logic only ensured that domain->threadpool_jobs was 0.
There was a race condition as follows:
* worker jobs are queued into ThreadPoolDomain outstanding_request's
* domain unload starts
* domain->threadpool_jobs is 0 so unload proceeds
* queued jobs are processed from the ThreadPoolDomain outstanding_request's
* the domain can be set/entered by worker threads since
  mono_domain_set only fails for domains with state of MONO_APPDOMAIN_UNLOADED,
  while our domain is in the MONO_APPDOMAIN_UNLOADING state
* jobs are now being unexpectedly run in domain that is being shutdown

* Fix a hang when unloading the domain.

This change applies the diff from ludovic-henry to correct the hang.

https://gist.github.com/ludovic-henry/6c8a4bc8951091c0ef36df2e52d5e32e
2016-09-08 14:28:59 +02:00
Henric Müller 3ce9192edf Removing hard coded preamble length
For some reason preamble length was asumed to be 3 when cp 65001
instead of always looking att the preamble length of the encoding.
This resulted in responses cropped by 3 chars on windows.
2016-09-08 14:15:32 +02:00
Alexander Köplinger 43ffa41898 Merge pull request #3532 from alexrp/profiler-stress-tests
[acceptance-tests] Add profiler-stress suite.
2016-09-08 07:23:40 +02:00
Alex Rønne Petersen 7d7b674ac5 [acceptance-tests] Add profiler-stress suite. 2016-09-08 07:04:39 +02:00
Alex Rønne Petersen 8f3dacc509 Merge pull request #3531 from alexrp/master
[profiler} Don't crash if a zero sampling frequency is given.
2016-09-08 03:18:40 +02:00
Alex Rønne Petersen e5a68998b7 [profiler} Don't crash if a zero sampling frequency is given. 2016-09-08 02:20:32 +02:00
Henric Müller f577b619e9 Moving WSAGetLastError calls closer to socket operation (#3450)
* When doing async connect on windows, connect returns `WSAEINPROGRESS`
which needs to be returned to managed code for correct handling. However
on Windows, last error gets reset before `WSAGetLastError` is called.
This fix moves all `WSAGetLastError` calls up closer to the socket
operation to make sure correct error code is returned to the managed code.

* Making sure `TcpNoDelay` is set to false for IPv4 by default and
that `DualMode` is default for IPv6.

* Making sure option value is set to 0 before calling getsockopt
because on Windows, a `BOOL` option value (eg TcpNoDelay) is returned
as a one byte value and the other bytes are left untouched which resulted
in TcpNoDelay always seemed to be true.

* Fixed so `TF_REUSE_SOCKET` is set only if `reuse` parameter is set
when disconnecting a socket.
2016-09-07 15:30:55 +02:00
Niklas Therning a231b0a82c Merge pull request #3511 from henricm/fix-no-socket-reuse
Not reusing sockets in dual mode tests
2016-09-07 15:23:54 +02:00
Henric Müller 67cdb99406 Using running process to determine mono exe path on windows
Extracting mono, mcs, vbnc, al and gac path lookup to a common class.
On windows we now also check the running process to try to determine
the mono.exe.
2016-09-07 14:49:10 +02:00
Ludovic Henry f4d9546f3c [threads] Remove CREATE_SUSPENDED (#3529)
* [threads] Remove use of CREATE_SUSPENDED for domain unload thread

* [threads] Remove use of CREATE_SUSPENDED for managed thread

* [threads] Remove CREATE_SUSPENDED
2016-09-07 14:28:46 +02:00
Alex Rønne Petersen 1fd62ac204 Merge pull request #3526 from alexrp/master
[sgen] Don't consider managed write barriers to be critical methods.
2016-09-07 03:00:48 +02:00
Vlad Brezae ad563e4352 [sgen] Make sure we don't sweep a block if we're not supposed to
If the sweeping mechanism has been triggered by a major collection, then the iteration will wait for the general sweeping to finish and also for the sweeping of all the blocks. If this isn't the case (we are doing a major collection) we will iterate over the current state of the heap, some objects being bound to die during the collection, and the callback must account for this.

It doesn't make much sense to explicitly attempt to iterate without trying to sweep blocks that can be swept.
2016-09-07 03:14:32 +03:00
Manu d251fcc2cd Rename local file into socket_fd (#3524)
This is to avoid hiding the static gint `file` and to better understand the code.
2016-09-07 00:28:16 +02:00
Ludovic Henry cf29167326 Merge pull request #3509 from ludovic-henry/iolayer-extract-threading
[mono-threads] Keep cleaning up mono-threads after iolayer extraction
2016-09-07 00:18:23 +02:00
Alex Rønne Petersen 2cfd9db070 [sgen] Don't consider managed write barriers to be critical methods.
When we emit calls to them, we also emit an OP_DUMMY_USE instruction to keep
the object alive, so it is OK for the GC to interrupt write barriers now.
2016-09-06 20:51:13 +02:00
Vlad Brezae 4d577807ed [sgen] Remove unused and potentially wrong case from major object iteration
We never enter this case since we never iterate over the major objects without requiring to sweep, while a sweep is running. Even if we would be in this case, we directly access the mark bits which can be cleared at the same time by another thread sweeping the block, so we could miss live objects.
2016-09-06 20:01:28 +03:00
Vlad Brezae e8bf41f58d [sgen] Fix mod union consistency check
We don't need a mod union to mark an object with concurrent mark&sweep.
2016-09-06 19:59:24 +03:00
Vlad Brezae 743a184be0 [sgen] Don't do remset consistency checks during majors
It doesn't make sense to check the remset during a major since majors dont use the cardtable and we clear it at the start. So we will obviously have missing remsets. For the debugging concurrent case, we should use the mod union consistency checks instead.
2016-09-06 19:59:23 +03:00
Vlad Brezae 971883045a [sgen] Don't verify the heap after a major
We would need to deal with scanning forwarded objects and dead objects which is not worth it. Only verify the heap at the start of a collection, as indicated by the name of the flag.
2016-09-06 19:59:23 +03:00
Vlad Brezae a6914676d1 [sgen] Fix missing remsets with verify before collections
When verifying the heap we need to have the set of pinned objects otherwise we can observe missing remsets if suspended between the store and the write barrier. If we don't have the set of pinned objects, allow missing remsets.
2016-09-06 19:59:22 +03:00
Ludovic Henry fa41710fe0 [mono-threads] Have error in case we cannot set thread priority 2016-09-06 17:01:27 +02:00
Ludovic Henry f4f7bf559b [mono-threads] Fix win32 to posix priority conversion 2016-09-06 17:01:26 +02:00
Ludovic Henry 22fdfbfafe [mono-threads] Store handle related data in MonoThreadInfo 2016-09-06 17:00:02 +02:00
Ludovic Henry e687b1277e [mono-threads] Assert that we do not try to signal the handle multiple times 2016-09-06 17:00:00 +02:00
Alexander Köplinger faf790bd02 Merge pull request #3518 from akoeplinger/fix-fileiopermission
[corlib] Ensure FileIOPermission ctor is not called on mobile
2016-09-06 15:17:30 +02:00
Alexander Köplinger 5e6fdbd71d [corlib] Ensure FileIOPermission ctor is not called on mobile
After https://github.com/mono/mono/pull/3452 was merged, the LinkSdkRegressionTest.SecurityDeclaration
test in XI started failing:

```
	[FAIL] LinkSdkRegressionTest.SecurityDeclaration :   FileIOPermissionAccess
  Expected: null
  But was:  <System.Security.Permissions.FileIOPermissionAccess>

		  at LinkSdk.LinkSdkRegressionTest.SecurityDeclaration () [0x00033] in /Users/builder/data/lanes/1411/2a96404f/source/xamarin-macios/tests/linker-ios/link sdk/LinkSdkRegressionTest.cs:990
		  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
		  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/1411/2a96404f/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
```

Due to the added call in the PR the linker preserved FileIOPermissionAccess enum,
which is apparently something we want to avoid.

Since according to https://github.com/mono/mono/pull/3452#discussion_r76384945 the only point of calling the
FileIOPermission is validating that the path doesn't contain invalid characters (mostly an issue on Windows),
I decided to just copy those checks as it's way cleaner.
2016-09-06 12:27:26 +02:00
Alexander Köplinger ef85a70d45 Merge pull request #3525 from henricm/fix-access-level-get-token
Using max level allowed when getting current token
2016-09-06 12:24:39 +02:00
Henric Müller f99d80d3be Using max level allowed when getting current token
Reference source of WindowsIdentity is using `MAXIMUM_ALLOWED`
as desired level by default when getting current token.
Changing to same behaviour to enable duplicate and impersonation
to be made on the token retrieved by GetCurrentToken.
2016-09-06 10:08:50 +02:00
Miguel de Icaza a14e0d7c4b [mcs/Makefile] make the 'btest' (bootstrap test) target work again 2016-09-05 21:39:03 -04:00
Zoltan Varga 534f48a15d [jit] Unify the handling of 'error' and 'exc' in the llvm-only and non llvm-only runtime invoke code. Fixes #41961. 2016-09-06 02:22:03 +02:00
Joshua Peterson 895f3f5ae8 Better handle marshaling of packed types (#3508)
* This improves the marshaling for packed classes and class involved in an inheritance hierarchy.
* Similar changes were made in the Unity fork of mono across a number of commits.
* The tests here have been taken from the repo and converted to work as NUnit tests in Mono.
2016-09-05 23:43:55 +02:00
Zoltan Varga 56ec616f73 [jit] Emit a dummy call after calls to Type.GetType () in llvm-only mode to prevent clang from transforming the call to a tail call which would cause the stack walk done by GetType () to find the wrong frame. Fixes #41956. 2016-09-05 23:02:08 +02:00
Alexander Köplinger b41a4217cc Merge pull request #3521 from ntherning/fix-failures-in-RegistryKeyTest-on-windows
Fix for failures in RegistryKeyTest on Windows
2016-09-05 18:17:22 +02:00
Alexander Köplinger beedbc9116 Merge pull request #3520 from ntherning/fix-ModuleTest-too-long-temp-folder-path-on-windows
Prevent ModuleTest failures due to too long temp folder path on Windows
2016-09-05 17:39:33 +02:00
Niklas Therning 48416ee7ac Fix for failures in RegistryKeyTest on Windows
Refcatored Win32RegistryApi.SetValue() to accept uint/byte/etc values for
DWord registry values.

Added handling of ERROR_CHILD_MUST_BE_VOLATILE errors to GenerateException().

Centralized MarkedForDeletion error handling to GenerateException().

Fixed tests which create volatile subkeys in RegistryKeyTest which used the
same key names but didn't clean up properly.
2016-09-05 15:15:11 +02:00
Alexander Köplinger 71694e1e9d Merge pull request #3505 from ntherning/fix-resource-lookup-in-ResourceReaderTest-on-mono-on-windows
Lookup of test resource files in ResourceReaderTest fails on Windows
2016-09-05 13:42:57 +02:00
Niklas Therning db075cce35 Prevent ModuleTest failures due to too long temp folder path on Windows
On Windows the TearDown() cannot delete the temp folder since it contains
loaded assemblies. The next time the test is run it will create a temp folder
inside the previous folder. After a number of runs the temp folder path will
approach the ~260 max path supported on Windows and some of the methods will
start failing.

This patch changes the way the temp folder is created and reduces the depth in
the same way as AssemblyTest was patched to fix a similar issue in
b90617e7b7.
2016-09-05 13:31:51 +02:00
Vlad Brezae 6829e52344 [sgen] Remove unused parameter
We never do nursery collections as part of the concurrent finishing pause
2016-09-05 14:12:00 +03:00
Niklas Therning a611abd2d8 Lookup of test resource files in ResourceReaderTest fails on Windows
Removed the differing code paths in FixtureSetUp() when running on non-Windows
platforms vs when running Mono on Windows or on .NET. The path previously
taken only on non-Windows platforms has been verified to work as expected on
both Mono on Windows and on .NET.
2016-09-05 10:45:26 +02:00
Alexander Köplinger 9d40383ca9 [Dataflow] Bump timeouts in TransformBlockTest.DeferredUsage
It failed a couple of times according to the babysitter logs with the following error:

```
MESSAGE:
Expected and actual are both <System.Int32[10]>
  Values differ at index [1]
  Expected: -1
  But was:  0
```

Bump timeouts a little bit to see if this helps.
2016-09-04 20:11:36 +02:00
Alexander Köplinger d06a5075a8 Merge pull request #3514 from ntherning/more-reliable-g_get_home_dir-on-windows
Prefer SHGetKnownFolderPath() in g_get_home_dir() over HOMEDRIVE/HOMEPATH environment variables
2016-09-04 11:12:01 +02:00
Alex Rønne Petersen 2a96404f87 Merge pull request #3517 from alexrp/master
[man] Update mprof-report.1 to cover new profiler options.
2016-09-03 22:14:16 +02:00
Niklas Therning 16bfa4ec2f Prefer SHGetKnownFolderPath() in g_get_home_dir() over HOMEDRIVE/HOMEPATH
environment variables

Relying on the HOMEDRIVE/HOMEPATH environment variables is fragile as those
variables don't always have to be set. One such scenario is when running on a
Jenkins slave. When not set g_get_home_dir() in eglib would return NULL which
led to a crash in ves_icall_System_Environment_InternalGetHome().

This patch changes g_get_home_dir() to first try to call
SHGetKnownFolderPath() to get the current user's profile directory (i.e. home
dir). If that fails it falls back to the USERPROFILE environment variable. If
that isn't available the function will fallback to the original behavior and
try with HOMEDRIVE/HOMEPATH.
2016-09-03 22:10:59 +02:00
Alex Rønne Petersen bc8a54795e [man] Update mprof-report.1 to cover new profiler options.
Also reformat some sections a bit.
2016-09-03 17:05:52 +02:00
Zoltan Varga 8c239d6e51 [SRE] Move the resolving of user types to managed code, the runtime was not using write barriers. (#3515) 2016-09-03 04:08:40 +02:00
Zoltan Varga 462dd05a95 [runtime] Fix a C&P problem introduced by d4052c5563. 2016-09-03 02:59:20 +02:00
Zoltan Varga 5589845bf3 [SRE] Remove empty TypeBuilder:setup_generic_class () icall. 2016-09-02 21:39:53 +02:00
Zoltan Varga d5321089bb [runtime] Remove the stub of ves_icall_TypeBuilder_create_internal_class (). 2016-09-02 21:33:26 +02:00
Zoltan Varga 8638f0605f [corlib] Fix the signature of a few SRE icalls, they already receive a TypeBuilder as the 'this' argument. 2016-09-02 21:30:29 +02:00
Aleksey Kliger (λgeek) c8287cd329 Merge pull request #3446 from lambdageek/bug-42584
[loader] Check for ReferenceAssemblyAttribute when loading
2016-09-02 10:31:42 -04:00
Marek Safar 7e19f1f62b [mcs] Adjust correctly newline counter inside pragma warning 2016-09-02 16:21:25 +02:00
Marek Safar 1a69613fde [corlib] Add timeout to failing test 2016-09-02 15:46:07 +02:00
Marek Safar bc54b1ed7b Merge pull request #3506 from ntherning/make-ZoneTest-succeed-on-mono-on-windows
Make Zone.CreateFromUrl() work with URLs like file://C:\foo\bar
2016-09-02 15:01:32 +02:00
Marek Safar 2ad252a24f Merge pull request #3452 from ntherning/fix-AppDomainSetupTest-on-windows
Validate AppDomainSetup.ApplicationBase path more like .NET does
2016-09-02 11:25:15 +02:00
Henric Müller 54606e4880 Not reusing sockets in dual mode tests
Creating new sockets between each connect instead of
trying to reuse the client socket. The original tests
was not working in the MS .NET runtime and socket reuse
is not recommended to use unless in very special cases.
2016-09-02 11:09:30 +02:00
Marek Safar ceb298c91e [System.Core] Allow TryConvert to return null for any reference types (not only object). Fixes #41509 2016-09-02 11:02:52 +02:00
Aleksey Kliger bc9461168e [runtime] Check for ReferenceAssemblyAttribute when loading for execution. 2016-09-01 17:53:26 -04:00
Aleksey Kliger 31de4df835 [loader] Tests for RefereceAssemblyAttribute support 2016-09-01 17:53:26 -04:00
Aleksey Kliger c9232d7c61 [runtime] Add mono_assembly_get_reference_assembly_attribute
Checks whether the given assembly has the
System.Runtime.CompilerServices.ReferenceAssemblyAttribute applied.
2016-09-01 17:52:14 -04:00
Rodrigo Kumpera 1a337a898c Merge pull request #3455 from kumpera/abort_cctor
[runtime] Don't abort .cctors. Fixes #43320
2016-09-01 17:49:32 -04:00
Ludovic Henry 012e176979 [mono-threads] Factor common platform create thread code (#3484) 2016-09-01 21:22:51 +02:00
Miguel de Icaza bb1eda94c0 Bundle other options (#3501)
* [mkbundle] add support for baking environment variables, make endian-independent

* [runtime] Bundle support, implement missing stream processing
2016-09-01 12:58:48 -04:00
Alexander Köplinger 5c36996721 Merge pull request #3498 from mattleibow/bug-41723
[Mono.Data.Sqlite] Added checks for entry point existence
2016-09-01 18:17:46 +02:00
Niklas Therning 3a2063b071 Make Zone.CreateFromUrl() work with URLs like file://C:\foo\bar
On Windows the test used URLs like `file://C:\tmp\foo` which the
Mono.Security.Uri class was incapable of parsing. System.Uri from
referencesource parses such URLs just fine. This patch fixes the Uri class to
be able to parse such URLs. It also changes the Zone class to not throw an
exception if the Zone.CreateFromUrl() method is passed an invalid URL. Instead
the zone is set to NoZone. This seems to be how Zone in .NET behaves.
2016-09-01 16:43:50 +02:00
Niklas Therning 4a066c4504 Merge pull request #3503 from ntherning/fix-MarshalTest.GetHINSTANCE-on-mono-windows
Ignore the MarshalTest.GetHINSTANCE() test on Mono on Windows
2016-09-01 16:41:58 +02:00
Niklas Therning 72c153f098 Merge pull request #3504 from ntherning/fix-PropertyInfoTest.ConstantValue-fails-to-delete-locked-file-on-windows
PropertyInfoTest.ConstantValue() shouldn't fail if temp file cannot be deleted
2016-09-01 16:41:17 +02:00
Niklas Therning c862a7b423 PropertyInfoTest.ConstantValue() shouldn't fail if temp file cannot be deleted
Happens when running this test on Windows. Just swallow the exception if the
File.Delete() fails.
2016-09-01 16:30:40 +02:00
Niklas Therning 133e8a43cb Ignore the MarshalTest.GetHINSTANCE() test on Mono on Windows
Won't work on Mono even when running on Windows.
2016-09-01 16:25:01 +02:00
Matthew Leibowitz f44e145ac5 [Mono.Data.Sqlite] Using the Version class to do the version comparison correctly 2016-09-01 16:02:44 +02:00
Miguel de Icaza be3d436e4a Typo fix 2016-09-01 09:22:16 -04:00
Jo Shields 02f0dd9660 Add a man page for cert-sync (#3424) 2016-09-01 09:21:15 -04:00
Zoltan Varga 4664161ae3 [runtime] Add a mono_threads_close_thread_handle () function and use it to close thread handles instead of CloseHandle (). (#3497) 2016-09-01 13:34:00 +02:00
Bernhard Urban 097c8e17cb Merge pull request #3492 from lewurm/fix-insert-insn
[mini] emit sequence point before branching off for tail call [was: respect seq points when adding instruction at end of block]
2016-09-01 07:22:17 +02:00
monojenkins 49a0494ecb Merge pull request #3499 from kumpera/fix_logging
[logging] Ensure glib logging redirection and remove unwanted new pub api functions.
2016-09-01 03:40:12 +01:00
Matthew Leibowitz b70d1330a7 [Mono.Data.Sqlite] Instead of try/catch and dlopen/dlsym, use a cross-platform, correct way of determining API features: version 2016-09-01 04:09:00 +02:00
Rodrigo Kumpera 8abb08a8cf [threading] Update comments. 2016-08-31 17:49:48 -07:00
Rodrigo Kumpera 4729a107b1 [runtime] Introduce abort protected blocks. Use it within async invokes and unhandled exceptions.
There are a few places in the runtime that should not be aborted as it would render it unusable.

cctor execution was the initial trigger for this changeset, but then edge triggering of TAE turned out
to expose this issue on other places.

This patch introduces those regions and apply them to the following places:

ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke: Not delivering the completed CB
screws up any completion logic the user setup up.

mono_unhandled_exception: Protect delivery of the unhandled exception. Can't fail during it or we'll
effectively double fault and abort.
2016-08-31 17:45:31 -07:00
Rodrigo Kumpera 1764718ce5 [runtime] Add test for the interactions between thread abort and .cctors.
This covers bug #43320
2016-08-31 17:45:31 -07:00
Rodrigo Kumpera 152a3943ae [runtime] Don't start aborting a thread if it's running any .cctor. Fixes #43320.
A thread abort must not start if the thread is running a .cctor.
OTOH, if the cctor self aborts, it should start.

Threads now track how many cctors they are running in the cctor_exec_depth variable.

The abort machinery (in async_abort_critical) checks that flag and bail from
starting the abort.

The cctor code (in mono_runtime_class_init_full) ensures that cctor_exec_depth is bumped
around execution of the cctor itself. Additionally, error handling was cleaned up as it was pretty
inconsistent.
2016-08-31 17:45:31 -07:00
Rodrigo Kumpera 48d1f5cd09 [runtime] Add mono_current_thread_has_handle_block_guard callback to the runtime EH callbacks.
This callback allows the runtime to query mini on whether there's a block guard in play.
It allows for the runtime to correctly decide when to start an abort.
2016-08-31 17:45:31 -07:00
Rodrigo Kumpera 168394fb2f [logging] Ensure that glib logging goes through the new logging mechanics and that the domain prefix is preserved.
Call g_log_set_default_handler in mono_trace_set_log_handler and mono_trace_set_log_handler_internal to ensure that g_ logging is properly routed.

Additionally, change the internal logging callback to take the log message as a single string to simplify things.
2016-08-31 17:43:36 -07:00
Matthew Leibowitz d2c68ea932 [Mono.Data.Sqlite] Make the fields read-only 2016-09-01 01:28:06 +02:00
Matthew Leibowitz 4ca0a0b853 [Mono.Data.Sqlite] Added iOS specific checks for entry point existence:
- using dlfcn.dlsym to avoid P/Invoke exceptions
2016-09-01 01:25:04 +02:00
Rodrigo Kumpera e669004045 [logging] Move internals that were landed in public headers by mistake. 2016-08-31 16:23:56 -07:00
Zoltan Varga da7e234b3c [runtime] Fix a warning. 2016-09-01 01:15:54 +02:00
Alex Rønne Petersen b877d6f3d9 [profiler] Fix some off-by-ones in header size calculation. 2016-09-01 01:03:55 +02:00
Alex Rønne Petersen e36583e871 Merge pull request #3493 from alexrp/master
Follow-up PR for #3481
2016-09-01 01:03:41 +02:00
Zoltan Varga 5621b5878b [corlib] Disable CS0169 for RuntimeStructs.cs. 2016-09-01 00:59:30 +02:00
Zoltan Varga 2cab627a7c [llvm] Error out when using --aot=llvmonly in a runtime compiled without llvm. 2016-09-01 00:56:52 +02:00
Zoltan Varga f9fe66adba [arm] Make mono_arch_get_call_target () work on direct branches too, previously it returned NULL, which broke the code in handle_thunk () for tail calls. 2016-09-01 00:41:12 +02:00
Alex Rønne Petersen b0334d6cf9 [profiler] Include arguments, architecture, and OS in format header.
Bumped the major/minor version to 1.0 for this change.
2016-09-01 00:34:26 +02:00
Alex Rønne Petersen 5f419ae489 [profiler] Fix dump_header () to do fflush () in all non-gzip code paths. 2016-09-01 00:34:25 +02:00
Alex Rønne Petersen cd34142b77 [runtime] Export API functions to get arch/os/wordsize strings. 2016-09-01 00:34:25 +02:00
Alex Rønne Petersen ece3faccab [profiler] Remove duplicate #include. 2016-09-01 00:34:24 +02:00
Alex Rønne Petersen 8982a5c794 [profiler] Update documentation for time fields. 2016-09-01 00:34:24 +02:00
Alex Rønne Petersen f1ee1fbf3b [profiler] Document the TYPE_EXCEPTION format. 2016-09-01 00:34:23 +02:00
Alex Rønne Petersen f170865301 [profiler] Clean up some enums a bit. No format change. 2016-09-01 00:34:22 +02:00
Alex Rønne Petersen 414315dca5 [profiler] Update documentation on the backtrace format. 2016-09-01 00:34:22 +02:00
Alex Rønne Petersen cd7478ec96 [profiler] Pump the hazard free queue when shutting down. 2016-09-01 00:34:21 +02:00
Alex Rønne Petersen c17926d622 [utils/hp] Export mono_thread_hazardous_try_free_all () for use in the profiler. 2016-09-01 00:34:20 +02:00
Alex Rønne Petersen 66cf06f9b9 [utils/hp] Keep pumping the free queue even when we encounter hazardous items.
Previously, a single item being hazardous for a while could completely block
pumping of the queue. This fixes that.
2016-09-01 00:34:16 +02:00
Zoltan Varga 02ffe591f7 [runtime] Fix the method stored in the WrapperInfo for delegate-invoke wrappers for shared methods. Fixes #43696. 2016-09-01 00:25:38 +02:00
Bernhard Urban 4e8e5369ae [mini] emit sequence point before branching off for tail call 2016-08-31 22:36:19 +02:00
Niklas Therning 89ce2b94f3 Merge pull request #3473 from ntherning/fix-thread-double-close-handle-on-appdomain-unload
Fix for double CloseHandle() on AppDomain unload
2016-08-31 22:08:29 +02:00
Niklas Therning 3452b3d990 Merge pull request #3496 from ntherning/fix-heap-corruption-on-windows
Fixes two heap corruptions in the corlib tests on Windows
2016-08-31 20:22:13 +02:00
Aleksey Kliger (λgeek) 7dc4bb5aca Merge pull request #3395 from lambdageek/dev/handles-strings
[runtime] Use coop handles in some String-returning icalls
2016-08-31 13:23:52 -04:00
Niklas Therning e8fd99043a Fixes two heap corruptions in the corlib tests on Windows
The patch of mono/metadata/marshal.c makes sure that
Marshal.StringToHGlobalAnsi() allocates a memory area for the returned C
string which is at least as large as the length of the string object. This is
the behavior on non-Windows platforms. Without this patch the
MarshalTest.StringToHGlobalAnsiWithNullValues() test wrote outside of a memory
area and corrupted the heap which later on caused a heap corruption crash when
running the corlib test suite on Windows.

The patch of mono/metadata/mono-security.c fixes the freeing of the memory
returned by GetNamedSecurityInfoW(). When GetNamedSecurityInfoW() is used to
request a DACL one must also pass an argument for the ppSecurityDescriptor
parameter and this is the one that should be freed later on, not the pointer
to the DACL as the original code used to free. Before this patch
DSACryptoServiceProviderTest.UseMachineKeyStore() crashed because of a heap
corruption.
2016-08-31 19:11:24 +02:00
Marek Safar 07f9a6fc17 Bump cecil 2016-08-31 16:28:02 +02:00
Alexander Köplinger 882749b0b2 Merge pull request #3494 from akoeplinger/netstd-fixes
Expose a few more types/methods for netstandard
2016-08-31 13:52:49 +02:00
Alexander Köplinger 02d1ff2d38 [corlib] Add Environment APIs that take EnvironmentVariableTarget on mobile
We only do something when target is "Process", this matches CoreFX behavior.
2016-08-31 13:33:53 +02:00
Alexander Köplinger 19dae8eb86 [System.Core] Add a couple of System.IO.Pipes classes to the mobile profiles
These are required for netstandard parity.
2016-08-31 13:15:14 +02:00
Marek Safar 999fb3c8d1 [System] HttpWebRequest::Headers setter was only setting local variable. Fixes #42408 2016-08-31 12:13:12 +02:00
Bernhard Urban 913d6f9c56 Merge pull request #3470 from lewurm/fix-aot-compiler-toolchain-ld-invoke
[aot] fix linker invocation
2016-08-31 11:45:58 +02:00
Marek Safar 3bfbaa165d Merge pull request #3487 from marek-safar/rs-Threading
[corlib] Flow CultureInfo from parent thread. Fixes #43193
2016-08-31 07:57:02 +02:00
Marek Safar 4b5eace32d Merge pull request #3489 from akoeplinger/fix-latin1-surrogatepair
[corlib] Fix replacement of UTF-16 surrogate pairs in Latin1Encoding
2016-08-31 07:52:38 +02:00
Zoltan Varga e15f21ba18 Only set the attached flag when a client attaches (#3490)
In defer mode, the debugger thread is started as soon as possible before
any clients are attached, but the debugger is_attached flag was being set
immediately. This would cause the runtime (and the System.Diagnostics.Debugger
class) to wrongly report a client as being attached.

Originally fixed in the Unity fork here: https://github.com/Unity-Technologies/mono/commit/797a210e0f2416d779c448bb9e03bb16933e261f
2016-08-31 02:56:54 +02:00
Josh Peterson f4128e317e Only set the attached flag when a client attaches
In defer mode, the debugger thread is started as soon as possible before
any clients are attached, but the debugger is_attached flag was being set
immediately. This would cause the runtime (and the System.Diagnostics.Debugger
class) to wrongly report a client as being attached.

Originally fixed in the Unity fork here: https://github.com/Unity-Technologies/mono/commit/797a210e0f2416d779c448bb9e03bb16933e261f
2016-08-30 20:49:47 -04:00
Rodrigo Kumpera 4f6fb3002d Merge pull request #3488 from Unity-Technologies/threadpool-unhandled-exception-policy-legacy
Always clear thread abort exception for internal/threadpool threads
2016-08-30 15:44:20 -07:00
Alex Rønne Petersen 2b03fe54d7 Merge pull request #3481 from alexrp/master
Even more profiler fixes/improvements
2016-08-31 00:23:43 +02:00
Alex Rønne Petersen 2db49df290 Merge pull request #3464 from alexrp/arm64-native-atomics
[runtime] Fix C and LLVM atomics on ARM64
2016-08-30 21:47:14 +02:00
Alex Rønne Petersen 24b1ec360e [utils] Remove ia64-specific atomics/membar code.
All ia64 compilers have intrinsics that we use. Also, this ia64 code was very
out of date (missing many functions we use now) so it wouldn't compile anyway.
2016-08-30 21:12:32 +02:00
Alex Rønne Petersen 062ccc0d7e [llvm] Fix atomic opcodes on ARM64 to emit correct fences.
This is a workaround. It's needed for the same reason that we need the fix for
Clang's atomic intrinsics in mono/utils/atomic.h.
2016-08-30 21:12:32 +02:00
Alex Rønne Petersen 66fa2d770d [utils/atomic] Fix native atomic intrinsics on buggy ARM64 compilers.
See the comment in atomic.h for details.
2016-08-30 21:12:32 +02:00
Alex Rønne Petersen b23579f4a0 [utils] Add a MONO_GNUC_VERSION macro. 2016-08-30 21:12:32 +02:00
Marek Safar 54ea12e4fa [corlib] Flow CultureInfo from parent thread. Fixes #43193 2016-08-30 20:42:25 +02:00
Alexander Köplinger cc22315b6f [corlib] Fix replacement of UTF-16 surrogate pairs in Latin1Encoding
When encoding a UTF-16 C# string into bytes using "latin-1"/"iso-8859-1" encoding we were
not properly taking surrogate pairs into account. MSDN[1] provides a good introduction about the topic.

For example, this string would fail to encode and throw an IndexOutOfRangeException: "\ud83d\ude0a "
However, this string would not: "\ud83d\ude0a" (note missing space at the end). More on that later.

In https://bugzilla.xamarin.com/show_bug.cgi?id=42887 it was noted that encoding the string
didn't cause the exception on Mono 2.10.8.1 and 3.2.8. Indeed, it doesn't happen until Mono 4.0
where we switched most of the string code to referencesources.

While looking at the output of `Encoding.GetEncoding("latin1").GetBytes("\ud83d\ude0a ")` on the
"working" Mono verions I noticed that they essentially returned wrong results, e.g.:

```
csharp> Encoding.GetEncoding("latin1").GetBytes("\ud83d\ude0a ")
{ 63, 32, 0 }
```

This is wrong, because a) there's only one 63 (i.e. the '?' question mark char which is used as
a replacement char whenever the target encoding doesn't support a specific char,
and b) there is a trailing '\0' which should not be there.

Checking on .NET confirms the expected result: { 63, 63, 32 } i.e. '?? '

Back to the IndexOutOfRangeException in Mono 4.0+: digging into Latin1Encoding.InternalGetBytes() it
turns out that when we detect a surrogate pair we were incrementing charIndex, but we didn't decrement count.
This means that after the fallback characters (the two '?') were added we would still try to encode one more
char in the loop even though we're already at the end of the string, resulting in the exception.
For the "\ud83d\ude0a" example we would not hit the `count > 1` code path which made it work in this case.

Adding the decrement fixes the bug and makes the code consistent with MonoEncoding.cs[2].

The reason why it "worked" in earlier Mono versions was that we had a very simple EncoderReplacementFallbackBuffer
implementation[3] which only output a single '?' for the surrogate pair:

```
csharp> var buf = Encoding.GetEncoding("latin1").EncoderFallback.CreateFallbackBuffer()
csharp> buf.Fallback((char)0xD800, (char)0xDC00, 0)
true
csharp> buf.GetNextChar()
'?'
csharp> buf.GetNextChar()
'\x0

csharp> buf.Fallback((char)0xD800, (char)0xDC00, 0)
true
csharp> buf.GetNextChar()
'?'
csharp> buf.GetNextChar()
'?'
csharp> buf.GetNextChar()
'\x0'
```

This means that for the "\ud83d\ude0a " example from above we would only add one '?' character
for the surrogate pair to the result buffer, then the space and then we'd be done, leaving the
uninitialized array value 0 in the buffer on index 2.

I added tests for Latin1Encoding, mostly copied from ASCIIEncoding with additions for these
specific cases.

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

[1] https://msdn.microsoft.com/en-us/library/ms404377(v=vs.110).aspx
[2] https://github.com/mono/mono/blob/5b69e839e12b3d3512f310aa5a0e873346d7e50e/mcs/class/I18N/Common/MonoEncoding.cs#L62-L66
[3] https://github.com/mono/mono/blob/mono-3.12.0-branch/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs
2016-08-30 20:36:20 +02:00
Marek Safar 5b69e839e1 Merge pull request #3477 from Unity-Technologies/create-delegate-exception
Throw an ArgumentException when a delegate is bound to an open generi…
2016-08-30 19:05:29 +02:00
Jonathan Chambers 968b23e5da Reset thread abort exception for internal threads regardless of unhandled exception policy. 2016-08-30 11:32:53 -04:00
Josh Peterson 2a6e768884 Make improvments after code review:
* Use mono_set_pending_exception instead of mono_raise_exception
* Make the test an nunit test instead of a runtime test.
2016-08-30 10:46:02 -04:00
Ludovic Henry 57f8cb189f [mono-threads] Use create_suspended_sem on windows (#3482) 2016-08-30 12:45:53 +02:00
Marek Safar 76a61357ef Merge pull request #3483 from alexavator/bugfix-keepalive
[System] Set KeepAlive flag for HttpWebRequest
2016-08-30 11:02:43 +02:00
Pozdeev b7754c85fd [System] Set KeepAlive flag for HttpWebRequest 2016-08-30 13:36:21 +05:00
Ludovic Henry e8a221683d [pedump] Fix assertion error
We would previously observe the following crash:

```
ludovic-laptop :: ~/Xamarin/mono ‹16c07b5› » (cd tools/pedump && MONO_PATH=../../mcs/class/lib/net_4_x lldb -- ./pedump --verify metadata,code ../.././mono/tests/xdomain-threads.exe)
(lldb) target create "./pedump"
Current executable set to './pedump' (x86_64).
(lldb) settings set -- target.run-args  "--verify" "metadata,code" "../.././mono/tests/xdomain-threads.exe"
(lldb) r
Process 14407 launched: './pedump' (x86_64)
mono_os_mutex_lock: pthread_mutex_lock failed with "Invalid argument" (22)
Process 14407 stopped
* thread #1: tid = 0x27c9715, 0x00007fff93cfcf06 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff93cfcf06 libsystem_kernel.dylib`__pthread_kill + 10
	libsystem_kernel.dylib`__pthread_kill:
	->  0x7fff93cfcf06 <+10>: jae    0x7fff93cfcf10            ; <+20>
	    0x7fff93cfcf08 <+12>: movq   %rax, %rdi
        0x7fff93cfcf0b <+15>: jmp    0x7fff93cf77cd            ; cerror_nocancel
	    0x7fff93cfcf10 <+20>: retq
(lldb) bt
* thread #1: tid = 0x27c9715, 0x00007fff93cfcf06 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff93cfcf06 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff8b9b74ec libsystem_pthread.dylib`pthread_kill + 90
	frame #2: 0x00007fff908d56e7 libsystem_c.dylib`abort + 129
	frame #3: 0x000000010022da6a pedump`monoeg_log_default_handler(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, message="mono_os_mutex_lock: pthread_mutex_lock failed with \"Invalid argument\" (22)", unused_data=0x0000000000000000) + 202 at goutput.c:231
	frame #4: 0x000000010022d98d pedump`monoeg_g_logv(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, format="%s: pthread_mutex_lock failed with \"%s\" (%d)", args=0x00007fff5fbff4a0) + 109 at goutput.c:111
	frame #5: 0x000000010022dbd9 pedump`monoeg_g_log(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, format="%s: pthread_mutex_lock failed with \"%s\" (%d)") + 361 at goutput.c:121
	frame #6: 0x000000010022301e pedump`mono_os_mutex_lock(mutex=0x00000001002ec630) + 110 at mono-os-mutex.h:98
	frame #7: 0x0000000100223a66 pedump`mono_w32handle_new(type=MONO_W32HANDLE_PROCESS, handle_specific=0x00007fff5fbff540) + 246 at w32handle.c:440
	frame #8: 0x00000001001ef8bb pedump`_wapi_processes_init + 123 at processes.c:1149
	frame #9: 0x00000001001fbcc3 pedump`wapi_init + 19 at wapi.c:23
	frame #10: 0x0000000100116486 pedump`mono_init_internal(filename="pedump", exe_filename=0x0000000000000000, runtime_version="v4.0.30319") + 102 at domain.c:528
	frame #11: 0x0000000100117124 pedump`mono_init_version(domain_name="pedump", version="v4.0.30319") + 36 at domain.c:868
	frame #12: 0x0000000100001496 pedump`verify_image_file(fname="../.././mono/tests/xdomain-threads.exe") + 678 at pedump.c:466
	frame #13: 0x0000000100000f87 pedump`main(argc=4, argv=0x00007fff5fbff9a0) + 1095 at pedump.c:708
	frame #14: 0x00007fff93e655ad libdyld.dylib`start + 1
```

That would be because the w32handle wouldn't be initialized before calling into `wapi_init` which allocates w32handle.
2016-08-30 10:26:04 +02:00
Ludovic Henry 16c07b50f3 Merge pull request #3476 from lambdageek/fix-conc-ht
[test-conc-hashtable] Init w32 handles. Fixes OSX+coop.
2016-08-30 10:04:32 +02:00
Alex Rønne Petersen 9a14246053 [profiler] Reject heapshot requests if we're not in on-demand mode.
Previously, we would try to satisfy the heapshot request every single time
process_requests () was invoked, but since heap_walk () would never unset
heapshot_requested, we'd end up doing GCs over and over, causing massive
overhead.
2016-08-30 10:01:07 +02:00
Alex Rønne Petersen 39951e43ef [profiler] Process on-demand heapshot requests on the finalizer thread.
This way, we avoid attempting to fully attached the helper thread when it's
already a tools thread, which can lead to all sorts of problems.
2016-08-30 10:01:06 +02:00
Alex Rønne Petersen 16ea17a5e1 [profiler] Add GC finalization events to the format. 2016-08-30 10:01:06 +02:00
Alex Rønne Petersen 0c0e3702a4 [gc] Expose mono_gc_pending_finalizers () and mono_gc_finalize_notify () as public API.
We need these in the profiler, but they are also generally useful functions
that embedders may very well want to use.
2016-08-30 10:01:06 +02:00
Alex Rønne Petersen 138adfc043 [profiler] Add GC finalization callbacks to the profiler API. 2016-08-30 10:01:06 +02:00
Alex Rønne Petersen 8310af2230 [profiler] Initialize counters in the runtime_initialized () callback.
This way, we don't have to depend on the counters subsystem having been
initialized when the profiler library is loaded (very early).
2016-08-30 10:01:06 +02:00
Alex Rønne Petersen 7240d72222 [profiler] Normalize time fields in the format.
All events now come with a time field right after the event byte, and it is
encoded in the same way for all events (based on LogBuffer.time_base).

This allows readers to queue up events until a sync point event, then sort all
of those events by time, and process them in the order they were actually
written in.
2016-08-30 10:01:05 +02:00
Alex Rønne Petersen 41dc6f631c [profiler] Make the comment in proflog.c only represent the latest version of the format.
Maintaining it for every format version is getting unwieldy and most readers
likely won't care about ancient format versions. Further, we haven't really
stabilized the format yet, so documenting every iteration of it doesn't make
a whole lot of sense. Finally, if somebody does care about older versions,
they can simply look in decode.c to see how mprof-report deals with them.
2016-08-30 10:01:05 +02:00
Alex Rønne Petersen bdd9db1ed1 [profiler] Fix a few format bloat and encoding issues since we're bumping the format version.
* Methods in backtraces are now properly encoded based on the method_base
  rather than the ptr_base.
* The unused IL and native offset fields in TYPE_SAMPLE_HIT's backtrace frame
  format have been removed.
* The unused flags fields in the backtrace format and in metadata events have
  been removed.
* Changed a number of fields to be encoded as a single byte instead of LEB128.
2016-08-30 10:01:05 +02:00
Alex Rønne Petersen 02d148fd88 [profiler] Emit sync point events when flushing all buffers.
These events basically establish points in the event stream where all previous
events can be processed and a complete view of the profiling state can be
formed. For instance, if an allocation event for object A of type T was seen
before a sync point, then it's guaranteed that the class load event for T also
came before that sync point (although it may have arrived after the allocation
event for A).
2016-08-30 10:01:05 +02:00
Alex Rønne Petersen 4f62b5af43 [profiler] Acquire the exclusive buffer lock after the suspend lock.
This prevents possible STW deadlocks.
2016-08-30 10:01:05 +02:00
Alex Rønne Petersen 25edbd406f [profiler] Only flush buffers when they exceed the base capacity.
Other than timely arrival, there was never really a need to force buffers to be
flushed at these arbitrary points. Now that we flush all buffers periodically,
that reason is no longer relevant.
2016-08-30 10:01:04 +02:00
Alex Rønne Petersen a34946226e [profiler] Process requests in enter/leave callbacks regardless of call depth.
Heapshots have nothing to do with call depth, so they should be processed in
any case.

Also flush the local buffer in all enter/leave callbacks if needed.
2016-08-30 10:01:04 +02:00
Alex Rønne Petersen 2ccdecec40 [profiler] Periodically flush all thread-local buffers.
This ensures that even for low-activity threads, it won't take ages before the
events from it arrive. We do this flush every 1sec (as with sampling of perf
counters).
2016-08-30 10:01:04 +02:00
Alex Rønne Petersen 12e4a840ae [profiler] Implement global flush points for thread-local buffers.
The problem is this: Given an allocation of object O on address A1 in thread T1
and a subsequent GC move of O from A1 to A2 in T2, if T2's event buffer is
flushed before T1's buffer, the reader of the log file will a seemingly
nonexistent object being moved, and then see the actual allocation of that
object later. This makes it extremely difficult to keep track of the managed
heap.

The way we solve this is by flushing all thread-local buffers when the GC stops
the world. This way, we know that all prior allocations in the program have
been committed to the log file before any moves that are about to follow as
part of the collection. Similarly, we flush the GC thread's buffer before
restarting the world to ensure that all moves are committed before allocations
that may happen later (which could use some of the addresses freed up for use
due to the moves).

This is reasonably easy now that we have a global LLS of threads which are
attached to the profiler. However, we have to use some kind of lock to ensure
that buffers aren't being written to while we're trying to flush them, or that
a suspended thread was in the middle of modifying its buffer. For this, we use
a reader/writer spin lock of sorts, somewhat similar to the lock used by the
SGen binary protocol. When threads are modifying their own buffer (whether it
be writing to it or flushing it), they take the reader lock. This means that
many different threads can be operating on their own buffers without any lock
contention (which would kinda defeat the purpose of the thread-local buffers).
Now, when a thread -- such as the thread that initiated a GC -- wants to access
the buffers of other threads, it takes the writer lock. In doing so, all other
threads are prevented from modifying their own buffers. This gives the thread
holding the writer lock an opportunity to flush the buffers of other threads.
2016-08-30 10:01:04 +02:00
Alex Rønne Petersen ed552792d4 [utils/threads] Export mono_thread_info_yield () for use in the profiler. 2016-08-30 10:01:04 +02:00
Alex Rønne Petersen 869585c2a6 [profiler] Remove LogBuffer.locked and related debugging code.
This hasn't been needed for a long time.
2016-08-30 10:01:03 +02:00
Alex Rønne Petersen 928b840dad [profiler] Rewrite TLS code.
* Actual thread-local state is now stored in a MonoProfilerThread struct which
  is stored in a single TLS slot per thread. This avoids storing things like
  call_depth in LogBuffer. The current LogBuffer of a thread is also stored in
  the MonoProfilerThread.
* All MonoProfilerThread structs are stored in a global linked list set. This
  LLS is used to manually clean up the thread-local state of threads that, for
  whatever reason, don't have the thread_end () callback invoked.
* Lifetime management of thread-local buffers is now much more straightforward.
* The thread-local list of referenced methods is now only allocated if needed.
* Fixed a MethodInfo memory leak in handle_writer_queue_entry ().
* Fixed some class load events that could be lost in the writer thread when
  fetching the full name of a method.
* TLS slots are now actually freed on shutdown.
2016-08-30 10:01:03 +02:00
Alex Rønne Petersen 91af66e4ab [profiler] Implement process_id () for Windows. 2016-08-30 10:01:03 +02:00
Alex Rønne Petersen 9008efcc56 [utils/lls] Export the linked list set API for use in the profiler.
Also exported a couple of hazard pointer functions used by the LLS macros.
2016-08-30 10:01:03 +02:00
Alex Rønne Petersen 64e35f6d8b [utils/lls] Use mono_thread_hazardous_queue_free () instead of mono_thread_hazardous_try_free ().
We cannot use the latter as we do not know whether the free function is safe to call.
2016-08-30 10:01:03 +02:00
Alex Rønne Petersen c2d170ab30 [utils/lls] Rename get_hazardous_pointer_with_mask () to mono_lls_get_hazardous_pointer_with_mask (). 2016-08-30 10:01:02 +02:00
Alex Rønne Petersen 7352d60f62 [utils/hp] Rename get_hazardous_pointer () to mono_get_hazardous_pointer (). 2016-08-30 10:01:02 +02:00
Alex Rønne Petersen e25f0dd1e7 [utils/hp] Remove HazardFreeLocking and HazardFreeContext enums.
These are no longer useful in the new hazard free API.
2016-08-30 10:01:02 +02:00
Alex Rønne Petersen f8a716f1f0 [profiler] Only forward declare structs that need it. 2016-08-30 10:01:02 +02:00
Zoltan Varga f7a57d5f08 Revert "[runtime] Fix pedump by using the normal embedding APIs instead of in…" (#3479) 2016-08-30 00:01:18 +02:00
Rodrigo Kumpera 770ca46e08 Merge pull request #3478 from vargaz/fix-pedump
[runtime] Fix pedump by using the normal embedding APIs instead of in…
2016-08-29 17:51:30 -04:00
Zoltan Varga a9c75b075c [runtime] Fix pedump by using the normal embedding APIs instead of initializing parts of the runtime. Fixes #43786. 2016-08-29 22:37:31 +02:00
monojenkins 66fd6fd24d Merge pull request #3422 from xmcclure/tarjan-doublefan
Make GC bridge perform well in the "double fan" scenario

The GC bridge currently performs VERY poorly when the object graph has a "double fan" shape. If M Java objects point to 1 C# object which points to N Java objects, the graph exported to Monodroid will currently drop the C# object node and replace it with (M\*N) edges. It is easy to write code where (M\*N) grows ludicrously big.

In testing on device, this patch solves that problem while leaving other cases unaffected. In testing on device, I found:
* All performance tests except double fan: No discernible performance difference after patch
* Double fan test with M=N=1000: Before the patch this took between three and seven seconds. After the patch this took between 0.2 and 0.3 seconds.
* Double fan test with M=N=4000: Before the patch this took anywhere from one to two minutes. After the patch, this took about 1.2 seconds.
* Double fan test with M=N=6000: Before the patch, this took so long I was not able to get it to ever complete. After the patch, this took about 1.3 seconds.
* Double fan test with M=N=20000: I did not attempt this test pre-patch. After the patch, it took about 5.6 seconds.

The commit messages describe the changes in some detail but the short version is:
* Add a mechanism for exporting non-bridged SCCs to the bridge client
* Turn that mechanism on whenever the product fanin*fanout grows too large
* Make the merge cache more aggressive

To function, this patch requires a corresponding change to monodroid. See https://github.com/xamarin/xamarin-android/pull/154
2016-08-29 22:30:06 +02:00
Marek Safar c8c09310f9 [Facades] Remove private facade 2016-08-29 21:41:14 +02:00
Marek Safar 3c045871b5 Merge pull request #3463 from david-mitchell/al-platform-switch
Add missing switch and functionality to al.
2016-08-29 21:31:33 +02:00
Andi McClure 40a1b5afe5 GC bridge: Fix non-buildable assert ()s added in previous commits 2016-08-29 14:34:22 -04:00
Alex Rønne Petersen 6a5599d71e Merge pull request #3468 from alexrp/hwcap-improvements
[utils/hwcap] Clean up and improve the hwcap code.
2016-08-29 20:26:46 +02:00
Andi McClure c300a36dbc GC bridge: Move bridge-require-precise-merge to MONO_GC_PARAMS
This was previously in MONO_GC_DEBUG, but we do not use this for
production-viable flags.
2016-08-29 13:48:48 -04:00
Marek Safar 57497c6e33 [corlib] Improve CanceledContinuationExecuteSynchronouslyTest test 2016-08-29 18:39:14 +02:00
Josh Peterson eaaf9b498f Throw an ArgumentException when a delegate is bound to an open generic method.
* This change was made in Unity's old version of Mono at: https://github.com/Unity-Technologies/mono/commit/9e27edaec9a91a75d6ebf0d21654dedcab74653d
2016-08-29 12:23:13 -04:00
David Mitchell 6fcc60e1c9 Add missing switch and functionality to al.
When running msbuild on mono against an architecture-specific
project that also defines satellite assemblies, the /platform
switch will be passed to al.exe. Mono's implementation of al.exe
does not support this switch, which results in a failed build.

This commit adds the /platform switch, which also required
changing the implementation from System.Reflection to
IKVM.Reflection because Mono's implementation of AssemblyBuilder
does not support the necessary options.

While testing this change, I also noticed a few attributes that
the MS version of al.exe will copy from "template" assemblies,
so I added support for those, as well.
2016-08-29 09:17:24 -07:00
Aleksey Kliger f61f855794 [runtime] Use coop handles in some String-returning icalls
Also begin adding handle definitions for some System.Reflection classes
when needed.
2016-08-29 12:12:57 -04:00
Marek Safar f16a7daaf1 [mcs] Add reference to parent storey when current value type async storey needs fabricated this access. Fixes #40860 2016-08-29 18:04:14 +02:00
Aleksey Kliger 2ef81c56cd [test-conc-hashtable] Init w32 handles. Fixes OSX+coop. 2016-08-29 11:57:31 -04:00
Zoltan Varga a35f78db32 [llvm] Fix the arm cross compiler build when using llvm 3.9. 2016-08-29 16:49:17 +02:00
Marek Safar eb42f74662 Merge pull request #3453 from ntherning/cleanup-AssemblyTest-temp-file-handling
Cleanup temp file handling in AssemblyTest
2016-08-29 16:46:04 +02:00
Niklas Therning b90617e7b7 Cleanup temp file handling in AssemblyTest
SetUp() already sets up a temp folder for the test methods and TearDown()
handles cleaning up and taking into account that on Windows, loaded assemblies
cannot be deleted. However, some of the tests created temp files outside of
this folder and had their own cleanup code which didn't expect temp files to
be undeletable on Windows.

This patch removes any custom temp file creation/cleanup from individual test
methods. It also slightly changes the way SetUp() created the temp folder for
each test, now the paths will be shallower.
2016-08-29 14:27:00 +02:00
Niklas Therning 2d407e62e6 Fix for double CloseHandle() on AppDomain unload
When AppDomain.Unload() is called a new thread is created and attached. When
this thread is done the thread handle is immediately closed using
CloseHandle() but the same handle is also passed to CloseHandle() later on by
the InternalThread destructor. On the second CloseHandle() call Windows will
abort the process with an "Invalid handle" error.

This patch removes the CloseHandle() calls in mono_domain_try_unload() which
is called by AppDomain.Unload(). The patch also wires up some more functions
in mono/utils/mono-threads-windows.c to set the MonoThreadInfo.handle field to
NULL when a thread has exited.
2016-08-29 14:00:48 +02:00
Bernhard Urban fc5305d2af [aot] fix linker invocation
fixes regression introduced by 7d238ddd5e
2016-08-29 12:06:30 +02:00
Alex Rønne Petersen 20d221e596 [utils/hwcap] Clean up and improve the hwcap code.
* Get rid of the arch-specific headers.
* Do verbose printing in one place.
* Simplify the cross compilation case to avoid repetition.
* Define all variables with a macro in a single header.
* Print detected hwcap info via g_print () so it's visible on mobile.
* Expose plain bool variables in the s390x implementation.
2016-08-29 06:38:53 +02:00
Miguel de Icaza 39e345a0e5 [runtime] Bundle support, implement missing stream processing (#3423) 2016-08-27 21:51:53 -04:00
Alexander Köplinger 448da87d44 [corlib] Fix Marshal test to not rely on Assert.Less
It doesn't work on nunitlite e.g. on XA:

```
src/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs(268,11): error CS0117: `NUnit.Framework.Assert' does not contain a definition for `Less'
```
2016-08-27 21:24:45 +02:00
Aleksey Kliger (λgeek) 783593ac12 [runtime] ves_icall_AssemblyBuilder_InternalAddModule is dead code (#3461)
There is no System.Refleciton.Emit.AssemblyBuilder::InternalAddModule method
2016-08-26 17:46:11 -04:00
Vlad Brezae 3806fa0d2c Merge pull request #3451 from BrzVlad/fix-armel-emulation
[arm] Fix armel no fp
2016-08-26 23:57:29 +03:00
Alexander Köplinger 91b2f2d620 Merge pull request #3460 from akoeplinger/remove-net_4_5-ifdef
[mcs] Remove NET_4_5 ifdef from the source files
2016-08-26 21:21:55 +02:00
Alexander Köplinger 94e60c50bf Merge pull request #3459 from akoeplinger/fix-parameter-names
[bcl] Fix method parameter names to match .NET
2016-08-26 21:18:07 +02:00
Alexander Köplinger 3b167e0671 Merge pull request #3457 from akoeplinger/fix-gethrforexception
[corlib] Return e.HResult instead of PlatformNotSupportedException/-1 for Marshal.GetHRForException
2016-08-26 20:58:59 +02:00
Andi McClure d00831f52b PR feedback: Add a runtime switch for the aggressive SCC merging
Previously every time we add a new runtime setting for the bridge
processor we have added a new callback for it. Because this is getting
unweildy, and also because some of these settings might have been
broken by recent init order changes, I created a new set_config
callback and merged the existing set_dump_prefix and enable_processing
with it.
2016-08-26 14:13:44 -04:00
Andi McClure 9bd7907af5 PR feedback: Corrections to aggressive merge cache
hash_perturb was being mixed in in the wrong place. Fix that, also
make the hash function take some input from high bits on 64-bit
systems, also make the types around the hash more reasonable.
2016-08-26 15:00:37 -04:00
Zoltan Varga b1ef3a57d0 [sre] Remove TypeBuilder::create_internal_class () icall, it doesn't seem to be needed. (#3458) 2016-08-26 19:56:12 +02:00
Alexander Köplinger c4692001a9 [bcl] Fix method parameter names to match .NET
The names were fixed only for the subset of methods that are included in netstandard,
and in cases where netstandard differs from Desktop .NET we match with .NET.
2016-08-26 17:49:03 +02:00
Alexander Köplinger d7967505ff Fix tarball build
emitnunit.pl was removed in d3129a7624
2016-08-26 17:31:32 +02:00
Alexander Köplinger 055d9416c4 [corlib] Return e.HResult instead of PlatformNotSupportedException/-1 for Marshal.GetHRForException
Follow what coreclr/corefx does now: https://github.com/dotnet/coreclr/pull/6929.
2016-08-26 17:20:47 +02:00
Zoltan Varga 8c1ef41894 [runtime] Remove most of the contents of MonoDynamicGenericClass, the… (#3441)
* [runtime] Remove most of the contents of MonoDynamicGenericClass, the elements of the 'fields' array are not used anywhere, making all the other fields unneccesary too.

* [runtime] Remove the MonoDynamicGenericClass structure, merge it into MonoGenericClass. Add some comments.
2016-08-26 12:32:05 +02:00
Zoltan Varga 8963cc85bf [jit] Add an assert to the native types code to make sure we are using the matching managed assembly. 2016-08-26 12:02:54 +02:00
Zoltan Varga dcd650d6fc [llvmonly] Initialize native-to-managed wrappers when they are loaded instead of on the first call, since the call might be made on a thread not attached to the runtime. Fixes #43357. 2016-08-25 22:18:45 +02:00
Zoltan Varga 20b49905f2 [jit] Fix an assertion on amd64 when using fixed size buffers and pinvoke. Fixes #33571. 2016-08-25 20:35:25 +02:00
Marek Safar 01038e7c2d [corcompare] Show extension argument changes. Make parameter name difference breaking change. 2016-08-25 18:28:57 +02:00
Marek Safar 6d1a78e35a [mcs] Don't crash when as operand cannot be resolved. Fixes #43718 2016-08-25 18:28:57 +02:00
Marek Safar 0a37c37c77 [mcs] Correctly detect catch resume point marker in scope of resume points. Fixes #43636 2016-08-25 18:28:57 +02:00
Niklas Therning 83e7e0822e Validate AppDomainSetup.ApplicationBase path more like .NET does
On Windows we should check the path for invalid characters. Also expand
relative paths set using file:// URLs like .NET does. This patch also removes
the code which prepends "//" on Windows when a file:// URL is given as .NET
doesn't seem to do that in more recent versions.
2016-08-25 18:25:17 +02:00
Ludovic Henry e3ff1ef240 Merge pull request #3447 from ludovic-henry/iolayer-extract-threading
[threads] Get thread handle from MonoThreadInfo when attaching
2016-08-25 15:55:15 +02:00
Vlad Brezae d3962a8a80 [jit] Don't lower store_r4 and load_r4 on armel with no fp
When having a float variable in memory, we should always access its contents through the fload_r4/fstore_r4 funcs, which do the conversion between float and double and different memsize vs var size. It is common case, to have a temp float, have its address loaded with ldaddr and later do a load_r4_membase on that address to access the contents. If alias analyis lowers this load_r4_membase to an op_fmove directly on the register pair, this would in turn be decomposed into 2 simple int op_moves on soft float, which is wrong if these op_moves are converted to memory accesses.
2016-08-25 11:55:46 +00:00
João Matos ad34387f2c Merge pull request #3449 from lateralusX/jlorenss/win-add-missing-source-file
Add missing source file, sgen-os-coop.c, to libmonoruntime Visual Studio project.
2016-08-25 11:39:54 +01:00
Vlad Brezae 208d127b0f [arm] Fix opcode emulation on armel with no fp
Even though we register emulations for these opcodes, the native function doesn't not map to the opcode logic, being used instead as part of the opcode decomposition along with other instructions. Make sure we don't try to emulate these opcodes through the general emulation pass.
2016-08-25 10:15:16 +00:00
lateralusX 9393bb86e1 Add missing source file, sgen-os-coop.c, to libmonoruntime Visual Studio project.
Add missing source file, sgen-os-coop.c to project.

Add source files and headers into correct filters (Header/Source Files).

Eliminated Visual Studio linker warning LNK4221 for libmonoruntime project generated
by empty source files under certain configurations, boehm-gc.c, lock-tracer.c,
null-gc.c and sgen-os-coop.c
2016-08-25 11:14:33 +02:00
Alexander Köplinger dfbd2bcf82 Merge pull request #3437 from ntherning/fix-DirectoryNotFoundException-thrown-in-FileInfoTest.MoveTo_DestFileName_DirectoryDoesNotExist-on-windows
FileInfo.MoveTo() throws DirectoryNotFoundException rather than FileNotFoundException on Windows when target doesn't exist
2016-08-24 23:38:29 +02:00
Andi McClure 48e498d1cf PR feedback: Formatting, comments, asserts 2016-08-24 15:33:00 -04:00
Ludovic Henry bed939e9f7 [threads] Get thread handle from MonoThreadInfo when attaching 2016-08-24 20:56:24 +02:00
Ludovic Henry 9a54e8d226 Merge pull request #3439 from ludovic-henry/iolayer-extract-threading
[mono-threads] Create Win32 handle when attaching the thread
2016-08-24 20:54:04 +02:00
Alexander Köplinger 399de6b18c Merge pull request #3444 from akoeplinger/fix-netstandard-extensions
[Facades] Implement methods for *Extensions types that are available on the extended type
2016-08-24 20:05:08 +02:00
Alexander Köplinger 0196e9a169 [mini] Wrap error output for NUnit xml in CDATA section
Makes sure that characters like <> (which appear in stack traces) don't confuse the XML parser.
2016-08-24 18:38:23 +02:00
Marek Safar cbffc5e908 [monosymbolicate] Add pdb detection 2016-08-24 17:05:58 +02:00
Ludovic Henry 6c6b7b3f50 [mono-threads-windows] Allocate ThreadStartInfo on the stack 2016-08-24 16:39:18 +02:00
Ludovic Henry fb50573d53 [mono-threads] Create Win32 handle when attaching the thread
This guarantee that a MonoThreadInfo always has a handle.
2016-08-24 16:39:17 +02:00
Ludovic Henry 9f00edd1b4 [w32handle] Remove unused assertions 2016-08-24 16:39:16 +02:00
Ludovic Henry e5a4d23fc7 [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).
2016-08-24 16:39:15 +02:00
Marek Safar 1b2d5e91fa Merge pull request #3445 from rolfbjarne/cecil-update
[tuner/linker] Update code to fix build errors after cecil update.
2016-08-24 16:11:50 +02:00
Marek Safar b430545e06 Revert "[corcompare] Reflects cecil breaking changes"
This reverts commit b0ec389b68.
2016-08-24 16:08:25 +02:00
Rolf Bjarne Kvinge 40abe3056b [tuner/linker] Update code to fix warnings after cecil update. 2016-08-24 15:56:55 +02:00
Marek Safar b0ec389b68 [corcompare] Reflects cecil breaking changes 2016-08-24 15:17:12 +02:00
Niklas Therning 93181627a2 FileInfo.MoveTo() throws DirectoryNotFoundException rather than
FileNotFoundException on Mono on Windows and on .NET when target doesn't exist

FileInfoTest.MoveTo_DestFileName_DirectoryDoesNotExist() expects
FileNotFoundException to be thrown but on Windows a DirectoryNotFoundException
is thrown instead.

This patch changes MoveFile() in mono/io-layer/io.c to set the last error to
ERROR_PATH_NOT_FOUND rather than ERROR_FILE_NOT_FOUND when the destination
path doesn't exist. This results in a DirectoryNotFoundException being thrown
in managed code rather than FileNotFoundException. This is the behaviour
observed in .NET.

Also updated FileInfoTest.MoveTo_DestFileName_DirectoryDoesNotExist() to check
for DirectoryNotFoundException rather than FileNotFoundException.
2016-08-24 15:02:59 +02:00
Niklas Therning b72f1d7327 Merge pull request #3443 from ntherning/do-not-pass-FILE_FLAG_OVERLAPPED-to-CreateFile
Don't pass FILE_FLAG_OVERLAPPED to CreateFile()
2016-08-24 15:02:04 +02:00
Alexander Köplinger 186b0adff4 [Facades] Add argument null validation for extension methods 2016-08-24 14:50:21 +02:00
Alexander Köplinger f8db3589fc [Facades] Implement methods for *Extensions types that are available on the extended type
The methods are already available in our implementations of those types so we can just forward the calls
to the "real" types instead of throwing NotImplementedException.

I audited all code in mcs/class/Facades and the only places where we still throw NotImplementedException
are ones where we really need to add a custom implementation.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43695
2016-08-24 13:53:00 +02:00
Alexander Köplinger cce82f1700 [Facades] Make sure "this" is added to the type extensions
It was missing on a few methods.
2016-08-24 13:46:41 +02:00
Alexander Köplinger fd8c6c1956 [Facades] Throw PlatformNotSupportedException instead of NotImplementedException for ServiceController on mobile
It's unlikely the ServiceController APIs will be supported on mobile since they don't really make sense there,
they were initially designed for controlling Windows Services.
2016-08-24 13:46:40 +02:00
Marek Safar 11fb0e399f Merge pull request #3436 from ntherning/fix-alt-dir-separator-not-replaced-in-Path.CleanPath
Path.CleanPath() does not always replace AltDirectorySeparatorChar
2016-08-24 13:17:24 +02:00
Rolf Bjarne Kvinge 59260ced5a [linker] Mark declaring types of nested types resolved from xml descriptors. Fixes #43658. (#3434)
If the declaring type of a nested type marked by an xml descriptor
is not otherwise marked, the members of the nested type will not
be preserved, because the linker will not process the nested type
(since the parent type isn't marked, MarkStep:InitializeAssembly
will skip it, and thus skip akk its nested types as well).

https://bugzilla.xamarin.com/show_bug.cgi?id=43658
2016-08-24 12:12:48 +02:00
Niklas Therning 3b1ebefb7b Path.CleanPath() does not always replace AltDirectorySeparatorChar
If sub == 0, i.e. there are no repeated separators, this method just returns
the input string. On Windows, where DirectorySeparatorChar (\) is different
from AltDirectorySeparatorChar (/), this means that the call

    Path.GetDirectoryName ("foo/bar/dingus")

won't return "foo\bar" as .NET would but rather returns "foo/bar".

This patch makes sure the '/' -> '\' conversion is run when
AltDirectorySeparatorChar characters have been seen in the input string, even
if sub == 0.

PathTest.GetDirectoryName() triggered this bug.
2016-08-24 11:22:39 +02:00
Niklas Therning 1c6422e455 Don't pass FILE_FLAG_OVERLAPPED to CreateFile()
When a FileStream is opened with the FileOptions.Asynchronous flag set the
code in file-io.c will pass FILE_FLAG_OVERLAPPED to the CreateFile() function.
On Windows this means the file will be in asynchronous mode and when
ReadFile()/WriteFile() are called an OVERLAPPED struct has to be passed. Mono
doesn't do this which means that when reading/writing asynchronous FileStreams
Windows returns an ERROR_INVALID_PARAMETER and an exception is raised in
managed code.

This patch simply removes the code which passes the FILE_FLAG_OVERLAPPED to
CreateFile(). This will work since asynchronous I/O is handled in managed code
anyway, using threads. On the OS level the I/O is still synchronous. The patch
won't affect other platforms since the implementation of
ReadFile()/WriteFile()/etc in mono/io-layer/, which is used on non-Windows, is
always synchronous and ignores the FILE_FLAG_OVERLAPPED.

This bug was triggered by the
MonoTests.System.IO.BinaryWriterTest.AsynchronousModeWrites test.
2016-08-24 10:49:23 +02:00
Marek Safar 5adec5a68a [bcl] More netstandard api matching 2016-08-24 00:27:01 +02:00
Alexander Köplinger a156e55b3a Merge pull request #3430 from akoeplinger/simplify-mini-nunit
[mini] Replace emitnunit.pl with simpler Makefile-based xml generation
2016-08-23 21:02:54 +02:00
Alexander Köplinger 4e84bd13f2 Merge pull request #3431 from mhutch/fix-targetframeworkattribute
[xbuild] Fix incremental build of TargetFrameworkAttribute
2016-08-23 19:20:31 +02:00
Niklas Therning cbda28a9a1 Merge pull request #3435 from ntherning/fix-DirectoryInfoTest-assumes-current-dir-is-c-on-windows
Fix for DirectoryInfoTest assuming current dir is C:\ on Windows
2016-08-23 16:46:27 +02:00
Niklas Therning 08efcc3a52 Fix for DirectoryInfoTest assuming current dir is C:\ on Windows
This test assumes that `new DirectoryInfo (@"c:").Name == "C:\"` when run on
Windows but the actual value depends on the current directory. If current dir
is C:\temp the Name property will return "temp". Similar problem in the
FullName() and Parent() tests.

This patch sets the current directory to C:\ explicitly before running the
failing tests on Windows. The current dir is reset in TearDown().
2016-08-23 15:44:54 +02:00
Alexander Köplinger d3129a7624 [mini] Replace emitnunit.pl with simpler Makefile-based xml generation
In an effort to cut down on the number of different scripts we have that try to output NUnit xml.

It also fixes a bug in emitnunit.pl where it would not output anything when one of the tests crashes
the process, because then the final "Overall results: tests: 22425, 100% pass, opt combinations: 25"
line isn't printed and emitnunit.pl just exits. This happens on Alpine.
2016-08-23 15:34:24 +02:00
Alexander Köplinger c4a5b6b5c3 [mcs] Remove NET_4_5 ifdef from the source files
It is always set in all profiles that we support so we can remove it.
2016-08-23 15:15:51 +02:00
Zoltan Varga 208650e6da [jit] Avoid strengh reducing divisions when using llvm, llvm can do it by itself. 2016-08-23 15:09:21 +02:00
Niklas Therning 82b02262cf Merge pull request #3426 from ntherning/fix-handle-leak-in-DirectoryInfo.EnumerateFileSystemInfos-on-windows
Fixes a handle leak in DirectoryInfo.EnumerateFileSystemInfos()
2016-08-23 13:55:25 +02:00
Niklas Therning 29d229377d 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()
2016-08-23 12:22:50 +02:00
Niklas Therning fb2afb6d76 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.
2016-08-23 12:20:28 +02:00
Niklas Therning b8c33e6549 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.
2016-08-23 12:05:53 +02:00
Marek Safar a9e83f7f6f Merge pull request #3103 from marek-safar/rs-Threading
[corlib] EventWaitHandle from referencesource
2016-08-23 09:17:43 +02:00
Mikayla Hutchinson efd47e8b31 [xbuild] Fix incremental build of TargetFrameworkAttribute
The targets depended on a feature that doesn't exist in
xbuild (https://bugzilla.xamarin.com/show_bug.cgi?id=43645)
and as a consequence would fail to add the generated file to
the build when the GenerateTargetFrameworkMonikerAttribute
target was up to date.
2016-08-22 22:52:31 -04:00
Alexander Köplinger 0d1db0362d 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
2016-08-23 02:35:44 +02:00
Alexander Köplinger d326ae2998 Merge pull request #3381 from krytarowski/netbsd-support-20
Resurrect NetBSD support in mono-perfcounters.c
2016-08-23 01:24:39 +02:00
Marek Safar f31d874829 [corlib] EventWaitHandle from referencesource 2016-08-22 23:20:00 +02:00
Vlad Brezae 2d91f05408 [arm64] Bump instruction sizes for atomic ops to match the emmited code 2016-08-22 14:06:23 -07:00
Alexander Köplinger e9205142b2 [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.
2016-08-22 20:47:47 +02:00
Aleksey Kliger 9aa7728ec6 [s390x] Fix compilation of sre-save.c 2016-08-22 14:07:59 -04:00
Alexander Köplinger f961e18753 [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.
2016-08-22 19:15:50 +02:00
Alexander Köplinger 24a4379898 [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.
2016-08-22 19:02:34 +02:00
Aleksey Kliger (λgeek) faa06c572d [sre] Fix s390x build (#3427)
Followup for 6be008c409 to fix the s390x build.
2016-08-22 12:28:18 -04:00
Alexander Köplinger 363f36f0cb [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.
2016-08-22 18:21:26 +02:00
Alexander Köplinger 07a2b30de0 Merge pull request #3428 from ntherning/fix-missing-libc-in-FileStreamTest-on-windows
Fixes DllNotFoundException in FileStreamTest.SetUp() on Windows
2016-08-22 17:30:04 +02:00
Niklas Therning ff18095f28 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.
2016-08-22 17:21:58 +02:00
Marek Safar 0e700ac819 [mcs] Move more eager references version mismatch checks. Fixes #30821 2016-08-22 17:04:11 +02:00
Marek Safar 2ce89dd94a [corlib] Fix exposed public APIs 2016-08-22 13:28:24 +02:00
Marek Safar 426cf7184f Update ms-test-suite 2016-08-22 13:28:24 +02:00
Kamil Rytarowski d04560589c Fix NetBSD build in proclib.c (#3378) 2016-08-22 08:45:17 +02:00
Marek Safar 53f837f3a4 [corlib] More sources from referencesource 2016-08-20 23:16:48 +02:00
Marek Safar 5fc43f7fb4 [corlib] Print some info on FailFast 2016-08-20 22:35:44 +02:00
Zoltan Varga 9efe45052a [runtime] Use a coop semaphore instead of an io layer one to wait for thread start. (#3383) 2016-08-20 11:36:20 +02:00
Marek Safar 1513f87658 [corlib] Interning of utc literals in TimeZoneInfo conversion. Fixes #43512 2016-08-20 11:05:23 +02:00
Johan Lorensson c16b127027 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.
2016-08-19 23:20:38 -04:00
Aleksey Kliger (λgeek) 6be008c409 Merge pull request #3413 from lambdageek/reflection-split
[reflection] Divide reflection.c into multiple files. NFC
2016-08-19 18:40:08 -04:00
Andi McClure 72070cc2e0 GC Bridge: Make merge_cache more aggressive, less exact, faster
The merge_cache previously, if it encountered an SCC ("color") with
many outgoing links, would not attempt to merge that SCC with existing
SCCs and instead would just create a new color. Because unbridged SCCs
are now reported to the bridge client, the cost of creating extra
colors has increased. To mitigate this the merge cache now attempts to
merge objects of all sizes, and has been changed to be able to do this
performantly.

The biggest change is that in the case of a hash collision, SCCs will
sometimes be merged without fully checking if they are exactly equal.
This is considered okay because false merges will be infrequent and
nothing worse will happen than short-term failure to reclaim memory.

The bridge-pathologies double fan test has been amended to verify
large-object merging works.
2016-08-19 16:22:31 -04:00
Andi McClure c972ad051a GC bridge: Only export non-bridged objects when it's helpful
Augments each tarjan-bridge SCC ("color") with a count of how many
SCCs are pointing to it. The mechanism for exporting non-bridged SCCs
uses this count to only export those SCCs where the "double fan"
scenario appears to be occurring. In testing this eliminates the
performance overhead imposed by the previous commit.

Also renamed/moved some variable declarations because namespace bugs
were creeping in.
2016-08-19 16:12:45 -04:00
Andi McClure db60c62ff9 GC bridge: Include non-bridged objects in the exported object graph
Introduces a mechanism for non-bridged SCCs which lay between bridged
SCCs in the SCC forest to be reported to the bridge client. In this
version, such non-bridged SCCs are always reported. The result is that
most GCs get a little slower but GCs in which the "double fan" shape
appears (many bridged objects link to one C# object which links to
many bridged objects) become massively faster.

Because before clients were allowed to assume exported SCCs were
always bridged, SGEN_BRIDGE_VERSION has been incremented.
2016-08-19 16:07:22 -04:00
Andi McClure ca48b5e9e2 Remove headers unused by sgen-tarjan-bridge.c 2016-08-19 15:48:17 -04:00
Aleksey Kliger 1a1a9a1743 [win32] Add sre-encode.c and sre-save.c to libmonoruntime project 2016-08-19 14:34:27 -04:00
Aleksey Kliger 91ee154da4 [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.
2016-08-19 14:32:38 -04:00
Jonathan Chambers 86b6624cdf Allocate handle stack for Boehm GC (#3421) 2016-08-19 19:14:46 +02:00
Niklas Therning d185b75dd7 Merge pull request #3419 from ntherning/fix-MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName-on-win
Fixes MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName on  Windows
2016-08-19 16:21:40 +02:00
Niklas Therning 9088f5a72a 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.
2016-08-19 15:54:55 +02:00
Ludovic Henry ddcd0f707d Merge pull request #3416 from ludovic-henry/iolayer-extract-wait
[io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAndWait
2016-08-19 11:16:35 +02:00
Vlad Brezae c6c9631e1b Merge pull request #3418 from BrzVlad/fix-arm64-finalizer-wait
[arm64] Fix atomics
2016-08-19 11:28:54 +03:00
Vlad Brezae 5914d34fd7 [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.
2016-08-19 04:15:52 +03:00
Marek Safar b303ade7c6 [mcs] Fix wrong range check for pragma warning CSxxx. Fixes #43471 2016-08-18 23:06:26 +02:00
Aleksey Kliger 2a87e4f1bf [sre] Split out MonoDynamicImage and MonoDynamicStream functions 2016-08-18 17:03:16 -04:00
Ludovic Henry 5acc26578d [io-layer] Remove unused WaitForInputIdle 2016-08-18 21:51:15 +02:00
Ludovic Henry 5df6d38e61 [io-layer] Remove unused WaitForMultipleObjects 2016-08-18 21:51:14 +02:00
Ludovic Henry 11e45402b3 [io-layer] Replace use of WaitForSingleObject by WaitForSingleObjectEx 2016-08-18 21:51:13 +02:00
Ludovic Henry 8b0cd42ef7 [io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAndWait 2016-08-18 21:51:12 +02:00
Ludovic Henry b190f213a3 Merge pull request #3415 from ludovic-henry/net_2_1-to-mobile
[mcs] Replace NET_2_1 by MOBILE
2016-08-18 21:39:39 +02:00
Vlad Brezae 322e7d0be8 [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.
2016-08-18 12:34:24 -07:00
Vlad Brezae 4c1dad1b67 [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.
2016-08-18 12:33:00 -07:00
Niklas Therning 58e6594d4b 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
2016-08-18 18:16:18 +02:00
Aleksey Kliger d8ef8c9444 [win32] Add new reflection files to vcxproj 2016-08-18 10:48:01 -04:00
Aleksey Kliger b6cf4908e0 [reflection] Rename files; adjust comments. 2016-08-18 10:48:00 -04:00
Ludovic Henry 5416358952 [mcs] Remove dead code 2016-08-18 16:38:50 +02:00
Ludovic Henry 249daf43de [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.
2016-08-18 16:34:36 +02:00
Niklas Therning fe51729712 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.
2016-08-18 14:40:17 +02:00
Vlad Brezae 499e5cd490 Merge pull request #3401 from BrzVlad/fix-managed-alloc2
[sgen] Fix managed alloc
2016-08-18 11:29:49 +03:00
Niklas Therning 8075cf3727 Merge pull request #3410 from lateralusX/jlorenss/vs2015-test-debug-projects
Visual Studio test/debug mono runtime utility projects.
2016-08-18 08:49:42 +02:00
Miguel de Icaza 50a4be2c5c [mkbundle] add support for distributing I18N encoding files and improved the man page 2016-08-17 22:49:56 -04:00
Aleksey Kliger 42dab3c0f8 [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.
2016-08-17 18:01:44 -04:00
Vlad Brezae 46e7c742cc [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.
2016-08-18 01:00:16 +03:00
Vlad Brezae 90ac4014a6 [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.
2016-08-18 01:00:15 +03:00
Vlad Brezae 47f6f8cfde [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.
2016-08-18 01:00:10 +03:00
Aleksey Kliger (λgeek) 5ac5585482 [runtime] Fix unhandled exception fatal error message. Fixes #43410 (#3404)
Partially revert bcbd0ac0c0
2016-08-17 15:33:03 -04:00
Marek Safar 0bd00f4154 Bump binary-reference-assemblies 2016-08-17 17:49:46 +02:00
Marek Safar 86e6221bec [bcl] Remove wrong ReferenceAssemblyAttribute(s) 2016-08-17 15:15:47 +02:00
lateralusX 8b1292313e 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.
2016-08-17 13:56:26 +02:00
Marek Safar 400b5eb8b4 [System] Change WebRequest::BeginGetRequestStream driven IAsyncResult::CompletedSynchronously to match .net. Fixes #32374 2016-08-17 13:47:47 +02:00
Alexander Köplinger 8dbf5df12e [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.
2016-08-17 11:29:35 +02:00
Craig McQueen 166653eecb 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.)
2016-08-17 09:42:48 +02:00
Alexander Köplinger 70602566de [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.
2016-08-16 22:23:40 +02:00
Marek Safar 870cbdc8b9 [System] Report an error instead of success when proxy authentication is required. Fixes #19594 2016-08-16 22:22:45 +02:00
Aleksey Kliger 7a60679b15 [linker] Update mscorlib.xml to include some Mono.RuntimeStructs
Followup to
https://github.com/mono/mono/commit/70d7f5e35059bdb64d3c6b7e42d7ad5120b476d6
2016-08-16 16:06:35 -04:00
Zoltan Varga 64918cd5c2 Fix the full-aot build. 2016-08-16 19:21:31 +02:00
Niklas Therning 3761639707 Merge pull request #3403 from ntherning/fix-handler-block-trampoline-crash-on-win64
Fixes illegal CALL emitted in handler_block_trampoline on Win64
2016-08-16 17:26:06 +02:00
Marek Safar 97e51abfcf [System] Put back handling of direct ip addresses to ServicePoint::HostEntry (removed in 932359f). Fixes #42864 2016-08-16 15:15:05 +02:00
Marek Safar 6b26583efd [mcs] Avoid agressive generic members inflation from using static. Fixes #43400 2016-08-16 14:01:03 +02:00
Niklas Therning 89a1552d6f 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.
2016-08-16 10:46:36 +02:00
Miguel de Icaza c3405680eb [linker] Bring various descriptors that were updated in iOS, but not on desktop Mono 2016-08-15 23:56:01 -04:00
Miguel de Icaza 7473246b06 [linker] Update descriptors for mscorlib to include the new _ThreadPoolWaitCallback 2016-08-15 23:42:24 -04:00
Zoltan Varga ac5102e9b4 [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.
2016-08-15 23:24:19 +02:00
Marek Safar 3aa57ed53a [mcs] Don't reset temporary stack fields too early. Fixes #43265 2016-08-15 21:13:30 +02:00
Aleksey Kliger (λgeek) 694b115595 [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.
2016-08-15 15:05:14 -04:00
Zoltan Varga e4a17068f5 [runtime] Fix warnings. 2016-08-15 16:30:15 +02:00
Martin Baulig c5072c8f47 Fix the build.
Use the desktop version of MonoTlsProviderFactory.CreateDefaultProviderImpl()
in the 'mobile_static' profile.
2016-08-15 15:57:13 +02:00
Niklas Therning 87a0f5af23 Merge pull request #3396 from ntherning/fix-async-exc-compilation-on-windows
Fix the failure of the async-exc-compilation.exe test on Windows
2016-08-15 09:59:46 +02:00
Henric Müller e7ce5ea9d9 Fix empty hostname in GetHostByName on windows (#3397) 2016-08-14 22:05:32 -04:00
Alexander Köplinger b97fad34be [bcl] Fix netstandard mistake in WebHeaderCollection
I accidentally added this in 3c3ef17376 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).
2016-08-12 16:45:19 +02:00
Marek Safar b08769b904 Merge pull request #3398 from henricm/fix-for-test-helpers-symlink
Removing symlink of TestHelpers.cs
2016-08-12 15:55:35 +02:00
Henric Müller ce261e6b94 Removing symlink of TestHelpers.cs 2016-08-12 14:11:57 +02:00
Vlad Brezae 378b6bee20 [jit] Add missing special case for div with mul optimization
The algorithm does not handle the -1, 0 and 1 special divisors.
2016-08-12 14:56:44 +03:00
Niklas Therning 5a561604bf 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.
2016-08-12 11:16:00 +02:00
Marek Safar f99366e0c3 Merge pull request #3394 from mono/netstandard
NetStandard 1.6 members matching
2016-08-12 09:54:24 +02:00
Alexander Köplinger f8480362ab [bcl] Define NETSTANDARD in xammac profile as well 2016-08-12 02:36:28 +02:00
Vlad Brezae b51beacb8e Merge pull request #2332 from BrzVlad/feature-div-with-mul
[jit] Optimize divisions by immediate
2016-08-12 00:44:00 +03:00
Marek Safar 1d64a37df9 [Facades] Remove wrong facades 2016-08-11 20:53:47 +02:00
Marek Safar 406a5b8177 [Facades] Update version numbers 2016-08-11 20:53:46 +02:00
Marek Safar f5b5a6fdfd [Facades] System.Security.Cryptography.Algorithms on netstandard profiles only 2016-08-11 20:53:45 +02:00
Alexander Köplinger 3c3ef17376 [bcl] Update to match NETStandard 1.6 members 2016-08-11 20:53:38 +02:00
Vlad Brezae 49c169f53f [jit] Enable division by constant optimization on 32 bit 2016-08-11 21:21:41 +03:00
Vlad Brezae 55a6e47160 [arm] Implement OP_BIGMUL 2016-08-11 21:21:41 +03:00
Vlad Brezae ce5df6d400 [tests] Add random immediate division test 2016-08-11 21:21:40 +03:00
Vlad Brezae b518ec10c0 [jit] Register counter for number of optimized divisions 2016-08-11 21:21:39 +03:00
Vlad Brezae 3bc3787974 [jit] Optimize signed division by constant 2016-08-11 21:21:39 +03:00
Vlad Brezae 9b3d453006 [jit] Optimize unsigned division by constant 2016-08-11 21:21:39 +03:00
Marek Safar c37bbef8f0 [corcompare] Use only C# known parameter type attributes for methods signatures 2016-08-11 18:07:54 +02:00
Martin Baulig b0e0d4785e [System]: Use 'HttpWebRequest.Host' for certificate host name validation.
(cherry picked from commit 5200955033)
2016-08-11 17:05:07 +02:00
Martin Baulig a47c56383b [System]: Add new internal X509Certificate2Impl.IntermediateCertificates.
(cherry picked from commit 8ed20455a5)
2016-08-11 17:05:00 +02:00
Martin Baulig 8b541144b1 [System]: Add private Mono.Net.Security APIs which will be shared between AppleTls and BoringTls.
(cherry picked from commit 934a577a94)
2016-08-11 17:04:49 +02:00
Martin Baulig 0ba6c7f3e0 [System]: Cleanup the internal MonoTlsProviderFactory and prepare for BTLS.
(cherry picked from commit b919768e1a)
2016-08-11 17:04:40 +02:00
Aleksey Kliger (λgeek) a232eb3b84 Merge pull request #3389 from lambdageek/bug-43099
[coop] Temporarily restore MonoThreadInfo when TLS destructor runs.  Fixes #43099
2016-08-11 10:43:08 -04:00
Marek Safar a00de00d95 [mcs] More reliable tests 2016-08-11 09:55:23 +02:00
Niklas Therning d22f93ffa6 Merge pull request #3388 from ntherning/fix-thread-priority-on-windows
Fix getting/setting thread priority on Windows
2016-08-11 09:20:54 +02:00
Miguel de Icaza 22f30140f5 [mkbundle] Fix --fetch-target to not require an assembly, embed the proper assembly when --cross RUNTIME is used 2016-08-11 00:33:53 -04:00
Aleksey Kliger 21a4a22997 [handles] offsets-tool should include MonoObjectHandlePayload
Complements 3c05314390
2016-08-10 18:49:40 -04:00
Alexander Kyte f4a87fca69 Merge pull request #3390 from alexanderkyte/fix_nunitlite_build_state
[nunitlite] Pass greedily, not fail greedily
2016-08-10 16:36:13 -04:00
Alexander Kyte d37b48e1f8 [nunitlite] Pass greedily, not fail greedily 2016-08-10 16:29:16 -04:00
Aleksey Kliger 3c05314390 [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.
2016-08-10 16:28:59 -04:00
Alexander Kyte 539ae700e2 Merge pull request #2780 from alexanderkyte/seq_point_optimize
[runtime] Implement performant unbounded-depth sequence point search
2016-08-10 15:47:59 -04:00
Aleksey Kliger 82ce6b8b28 [marshal] Ensure uses_handles is initialized. 2016-08-10 14:56:09 -04:00
Aleksey Kliger 57fb9aa164 [coop] Temporarily restore MonoThreadInfo when TLS destructor runs. Fixes #43099
We need a valid MonoThreadInfo in the TLS key while we run
unregister_thread because we may need to block the thread when it tries
to take the sgen GC mutex.

Fixes [#43099](https://bugzilla.xamarin.com/show_bug.cgi?id=43099)
2016-08-10 12:14:52 -04:00
Marek Safar 3fb3cdf6d7 [mono-api-html] Show assembly version differences 2016-08-10 17:30:56 +02:00
Niklas Therning df867664ee Merge pull request #3213 from henricm/fix-for-win-securestring-to-bstr
Fix for win securestring to bstr
2016-08-10 17:04:53 +02:00
Niklas Therning dca0544211 Fix getting/setting thread priority on Windows
The mono_threads_platform_get_priority()/mono_threads_platform_set_priority()
functions in mono-threads-windows.c assume the "handle" member has been set in
the MonoThreadInfo struct passed to it but it's always NULL. This patch
implements mono_threads_suspend_register() in the same file which sets the
"handle" member at thread registration time, like it's done in
mono-threads-posix.c.

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

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

The changes in this patch fixes the failures in mono/tests/priority.exe on
Windows i386 and x64.
2016-08-10 16:47:33 +02:00
Marek Safar a350474b32 [mcs] Report second level references mismatch only for really used references. Fixes #42702 2016-08-10 15:54:04 +02:00
monojenkins 6e17b26ef5 Merge pull request #3387 from xmcclure/test-suite-bump
Update ms-test-suite to fix broken test
2016-08-10 00:30:10 +02:00
Alexander Köplinger 8ac1adac8e [WinForms] Fix a test to correctly check for Mono
typeof (int).GetType ().GetType ().Name is now RuntimeType since https://github.com/mono/mono/pull/3045.
We did not notice this since most of our bots don't run with en-US locale set which this test requires.
2016-08-10 00:16:06 +02:00
Alexander Köplinger dfdbf0c365 [mono] Use -size 0 instead of -empty as find argument
The latter is not supported by the "find" binary in Alpine. The former works everywhere.
2016-08-10 00:16:06 +02:00
Alexander Köplinger 66881ac454 [mini] Fix mktemp argument in test_op_il_seq_point.sh
mktemp on e.g. Alpine requires at least six 'X' characters in the template argument.
2016-08-10 00:16:05 +02:00
Alexander Köplinger cbe8a553b0 [mdoc] Remove --exclude=.svn from diff arguments
We don't use svn anymore since a very long time and some diff implementations (e.g. in Alpine) don't support --exclude.
Removing the argument is an easy fix.
2016-08-10 00:16:04 +02:00
Alexander Köplinger 421481419d [acceptance-tests] Run ms-test-suite with debug symbols
So we get line numbers in stack traces.
2016-08-10 00:16:04 +02:00
Zoltan Varga d4052c5563 [runtime] Use a coop semaphore instead of the io-layer one in the monitor code. (#3382) 2016-08-09 22:51:30 +02:00
Andi McClure 269608b176 Update ms-test-suite to fix broken test 2016-08-09 16:45:24 -04:00
Alexander Kyte 6718281ee8 Merge pull request #3386 from alexanderkyte/nunit_lite_return_status
[runtime] Make nunitlite return failure exit code when tests fail
2016-08-09 15:03:27 -04:00
Marek Safar 1fe681e47c Merge pull request #3373 from marek-safar/net-4.6.2
[bcl] Update Reference Source to .NET Framework 4.6.2
2016-08-09 21:02:27 +02:00
Alexander Kyte 9f798cb8eb [runtime] Return failure return status if nunit-lite test suite fails 2016-08-09 14:49:14 -04:00
Alexander Kyte e7dc20067c [runtime] Bump nunit-lite dependency for runner change 2016-08-09 14:47:34 -04:00
Marek Safar d948067ae9 [System] Remove one no longer needed uri workaround. Fixes #43032 2016-08-09 19:46:22 +02:00
Marek Safar b6a30059db [bcl] Update Reference Source to .NET Framework 4.6.2 2016-08-09 18:07:14 +02:00
Henric Müller c5cdfaec1e Moving BSTR conv to native code in SecureStringToBSTR.
Previous implementation laid out the BSTR structure
in directly memory in C# code. This layout was not correct
for windows.
Furthermore memory was allocated using AllocCoTaskMem but later freed
using SysFreeString which on windows are different memory areas.
Third issue is that SecureString asumes big-endian when copying the chars
to its internal byte buffer. So on little-endian environments,
a swap of bytes is needed before the buffer is sent to native side
for BSTR conversion. This should probably be handled internally in
SecureString instead.
2016-08-09 14:09:32 +02:00
Kamil Rytarowski ab14520764 Handle NetBSD specific iconv(3) call prototype (#3376)
In the past there were wars between constified and unconstified
second parameter.. NetBSD went with constifying it. POSIX went without
const and most other OSes standarized. NetBSD is still having
incompatible function prototype.

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <iconv.h>

     size_t
     iconv(iconv_t cd, const char ** restrict src, size_t * restrict srcleft,
           char ** restrict dst, size_t * restrict dstleft);
2016-08-09 12:41:54 +02:00
Marcos Henrich 1e6895d366 Merge pull request #3353 from esdrubal/st-format
[corlib] Removed MVID and AOTID metadata.
2016-08-09 10:34:06 +01:00
Alexander Köplinger c4f4517828 [ci] Another Python 3 fix in babysitter
```
  File "./scripts/ci/babysitter", line 424, in run
    for xml in (xml_list + wrote_xml):
TypeError: can only concatenate list (not "map") to list
```
2016-08-09 02:12:53 +02:00
Kamil Rytarowski 3e6701d4b2 Define _NETBSD_SOURCE for mincore(2) (#3380) 2016-08-09 02:00:44 +02:00
Kamil Rytarowski 615f644ca1 Fix the definition of legacy_closer(), detected on NetBSD (#3377) 2016-08-09 01:59:31 +02:00
Kamil Rytarowski 1b7d212ead Resurrect NetBSD support in mono-perfcounters.c 2016-08-09 01:28:48 +02:00
Alexander Köplinger 07cdf4137c [ci] Python3 fix in babysitter script
iteritems() was removed in py3, we can just use items() instead since we're iterating
over the list anyway so we don't need the lazy evaluation behavior of iteritems().
2016-08-08 23:51:45 +02:00
Kamil Rytarowski 5fe8bfae7d Introduce mono-threads-netbsd.c (#3374) 2016-08-08 17:21:38 -04:00
Kamil Rytarowski 736a445ddc Fix shell portability, detected with NetBSD/pkgsrc (#3375) 2016-08-08 17:20:49 -04:00
Aleksey Kliger (λgeek) 70d7f5e350 Merge pull request #3349 from lambdageek/handle-icalls-in-jit
[handles] Add coop handles in wrapper to icalls with HANDLES() declaration
2016-08-08 16:39:13 -04:00
Aleksey Kliger 950ec31540 [marshal] Assert if adding handles to an out or inout parameter of an icall.
Eventually should support this (System.RuntimeType.GetInterfaceMapData
could use it, for one) but for now just assert.
2016-08-08 12:50:19 -04:00
Aleksey Kliger 588900f837 [marshal] Load payload from return handle 2016-08-08 12:50:18 -04:00
Aleksey Kliger bb4cb46eb1 [marshal] If an icall is getting handles and MonoError added, it better
check for exceptions.
2016-08-08 12:50:17 -04:00
Aleksey Kliger 106c604f29 [marshal] Wrap icall managed obj input arguments with handles. 2016-08-08 12:50:16 -04:00
Aleksey Kliger fd44a557dd [runtime] Modify Zoltan's prototype to query icall-def.h handles tables
TODO: there's a gratuitous call to mono_lookup_internal_call_full().
Should really cache the uses_handle info along with the addr since the
lookup by name is rather involved.
2016-08-08 12:50:15 -04:00
Aleksey Kliger 8e509d4d09 [runtime] Add HANDLES() macro to icall-def.h
The HANDLES() macro can be wrapped around an ICALL() to signal that
the icall should use the coop handles machinery from handles.h
2016-08-08 12:50:14 -04:00
Zoltan Varga 98705767f9 Add RuntimeStructs class. 2016-08-08 12:50:13 -04:00
Zoltan Varga 9c29176aa2 Pass a MonoError argument to icalls. 2016-08-08 12:50:07 -04:00
João Matos f1efd46acb Merge pull request #3372 from ntherning/fix-g_win32_getlocale
Explicitly use the ANSI version of GetLocaleInfo() in g_win32_getlocale()
2016-08-08 17:26:28 +01:00
Niklas Therning 7945519f84 Explicitly use the ANSI version of GetLocaleInfo() in g_win32_getlocale()
Since UNICODE is defined when Mono is compiled under Windows the
GetLocaleInfo() macro will expand to GetLocaleInfoW() which returns the
current locale identifier in g_win32_getlocale() in 16-bit Unicode.
g_win32_getlocale() however expects an 8-bit encoding. By using
GetLocaleInfoA() explicitly we'll get the identifier back as an ordinary 8-bit
C string.

This patch fixes the mono/tests/threadpool-exceptions5.exe test.
2016-08-08 17:17:19 +02:00
Marcos Henrich 60f8256fd8 [corlib] Removed MVID and AOTID metadata.
MVID and AOTID metadata is no longer displayed at the end of the stack
trace.

Now, every stack frame contains a MVID and AOTID inlined.

An IL offset stackframe looks like:
  at StackTraceDumper.Main () [0x00000] in <a3ec873a838c42c29f4eba7cab7d1dfb>:0

A native offset stack frame looks like:
  at StackTraceDumper.<Main>m__0 () <0x100e15d50 + 0x00029> in <a3ec873a838c42c29f4eba7cab7d1dfb#b37a9d11247b811ffffdaff8090d8a59>:0
2016-08-08 16:12:59 +01:00
Alexander Köplinger 8d1a18d611 Merge pull request #2903 from krytarowski/netbsd-support-4
Implement mremap(2) usage on NetBSD
2016-08-08 11:47:08 +02:00
Zoltan Varga f34c0223fc Fix the loaded llvm build. 2016-08-08 01:40:17 +02:00
Ludovic Henry 7324cd4a7a Merge pull request #3370 from ludovic-henry/fix-finalizer-wait
[gc] Fix crash when doing WaitForPendingFinalizers
2016-08-07 18:58:45 +02:00
Ludovic Henry df3278863a [gc] Fix crash when doing WaitForPendingFinalizers
The crash would come from a use-after-free of stack memory: in coop_cond_timedwait_alertable, we would allocate the struct we pass to the mono_thread_info_install_interrupt function on the stack. But there is no guarantee as to when break_coop_alertable_wait is run. The fix is to allocate the data passed to mono_thread_info_install_interrupt on the heap, and free it in the callback, or if it hasn't been interrupted.
2016-08-07 13:45:56 +02:00
Vincent Povirk 466097af62 [x86] Only pinvoke methods are stdcall. (#3354)
For xamarin bug 30146.
2016-08-07 03:29:41 -04:00
Zoltan Varga 871a3d453b [runtime] Fix the loaded llvm build. 2016-08-06 13:03:40 -04:00
Marek Safar 105085eb95 Merge pull request #3356 from marek-safar/cecil-update
Cecil update
2016-08-06 09:31:04 +02:00
Zoltan Varga d66b50ddb8 [runtime] Store the original invoke method in WrapperInfo for delegate invokes, use that to fix the check in find_aot_method_in_amodule (). 2016-08-05 18:59:07 -04:00
Marek Safar 5b0af84d6a [monosymbolicate] Update project file 2016-08-05 23:08:14 +02:00
Marek Safar 2d34a90a4c [Mono.Cecil] Add special handling of legacy 0.9.5 version 2016-08-05 23:08:13 +02:00
Marek Safar 0eada4ca3b [mono-symbolicate] Better test failure reporting 2016-08-05 23:08:12 +02:00
Marek Safar e3f25930e1 [mdoc] Update project file 2016-08-05 23:08:12 +02:00
Marek Safar 2371e279ae [Mono.Contract] Less obsolete warnings 2016-08-05 23:08:11 +02:00
Marek Safar d80283d1e8 [bcl] Reflect cecil breaking changes 2016-08-05 23:08:10 +02:00
Marek Safar 78bc83d6c6 Update Cecil to the latest master 2016-08-05 23:08:03 +02:00
Alexander Köplinger 2289feac4c Merge pull request #3363 from akoeplinger/fix-42938
[xbuild] Use the xbuild ToolsVersion even if another one is specified in the csproj
2016-08-05 22:54:59 +02:00
Zoltan Varga 32f8df796e [arm] Fix aot support in the sdb soft breakpoint trampolines. 2016-08-05 16:29:14 -04:00
Alexander Köplinger 97076ff919 [ci] Don't build mobile profiles in a monolite build
The mobile profiles rely on system resgen2 which is not present in a monolite build.
2016-08-05 19:44:48 +02:00
Niklas Therning 7e92715a0f Merge pull request #3359 from ntherning/sgen-avoid-scanning-stack-guard-page-on-windows
Prevent SGen from scanning the guard page used by Windows to dynamically grow the stack
2016-08-05 19:25:39 +02:00
Alexander Köplinger c7aa64ab0b Merge pull request #3361 from xmcclure/babysitter-xml
Add mono/tests support to CI babysitter
2016-08-05 18:58:44 +02:00
Zoltan Varga 98f6d1e7ce Initial prototype for handling handle stack setup and argument/return value conversion in icall wrappers. 2016-08-05 12:16:33 -04:00
Niklas Therning 29fecdd2fc Merge pull request #3365 from ntherning/fix-gc-graystack-stress-on-win64
Fixes the mono/tests/gc-graystack-stress test on Windows x64
2016-08-05 17:16:28 +02:00
Alexander Köplinger ca43f903c2 Merge pull request #3337 from akoeplinger/fix-alpine
Fix Alpine build
2016-08-05 16:50:04 +02:00
Alexander Köplinger 23fda51698 [ci] Add a CI_TAGS option for building with monolite
Also ensure that all the CI_TAGS check work with multiple values.
2016-08-05 16:49:37 +02:00
Alexander Köplinger 34bc900fc7 [ci] Run "make" in parallel in run-jenkins.sh
To speed up the build.
2016-08-05 16:49:37 +02:00
Ludovic Henry 8194bea584 Merge pull request #3288 from ludovic-henry/iolayer-extract-threading
[io-layer] Extract threading code
2016-08-05 15:05:34 +02:00
Niklas Therning 84d0f76ec7 Prevent SGen from scanning the guard page used by Windows to dynamically grow
the stack.

Windows uses a guard page before the committed stack memory pages to detect
when the stack needs to be grown. If we suspend a thread just after a function
prolog has decremented the stack pointer to point into the guard page but
before the thread has been able to read or write to that page, starting the
stack scan at the thread's ESP/RSP will raise a STATUS_GUARD_PAGE_VIOLATION and
the process will crash.

This patch uses VirtualQuery() to determine whether the thread's stack_start
value points into the guard page. If it does the stack scan will instead be
started at the following, non-guard page.
2016-08-05 14:54:06 +02:00
Marek Safar 643eadf903 Bump binary-reference-assemblies 2016-08-05 14:29:28 +02:00
Niklas Therning 56664d10bf Fixes the mono/tests/gc-graystack-stress test on Windows x64
Windows x64 only has 1 MB of stack per thread which is less than other x86
64-bit OSes. Using 10000 for "depth" in this test causes a stack overflow on
Windows x64. This patch changes "depth" to 5000 only on Windows x64. 5000 will
fit within the default stack size.
2016-08-05 14:18:27 +02:00
Ludovic Henry b8fff1390a Merge pull request #3355 from ludovic-henry/process-fix-exited
[process] Fix Process.Exited event triggered too soon
2016-08-05 10:59:21 +02:00
Miguel de Icaza 0d1f6eea5b Remove stray comment 2016-08-04 23:56:52 -04:00
Zoltan Varga a9e01245a9 [arm] Fix the initialization of the variable holding the single step trampoline address when using soft breakpoints + aot. 2016-08-04 18:15:34 -04:00
Alexander Kyte 18b834028e Merge pull request #3360 from alexanderkyte/mini_fix_timeout
[runtime] Increase mini bitcode timeout and add parallelism
2016-08-04 16:03:14 -04:00
Alexander Kyte 37210cf0d4 [mobile_static] Give bitcode mini tests parallelism and more time 2016-08-04 16:02:29 -04:00
Alexander Köplinger a1a54b5f14 [xbuild] Use the xbuild ToolsVersion even if another one is specified in the csproj
This is the recent behavior in .NET/MSBuild as well [1]:

> Starting in Visual Studio 2013, the MSBuild Toolset version is the same
> as the Visual Studio version number. MSBuild defaults to this Toolset
> within Visual Studio and on the command line, regardless of the
> toolset version specified in project file.

With this change xbuild will always use its own version instead
of the one specified in the project, unlessa ToolsVersion is forced
via the /tv switch on the command line.

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

[1] https://msdn.microsoft.com/en-us/library/bb383796.aspx#Anchor_1
2016-08-04 21:57:26 +02:00
Andi McClure 3c3dd75865 Add NUnit XML support to test babysitter, also document the communication protocol better
For test harnesses which don't support the full babysitter protocol,
the test harness can now report back paths to NUnit-format XML files
containing test results, or the paths to those XML files can be given
by whoever invoked the babysitter script. Failures listed in the XMLs
are included in the babysitter log.

test-runner.cs has been modified to report its XMLs, so we should now
see mono/tests failures in the babysitter log.
2016-08-04 15:09:34 -04:00
João Matos 427af110f6 Merge pull request #3357 from tritao/zip_delete_entries
[System.IO.Compression] Remove the entry from ZipArchive entries when its deleted
2016-08-04 18:27:37 +01:00
Ludovic Henry 8afaa90625 [process] Fix Process.Exited event triggered too early
The Process.Exited event would be triggered too early, leading to crash in code using this event to access the process exit code. This is because in Process.ExitCode, we first check that the process has really exited.
2016-08-04 18:59:50 +02:00
Niklas Therning 687cb3e46a Merge pull request #3358 from ntherning/disable-sgen-red-zone-on-win64
Set SGen's REDZONE_SIZE=0 on Win64
2016-08-04 16:45:59 +02:00
Niklas Therning eb9d4b44e7 Set SGen's REDZONE_SIZE=0 on Win64 since the ABI defines no red zone and the
ABI states that "All memory beyond the current address of RSP is considered
volatile".

On Windows the stack grows dynamically as the thread needs more stack space.
Windows places a guard page before the page at the top of stack and when this
guard page is accessed by the thread Windows will add a new page to the stack
and resume the thread.

Before this fix SGen on Win64 subtracted 128 from the stack pointer of a
suspended thread and started the stack scan from this address. In the case
when the stack pointer would be less than 128 from the start of the memory
page SGen would attempt to read from the previous page. If this happens to be
the guard page a STATUS_GUARD_PAGE_VIOLATION exception is raised and the
process crashes. The sgen-weakref-stress.exe triggered this bug on almost
every invocation.
2016-08-04 16:07:11 +02:00
Ludovic Henry 257b951a6c [io-layer] Remove threads.h, thread-private.h and wthreads.c 2016-08-04 15:41:47 +02:00
Ludovic Henry 44e8f37286 [io-layer] Remove unused _WAPI_THREAD_CURRENT 2016-08-04 15:41:46 +02:00
Ludovic Henry 3c52d24037 [io-layer] Extract thread MonoW32HandleOps 2016-08-04 15:41:46 +02:00
Ludovic Henry bd07ed29e0 [io-layer] Extract GetThreadPriority and SetThreadPriority 2016-08-04 15:41:45 +02:00
Ludovic Henry 3a3801b1e1 [io-layer] Extract wapi_create_thread_handle 2016-08-04 15:41:44 +02:00
Ludovic Henry fab2d1f531 [io-layer] Extract wapi_thread_own_mutex and wapi_thread_disown_mutex 2016-08-04 15:41:17 +02:00
Ludovic Henry c472a8e636 [io-layer] Extract wapi_current_thread_desc 2016-08-04 15:40:47 +02:00
Ludovic Henry 020ca4264b [io-layer] Extract wapi_ref_thread_handle 2016-08-04 15:40:26 +02:00
Ludovic Henry 27b44e002b [io-layer] Remove _wapi_thread_cur_apc_pending 2016-08-04 15:40:25 +02:00
Ludovic Henry 23613bd913 [io-layer] Extract wapi_get_current_thread_handle 2016-08-04 15:40:25 +02:00
Ludovic Henry 3cd88d5518 [io-layer] Extract wapi_thread_handle_set_exited 2016-08-04 15:40:20 +02:00
Ludovic Henry d19e5eaeae [io-layer] Make _wapi_getpid, _wapi_thread_own_mutex, _wapi_thread_disown_mutex and _wapi_mutex_abandon functions public 2016-08-04 15:00:07 +02:00
Ludovic Henry 523740c04a [io-layer] Make _WapiHandle_thread struct public 2016-08-04 15:00:06 +02:00
Ludovic Henry bd3e01a6ec [mono-threads] Split platform and suspend specific functions
We split mono-threads-{posix,windows,mach}.c functions in 2 categories:
 - platform: depends on the host the runtime is compiled on (possible values: posix or windows)
 - suspend: depends on the mono-threads suspend backend in use (possible values: posix, windows or mach)
2016-08-04 15:00:05 +02:00
Ludovic Henry dfa6daf9ed [io-layer] Make wait.c not depend on _wapi_thread_cur_apc_pending 2016-08-04 15:00:04 +02:00
João Matos 179e33d100 [System.IO.Compression] Remove the entry from ZipArchive entries when its deleted. Fixes #43022.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43022.
2016-08-04 13:21:13 +01:00
Marek Safar c0bd75d8cd [mcs] Better error reporting for missing types during conversion 2016-08-04 12:57:42 +02:00
Miguel de Icaza 5ea18d668c [build] Update order.xml data 2016-08-03 23:14:59 -04:00
Zoltan Varga b32c4cf6d1 [arm64] Assert that the displacement is not out of range int he b/bl macros, instead of in arm_get_disp (), so the assert location is more meaningful. 2016-08-03 19:50:11 -04:00
Alexander Kyte a41a317d69 Merge pull request #3352 from alexanderkyte/mini_bitcode_fix
[runtime] Provide Mono.Simd.dll to llvmonlycheck+fullaotcheck
2016-08-03 13:35:21 -04:00
Alexander Kyte fb726a78e9 [runtime] Provide Mono.Simd.dll to llvmonlycheck+fullaotcheck 2016-08-03 13:24:32 -04:00
Alexander Köplinger 9e132b68e7 Merge pull request #3351 from kasthack/patch-2
Added missing DeliveryFormat property to MailClient
2016-08-03 18:31:35 +02:00
Zoltan Varga 32a3e6815c [arm] Initialize breakpoint_tramp later in full aot mode, its not available in arch_init (). 2016-08-03 11:31:48 -04:00
Konstantin Safonov 0902d69876 Added missing DeliveryFormat property to MailClient
Doesn't actually change the behavior but at least allows to build sources referencing it on mono.
https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.deliveryformat(v=vs.110).aspx
2016-08-03 17:50:53 +03:00
Aleksey Kliger (λgeek) 9e4743224b Merge pull request #3347 from lambdageek/coop-abort-ignore-unhandled
[coop] Don't call unhandled exn hook for ThreadAbortException
2016-08-03 10:29:33 -04:00
Marek Safar d3582e9b85 [mcs] More tweaks in betterness improvements. Fixes #41724 2016-08-02 20:54:37 +02:00
Aleksey Kliger 65c1b9cc10 [coop] Don't call unhandled exn hook for ThreadAbortException
Fixes the weird Jenkins logs for the coop job.
2016-08-02 12:32:24 -04:00
Alexander Köplinger 74be3019a7 [mini] Fix asm/sigcontext.h include in exceptions-arm.h
We include the header under the PLATFORM_ANDROID ifdef in mono-sigcontext.h as well [1].
It was probably added because older Bionic didn't include this from signal.h [2].

Fixes the build on Alpine/musl-libc.

[1] https://github.com/mono/mono/blob/19a99abf1680c85f8ff58c2b44ea8c15bb557ca5/mono/utils/mono-sigcontext.h#L5
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=859580
2016-07-28 15:56:10 +02:00
Angelo Compagnucci d5aec290cb [libgc] fix musl incorrect sigcontext include
On musl __GLIBC__ is not defined, so the conditional logic will
not produce correct result. Add a specific case to handle when
__GLIBC__ is not defined.
2016-07-28 15:56:09 +02:00
Alexander Köplinger a329632db2 [io-layer] Add include for sys/types.h to processes.h to fix Alpine build
It showed the following error before:

```
In file included from wapi.h:23:0,
                 from wapi.c:2:
../../mono/io-layer/processes.h:218:31: error: unknown type name 'pid_t'
 gchar* wapi_process_get_path (pid_t pid);
                               ^
Makefile:603: recipe for target 'wapi.lo' failed
make[3]: *** [wapi.lo] Error 1
```
2016-07-28 15:04:14 +02:00
Kamil Rytarowski b522eab5ff Implement mremap(2) usage on NetBSD
The NetBSD version of mremap takes additional argument "newp" to hint
new position of a mapped range.

     void *
     mremap(void *oldp, size_t oldsize, void *newp, size_t newsize,
         int flags);

  -- NetBSD's mremap(2)

While Linux by default sets old_address and fails if the resize
operation cannot be finished for the original address.

       void *mremap(void *old_address, size_t old_size,
                    size_t new_size, int flags, ... /* void *new_address */);

  -- Linux's mremap(2)

NetBSD offers inversed logic with the MAP_FIXED flag to Linux's MREMAP_MAYMOVE:

     MAP_FIXED          newp is tried and mremap() fails if that address can't
                        be used as new base address for the range.  Otherwise,
                        oldp and newp are used as hints for the position,
                        factoring in the given alignment.

  -- NetBSD's mremap(2)

       MREMAP_MAYMOVE
              By default, if there is not sufficient space to expand a mapping
              at its current location, then mremap() fails.  If this flag is
              specified, then  the  kernel  is permitted to relocate the
              mapping to a new virtual address, if necessary.  If the mapping
              is relocated, then absolute pointers into the old mapping
              location become invalid (offsets relative to the starting address
              of the mapping should be employed).

  -- Linux's mremap(2)

The thing that bothers is calling mremap(2) syntax from Linux "posix", but we
cannot do anything with it, for now just simulate the Linux behavior on NetBSD.
2016-04-17 02:46:57 +02:00
Alexander Kyte 85d318b725 [runtime] Implement performant unbounded-depth sequence point search
With this change we search for sequence points to unbounded depth and memoize in basic blocks
2016-03-21 12:09:18 -04:00
2281 changed files with 87911 additions and 44745 deletions

No files matched your search

+11
View File
@@ -35,3 +35,14 @@
[submodule "external/buildtools"]
path = external/buildtools
url = git://github.com/mono/buildtools.git
[submodule "external/cecil-legacy"]
path = external/cecil-legacy
url = git://github.com/mono/cecil.git
branch = mono-legacy-0.9.5
[submodule "external/boringssl"]
path = external/boringssl
url = git://github.com/mono/boringssl.git
branch = mono
[submodule "external/corefx"]
path = external/corefx
url = git://github.com/mono/corefx.git
+24 -15
View File
@@ -15,19 +15,22 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
6. [Configuration Options](#configuration-options)
7. [Working with Submodules](#working-with-submodules)
**Build Status**
### Build Status
Officially supported architectures:
| OS | Architecture | Status |
|--------------|--------------------|------------------------------|
| Ubuntu 14.04 | amd64 | [![ubuntu-1404-amd64][1]][2] |
| Ubuntu 14.04 | i386 | [![ubuntu-1404-i386][3]][4] |
| Debian 8 | armel | [![debian-8-armel][5]][6] |
| Debian 8 | armhf | [![debian-8-armhf][7]][8] |
| Debian 8 | arm64 | [![debian-8-arm64][9]][10] |
| OS X | amd64 | [![osx-amd64][11]][12] |
| OS X | i386 | [![osx-i386][13]][14] |
| Windows | amd64 | [![windows-amd64][15]][16] |
| Windows | i386 | [![windows-amd64][17]][18] |
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
| ubuntu-1404-amd64 | ubuntu-1404-i386 | debian-8-armel | debian-8-armhf | debian-8-arm64 | windows-amd64 |
|------------------------------|-----------------------------|---------------------------|---------------------------|-----------------------------|----------------------------|
| [![ubuntu-1404-amd64][1]][2] | [![ubuntu-1404-i386][3]][4] | [![debian-8-armel][5]][6] | [![debian-8-armhf][7]][8] | [![debian-8-arm64][9]][10] | [![windows-amd64][11]][12] |
Community supported architectures:
| centos-s390x |
|---------------------------|
| [![centos-s390x][13]][14] |
_(cs) = community supported architecture_
[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64/badge/icon
[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64
@@ -39,10 +42,16 @@ Community supported architectures:
[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/
[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/badge/icon
[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/
[11]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
[12]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
[13]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
[14]: https://jenkins.mono-project.com/job/z/label=centos-s390x
[11]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/badge/icon
[12]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/
[13]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/badge/icon
[14]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/
[15]: https://jenkins.mono-project.com/job/z/label=w64/badge/icon
[16]: https://jenkins.mono-project.com/job/z/label=w64/
[17]: https://jenkins.mono-project.com/job/z/label=w32/badge/icon
[18]: https://jenkins.mono-project.com/job/z/label=w32/
[19]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
[20]: https://jenkins.mono-project.com/job/z/label=centos-s390x
Compilation and Installation
============================
+3 -1
View File
@@ -1,4 +1,5 @@
ACCEPTANCE_TESTS_PATH=external
BENCHMARKER_PATH=$(ACCEPTANCE_TESTS_PATH)/benchmarker
ROSLYN_PATH=$(ACCEPTANCE_TESTS_PATH)/roslyn
CORECLR_PATH=$(ACCEPTANCE_TESTS_PATH)/coreclr
MSTESTSUITE_PATH=$(ACCEPTANCE_TESTS_PATH)/ms-test-suite
@@ -14,10 +15,11 @@ MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe
ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
include versions.mk
include profiler-stress.mk
include roslyn.mk
include coreclr.mk
include ms-test-suite.mk
check-full: check-roslyn check-coreclr check-ms-test-suite
check-full: check-profiler-stress check-roslyn check-coreclr check-ms-test-suite
clean-local: clean-local-coreclr
+10 -2
View File
@@ -18,9 +18,17 @@
{
"name": "ms-test-suite",
"url": "[email protected]:xamarin/ms-test-suite.git",
"rev": "840653918efed24f00f5e166094f06354cae7255",
"rev": "eb7cd709549bffe170653a50805f1593d66ea81e",
"remote-branch": "origin/master",
"branch": "master",
"directory": "ms-test-suite"
},
{
"name": "benchmarker",
"url": "git://github.com/xamarin/benchmarker.git",
"rev": "97f618cd585af549dd861b7c142656c496f6a89b",
"remote-branch": "origin/master",
"branch": "master",
"directory": "benchmarker"
}
]
]
+2 -2
View File
@@ -1,10 +1,10 @@
check-ms-test-suite:
@if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -t:library -warn:1 -r:nunit.framework" && \
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:nunit.framework" && \
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-console.exe -nologo -exclude=MonoBug,BadTest" NUNIT_XML_RESULT=$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml || EXIT_CODE=1; \
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug -warn:1" && \
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
exit $$EXIT_CODE; \
else \
echo "*** [ms-test-suite] Getting the repository failed, you probably don't have access to this Xamarin-internal resource. Skipping."; \
fi
fi
+13
View File
@@ -0,0 +1,13 @@
SYS_REFS = \
System.dll \
System.Core.dll \
System.Data.dll \
System.Runtime.Serialization.dll \
System.Xml.dll \
System.Xml.Linq.dll \
Mono.Posix.dll
check-profiler-stress:
@$(MAKE) validate-benchmarker RESET_VERSIONS=1
cd profiler-stress && $(MCS) -target:exe $(addprefix -r:, $(SYS_REFS)) -out:runner.exe @runner.exe.sources
cd profiler-stress && $(RUNTIME) runner.exe
+278
View File
@@ -0,0 +1,278 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Xml;
using Mono.Unix.Native;
using Newtonsoft.Json;
// Shut up CLS compliance warnings from Json.NET.
[assembly: CLSCompliant (true)]
namespace Mono.Profiling.Tests.Stress {
// https://github.com/xamarin/benchmarker/blob/master/tools/libdbmodel/Benchmark.cs
sealed class Benchmark {
public string Name { get; set; }
public string TestDirectory { get; set; }
public bool OnlyExplicit { get; set; }
public string[] CommandLine { get; set; }
public string[] ClientCommandLine { get; set; }
public string[] AOTAssemblies { get; set; }
public static Benchmark Load (string file)
{
return JsonConvert.DeserializeObject<Benchmark> (File.ReadAllText (file));
}
}
sealed class TestResult {
public Benchmark Benchmark { get; set; }
public ProcessStartInfo StartInfo { get; set; }
public Stopwatch Stopwatch { get; set; } = new Stopwatch ();
public int? ExitCode { get; set; }
public StringBuilder StandardOutput { get; set; } = new StringBuilder ();
public StringBuilder StandardError { get; set; } = new StringBuilder ();
}
static class Program {
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
static string FilterInvalidXmlChars (string text) {
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
}
static int Main ()
{
var depDir = Path.Combine ("..", "external", "benchmarker");
var benchDir = Path.Combine (depDir, "benchmarks");
var testDir = Path.Combine (depDir, "tests");
var benchmarks = Directory.EnumerateFiles (benchDir, "*.benchmark")
.Select (Benchmark.Load)
.Where (b => !b.OnlyExplicit && b.ClientCommandLine == null)
.OrderBy (b => b.Name)
.ToArray ();
var monoPath = Path.GetFullPath (Path.Combine ("..", "..", "runtime", "mono-wrapper"));
var classDir = Path.GetFullPath (Path.Combine ("..", "..", "mcs", "class", "lib", "net_4_x"));
var rand = new Random ();
var cpus = Environment.ProcessorCount;
var results = new List<TestResult> (benchmarks.Length);
var sw = Stopwatch.StartNew ();
for (var i = 0; i < benchmarks.Length; i++) {
var bench = benchmarks [i];
var sampleFreq = rand.Next (0, 1001);
var sampleMode = rand.Next (0, 2) == 1 ? "real" : "process";
var maxSamples = rand.Next (0, cpus * 2000 + 1);
var heapShotFreq = rand.Next (0, 11);
var maxFrames = rand.Next (0, 33);
var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
var profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
var info = new ProcessStartInfo {
UseShellExecute = false,
WorkingDirectory = Path.Combine (testDir, bench.TestDirectory),
FileName = monoPath,
Arguments = $"--debug --profile=log:{profOptions} " + string.Join (" ", bench.CommandLine),
RedirectStandardOutput = true,
RedirectStandardError = true,
};
info.EnvironmentVariables.Clear ();
info.EnvironmentVariables.Add ("MONO_PATH", classDir);
var progress = $"({i + 1}/{benchmarks.Length})";
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} Running {bench.Name} with profiler options: {profOptions}");
Console.ResetColor ();
var result = new TestResult {
Benchmark = bench,
StartInfo = info,
};
using (var proc = new Process ()) {
proc.StartInfo = info;
proc.OutputDataReceived += (sender, args) => {
if (args.Data != null)
result.StandardOutput.AppendLine (args.Data);
};
proc.ErrorDataReceived += (sender, args) => {
if (args.Data != null)
result.StandardError.AppendLine (args.Data);
};
result.Stopwatch.Start ();
proc.Start ();
proc.BeginOutputReadLine ();
proc.BeginErrorReadLine ();
if (!proc.WaitForExit ((int) _timeout.TotalMilliseconds)) {
// Force a thread dump.
Syscall.kill (proc.Id, Signum.SIGQUIT);
Thread.Sleep (1000);
try {
proc.Kill ();
} catch (Exception) {
}
} else
result.ExitCode = proc.ExitCode;
result.Stopwatch.Stop ();
}
var resultStr = result.ExitCode == null ? "timed out" : $"exited with code: {result.ExitCode}";
Console.ForegroundColor = result.ExitCode != 0 ? ConsoleColor.Red : ConsoleColor.Green;
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} {bench.Name} took {result.Stopwatch.Elapsed.ToString ("G")} and {resultStr}");
Console.ResetColor ();
if (result.ExitCode != 0) {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine ("===== stdout =====");
Console.ResetColor ();
Console.WriteLine (result.StandardOutput.ToString ());
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine ("===== stderr =====");
Console.ResetColor ();
Console.WriteLine (result.StandardError.ToString ());
}
results.Add (result);
}
sw.Stop ();
var successes = results.Count (r => r.ExitCode == 0);
var failures = results.Count (r => r.ExitCode != null && r.ExitCode != 0);
var timeouts = results.Count (r => r.ExitCode == null);
var settings = new XmlWriterSettings {
NewLineOnAttributes = true,
Indent = true,
};
using (var writer = XmlWriter.Create ("TestResult-profiler-stress.xml", settings)) {
writer.WriteStartDocument ();
writer.WriteComment ("This file represents the results of running a test suite");
writer.WriteStartElement ("test-results");
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
writer.WriteAttributeString ("total", results.Count.ToString ());
writer.WriteAttributeString ("failures", failures.ToString ());
writer.WriteAttributeString ("not-run", "0");
writer.WriteAttributeString ("date", DateTime.Now.ToString ("yyyy-MM-dd"));
writer.WriteAttributeString ("time", DateTime.Now.ToString ("HH:mm:ss"));
writer.WriteStartElement ("environment");
writer.WriteAttributeString ("nunit-version", "2.4.8.0");
writer.WriteAttributeString ("clr-version", Environment.Version.ToString ());
writer.WriteAttributeString ("os-version", Environment.OSVersion.ToString ());
writer.WriteAttributeString ("platform", Environment.OSVersion.Platform.ToString ());
writer.WriteAttributeString ("cwd", Environment.CurrentDirectory);
writer.WriteAttributeString ("machine-name", Environment.MachineName);
writer.WriteAttributeString ("user", Environment.UserName);
writer.WriteAttributeString ("user-domain", Environment.UserDomainName);
writer.WriteEndElement ();
writer.WriteStartElement ("culture-info");
writer.WriteAttributeString ("current-culture", CultureInfo.CurrentCulture.Name);
writer.WriteAttributeString ("current-uiculture", CultureInfo.CurrentUICulture.Name);
writer.WriteEndElement ();
writer.WriteStartElement ("test-suite");
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
writer.WriteStartElement ("results");
writer.WriteStartElement ("test-suite");
writer.WriteAttributeString ("name", "MonoTests");
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
writer.WriteStartElement ("results");
writer.WriteStartElement ("test-suite");
writer.WriteAttributeString ("name", "profiler-stress");
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
writer.WriteStartElement ("results");
foreach (var result in results) {
var timeoutStr = result.ExitCode == null ? "_timeout" : string.Empty;
writer.WriteStartElement ("test-case");
writer.WriteAttributeString ("name", $"MonoTests.profiler-stress.{result.Benchmark.Name}{timeoutStr}");
writer.WriteAttributeString ("executed", "True");
writer.WriteAttributeString ("success", (result.ExitCode == 0).ToString ());
writer.WriteAttributeString ("time", ((int) result.Stopwatch.Elapsed.TotalSeconds).ToString ());
writer.WriteAttributeString ("asserts", result.ExitCode == 0 ? "0" : "1");
if (result.ExitCode != 0) {
writer.WriteStartElement ("failure");
writer.WriteStartElement ("message");
writer.WriteCData (FilterInvalidXmlChars (result.StandardOutput.ToString ()));
writer.WriteEndElement ();
writer.WriteStartElement ("stack-trace");
writer.WriteCData (FilterInvalidXmlChars (result.StandardError.ToString ()));
writer.WriteEndElement ();
writer.WriteEndElement ();
}
writer.WriteEndElement ();
}
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndDocument ();
}
var failureStr = failures + timeouts != 0 ? $" ({failures} failures, {timeouts} timeouts)" : string.Empty;
Console.ForegroundColor = failures + timeouts != 0 ? ConsoleColor.Red : ConsoleColor.Green;
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Finished with {successes}/{results.Count} passing tests{failureStr}");
Console.ResetColor ();
return failures + timeouts;
}
}
}
@@ -0,0 +1,156 @@
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryType.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonReader.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonToken.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonType.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonObjectId.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BinaryConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataSetConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataTableConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DateTimeConverterBase.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/ExpandoObjectConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/KeyValuePairConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BsonObjectIdConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/RegexConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/StringEnumConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ConstructorHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/VersionConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateFormatHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateTimeZoneHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Formatting.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConstructorAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPosition.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyKeyedCollection.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxy.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPath.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JRaw.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Required.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDynamicContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonLinqContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPrimitiveContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorEventArgs.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultReferenceResolver.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/PreserveReferencesHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/IJsonLineInfo.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonArrayAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonContainerAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DefaultValueHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonObjectAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializerSettings.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonValidatingReader.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/IJEnumerable.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenEqualityComparer.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MemberSerialization.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ObjectCreationHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/IsoDateTimeConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/JavaScriptDateTimeConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextReader.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPropertyAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonIgnoreAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriterException.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReaderException.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterCollection.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReader.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConvert.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializationException.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializer.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/Extensions.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JConstructor.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JContainer.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JEnumerable.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JObject.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JArray.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenReader.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JToken.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JProperty.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenType.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JValue.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/Extensions.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CamelCasePropertyNamesContractResolver.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorContext.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IContractResolver.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IValueProvider.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonProperty.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPropertyCollection.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MissingMemberHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/NullValueHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ReferenceLoopHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchema.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IReferenceResolver.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerProxy.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonStringContract.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CachedAttributeGetter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/LateBoundMetadataTypeAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ReflectionValueProvider.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/OnErrorAttribute.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/Base64Encoder.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxyMetaObject.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ObjectConstructor.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionDelegateFactory.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/LateBoundReflectionDelegateFactory.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MethodCall.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringReference.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/TypeNameHandling.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/BidirectionalDictionary.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionWrapper.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValue.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValues.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/JavaScriptUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonToken.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriter.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringBuffer.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ListWrapper.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MathUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ValidationUtils.cs
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/WriteState.cs
runner.cs
+10
View File
@@ -3,28 +3,35 @@
SUBMODULES_CONFIG_FILE = $(top_srcdir)/acceptance-tests/SUBMODULES.json
include $(top_srcdir)/scripts/submodules/versions.mk
$(eval $(call ValidateVersionTemplate,benchmarker,BENCHMARKER))
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
# Bump the given submodule to the revision given by the REV make variable
# If COMMIT is 1, commit the change
bump-benchmarker: __bump-benchmarker
bump-roslyn: __bump-version-roslyn
bump-coreclr: __bump-version-coreclr
bump-ms-test-suite: __bump-version-ms-test-suite
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
# If COMMIT is 1, commit the change
bump-branch-benchmarker: __bump-branch-benchmarker
bump-branch-roslyn: __bump-branch-roslyn
bump-branch-coreclr: __bump-branch-coreclr
bump-branch-ms-test-suite: __bump-branch-ms-test-suite
# Bump the given submodule to its current GIT version
# If COMMIT is 1, commit the change
bump-current-benchmarker: __bump-current-benchmarker
bump-current-roslyn: __bump-current-version-roslyn
bump-current-coreclr: __bump-current-version-coreclr
bump-current-ms-test-suite: __bump-current-version-ms-test-suite
commit-bump-benchmarker:
$(MAKE) bump-benchmarker COMMIT=1
commit-bump-roslyn:
$(MAKE) bump-roslyn COMMIT=1
@@ -34,6 +41,9 @@ commit-bump-coreclr:
commit-bump-ms-test-suite:
$(MAKE) bump-ms-test-suite COMMIT=1
commit-bump-current-benchmarker:
$(MAKE) bump-current-benchmarker COMMIT=1
commit-bump-current-roslyn:
$(MAKE) bump-current-roslyn COMMIT=1
-79
View File
@@ -1,79 +0,0 @@
#
# Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
#
# For further details see http://www.appveyor.com
#
#
# Custom environment variables
#
environment:
global:
CYG_ROOT: C:\cygwin
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_CACHE: C:\cygwin\var\cache\setup
CYG_BASH: C:\cygwin\bin\bash
#
# Cache Cygwin files to speed up build
#
cache:
- '%CYG_CACHE%'
#
# Do a shallow clone of the repo to speed up build
#
clone_depth: 1
#
# Initialisation prior to pulling the Mono repository
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
#
init:
- git config --global core.autocrlf input
#
# Install needed build dependencies
#
install:
- ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"'
- 'setup-x86.exe --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages autoconf,automake,bison,gcc-core,gcc-g++,mingw-runtime,mingw-binutils,mingw-gcc-core,mingw-gcc-g++,mingw-pthreads,mingw-w32api,libtool,make,python,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,libxslt > NUL 2>&1'
- '%CYG_BASH% -lc "cygcheck -dc cygwin"'
# Cygwin build script
#
# NOTES:
#
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
# build which causes failures as certain functions attempt to redirect
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
#
build_script:
- 'echo Building...'
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./autogen.sh --prefix=/usr/local --host=i686-pc-mingw32"'
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make -j2"'
- 'echo Installing...'
- 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
- '%CYG_BASH% -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
#
# Disable tests for now
#
test: off
#
# Only build the master branch
#
branches:
only:
- master
#
# NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
# It has to be relative to the project path. Thus we have installed to within the build tree.
#
artifacts:
- path: install
name: mono-binaries
type: zip
+169 -26
View File
@@ -2,7 +2,7 @@
#AC_PREREQ([2.62])
# when bumping version number below, keep it in sync with man/mono.1 too
AC_INIT(mono, [4.7.0],
AC_INIT(mono, [4.9.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -52,6 +52,8 @@ CPPFLAGS_FOR_LIBGC=$CPPFLAGS
CFLAGS_FOR_LIBGC=$CFLAGS
CPPFLAGS_FOR_EGLIB=$CPPFLAGS
CFLAGS_FOR_EGLIB=$CFLAGS
CPPFLAGS_FOR_BTLS=$CPPFLAGS
CFLAGS_FOR_BTLS=$CFLAGS
# libgc uses some deprecated APIs
CFLAGS_FOR_LIBGC="$CFLAGS -Wno-deprecated-declarations"
@@ -66,7 +68,11 @@ AC_SUBST(libmono_cflags)
AC_SUBST(libmono_ldflags)
# Variable to have relocatable .pc files (lib, or lib64)
reloc_libdir=`basename ${libdir}`
# realpath isn't always available, and requires that all but the tip of the provided
# path exists. Fall back to the old behaviour, but realpath allows depth >1
# e.g. Debian puts Mono in /usr/bin and libs in /usr/lib/x86_64-linux-gnu/ which is
# too deep for the old method to work
reloc_libdir=`realpath --relative-to=${prefix} ${libdir} 2> /dev/null || basename ${libdir}`
AC_SUBST(reloc_libdir)
# Set to yes if Unix sockets cannot be created in an anonymous namespace
@@ -111,6 +117,7 @@ case "$host" in
libgc_threads=win32
with_sigaltstack=no
with_tls=pthread
with_sgen_default_concurrent=yes
LN_S=cp
# This forces libgc to use the DllMain based thread registration code on win32
libgc_configure_args="$libgc_configure_args --enable-win32-dllmain=yes"
@@ -126,6 +133,7 @@ case "$host" in
libgc_threads=pthreads
with_sigaltstack=no
use_sigposix=yes
with_sgen_default_concurrent=yes
;;
*-*-kfreebsd*-gnu)
CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -DTHREAD_LOCAL_ALLOC -pthread"
@@ -136,6 +144,7 @@ case "$host" in
need_link_unlink=yes
with_sigaltstack=no
use_sigposix=yes
with_sgen_default_concurrent=yes
;;
*-*-*freebsd*)
if test "x$PTHREAD_CFLAGS" = "x"; then
@@ -159,6 +168,7 @@ case "$host" in
libgc_threads=pthreads
use_sigposix=yes
has_dtrace=yes
with_sgen_default_concurrent=yes
;;
*-*-*openbsd*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_REENTRANT -DUSE_MMAP"
@@ -173,6 +183,7 @@ case "$host" in
libgc_threads=pthreads
with_sigaltstack=no
use_sigposix=yes
with_sgen_default_concurrent=yes
;;
*-*-linux-android*)
platform_android=yes
@@ -236,6 +247,7 @@ case "$host" in
disable_munmap=yes
;;
esac
with_sgen_default_concurrent=yes
;;
*-*-nacl*)
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
@@ -308,8 +320,10 @@ case "$host" in
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_CPPFLAGS"
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
with_sgen_default_concurrent=yes
;;
x*64-*-darwin*)
with_sgen_default_concurrent=yes
;;
arm*-darwin*)
has_dtrace=no
@@ -345,6 +359,10 @@ if test x$target_win32 = xyes; then
AC_DEFINE(TARGET_WIN32, 1, [Target Platform is Win32])
fi
# Defined for all targets/platforms using classic Windows API support.
AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support])
AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
AC_SUBST(extra_runtime_ldflags)
AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
@@ -1156,20 +1174,6 @@ AC_COMPILE_IFELSE([
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for deprecated __attribute__)
AC_TRY_COMPILE([
int doit (void) __attribute__ ((deprecated));
int doit (void) { return 0; }
], [
return 0;
], [
have_deprecated=yes
AC_MSG_RESULT(yes)
], [
have_deprecated=no
AC_MSG_RESULT(no)
])
dnl
dnl Boehm GC configuration
dnl
@@ -2666,12 +2670,6 @@ fi
AC_ARG_ENABLE(bcl-opt, [ --disable-bcl-opt BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes)
AC_ARG_ENABLE(perf-events, [ --enable-perf-events Enable using `perf` for profiling on Linux], test_perf_events=$enableval, test_perf_events=no)
if test "x$test_perf_events" = "xyes"; then
AC_DEFINE(ENABLE_PERF_EVENTS, 1, [Enable using `perf` for profiling on Linux])
AC_SUBST(ENABLE_PERF_EVENTS)
fi
AC_MSG_CHECKING([if big-arrays are to be enabled])
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
if test "x$enable_big_arrays" = "xyes" ; then
@@ -2856,13 +2854,12 @@ if test "x$enable_llvm" = "xyes"; then
LLVM_SYSTEM_LIBS=`$LLVM_CONFIG --system-libs 2>/dev/null | grep -- -`
llvm_jit_supported=yes
llvm_jit_libs="jit mcjit $llvm_codegen"
if test $llvm_api_version -gt 100; then
# Based on llvm 3.9, only aot is currently supported
llvm_jit_libs="orcjit $llvm_codegen"
elif test "x$host" != "x$target"; then
if test "x$host" != "x$target"; then
# No need for jit libs
llvm_jit_supported=no
llvm_jit_libs=""
elif test $llvm_api_version -gt 100; then
llvm_jit_libs="orcjit $llvm_codegen"
fi
LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter $llvm_jit_libs`
if test "x$LLVM_LIBS" = "x"; then
@@ -2948,6 +2945,8 @@ sizeof_register="SIZEOF_VOID_P"
jit_wanted=true
boehm_supported=true
BTLS_SUPPORTED=no
BTLS_PLATFORM=
case "$host" in
mips*)
TARGET=MIPS;
@@ -3000,9 +2999,13 @@ case "$host" in
;;
linux*)
AOT_SUPPORTED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=i386
;;
darwin*)
AOT_SUPPORTED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=i386
;;
openbsd*|freebsd*|kfreebsd-gnu*)
;;
@@ -3018,9 +3021,13 @@ case "$host" in
case $host_os in
linux*)
AOT_SUPPORTED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=x86_64
;;
darwin*)
AOT_SUPPORTED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=x86_64
;;
openbsd*|freebsd*|kfreebsd-gnu*)
;;
@@ -3141,6 +3148,7 @@ HOST=$TARGET
if test "x$host" != "x$target"; then
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
enable_mcs_build=no
BTLS_SUPPORTED=no
case "$target" in
arm*-darwin*)
TARGET=ARM;
@@ -3426,10 +3434,12 @@ if test "x$target_mach" = "xyes"; then
AC_DEFINE(TARGET_WATCHOS,1,[The JIT/AOT targets WatchOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
BTLS_SUPPORTED=no
elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
BTLS_SUPPORTED=no
else
AC_TRY_COMPILE([#include "TargetConditionals.h"],[
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
@@ -3444,6 +3454,7 @@ if test "x$target_mach" = "xyes"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
BTLS_SUPPORTED=no
])
fi
AC_DEFINE(TARGET_MACH,1,[The JIT/AOT targets Apple platforms])
@@ -3751,6 +3762,45 @@ if test ${TARGET} = unknown; then
AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
fi
if test "x$platform_android" = "xyes"; then
case "x${TARGET}" in
xARM)
case "x$arm_ver" in
xARMv5)
BTLS_SUPPORTED=yes
BTLS_PLATFORM=android-armv5
;;
xARMv6)
BTLS_SUPPORTED=yes
BTLS_PLATFORM=android-armv6
;;
xARMv7)
BTLS_SUPPORTED=yes
BTLS_PLATFORM=android-armv7
;;
*)
BTLS_SUPPORTED=no
;;
esac
;;
xARM64)
BTLS_SUPPORTED=yes
BTLS_PLATFORM=android-v8a
;;
xX86)
BTLS_SUPPORTED=yes
BTLS_PLATFORM=android-x86
;;
xAMD64)
BTLS_SUPPORTED=yes
BTLS_PLATFORM=android-x64
;;
*)
BTLS_SUPPORTED=no
;;
esac
fi
if test ${ACCESS_UNALIGNED} = no; then
CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
fi
@@ -3873,6 +3923,88 @@ else
fi
AC_SUBST(LIBMONO_LA)
dnl **************
dnl *** Btls ***
dnl **************
AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
AM_CONDITIONAL(BTLS, test x$enable_btls = xyes)
btls_android=no
if test "x$enable_btls" = "xyes"; then
AC_PATH_PROG(CMAKE, [cmake], [no], [$PATH:/Applications/CMake.app/Contents/bin:/usr/local/bin])
if test "x$CMAKE" = "xno"; then
AC_MSG_ERROR("cmake not found")
fi
BTLS_ROOT=`cd $srcdir && pwd`/external/boringssl
AC_SUBST(BTLS_ROOT)
btls_arch=
btls_cflags=
BTLS_CMAKE_ARGS=
case "$BTLS_PLATFORM" in
i386)
btls_arch=i386
btls_cflags="-m32"
case $host_os in
darwin*)
btls_cflags="$btls_cflags -arch i386"
esac
;;
x86_64)
btls_arch=x86_64
;;
android-armv5)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
;;
android-armv6)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
;;
android-armv7)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=12"
;;
android-v8a)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=12"
;;
android-x86)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=12"
;;
android-x64)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=12"
;;
*)
AC_MSG_ERROR(Invalid BTLS platform)
esac
if test "x$platform_android" = "xyes"; then
btls_android=yes
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$BTLS_ROOT/util/android-cmake/android.toolchain.cmake"
if test "x$with_btls_android_ndk" != "x"; then
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DANDROID_NDK=\"$with_btls_android_ndk\""
fi
fi
if test "x$btls_arch" != "x"; then
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DBTLS_ARCH=\"$btls_arch\""
fi
BTLS_CFLAGS="$CPPFLAGS_FOR_BTLS $btls_cflags"
AC_SUBST(BTLS_ARCH)
AC_SUBST(BTLS_CFLAGS)
AC_SUBST(BTLS_PLATFORM)
AC_SUBST(BTLS_CMAKE_ARGS)
AC_DEFINE(HAVE_BTLS, 1, [BoringTls is supported])
else
enable_btls=no
fi
AM_CONDITIONAL(BTLS_ANDROID, test x$btls_android = xyes)
if test x$DISABLE_MCS_DOCS = xyes; then
docs_dir=""
else
@@ -4109,6 +4241,7 @@ llvm/Makefile
scripts/mono-find-provides
scripts/mono-find-requires
mono/Makefile
mono/btls/Makefile
mono/utils/Makefile
mono/metadata/Makefile
mono/dis/Makefile
@@ -4280,6 +4413,15 @@ fi
libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
btls_platform_string=
if test x$enable_btls = xyes; then
if test x$btls_android = xyes; then
btls_platform_string=" (android:$BTLS_PLATFORM)"
else
btls_platform_string=" ($BTLS_PLATFORM)"
fi
fi
echo "
mcs source: $mcsdir
@@ -4305,6 +4447,7 @@ echo "
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
zlib: $zlib_msg
BTLS: $enable_btls$btls_platform_string
$disabled
"
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
+3 -4
View File
@@ -40,9 +40,8 @@
<p>The output of the SCC analysis is passed to the
`cross_references()` callback. It is expected to set the
`is_alive` flag on those strongly connected components that it
wishes to be kept alive. Only bridged objects will be
reported to the callback, i.e., non-bridged objects are
removed from the callback graph.
wishes to be kept alive. The value of `is_alive` will be
ignored on any SCCs which lack bridges.
<p>In monodroid each bridged object has a corresponding Java
mirror object. In the bridge callback it reifies the Mono
@@ -63,7 +62,7 @@
<div class="mapi-header">
enum {
SGEN_BRIDGE_VERSION = 4
SGEN_BRIDGE_VERSION = 5
};
typedef enum {
+6 -2
View File
@@ -130,6 +130,10 @@ AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
# Defined for all targets/platforms using classic Windows API support.
AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support])
AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
@@ -140,7 +144,7 @@ AC_CHECK_FUNCS(fork execv execve)
AC_ARG_WITH([overridable-allocators], [ --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable])
if test x$with_overridable_allocators == xyes; then
if test x$with_overridable_allocators = xyes; then
AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled])
AC_MSG_NOTICE([Overridable allocator support enabled])
else
@@ -160,7 +164,7 @@ elif test x$target_ios = xno; then
AC_CHECK_FUNCS(strndup getpwuid_r)
fi
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators == xyes)
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators = xyes)
AM_ICONV()
AC_SEARCH_LIBS(sqrtf, m)
+21
View File
@@ -35,6 +35,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <direct.h>
#ifdef G_OS_WIN32
#include <io.h>
@@ -68,6 +69,26 @@ int mkstemp (char *tmp_template)
return fd;
}
gchar *
g_mkdtemp (char *tmp_template)
{
gunichar2* utf16_template;
utf16_template = u8to16 (tmp_template);
utf16_template = _wmktemp(utf16_template);
if (utf16_template && *utf16_template) {
if (_wmkdir (utf16_template) == 0){
char *ret = u16to8 (utf16_template);
g_free (utf16_template);
return ret;
}
}
g_free (utf16_template);
return NULL;
}
#ifdef _MSC_VER
#pragma warning(disable:4701)
#endif
+4 -1
View File
@@ -199,8 +199,11 @@ g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft,
} else {
outleftptr = NULL;
}
#if defined(__NetBSD__)
return iconv (cd->cd, (const gchar **)inbytes, inleftptr, outbytes, outleftptr);
#else
return iconv (cd->cd, inbytes, inleftptr, outbytes, outleftptr);
#endif
}
#endif
+10
View File
@@ -887,6 +887,12 @@ gboolean g_file_test (const gchar *filename, GFileTest test);
#define g_ascii_strtod strtod
#define g_ascii_isalnum isalnum
#ifdef WIN32
gchar *g_mkdtemp (gchar *tmpl);
#else
#define g_mkdtemp mkdtemp
#endif
/*
* Pattern matching
*/
@@ -1062,6 +1068,10 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
#define _EGLIB_MINOR 0
#define GLIB_CHECK_VERSION(a,b,c) ((a < _EGLIB_MAJOR) || (a == _EGLIB_MAJOR && (b < _EGLIB_MIDDLE || (b == _EGLIB_MIDDLE && c <= _EGLIB_MINOR))))
#define G_HAVE_API_SUPPORT(x) (x)
#define G_UNSUPPORTED_API "%s:%d: '%s' not supported.", __FILE__, __LINE__
#define g_unsupported_api(name) G_STMT_START { g_warning (G_UNSUPPORTED_API, name); } G_STMT_END
G_END_DECLS
+56 -14
View File
@@ -26,12 +26,18 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <config.h>
#include <stdlib.h>
#include <glib.h>
#include <windows.h>
#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
#include <shlobj.h>
#endif
#include <direct.h>
#include <io.h>
#include <assert.h>
const gchar *
g_getenv(const gchar *variable)
@@ -84,17 +90,40 @@ g_unsetenv(const gchar *variable)
g_free(var);
}
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
gchar*
g_win32_getlocale(void)
{
LCID lcid = GetThreadLocale();
gchar buf[19];
gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
gint ccBuf = GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, buf, 9);
buf[ccBuf - 1] = '-';
ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
ccBuf += GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
return g_strdup (buf);
}
#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
gchar*
g_win32_getlocale(void)
{
gunichar2 buf[19];
gint ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO639LANGNAME, buf, 9);
assert (ccBuf <= 9);
if (ccBuf != 0) {
buf[ccBuf - 1] = L'-';
ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
assert (ccBuf <= 9);
}
// Check for GetLocaleInfoEx failure.
if (ccBuf == 0)
buf[0] = L'\0';
return u16to8 (buf);
}
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
gboolean
g_path_is_absolute (const char *filename)
{
@@ -116,20 +145,34 @@ g_path_is_absolute (const char *filename)
const gchar *
g_get_home_dir (void)
{
/* FIXME */
const gchar *drive = g_getenv ("HOMEDRIVE");
const gchar *path = g_getenv ("HOMEPATH");
gchar *home_dir = NULL;
if (drive && path) {
home_dir = g_malloc(strlen(drive) + strlen(path) +1);
if (home_dir) {
sprintf(home_dir, "%s%s", drive, path);
}
#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
PWSTR profile_path = NULL;
HRESULT hr = SHGetKnownFolderPath (&FOLDERID_Profile, KF_FLAG_DEFAULT, NULL, &profile_path);
if (SUCCEEDED(hr)) {
home_dir = u16to8 (profile_path);
CoTaskMemFree (profile_path);
}
#endif
if (!home_dir) {
home_dir = (gchar *) g_getenv ("USERPROFILE");
}
g_free (drive);
g_free (path);
if (!home_dir) {
const gchar *drive = g_getenv ("HOMEDRIVE");
const gchar *path = g_getenv ("HOMEPATH");
if (drive && path) {
home_dir = g_malloc (strlen (drive) + strlen (path) + 1);
if (home_dir) {
sprintf (home_dir, "%s%s", drive, path);
}
}
g_free (drive);
g_free (path);
}
return home_dir;
}
@@ -163,4 +206,3 @@ g_get_tmp_dir (void)
}
return tmp_dir;
}
+43
View File
@@ -28,6 +28,7 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <config.h>
#include <glib.h>
#include <gmodule.h>
#include <windows.h>
@@ -68,6 +69,7 @@ g_module_open (const gchar *file, GModuleFlags flags)
return module;
}
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
static gpointer
w32_find_symbol (const gchar *symbol_name)
{
@@ -115,6 +117,17 @@ w32_find_symbol (const gchar *symbol_name)
return NULL;
}
#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
static gpointer
w32_find_symbol (const gchar *symbol_name)
{
g_unsupported_api ("EnumProcessModules");
SetLastError (ERROR_NOT_SUPPORTED);
return NULL;
}
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
gboolean
g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
{
@@ -134,6 +147,7 @@ g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
}
}
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
const gchar *
g_module_error (void)
{
@@ -151,6 +165,35 @@ g_module_error (void)
return ret;
}
#elif G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
const gchar *
g_module_error (void)
{
gchar* ret = NULL;
TCHAR buf[1024];
DWORD code = GetLastError ();
if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, G_N_ELEMENTS(buf) - 1, NULL) )
buf[0] = TEXT('\0');
ret = u16to8 (buf);
return ret;
}
#else
const gchar *
g_module_error (void)
{
g_unsupported_api ("FormatMessage");
SetLastError (ERROR_NOT_SUPPORTED);
return NULL;
}
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
gboolean
g_module_close (GModule *module)
{
+30 -10
View File
@@ -205,24 +205,22 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
return res;
}
#ifdef G_OS_WIN32
extern WINBASEAPI UINT WINAPI GetACP(void);
gboolean
g_get_charset (G_CONST_RETURN char **charset)
{
if (my_charset == NULL) {
#ifdef G_OS_WIN32
static char buf [14];
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
CPINFOEXA cp_info;
GetCPInfoExA (CP_ACP, 0, &cp_info);
sprintf (buf, "CP%u", cp_info.CodePage);
#else
sprintf (buf, "CP%u", GetACP ());
#endif
my_charset = buf;
is_utf8 = FALSE;
#else
/* These shouldn't be heap allocated */
#if defined(HAVE_LOCALCHARSET_H)
my_charset = locale_charset ();
#else
my_charset = "UTF-8";
#endif
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
#endif
}
if (charset != NULL)
@@ -231,6 +229,28 @@ g_get_charset (G_CONST_RETURN char **charset)
return is_utf8;
}
#else /* G_OS_WIN32 */
gboolean
g_get_charset (G_CONST_RETURN char **charset)
{
if (my_charset == NULL) {
/* These shouldn't be heap allocated */
#if defined(HAVE_LOCALCHARSET_H)
my_charset = locale_charset ();
#else
my_charset = "UTF-8";
#endif
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
}
if (charset != NULL)
*charset = my_charset;
return is_utf8;
}
#endif /* G_OS_WIN32 */
gchar *
g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
{
+7
View File
@@ -28,7 +28,10 @@
#include <config.h>
#include "test.h"
#ifndef DRIVER_EXTERNAL_TESTS
#include "tests.h"
#endif
#include <stdio.h>
#ifdef HAVE_GETOPT_H
@@ -102,7 +105,11 @@ static void print_help(char *s)
printf("\n");
}
#ifdef DRIVER_EXTERNAL_MAIN
gint run_tests_main(gint argc, gchar **argv)
#else
gint main(gint argc, gchar **argv)
#endif
{
gint i, j, c, iterations = 1;
StringArray *tests_to_run = NULL;
+20
View File
@@ -78,4 +78,24 @@
#define VERSION "0.1"
#define HAVE_STRTOK_R 1
#ifndef HAVE_WINAPI_FAMILY_SUPPORT
#define HAVE_WINAPI_FAMILY_SUPPORT
/* WIN API Family support */
#include <winapifamily.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define HAVE_CLASSIC_WINAPI_SUPPORT 1
#define HAVE_UWP_WINAPI_SUPPORT 0
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
#define HAVE_UWP_WINAPI_SUPPORT 1
#else
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
#define HAVE_UWP_WINAPI_SUPPORT 0
#endif
#endif
#endif
Vendored Submodule
+1
Submodule external/boringssl added at 432738a3c9.
+1 -1
Vendored Submodule
+1
Submodule external/cecil-legacy added at 33d50b874f.
Vendored Submodule
+1
Submodule external/corefx added at b1aa1d92ca.
+1 -1
+1
View File
@@ -93,6 +93,7 @@ GC_API GC_PTR (*GC_oom_fn) GC_PROTO((size_t bytes_requested));
/* pointer to a previously allocated heap */
/* object. */
// Keep somewhat in sync with mono/metadata/profiler.h:enum MonoGCEvent
typedef enum {
GC_EVENT_START,
GC_EVENT_MARK_START,
+1 -1
View File
@@ -26,7 +26,7 @@
# define __KERNEL__
# include <asm/signal.h>
# undef __KERNEL__
# else
# elif defined(__GLIBC__)
/* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
/* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */
/* prototypes, so we have to include the top-level sigcontext.h to */
+1
View File
@@ -2,6 +2,7 @@ man_MANS = \
al.1 \
cert2spc.1 \
certmgr.1 \
cert-sync.1 \
chktrust.1 \
cilc.1 \
crlupdate.1 \
+52
View File
@@ -0,0 +1,52 @@
.\"
.\" cert-sync manual page.
.\" Copyright 2016 Microsoft Corp
.\" Author:
.\" Jo Shields <[email protected]>
.\"
.TH Mono "cert-sync"
.SH NAME
cert-sync \- Mono Certificate Store Sync Tool
.SH SYNOPSIS
.PP
.B cert-sync [--quiet] [--user] filename
.SH DESCRIPTION
This tool allows you to populate a Mono certificate store, from a large
concatenated list of certificates in PEM format (commonly provided on most
Linux distributions).
Its use is intended to be automated at Mono install time, by distribution
packagers, to seamlessly provide SSL support to Mono applications without
further user interaction.
.SH OPTIONS
.TP
.I "--quiet"
Suppress verbose output
.TP
.I "--user"
Populate the per-user store in the user's home directory, instead of the
system-wide store.
.TP
.I "filename.crt"
Path to a certificate bundle. The Mono store will have any extra entries
removed, and new entries added, to reflect the provided file.
.SH EXAMPLES
.TP
.B cert-sync /etc/ssl/certs/ca-certificates.crt
Synchronize the machine store, from the Debian cert store location
.TP
.B cert-sync --user /etc/pki/tls/certs/ca-bundle.crt
Synchronize the user store, from the Red Hat cert store location
.SH AUTHOR
Written by Jo Shields
.SH COPYRIGHT
Copyright (C) 2016 Microsoft Corp
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
.SH WEB SITE
Visit http://www.mono-project.com for details
.SH SEE ALSO
.BR certmgr(1)
+12 -3
View File
@@ -18,7 +18,8 @@ prepending the @ symbol to the response file name.
The
.I mcs
compiler is used to compile against the latest Mono Base Class Library
version and fully implements C# 1.0, 2.0, 3.0 and 4.0 specifications.
version and fully implements C# 1.0, 2.0, 3.0, 4.0, 5.0 and 6.0
specifications.
.PP
See the section on packages for more information.
.PP
@@ -163,7 +164,7 @@ The possible values are:
.TP
.I "Default"
Instruct compiler to use the latest version. Equivalent is to omit the
switch (this currently defaults to the C# 4.0 language specification).
switch (this currently defaults to the C# 6.0 language specification).
.TP
.I "ISO-1"
Restrict compiler to use only first ISO standardized features.
@@ -183,6 +184,14 @@ Restrict the compiler to use only the features available in C# 3.0
Restrict the compiler to use only the features available in C# 4.0
specification.
.TP
.I "5"
Restrict the compiler to use only the features available in C# 5.0
specification.
.TP
.I "6"
Restrict the compiler to use only the features available in C# 6.0
specification.
.TP
.I "experimental"
Enables unstable features from upcoming versions of the language.
.PP
@@ -510,7 +519,7 @@ the MIT X11. Please read the accompanying `COPYING' file for details.
Alternative licensing for the compiler is available from Xamarin.
.PP
.SH SEE ALSO
csharp(1), mdb(1), mono(1), mopen(1), pkg-config(1), sn(1)
csharp(1), mono(1), pkg-config(1), sn(1)
.PP
.SH BUGS
To report bugs in the compiler, you must file them on our bug tracking
+188 -62
View File
@@ -21,38 +21,208 @@ default only the assemblies specified in the command line will be
included in the bundle. To automatically include all of the
dependencies referenced, use the "--deps" command line option.
.PP
There are two modes of operation, the default one uses the
C compiler to create a bundle and requires a complete C and Mono SDK
to produced executables. The simple mode (enabled when using the
"--simple") command line option does not require this, and also allows
for cross compilation.
There are two modes of operation, one uses an existing Mono binary or
a server-hosted list of binaries and is enabled when you use either
the
.B --cross
or the
.B --runtime
command line options.
.PP
An older mechanism creates a small C stub that links against the
libmono library to produce a self-contained executable and requires a
C compiler. It is described in the "OLD EMBEDDING" section below.
.PP
For example, to create a bundle for hello world, use the following
command:
.nf
$ mkbundle -o hello --simple hello.exe
.fi
.PP
You can configure options to be passed to the Mono runtime directly
into your executable, for this, use the
.I --options
flag. For example, the following disables inlining, by passing the
"-O=-inline" command line option to the embedded executable:
.nf
$ mkbundle -o hello --options -O=-inline --simple hello.exe
.PP
The simple version allows for cross-compiling, this requires a Mono
runtime to be installed in the ~/.mono/targets/TARGET/mono to be
available. You can use the "--local-targets" to list all available
targets, and the "--cross" argument to specify the target, like this:
.nf
$ mkbundle --local-targets
Available targets:
default - Current System Mono
4.4.0-macosx-x86
4.4.0-debian-8-arm64
$ mkbundle --cross 4.4.0-debian-8-powerpc hello.exe -o hello-debian
.fi
.PP
The above will bundle your native library into hello-debian for
a Debian 8 system running on a PowerPC machine.
.PP
We provide pre-packages binaries for Mono for various architectures,
which allow you to cross compile, use the
.B --list-targets
to get a list of all targets supported, and use the
.B --fetch-target
flag to retrieve a target that you do not have installed, like this:
.nf
$ mkbundle --list-targets
Cross-compilation targets available:
4.4.0-linux-libc2.13-amd64
4.4.0-linux-libc2.13-armel
4.4.0-linux-libc2.13-armhf
4.4.0-linux-libc2.13-i386
4.4.0-macos-10.7-amd64
4.4.0-macos-10.7-i386
4.4.2-linux-libc2.13-amd64
4.4.2-linux-libc2.13-armel
4.4.2-linux-libc2.13-armhf
4.4.2-linux-libc2.13-i386
4.4.2-macos-10.7-amd64
4.4.2-macos-10.7-i386
$ mkbundle --fetch-target 4.4.2-macos-10.7-i386
.fi
.PP
And then you can produce a binary that will run on 32-bit Mono on
MacOS:
.nf
$ mkbundle --cross 4.4.2-macos-10.7-i386 hello.exe -o hello-macos
.fi
.PP
Downloaded targets are stored
.B ~/.mono/targets
directory.
.SH OPTIONS
.TP
.I "--config FILE"
Specifies that a machine.config file must be bundled as well.
Typically this is $prefix/etc/mono/1.0/machine.config or
$prefix/etc/mono/2.0/machine.config depending on the profile that you
are using (1.0 or 2.0)
.TP
.I "--config-dir DIR"
When passed, DIR will be set for the MONO_CFG_DIR environment variable
.TP
.I "--cross target"
Creates a bundle for the specified target platform. The target
must be a directory in ~/.mono/targets/ that contains a "mono"
binary. You can fetch various targets using the --fetch-target
command line option.
.TP
.I "--deps"
This option will bundle all of the referenced assemblies for the
assemblies listed on the command line option. This is useful to
distribute a self-contained image.
.TP
.I "--env KEY=VALUE"
Use this to hardcode an environment variable at runtime for KEY to be
mapped to VALUE. This is useful in scenarios where you want to
enable certain Mono runtime configuration options that are controlled
by environment variables.
.TP
.I "--fetch-target target"
Downloads a precompiled runtime for the specified target from the Mono
distribution site.
.TP
.I "--i18n encoding"
Specified which encoding tables to ship with the executable. By
default, Mono ships the supporting I18N.dll assembly and the
I18N.West.dll assembly. If your application will use the
System.Text.Encoding.GetEncoding with encodings other than the West
encodings, you should specify them here.
.Sp
You can use the
.B none
parameter to request that no implicit encodings should be bundled,
including the supporting I18N.dll, use this option if you have ran a
linker on your own.
.Sp
You can use the
.B all
flag to bundle all available encodings.
.Sp
Or you can use a comma delimited list of the workds CJK, MidWest,
Other, Rare and West to specificy which encoding assemblies to distribute.
.TP
.I "-L path"
Adds the `path' do the search list for assemblies. The rules are the
same as for the compiler -lib: or -L flags.
.TP
.I "--library [LIB,]PATH"
Embeds the dynamic library file pointed to by `PATH' and optionally
give it the name `LIB' into the bundled executable. This is used to
ship native library dependencies that are unpacked at startup and
loaded from the runtime.
.TP
.I "--lists-targets"
Lists all of the available local cross compilation targets available
as precompiled binaries on the Mono distribution server.
.TP
.I "--local-targets"
Lists all of the available local cross compilation targets.
.TP
.I "--machine-config FILE"
Uses the given FILE as the machine.config file for the generated
application.
.TP
.I "--nodeps"
This is the default: \fImkbundle\fP will only include the assemblies that
were specified on the command line to reduce the size of the resulting
image created.
.TP
.I "-o filename"
Places the output on `out'. If the flag -c is specified, this is the
C host program. If not, this contains the resulting executable.
.TP
.I "--options OPTS"
Since the resulting executable will be treated as a standalone
program, you can use this option to pass configuration options to the
Mono runtime and bake those into the resulting executable. These
options are specified as
.I OPTS.
.Sp
You can use the above to configure options that you would typically
pass on the command line to Mono, before the main program is
executed.
.Sp
Additionally, users of your binary can still configure their own
options by setting the
.I MONO_ENV_OPTIONS
environment variable.
.TP
.I "--target-server SERVER"
By default the mkbundle tool will download from a Mono server the
target runtimes, you can specify a different server to provide
cross-compiled runtimes.
.SH OLD EMBEDDING
.PP
The old embedding system compiles a small C stub that embeds the
C code and compiles the resulting executable using the system
compiler. This requires both a working C compiler installation and
only works to bundle binaries for the current host.
.PP
The feature is still available, but we recommend the simpler, faster
and more convenient new mode.
.PP
For example, to create a bundle for hello world, use the following
command:
.nf
$ mkbundle -o hello hello.exe
.fi
.PP
@@ -66,6 +236,7 @@ you want to link additional libraries or control the generated output
in more detail. For example, this could be used to link some libraries
statically:
.nf
$ mkbundle -c -o host.c -oo bundles.o --deps hello.exe
$ cc host.c bundles.o /usr/lib/libmono.a -lc -lrt
@@ -77,86 +248,40 @@ both the -c and --nomain options. The resulting host.c file will
not have a main() function. Call mono_mkbundle_init() before
initializing the JIT in your code so that the bundled assemblies
are available to the embedded runtime.
.SH OPTIONS
.SH OLD EMBEDDING OPTIONS
These options can only be used instead of using the
.B --cross, --runtime
or
.B --simple
options.
.TP
.I "-c"
Produce the stub file, do not compile the resulting stub.
.TP
.I "--cross target"
Creates a bundle for the specified target platform. The target
must be a directory in ~/.mono/targets/ that contains a "mono"
binary. You can fetch various targets using the --fetch-target
command line option.
.TP
.I "-o filename"
Places the output on `out'. If the flag -c is specified, this is the
C host program. If not, this contains the resulting executable.
.TP
.I "-oo filename"
Specifies the name to be used for the helper object file that contains
the bundle.
.TP
.I "-L path"
Adds the `path' do the search list for assemblies. The rules are the
same as for the compiler -lib: or -L flags.
.TP "--config FILE"
Specifies that a machine.config file must be bundled as well.
Typically this is $prefix/etc/mono/1.0/machine.config or
$prefix/etc/mono/2.0/machine.config depending on the profile that you
are using (1.0 or 2.0)
.TP
.I "--deps"
This option will bundle all of the referenced assemblies for the
assemblies listed on the command line option. This is useful to
distribute a self-contained image.
.TP
.I "--fetch-target target"
Downloads a precompiled runtime for the specified target from the Mono
distribution site.
.TP
.I "--nodeps"
This is the default: \fImkbundle\fP will only include the assemblies that
were specified on the command line to reduce the size of the resulting
image created.
.TP
.I "--keeptemp"
By default \fImkbundle\fP will delete the temporary files that it uses to
produce the bundle. This option keeps the file around.
.TP
.I "--lists-targets"
Lists all of the available local cross compilation targets available
as precompiled binaries on the Mono distribution server.
.TP
.I "--local-targets"
Lists all of the available local cross compilation targets.
.TP
.I "--machine-config FILE"
Uses the given FILE as the machine.config file for the generated
application.
.TP
.I "--nomain"
With the -c option, generate the host stub without a main() function.
.TP
.I "--config-dir DIR"
When passed, DIR will be set for the MONO_CFG_DIR environment variable
.TP
.I "--static"
By default \fImkbundle\fP dynamically links to mono and glib. This option
causes it to statically link instead.
.TP
.I "--target-server SERVER"
By default the mkbundle tool will download from a Mono server the
target runtimes, you can specify a different server to provide
cross-compiled runtimes.
.TP
.I "-z"
Compresses the assemblies before embedding. This results in smaller
executable files, but increases startup time and requires zlib to be
installed on the target system.
.SH WINDOWS
On Windows systems, it it necessary to have Unix-like toolchain to be
installed for \fImkbundle\fP to work. You can use cygwin's and install gcc,
gcc-mingw and as packages.
If you are using the old embedding on Windows systems, it it necessary
to have Unix-like toolchain to be installed for \fImkbundle\fP to
work. You can use cygwin's and install gcc, gcc-mingw and as
packages.
.SH ENVIRONMENT VARIABLES
.TP
.I "AS"
@@ -175,7 +300,8 @@ cache.
.PP
Targets are loaded from ~/.mono/targets/TARGETNAME/mono
.SH BUGS
The option "--static" is not supported under Windows.
The option "--static" is not supported under Windows when using the
old embedding.
Moreover, a full cygwin environment containing at least "gcc" and "as"
is required for the build process. The generated executable does not
depend on cygwin.
+6
View File
@@ -332,6 +332,12 @@ Currently this merely ensures that you are running either the
\fBMONO_ENV_OPTIONS\fR environment variable to force all of your child
processes to use one particular kind of GC with the Mono runtime.
.TP
\fB--gc-debug=[options]\fR
Command line equivalent of the \fBMONO_GC_DEBUG\fR environment variable.
.TP
\fB--gc-params=[options]\fR
Command line equivalent of the \fBMONO_GC_PARAMS\fR environment variable.
.TP
\fB--arch=32\fR, \fB--arch=64\fR
(Mac OS X only): Selects the bitness of the Mono binary used, if
available. If the binary used is already for the selected bitness, nothing
+67 -89
View File
@@ -1,4 +1,8 @@
.TH mprof-report 1 ""
.de Sp
.if t .sp .5v
.if n .sp
..
.TH mprof-report 1 ""
.SH The Mono log profiler
.PP
The Mono \f[I]log\f[] profiler can be used to collect a lot of
@@ -88,7 +92,7 @@ provided by the Mono runtime and write them to a file named
\f[I]output.mlpd\f[].
When no option is specified, it is equivalent to using:
.PP
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=8,calldepth=100\f[]
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=32,calldepth=100\f[]
.PP
The following options can be used to modify this default behaviour.
Each option is separated from the next by a \f[B],\f[] character,
@@ -135,41 +139,16 @@ garbage collections
to the control port
.RE
.IP \[bu] 2
\f[I]sample[=TYPE[/FREQ]]\f[]: collect statistical samples of the
\f[I]sample[=FREQ]\f[]: collect statistical samples of the
program behaviour.
The default is to collect a 100 times per second (100 Hz) the
instruction pointer.
This is equivalent to the value \[lq]cycles/100\[rq] for
\f[I]TYPE\f[].
On some systems, like with recent Linux kernels, it is possible to
cause the sampling to happen for other events provided by the
performance counters of the cpu.
In this case, \f[I]TYPE\f[] can be one of:
.RS 2
.IP \[bu] 2
\f[I]cycles\f[]: processor cycles
.IP \[bu] 2
\f[I]instr\f[]: executed instructions
.IP \[bu] 2
\f[I]cacherefs\f[]: cache references
.IP \[bu] 2
\f[I]cachemiss\f[]: cache misses
.IP \[bu] 2
\f[I]branches\f[]: executed branches
.IP \[bu] 2
\f[I]branchmiss\f[]: mispredicted branches
.RE
.IP \[bu] 2
\f[I]time=TIMER\f[]: use the TIMER timestamp mode.
TIMER can have the following values:
.RS 2
.IP \[bu] 2
\f[I]fast\f[]: a usually faster but possibly more inaccurate timer
.RE
This is equivalent to the value \[lq]100\[rq].
A value of zero for \f[I]FREQ\f[] effectively disables sampling.
.IP \[bu] 2
\f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
collect \f[I]NUM\f[] frames at the most.
The default is 8.
The default is 32.
.IP \[bu] 2
\f[I]maxsamples=NUM\f[]: stop allocating reusable sample events
once \f[I]NUM\f[] events have been allocated (a value of zero for
@@ -230,13 +209,15 @@ The following commands are available:
\f[I]heapshot\f[]: perform a heapshot as soon as possible
.RE
.IP \[bu] 2
\f[I]counters\f[]: sample counters values every 1 second. This allow
a really lightweight way to have insight in some of the runtime key
metrics. Counters displayed in non verbose mode are : Methods from AOT,
Methods JITted using mono JIT, Methods JITted using LLVM, Total time
spent JITting (sec), User Time, System Time, Total Time, Working Set,
Private Bytes, Virtual Bytes, Page Faults and CPU Load Average (1min,
5min and 15min).
\f[I]nocounters\f[]: disables sampling of runtime and performance
counters, which is normally done every 1 second.
.IP \[bu] 2
\f[I]coverage\f[]: collect code coverage data. This implies enabling
the \f[I]calls\f[] option.
.IP \[bu] 2
\f[I]onlycoverage\f[]: can only be used with \f[I]coverage\f[]. This
disables most other events so that the profiler mostly only collects
coverage data.
.RE
.SS Analyzing the profile data
.PP
@@ -260,19 +241,15 @@ To see this info invoke mprof-report as follows:
\f[B]mprof-report\ --traces\ output.mlpd\f[]
.PP
The maximum number of methods in each stack trace can be specified
with the \f[I]\[em]maxframes=NUM\f[] option:
with the \f[I]--maxframes=NUM\f[] option:
.PP
\f[B]mprof-report\ --traces\ --maxframes=4\ output.mlpd\f[]
.PP
The stack trace info will be available if method enter/leave events
have been recorded or if stack trace collection wasn't explicitly
disabled with the \f[I]maxframes=0\f[] profiler option.
Note that the profiler will collect up to 8 frames by default at
specific events when the \f[I]nocalls\f[] option is used, so in
that case, if more stack frames are required in mprof-report, a
bigger value for maxframes when profiling must be used, too.
.PP
The \f[I]\[em]traces\f[] option also controls the reverse reference
The \f[I]--traces\f[] option also controls the reverse reference
feature in the heapshot report: for each class it reports how many
references to objects of that class come from other classes.
.SS Sort order for methods and allocations
@@ -362,6 +339,10 @@ version
\f[I]heapshot\f[]: live heap usage at heap shots
.IP \[bu] 2
\f[I]counters\f[]: counters samples
.IP \[bu] 2
\f[I]coverage\f[]: code coverage data
.IP \[bu] 2
\f[I]stats\f[]: event statistics
.PP
It is possible to limit some of the data displayed to a timeframe
of the program execution with the option:
@@ -391,23 +372,23 @@ Instead of printing the usual reports from the profiler data, it is
possible to track some interesting information about some specific
object addresses.
The objects are selected based on their address with the
\f[I]\[em]track\f[] option as follows:
\f[I]--track\f[] option as follows:
.PP
\f[B]--track=0xaddr1[,0xaddr2,...]\f[]
.PP
The reported info (if available in the data file), will be class
name, size, creation time, stack trace of creation (with the
\f[I]\[em]traces\f[] option), etc.
\f[I]--traces\f[] option), etc.
If heapshot data is available it will be possible to also track
what other objects reference one of the listed addresses.
.PP
The object addresses can be gathered either from the profiler
report in some cases (like in the monitor lock report), from the
live application or they can be selected with the
\f[I]\[em]find=FINDSPEC\f[] option.
\f[I]--find=FINDSPEC\f[] option.
FINDSPEC can be one of the following:
.IP \[bu] 2
\f[I]S:SIZE\f[]: where the object is selected if it's size is at
\f[I]S:SIZE\f[]: where the object is selected if its size is at
least \f[I]SIZE\f[]
.IP \[bu] 2
\f[I]T:NAME\f[]: where the object is selected if \f[I]NAME\f[]
@@ -432,6 +413,13 @@ By default mprof-report will print the summary data to the console.
To print it to a file, instead, use the option:
.PP
\f[B]--out=FILENAME\f[]
.SS Processing code coverage data
.PP
If you ran the profiler with the \f[I]coverage\f[] option, you can
process the collected coverage data into an XML file by running
mprof-report like this:
.PP
\f[B]mprof-report --coverage-out=coverage.xml output.mlpd\f[]
.SS Dealing with profiler slowness
.PP
If the profiler needs to collect lots of data, the execution of the
@@ -439,20 +427,20 @@ program will slow down significantly, usually 10 to 20 times
slower.
There are several ways to reduce the impact of the profiler on the
program execution.
.SS Use the statistical sampling mode
.PP
.IP "\f[I]Use the statistical sampling mode\f[]" 4
.Sp
Statistical sampling allows executing a program under the profiler
with minimal performance overhead (usually less than 10%).
This mode allows checking where the program is spending most of
it's execution time without significantly perturbing its behaviour.
.SS Collect less data
.PP
its execution time without significantly perturbing its behaviour.
.IP "\f[I]Collect less data\f[]" 4
.Sp
Collecting method enter/leave events can be very expensive,
especially in programs that perform many millions of tiny calls.
The profiler option \f[I]nocalls\f[] can be used to avoid
collecting this data or it can be limited to only a few call levels
with the \f[I]calldepth\f[] option.
.PP
.Sp
Object allocation information is expensive as well, though much
less than method enter/leave events.
If it's not needed, it can be skipped with the \f[I]noalloc\f[]
@@ -463,21 +451,12 @@ expensive as well.
The impact of stack trace information can be reduced by setting a
low value with the \f[I]maxframes\f[] option or by eliminating them
completely, by setting it to 0.
.PP
The other major source of data is the heapshot profiler option:
especially if the managed heap is big, since every object needs to
be inspected.
.Sp
The other major source of data is the \f[I]heapshot\f[] profiler
option: especially if the managed heap is big, since every object
needs to be inspected.
The \f[I]MODE\f[] parameter of the \f[I]heapshot\f[] option can be
used to reduce the frequency of the heap shots.
.SS Reduce the timestamp overhead
.PP
On many operating systems or architectures what actually slows down
profiling is the function provided by the system to get timestamp
information.
The \f[I]time=fast\f[] profiler option can be usually used to speed
up this operation, but, depending on the system, time accounting
may have some level of approximation (though statistically the data
should be still fairly valuable).
.SS Dealing with the size of the data files
.PP
When collecting a lot of information about a profiled program, huge
@@ -486,15 +465,15 @@ There are a few ways to minimize the amount of data, for example by
not collecting some of the more space-consuming information or by
compressing the information on the fly or by just generating a
summary report.
.SS Reducing the amount of data
.PP
.IP "\f[I]Reducing the amount of data\f[]" 4
.Sp
Method enter/leave events can be excluded completely with the
\f[I]nocalls\f[] option or they can be limited to just a few levels
of calls with the \f[I]calldepth\f[] option.
For example, the option:
.PP
.Sp
\f[B]calldepth=10\f[]
.PP
.Sp
will ignore the method events when there are more than 10 managed
stack frames.
This is very useful for programs that have deep recursion or for
@@ -503,59 +482,59 @@ the call stack.
The optimal number for the calldepth option depends on the program
and it needs to be balanced between providing enough profiling
information and allowing fast execution speed.
.PP
.Sp
Note that by default, if method events are not recorded at all, the
profiler will collect stack trace information at events like
allocations.
To avoid gathering this data, use the \f[I]maxframes=0\f[] profiler
option.
.PP
.Sp
Allocation events can be eliminated with the \f[I]noalloc\f[]
option.
.PP
.Sp
Heap shot data can also be huge: by default it is collected at each
major collection.
To reduce the frequency, you can specify a heapshot mode: for
example to collect every 5 collections (including major and minor):
.PP
.Sp
\f[B]heapshot=5gc\f[]
.PP
.Sp
or when at least 5 seconds passed since the last heap shot:
.PP
.Sp
\f[B]heapshot=5000ms\f[]
.SS Compressing the data
.PP
.IP "\f[I]Compressing the data\f[]" 4
.Sp
To reduce the amout of disk space used by the data, the data can be
compressed either after it has been generated with the gzip
command:
.PP
.Sp
\f[B]gzip\ -9\ output.mlpd\f[]
.PP
.Sp
or it can be compressed automatically by using the \f[I]zip\f[]
profiler option.
Note that in this case there could be a significant slowdown of the
profiled program.
.PP
.Sp
The mprof-report program will tranparently deal with either
compressed or uncompressed data files.
.SS Generating only a summary report
.PP
.IP "\f[I]Generating only a summary report\f[]" 4
.Sp
Often it's enough to look at the profiler summary report to
diagnose an issue and in this case it's possible to avoid saving
the profiler data file to disk.
This can be accomplished with the \f[I]report\f[] profiler option,
which will basically send the data to the mprof-report program for
display.
.PP
.Sp
To have more control of what summary information is reported (or to
use a completely different program to decode the profiler data),
the \f[I]output\f[] profiler option can be used, with \f[B]|\f[] as
the first character: the rest of the output name will be executed
as a program with the data fed in on the standard input.
.PP
.Sp
For example, to print only the Monitor summary with stack trace
information, you could use it like this:
.PP
.Sp
\f[B]output=|mprof-report\ --reports=monitor\ --traces\ -\f[]
.SH WEB SITE
http://www.mono-project.com/docs/debug+profile/profile/profiler/
@@ -563,5 +542,4 @@ http://www.mono-project.com/docs/debug+profile/profile/profiler/
.PP
mono(1)
.SH AUTHORS
Paolo Molaro.
Paolo Molaro, Alex Rønne Petersen
+1 -1
View File
@@ -5,7 +5,7 @@ static class AssemblyRef
internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string EcmaPublicKey = "b77a5c561934e089";
#if NET_2_1
#if MOBILE
public const string FrameworkPublicKeyFull = "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9";
public const string FrameworkPublicKeyFull2 = "00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB";
#else
+2 -2
View File
@@ -39,7 +39,7 @@ static class Consts
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
#if NET_2_1
#if MOBILE
// Versions of .NET Framework for Silverlight 4.0
public const string FxVersion = "2.0.5.0";
public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
@@ -118,7 +118,7 @@ static class Consts
public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
#elif NET_2_1
#elif MOBILE
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#endif
}
+1 -1
View File
@@ -40,7 +40,7 @@ class X {
if (!Version.TryParse (field.GetValue (null) as string, out version))
return 4;
if (version < new Version (3, 8))
if (version < new Version (4, 0))
return 5;
return 0;
+6 -6
View File
@@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp
$(MAKE) -s do-profile-check-monolite ; \
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
echo "*** You need Mono version 3.8 or better installed to build MCS" 1>&2 ; \
echo "*** You need Mono version 4.0 or better installed to build MCS" 1>&2 ; \
echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
echo "*** The version of '$(BOOTSTRAP_MCS)' is: `$(BOOTSTRAP_MCS) --version`." 1>&2 ; \
exit 1; fi; fi
@@ -74,17 +74,17 @@ do-profile-check: $(depsdir)/.stamp
ifdef use_monolite
do-profile-check-monolite:
echo "*** The contents of your 'monolite' directory may be out-of-date" 1>&2
echo "*** You may want to try 'make get-monolite-latest'" 1>&2
@echo "*** The contents of your 'monolite' directory may be out-of-date" 1>&2
@echo "*** You may want to try 'make get-monolite-latest'" 1>&2
rm -f $(monolite_flag)
exit 1
else
do-profile-check-monolite: $(depsdir)/.stamp
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2
echo "*** Trying the 'monolite' directory." 1>&2
echo dummy > $(monolite_flag)
@echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2
@echo "*** Trying the 'monolite' directory." 1>&2
@echo dummy > $(monolite_flag)
$(MAKE) do-profile-check
endif
+2
View File
@@ -1,9 +1,11 @@
include $(topdir)/build/profiles/monotouch.make
PROFILE_MCS_FLAGS += \
-d:FEATURE_NO_BSD_SOCKETS \
-d:MONOTOUCH_WATCH
NO_THREAD_ABORT=1
NO_THREAD_SUSPEND_RESUME=1
NO_MULTIPLE_APPDOMAINS=1
NO_PROCESS_START=1
NO_MONO_SECURITY=1
@@ -1,6 +1,7 @@
include $(topdir)/build/profiles/monotouch_runtime.make
PROFILE_MCS_FLAGS += \
-d:FEATURE_NO_BSD_SOCKETS \
-d:MONOTOUCH_WATCH
NO_THREAD_ABORT=1
@@ -8,3 +9,4 @@ NO_THREAD_SUSPEND_RESUME=1
# The binding generator (bwatch) still needs to execute processes,
# so we need a System.dll that can do that.
#NO_PROCESS_START=1
NO_MONO_SECURITY=1
+1
View File
@@ -24,6 +24,7 @@ PROFILE_MCS_FLAGS = \
-d:XAMMAC \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-d:XAMARIN_MODERN \
-d:NETSTANDARD \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
+8
View File
@@ -123,12 +123,20 @@ TEST_HARNESS_POSTPROC_ONDOTNET = (echo ''; cat TestResult-ondotnet-$(PROFILE).lo
endif
ifdef FIXTURE
ifdef NUNIT_LITE
FIXTURE_ARG = -test=MonoTests.$(FIXTURE)
else
FIXTURE_ARG = -fixture=MonoTests.$(FIXTURE)
endif
endif
ifdef TESTNAME
ifdef NUNIT_LITE
TESTNAME_ARG = -test=MonoTests.$(TESTNAME)
else
TESTNAME_ARG = -run=MonoTests.$(TESTNAME)
endif
endif
ifdef ALWAYS_AOT
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp
@@ -28,7 +28,7 @@
<DebugType>full</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -36,7 +36,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -28,7 +28,7 @@
<DebugType>full</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -36,7 +36,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+2 -2
View File
@@ -28,7 +28,7 @@
<DebugType>full</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -36,7 +36,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -28,7 +28,7 @@
<DebugType>full</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -36,7 +36,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -54,7 +54,9 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\..\build\common\MonoTODOAttribute.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="RegistryAclExtensions.cs" />
<Compile Include="TypeForwarders.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -36,22 +36,28 @@ namespace Microsoft.Win32
{
public static class RegistryAclExtensions
{
[MonoTODO]
public static RegistrySecurity GetAccessControl (this RegistryKey key)
{
throw new NotImplementedException ();
if (key == null)
throw new ArgumentNullException (nameof (key));
return key.GetAccessControl ();
}
[MonoTODO]
public static RegistrySecurity GetAccessControl (this RegistryKey key, AccessControlSections includeSections)
{
throw new NotImplementedException ();
if (key == null)
throw new ArgumentNullException (nameof (key));
return key.GetAccessControl (includeSections);
}
[MonoTODO]
public static void SetAccessControl (this RegistryKey key, RegistrySecurity registrySecurity)
{
throw new NotImplementedException ();
if (key == null)
throw new ArgumentNullException (nameof (key));
key.SetAccessControl (registrySecurity);
}
}
}
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -55,6 +55,9 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="DbColumn.cs" />
<Compile Include="DbDataReaderExtensions.Facade.cs" />
<Compile Include="IDbColumnSchemaGenerator.cs" />
<Compile Include="TypeForwarders.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -90,6 +93,10 @@
<Project>{EC439BB8-FFED-4A32-A05D-2FA3A70CAD64}</Project>
<Name>System.Data-net_4_x</Name>
</ProjectReference>
<ProjectReference Include="../../System.XML/System.Xml-net_4_x.csproj">
<Project>{87FD2F0F-5222-4AE6-BD63-2D4975E11E5B}</Project>
<Name>System.Xml-net_4_x</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -1,41 +0,0 @@
//
// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Diagnostics.PerformanceCounter.dll")]
[assembly: AssemblyDescription ("System.Diagnostics.PerformanceCounter.dll")]
[assembly: AssemblyDefaultAlias ("System.Diagnostics.PerformanceCounter.dll")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -1,23 +0,0 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Diagnostics.PerformanceCounter
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Diagnostics.PerformanceCounter.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -1,3 +0,0 @@
TypeForwarders.cs
AssemblyInfo.cs
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -30,12 +30,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -54,7 +54,9 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\..\build\common\MonoTODOAttribute.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="StackFrameExtensions.cs" />
<Compile Include="TypeForwarders.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -34,27 +34,57 @@ namespace System.Diagnostics
{
public static class StackFrameExtensions
{
[MonoTODO]
public static IntPtr GetNativeImageBase (this StackFrame stackFrame)
{
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException ();
}
[MonoTODO]
public static IntPtr GetNativeIP (this StackFrame stackFrame)
{
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException ();
}
[MonoTODO]
public static bool HasNativeImage (this StackFrame stackFrame)
{
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException ();
}
[MonoTODO]
public static bool HasMethod (this StackFrame stackFrame)
{
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException ();
}
[MonoTODO]
public static bool HasILOffset (this StackFrame stackFrame)
{
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException ();
}
[MonoTODO]
public static bool HasSource (this StackFrame stackFrame)
{
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException ();
}
}
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
@@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -42,7 +42,7 @@
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,7 +35,3 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
Loaded 100 of 2281 files, more files were not shown because too many files have changed in this diff. Show more