Compare commits

...
6674 Commits
Author SHA1 Message Date
Marek Safar 39ebee1253 [corlib] Update locale tables. Fixes #40697 2016-05-04 15:05:28 +02:00
Marek Safar d70777a333 Merge pull request #2962 from marek-safar/referencesource-submodule-move
Submodule referencesource removal
2016-05-04 08:16:55 +02:00
Zoltan Varga 5b5d0f8a3d [aot] Emit EmptyArray<enum>:.cctor () instances since mcs now generates accesses to EmptyArray<enum>.Value for new enum[0] expressions. 2016-05-03 17:37:51 -04:00
Marek Safar 79fa40e7f2 Remove referencesource submodule and move sources to mcs/class/referencesource
This simplified PR workflow and makes branching easier
2016-05-03 13:34:32 +02:00
Marek Safar e223b6f140 Update after merge conflicts 2016-05-03 12:49:05 +02:00
Marek Safar e518101d9f Unify error handling added in fdebd8a4d709002bb499555c35e1dfd3834e2f4f 2016-05-03 11:45:09 +02:00
Alexander Köplinger e83619a710 Raise an UnauthorizedAccessException on FileInfo.Delete with a directory
When FileInfo was imported in https://github.com/mono/mono/commit/bdd0de7ee52d9675dada0d19985b9daf4edab5bc the check in Delete()
got removed that raised an UnauthorizedAccessException when the FileInfo object holds a path to a directory instead of a file.

It happened to pass the MonoTests.System.IO.FileInfoTest.Delete_Directory test on OSX because unlink returns EPERM there
which got turned into the expected UnauthorizedAccessException, but on Linux it returns EISDIR so the test would fail.

Fix is to put the explicit check for directory back.
2016-05-03 11:45:09 +02:00
Marek Safar cfedfb76ad Mono friendly FileInfo 2016-05-03 11:45:09 +02:00
Marek Safar 7c78315c70 Mono friendly FileSystemInfo 2016-05-03 11:45:09 +02:00
Ludovic Henry e070b05e04 Fix WaitHandle.Wait{One,Any,All} when runtime returns WAIT_FAILED
In case the runtime would fail to wait on the wait handle(s), we would still return true, as if the WaitHandle was successfully signaled.
2016-05-03 11:45:08 +02:00
Marek Safar 9f6370d2c9 Remove MONO_X509_ALIAS 2016-05-03 11:45:08 +02:00
Alexis Christoforides 62d78a5234 Re-apply compatibility fix from 42504b8af5a0bf7f012e6c40668659ca45fd4e22, it was eaten up by the .NET 4.6 merge. Fixes #38712 2016-05-03 11:45:08 +02:00
Ludovic Henry 63eb8475d8 Fix HasExited for non-child process
NativeMethods.GetExitCodeProcess would inherently be broken on Unix platforms for non-child processes as it can't succesfully get the exit code. This would in turn break Process.HasExited, which should not break, as it is possible to check if a non-child process is alive or dead.
2016-05-03 11:42:43 +02:00
Andi McClure 61edfafacf Adapt System.Exception to be usable by Mono 2016-05-03 11:42:43 +02:00
Marek Safar fa115cfaf1 SymbolType in reflection only profiles 2016-05-03 11:42:43 +02:00
Marek Safar a0d5b2513b Mono friendly SymbolType 2016-05-03 11:42:43 +02:00
Marek Safar b2c34433d5 Better error message for missing codeset assembly 2016-05-03 11:42:43 +02:00
Marek Safar 502db1d684 Fixes hardcoded Windows path in Serialization compiler 2016-05-03 11:42:42 +02:00
Marek Safar 86659c322e More DISABLE_CAS_USE tweaks 2016-05-03 11:42:42 +02:00
Marek Safar 4bb1910666 Add CSC_SDK_PATH_DISABLED workaround 2016-05-03 11:42:42 +02:00
Marek Safar 9a925e3842 Mono friendly RuntimeEnvironment 2016-05-03 11:42:42 +02:00
Marek Safar df05a171cf Add feature option to build without System.Runtime.Serialization 2016-05-03 11:42:42 +02:00
Marek Safar 65547ad990 Replace string resource key names with local constants 2016-05-03 11:42:41 +02:00
Ludovic Henry 97a27a7c04 Import System.Threading.WaitHandle 2016-05-03 11:42:41 +02:00
Andi McClure fa63cd35ed Remove Marshal.GetHRForLastWin32Error call from Diagnostics.Process
GetHRForLastWin32Error breaks the build on AOT, and even on non-AOT is unimplemented.
2016-05-03 11:42:41 +02:00
Ludovic Henry 71c5cb404a Revert "[mscorlib] Undo part 3d0e1b71993dd236db78290852a62e9ed3218216 of which breaks build"
This reverts commit 0cb499950a7ae61c62c433c8cce353d535dbd09e.
2016-05-03 11:42:41 +02:00
Marek Safar 68b0fce81c Undo part 3d0e1b71993dd236db78290852a62e9ed3218216 of which breaks build 2016-05-03 11:42:41 +02:00
Marek Safar 14fd72a958 Mono friendly MethodInfo 2016-05-03 11:42:40 +02:00
Ludovic Henry e10efa398b Import System.Diagnostics.Process 2016-05-03 11:42:40 +02:00
Marek Safar 29ca3f2f1f Disable AppContextDefaults 2016-05-03 11:42:40 +02:00
Timotheus Pokorra 99c3ee5a17 fixing display of asmx help page (#37137)
if MONO_BROKEN_CONFIGURATION_DLL is defined, make sure that actualPath always gets set
2016-05-03 11:42:40 +02:00
Marcos Henrich 10270723c3 Unix paths fix
DiscoveryClientProtocol.GetRelativePath was harcoded to use '\\'.

Fixes #36116
2016-05-03 11:42:40 +02:00
Alexander Kyte 8056732b2a Only use patched AesManaged on MONOTOUCH 2016-05-03 11:42:39 +02:00
Marek Safar 29a24b8538 Fixes a race in CancellationTokenSource with no logic change. Fixes #32768
It's not easy to trigger but following repro works fairly reliably

using System;
using System.Threading;

class MainClass
{
	public static void Main (string [] args)
	{
		var r = new Random ();
		for (int i = 0, total = 10000000; i < total; ++i) {
			if (i % 50 == 0)
				Console.WriteLine ("{0}/{1}", i, total);

			var c1 = new CancellationTokenSource ();
			var wh = c1.Token.WaitHandle;
			GC.Collect ();
			c1.CancelAfter (r.Next(5));
			c1.Dispose ();
		}
	}
}

It crashes like

Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ManualResetEvent'.
  at System.Threading.WaitHandle.CheckDisposed () <0x1f95be0 + 0x0005c> in <filename unknown>:0
  at System.Threading.EventWaitHandle.Set () <0x1f8d320 + 0x0007d> in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
  at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) <0x1d92c70 + 0x00084> in <filename unknown>:0
  at System.Threading.CancellationTokenSource.Cancel (Boolean throwOnFirstException) <0x1d92330 + 0x00030> in <filename unknown>:0
  at System.Threading.CancellationTokenSource.Cancel () <0x1d92300 + 0x00025> in <filename unknown>:0
  at System.Threading.CancellationTokenSource.TimerCallbackLogic (System.Object obj) <0x1d925c0 + 0x0005d> in <filename unknown>:0
2016-05-03 11:42:39 +02:00
Marek Safar aa04c66583 Compute InvariantCaseInsensitiveHashCode without any culture data initialization. Fixes #37583 2016-05-03 11:42:39 +02:00
Rolf Bjarne Kvinge 6fc91cacbe Add support for intercepting threadpool work.
This is used to Xamarin.iOS to wrap threadpool work in an NSAutoreleasePool.
2016-05-03 11:42:39 +02:00
Rolf Bjarne Kvinge a8bd1c9197 Add feature define for multiple appdomains. 2016-05-03 11:42:39 +02:00
Marek Safar 0ab9a9a305 Remove WindowsBase type forwarders from mobile profile 2016-05-03 11:42:38 +02:00
Alexander Köplinger 0b65c9719e Revert "[System] Mono friendly QEncodedStream"
This reverts commit 5a7abfc46054c02fabde6398b7514a0fcff06cb7.

The code should be added to Mono's Uri instead.
2016-05-03 11:42:38 +02:00
Alexander Köplinger 37083826c2 Add a few MONO comments for System.Net.Sockets 2016-05-03 11:42:38 +02:00
Alexander Köplinger 4349e51224 Mono friendly QEncodedStream
Mono's Uri class doesn't have IsAsciiLetter, so we need to copy the MS implementation into QEncodedStream.
2016-05-03 11:42:38 +02:00
Marek Safar e531197ca0 Fix invariant text info hashcode builder. Fixes #36786 2016-05-03 11:42:38 +02:00
Marek Safar 4b0559c474 Cannot use regex fallback as its implementations is incompatible 2016-05-03 11:42:37 +02:00
Marek Safar 553a760680 Disable regex fallback on Mono 2016-05-03 11:42:37 +02:00
dotnet-bot 215901f51b Update Reference Sources to .NET Framework 4.6.1 2016-05-03 11:42:37 +02:00
Marek Safar 10e54be5f8 Mono exception to SocketException 2016-05-03 11:40:06 +02:00
Zoltan Varga 1704dc7618 Remove a workaround for a JIT limitation which doesn't exist any more. 2016-05-03 11:40:06 +02:00
Sebastien Pouliot 8b146afe46 Disable use of Win32 specific p/invokes when built for the mobile profile 2016-05-03 11:40:06 +02:00
Sebastien Pouliot 0ca9cb1cef Do not include a win32-p/invoke call (RegCloseKey) for the mobile profile 2016-05-03 11:40:06 +02:00
Sebastien Pouliot 3c5294a89f Use DISABLE_CAS_USE to remove the use of several *Permission calls (forcibly removed by the linker on XI) [#36255] 2016-05-03 11:40:05 +02:00
Tarek Mahmoud Sayed 6c637dbe2b Port the DateTime parser fix from the Desktop
This change is fixing the DateTime parser in cases of date/time strings for cultures which has the date and time separators are same. This happen with Norway, Serbia and Finland cultures

[tfs-changeset: 1513801]
2016-05-03 11:40:05 +02:00
Miguel de Icaza d5344d8f1f Bring from CoreFX the f813aa2e9a5d927d121d6bdca467e10e9a6e0c9b fix for Asin and Acos 2016-05-03 11:40:05 +02:00
Rolf Bjarne Kvinge e4e9fa3599 Thread.Interrupt is not dependent on MONO_FEATURE_THREAD_SUSPEND_RESUME. 2016-05-03 11:40:05 +02:00
Rolf Bjarne Kvinge 1dd9bcf3d5 Make Thread.Abort and Thread.Suspend/Resume configurable features. 2016-05-03 11:40:04 +02:00
Marek Safar 90630a8260 Add legacy mobile api to synchronizationcontext 2016-05-03 11:40:04 +02:00
Marek Safar 380ad5efeb Mono friendly StringUtil 2016-05-03 11:40:04 +02:00
Marek Safar defaa3fe98 Tweaks for mobile profile 2016-05-03 11:40:04 +02:00
Martin Baulig e77a6b7a7c Attempt to fix the build. 2016-05-03 11:40:04 +02:00
Immo Landwerth 9832a80540 Make it more obvious that Reference Source is read-only 2016-05-03 11:38:06 +02:00
Marek Safar faa8692d17 Fixes com api 2016-05-03 11:38:06 +02:00
Marek Safar 20c42db9f9 Disable optimized comparer for byte, ushort enums 2016-05-03 11:38:06 +02:00
Marek Safar e04145a389 Disable encryption column certificate error message 2016-05-03 11:38:06 +02:00
Marek Safar 581e566d36 More tweaks to mscorlib updates 2016-05-03 11:38:05 +02:00
Marek Safar 559c591cf0 Make updated mscorlib mono friendly 2016-05-03 11:35:18 +02:00
Marek Safar ddc3b6bf85 Revert "[corlib] Fix dispose race condition in CancellationTokenSource"
This reverts commit 5f5ac0a87b65941f5377a1ba06614d22281b015f.
2016-05-03 11:32:33 +02:00
dotnet-bot 8f2487b3ce Update Reference Sources to .NET Framework 4.6 2016-05-03 11:32:33 +02:00
Miguel de Icaza 5f82524097 DateTime, DateTimeOffset, bring Unix time APIs from CoreCLR 2016-05-03 00:10:27 +02:00
Marek Safar 2c381b5a7f Change Page_Error resource key to workaround collision with Page_Error method name 2016-05-03 00:10:26 +02:00
Ludovic Henry c251136278 Fix dispose race condition in CancellationTokenSource
The race condition would manifest in the following code:

```
for (int i = 0, total = 100000; i < total; ++i) {
	if (i % 50 == 0)
		Console.WriteLine ("{0}/{1}", i, total);

	var c1 = new CancellationTokenSource ();
	var wh = c1.Token.WaitHandle;
	c1.CancelAfter (1);
	Thread.Sleep (1);
	c1.Dispose ();
}
```

And we would observe the following exception:
```
Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ManualResetEvent'.
 at System.Threading.WaitHandle.CheckDisposed () [0x00016] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:426
 at System.Threading.EventWaitHandle.Set () [0x0000c] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/EventWaitHandle.cs:205
 at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
 at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) [0x00051] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:723
 at System.Threading.CancellationTokenSource.Cancel (Boolean throwOnFirstException) [0x00006] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:409
 at System.Threading.CancellationTokenSource.Cancel () <0x7d75ada8 + 0x00017> in <filename unknown>:0
 at System.Threading.CancellationTokenSource.TimerCallbackLogic (System.Object obj) [0x00012] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:538
```

This would be a race condition between the TimerCallbackLogic call to Cancel and the call to Dispose on another thread. You could trigger it more reliably by putting a Thread.Sleep at CancellationTokenSource.cs:599.
2016-05-03 00:10:26 +02:00
Martin Baulig 9e9868aa2a SslState.AsyncResumeHandshake(): Fix resumption of pending handshake.
(cherry picked from commit 8f3cae56e1586ff9709ca78e1b3000da5860d132)

(cherry picked from commit a56d585fa65efcb7ef734dcd40248a4872e424a5)
2016-05-03 00:10:26 +02:00
Alex Rønne Petersen ef72855de9 Use optimized qword path in System.String::EqualsHelper () on 64-bit. 2016-05-03 00:10:26 +02:00
Lennart Sorensen b10b7ce8a5 Add BE support for Doubles, missed from 41a6d3d6a5432b964b6f8439b6375ffad6f2e6cb 2016-05-03 00:10:26 +02:00
Marek Safar b0a25a9af9 Mono friendly WebUtility 2016-05-03 00:10:25 +02:00
Marek Safar ebd091d820 Adjust to updated StackTrace 2016-05-03 00:10:25 +02:00
Marek Safar f65f365176 Remove unused using 2016-05-03 00:10:25 +02:00
Marek Safar 636c052ef0 Add mono tweaks 2016-05-03 00:10:25 +02:00
Martin Baulig 3cbc7cffca Fix and actually use the '_PendingReHandshake' logic in _SslState.cs 2016-05-03 00:10:25 +02:00
Marek Safar 50cfb468f0 Add more missing strings 2016-05-03 00:10:24 +02:00
Alexis Christoforides 222b1a2a4a Keep Mono's old default provider type value for RSA. The value isn't used for the managed crypto code and is still validfor CryptoAPI, but if it changes Mono can't find keypairs made with earlier versions. 2016-05-03 00:10:24 +02:00
Marcos Henrich e658c9f64a Ifdefed out some methods from methodbody.cs and methodbuilder.cs
Mono now uses ExceptionHandlingClauseOptions from methodbody.cs and ExceptionHandler from methobuilder.cs.
Remaining types from thoses files were ignored with ifdef.
2016-05-03 00:10:24 +02:00
Ludovic Henry 6428e43ed4 Move ThreadPool from System.Threading.Microsoft to System.Threading 2016-05-03 00:10:24 +02:00
Dylan Borg d6480e7c88 Add NET_4_6 defines for .NET 4.6 changes 2016-05-03 00:10:24 +02:00
Dylan Borg 6411ceadc7 Expose Task.CompletedTask
Signed-off-by: Dylan Borg <[email protected]>
2016-05-03 00:10:23 +02:00
Dylan Borg 35b33515b5 Expose Task.FromException/FromCanceled
Signed-off-by: Dylan Borg <[email protected]>
2016-05-03 00:10:23 +02:00
Martin Baulig 39fe6a219d Mono-specific implementation to get SecureChannel's connection info. 2016-05-03 00:10:23 +02:00
Ludovic Henry 2ab23abfa6 Add MS ThreadPool disabling flag 2016-05-03 00:10:23 +02:00
Marek Safar cb3748ae65 Add more legacy mobile apis 2016-05-03 00:10:23 +02:00
Sebastien Pouliot 2d03d8e102 RsaOaepDecrypt needs to throw, not return null
Mono's implementation of RSAOAEPKeyExchangeDeformatter did the throwing
but we're now using MS implementation of it - so it make sense to move
the throw (it's needed) in the utils.cs file
2016-05-03 00:10:22 +02:00
Sebastien Pouliot ea344fff66 Disable more CAS checks 2016-05-03 00:10:22 +02:00
Sebastien Pouliot 329deb3cd4 Fix RSA encryption/decryption with OAEP padding [#30572]
MS implementation is incorrect and the .NET framework never hits this code
path as it's RSA implementation calls CryptoAPI (bypassing those managed
classes).

mscorlib/system/security/cryptography/pkcs1maskgenerationmethod.cs
-> use Mono MGF1 implementation

mscorlib/system/security/cryptography/utils.cs
-> remove duplicated code from Mono's PKCS1
-> fix RsaOaepEncrypt and RsaOaepDecrypt to call Mono code
2016-05-03 00:10:22 +02:00
Marcos Henrich 0a65236d93 Debug build fixes. 2016-05-03 00:10:22 +02:00
Marek Safar c3305bdac4 Add conditional role based security 2016-05-03 00:10:22 +02:00
Marek Safar 2f169c2dd3 Disable more CAS 2016-05-03 00:10:21 +02:00
Marek Safar a87d7a5b98 Clone all levels of captures ExceptionDispatchInfos 2016-05-03 00:10:21 +02:00
Marek Safar 5acce6f89c Add more obsolete and not working types to MonoDroid 2016-05-03 00:10:21 +02:00
Marek Safar ab7d6301b6 Enable more thread api 2016-05-03 00:10:21 +02:00
Marek Safar 8db851afc5 Enable more thread code 2016-05-03 00:10:21 +02:00
Marek Safar 377c877584 SafeHandle mono friendly 2016-05-03 00:10:21 +02:00
Marek Safar 9cfa68491b Add more mobile api which fails of crashes but was available in previous versions 2016-05-03 00:10:20 +02:00
Marek Safar 48de084039 Disable more CAS 2016-05-03 00:10:20 +02:00
Marek Safar 3c7d14282b Update missing WaitHelper attributes 2016-05-03 00:10:20 +02:00
Marek Safar 02a83ffe8c Make various contexts mono friendly 2016-05-03 00:10:20 +02:00
Marek Safar 41110ea390 Disable more CAS 2016-05-03 00:10:20 +02:00
Marek Safar 130f2259a5 Finish CAS removal started in 1ef3d85190bc1beea5505710527c79ff658b94ce 2016-05-03 00:10:19 +02:00
Marek Safar b7eb32edba Correctly fix 1ef3d85190bc1beea5505710527c79ff658b94ce 2016-05-03 00:10:19 +02:00
Marek Safar 346a91db63 Fixes regression intoduced in 1ef3d85190bc1beea5505710527c79ff658b94ce 2016-05-03 00:10:19 +02:00
Sebastien Pouliot 8cdde6a24b Make NotSupportedException partial to allow XI to add an helper method 2016-05-03 00:10:19 +02:00
Marek Safar 03e215601a Remove mono specific handling 2016-05-03 00:10:19 +02:00
Ludovic Henry 1fcb23b1f1 Import System.Threading.ThreadLocal 2016-05-03 00:10:18 +02:00
Marek Safar 85f70e454a Some attributes are not translated in SL (this looks like a bug compatibility) 2016-05-03 00:10:18 +02:00
Sebastien Pouliot bbfd508059 Remove CAS usage from XslTransform 2016-05-03 00:10:18 +02:00
Sebastien Pouliot 562c95f4b5 Further reduce CAS usage in XmlSecureResolver to fix #30205 2016-05-03 00:10:18 +02:00
Sebastien Pouliot 4128114c6d Make NotImplementedException partial to allow XI to add an helper method 2016-05-03 00:10:18 +02:00
Sebastien Pouliot 8bfb3e2178 Sprinkle some DISABLE_CAS_USE for System.ServiceModel.* helpers 2016-05-03 00:10:18 +02:00
Marek Safar 994ee88ef4 Enable more thread apis 2016-05-03 00:10:17 +02:00
Marek Safar 282b3b475e Initial thread integration 2016-05-03 00:10:17 +02:00
Ludovic Henry d60eef7367 Import System.Threading.WaitHandle 2016-05-03 00:10:17 +02:00
Marek Safar 6d3fb6ee96 Disable more cas 2016-05-03 00:10:17 +02:00
Ludovic Henry 9822a42d0f Import System.Threading.Timer 2016-05-03 00:10:17 +02:00
Marek Safar ddb738322b Add more mobile api which fails or crashes but was available in previous versions 2016-05-03 00:10:16 +02:00
Ludovic Henry 1c3ad5e78c Implement System.Double runtime support 2016-05-03 00:10:15 +02:00
Marek Safar 9fc4ef4ac0 Disable RemoteDebugger 2016-05-03 00:10:15 +02:00
Marek Safar a9659d19f0 Add broken mono configuration hack 2016-05-03 00:10:15 +02:00
Marek Safar eb1383a1e3 Convert null attribute type to Attribute. Fixes #29916 2016-05-03 00:10:14 +02:00
Marek Safar 4eb39e62d0 Add more missing strings 2016-05-03 00:10:14 +02:00
Atsushi Eno d0dc3a604d we cannot check MDAC version via registry, so do not try it. 2016-05-03 00:10:14 +02:00
Martin Baulig 253b743dca Always call SSPIWrapper.CheckRemoteCertificate(). 2016-05-03 00:10:14 +02:00
Marek Safar 51da161316 Hold user token as IntPtr only 2016-05-03 00:10:13 +02:00
Marek Safar e9b36595bd More configuration dependencies 2016-05-03 00:10:13 +02:00
Marek Safar 00208a7bc6 Add mono dependencies 2016-05-03 00:10:13 +02:00
Marek Safar ac14ed1e94 Correctly throw on missing encoding 2016-05-03 00:10:13 +02:00
Marek Safar 54c0233bb9 SqlClient mono friendly bits 2016-05-03 00:10:13 +02:00
Marek Safar 7203c54514 Disable more cas 2016-05-03 00:10:12 +02:00
Marek Safar 7b23337a1c Mobile fixes 2016-05-03 00:10:12 +02:00
Marek Safar 03248cd9a6 PKCS bugfixes 2016-05-03 00:10:12 +02:00
Marek Safar 3cb9c4dcbb Add more mobile api which fails of crashes but was available in previous versions 2016-05-03 00:10:12 +02:00
Marek Safar 2d2e53a52c More profile apis tweaks 2016-05-03 00:10:12 +02:00
dotnet-bot d6fe4fa3a9 Adding reference source for System.Configuration 2016-05-03 00:10:11 +02:00
Marek Safar ad5431c494 Fix what looks like a buggy RsaOaepDecrypt 2016-05-03 00:10:11 +02:00
Marek Safar b7cdd0e6b9 More cryptography mono tweaks 2016-05-03 00:10:11 +02:00
Marek Safar 06de6ef501 Mono tweaks to cryptography 2016-05-03 00:10:11 +02:00
Marek Safar 8f1e2526c6 Make WindowsRuntime enum value alway available 2016-05-03 00:10:11 +02:00
Marek Safar e3bbb5bf5d Remove more com stuff from Attribute 2016-05-03 00:10:10 +02:00
Atsushi Eno 5d02cd7272 more uses of NO_DYNAMIC_CODEGEN condition were needed. 2016-05-03 00:10:10 +02:00
Sebastien Pouliot 0942d8e96e Restore Mono compatibility with UnmanagedType enum
Some values, like CustomMarshaler, are used by XI unit tests.
2016-05-03 00:10:10 +02:00
Marek Safar 0f3d462110 Mono friendly cryptography bits 2016-05-03 00:10:10 +02:00
Marek Safar b02565eba8 Mobile teaks to security attributes 2016-05-03 00:10:10 +02:00
Marek Safar 4ee14e99ab Update public api 2016-05-03 00:10:09 +02:00
Marek Safar 92499fe593 Mono friendly versioning 2016-05-03 00:10:09 +02:00
Marek Safar 5475c77bd2 Mono friendly safe handles 2016-05-03 00:10:09 +02:00
Marek Safar 7bb4332095 Fix wrong define 7612b6f65cec4620d83117511d38e47a5456b468 2016-05-03 00:10:09 +02:00
Marek Safar 4baab40f56 Tweaks for mobile profiles 2016-05-03 00:10:09 +02:00
Marek Safar aebdb6784e Mono friendlly com types 2016-05-03 00:10:08 +02:00
Atsushi Eno b6a6a85681 more SRE elimination was needed. 2016-05-03 00:10:08 +02:00
Atsushi Eno c8e34950fd Add NO_DYNAMIC_CODEGEN condition. We will be based on (non-emit) reflection. 2016-05-03 00:10:08 +02:00
Atsushi Eno 53b3c4f923 Add mobile build support in System.Runtime.Serialization. 2016-05-03 00:10:08 +02:00
Marek Safar 4f66383f7d Hide ComImportAttribute from MT 2016-05-03 00:10:08 +02:00
Marek Safar eb168f1434 Mono friendly runtime attributes 2016-05-03 00:10:07 +02:00
Marek Safar 0850952185 Add mono stacktraces to ExceptionDispatch 2016-05-03 00:10:07 +02:00
Marek Safar 9fd0cebb7d Mono friendly TextInfo 2016-05-03 00:08:11 +02:00
Marek Safar c832d66fd8 Fixes endianess issue in resourcereader 2016-05-03 00:08:11 +02:00
Marek Safar c6acf036cf Comparer fix 2016-05-03 00:08:11 +02:00
Marek Safar fb91b846d9 Equality comparers fixes 2016-05-03 00:08:10 +02:00
Marek Safar 439a5dedb3 More DISABLE_CAS_USE 2016-05-03 00:08:10 +02:00
Marek Safar 6564baacce Mono friendly Buffer 2016-05-03 00:08:10 +02:00
Marek Safar 0d62748e09 Mono friendly generic comparers 2016-05-03 00:08:10 +02:00
Marek Safar e7a8ed1cc6 Enable GetGenericArguments 2016-05-03 00:08:10 +02:00
Marek Safar 22a07806cd Update timezoneinfo TypeForwardedFrom 2016-05-03 00:08:09 +02:00
Marek Safar ff13385fb5 Update some TypeForwardedFrom 2016-05-03 00:08:09 +02:00
Marek Safar 4746b8ec18 Add FULL_AOT_RUNTIME to IAppDomain 2016-05-03 00:08:09 +02:00
Marek Safar a005b0d8df Mono friendly FileLoadException 2016-05-03 00:08:09 +02:00
Marek Safar 47cd4bbd44 Mono friendly TypeLoadException 2016-05-03 00:08:09 +02:00
Marek Safar 2922585d3f Fix wrong FEATURE_USE_LCID ifdef 2016-05-03 00:08:08 +02:00
Atsushi Eno d8a96b3455 Add mobile build conditions for SMDiagnostics.dll. 2016-05-03 00:08:08 +02:00
Ludovic Henry 459993273e Fix FullAOT build 2016-05-03 00:08:08 +02:00
Marek Safar 6a78fe3bd6 Remove unused icall 2016-05-03 00:08:08 +02:00
Marek Safar 3aa86a62f4 Mono friendly compareinfo 2016-05-03 00:08:08 +02:00
Atsushi Eno a807edd81b Fix mobile_static build. 2016-05-03 00:08:08 +02:00
Marek Safar 58710c252d Remove Mono specific paths from DateTimeFormatInfo 2016-05-03 00:08:07 +02:00
Marek Safar fdc3768649 Specialize encoding names translation 2016-05-03 00:08:07 +02:00
Zoltan Varga 9b53395dc1 Add a workaround for #24566 so 3.12 mcs can compile System.Xml. 2016-05-03 00:08:07 +02:00
Martin Baulig 7b7dd56579 Add conditionals to ServicePointManager.cs.
* `ServerCertValidationCallback': Enable this for Mono.
* `ServicePointManager': Use 'MONO_FEATURE_WEB_STACK' here, we'll
  eventually bring this together with the web stack.

We want the helper APIs at the top of the file, but not the actual
'ServicePointManager' class.
2016-05-03 00:08:07 +02:00
Zoltan Varga 19b3737709 Avoid initializing String.Empty, it is now done from native code. 2016-05-03 00:08:06 +02:00
Martin Baulig de0a074a69 Use actual parameter custom attribute type.
This fixes the situation where a parameter has more than one
custom attribute.
2016-05-03 00:08:06 +02:00
Atsushi Eno 1eb8ff5fa3 Add MONO_PARTIAL_DATA_IMPORT.
It is to make it possible to import everything but SqlClient and co.
2016-05-03 00:08:06 +02:00
Atsushi Eno a5b985c755 Add #if-s for mobile builds. 2016-05-03 00:08:06 +02:00
Atsushi Eno 6e52beedaa Avoid some windows-only calls in System.Data. 2016-05-03 00:08:06 +02:00
Marek Safar cdbda49db9 Mono friendly string 2016-05-03 00:08:05 +02:00
Alexander Köplinger 51003c985d Fix DateTime regression on ARM
This is the same issue as in https://github.com/mono/referencesource/pull/7,
i.e. there's an overflow when casting a too large value from double->long
and the referencesource implementation relies on this being a large negative
value in order for the ArgumentOutOfRangeException to be properly thrown.

As Mono's runtime on ARM in this case returns -1, the exception isn't thrown.

The fix is to introduce an explicit overflow check, catch an eventual
OverflowException and raise the proper exception instead. This can be JIT'd
to better code than checking if the value fits into long every time.

It fixes a couple of DateTime unit tests that currently fail on ARM.
2016-05-03 00:08:05 +02:00
Marek Safar b1b82b0e31 Mono friendly ExceptionDispatchInfo 2016-05-03 00:08:05 +02:00
Marek Safar 1fe2ef619e Don't replace CategoryAttribute value with key when not found. 2016-05-03 00:08:05 +02:00
Marek Safar 7f4798feed Mono friendly System.Resources 2016-05-03 00:08:05 +02:00
Marek Safar a3af9db16d Mono friendly MethodBase 2016-05-03 00:08:05 +02:00
Marek Safar 0d10918597 Mono friendly Type|MemberInfo 2016-05-03 00:08:04 +02:00
Marek Safar 33426e399f Disable unmanaged IsVisible type path, it does not work 2016-05-03 00:08:04 +02:00
Marek Safar e60baf545a Filter out more FrameworkEventSource 2016-05-03 00:08:04 +02:00
Marek Safar f011ecdf2d Enable more Type code 2016-05-03 00:08:04 +02:00
Marek Safar 94b29e3227 Return top-level parameter custom attributes when no base methods exists 2016-05-03 00:08:04 +02:00
Marek Safar 677426f76f Throw better exception on not yet implement runtime icall 2016-05-03 00:08:03 +02:00
Marek Safar 969a1d9f73 Mono friendly TypedReference 2016-05-03 00:08:03 +02:00
Marek Safar 0bf325955a Disable more CAS 2016-05-03 00:08:03 +02:00
Marek Safar 65bd5be8d5 Disable more CAS 2016-05-03 00:08:03 +02:00
Ludovic Henry 0e98066689 Restore RegisteredWaitHandle as we now use the Mono one
The Mono one is entirely implemented in managed code, so it does not need any runtime support.
2016-05-03 00:08:03 +02:00
Marek Safar a7a879fd73 Endian fixes to serialization 2016-05-03 00:08:02 +02:00
Marek Safar 1cd9233410 Mono friendly serialization 2016-05-03 00:08:02 +02:00
Marek Safar 634d8837f2 Update timer argument exception check 2016-05-03 00:08:02 +02:00
Alexander Kyte febf89f87c Added serialization annotations to StringBuilder 2016-05-03 00:08:02 +02:00
Marek Safar a044ac4be0 Add mono specific handling to attribute 2016-05-03 00:08:02 +02:00
Marek Safar fc3f42112d Mono friendly Attribute 2016-05-03 00:08:01 +02:00
Marek Safar c6a9c88494 Few FULL_AOT_RUNTIME tweaks 2016-05-03 00:08:01 +02:00
Marek Safar 153f8e39be Mono uses WebAsyncResult instead of reference sources LazyAsyncResult (at least for now) 2016-05-03 00:08:01 +02:00
Alexander Köplinger 9dc369e094 Fix System.Timers.Timer regression on ARM
When setting Interval = double.MaxValue like in the TimerTest.Interval_TooHigh_ThrowOnEnabled and
TimerTest.Interval_TooHigh_Enabled_Throw Mono unit tests there was a regression on ARM in that
the ArgumentOutOfRangeException wasn't thrown as expected.

Turns out, on ARM the call to (int)Math.Ceiling(double.MaxValue) as used in UpdateTimer() and Enabled setter
doesn't produce -2147483648 (i.e. Int32.MinValue) like on x86/amd64 but rather 2147483647 (i.e. Int32.MaxValue),
which is perfectly valid as the cast overflows and the result is an undefined value.
This means that the value passed to the underlying System.Threading.Timer is not negative
and no ArgumentOutOfRangeException is thrown there.

The fix is to properly check for interval>Int32.MaxValue like is done already in the constructor.
I pulled that logic out and introduced a separate method CalculateRoundedInterval().

Note: The thrown exception changes from an ArgumentOutOfRangeException inside of System.Threading.Timer
to an ArgumentException inside of CalculateRoundedInterval().
I think this has minimal impact as no-one should rely on this exception anyway and it actually matches
what MSDN (https://msdn.microsoft.com/en-us/library/system.timers.timer.interval(v=vs.110).aspx)
says should happen in this case (even though the MS.NET 4.5 implementation doesn't comply).
Mono's implementation also did the same before: https://github.com/mono/mono/blob/4cb3f77b4bbf703b1cda59db2f5aee206e35d31a/mcs/class/System/System.Timers/Timer.cs#L95-L96
2016-05-03 00:08:01 +02:00
Marek Safar c1414877eb Mono friendly Type 2016-05-03 00:08:01 +02:00
dotnet-bot daa3c08494 Adding reference source for SMDiagnostics 2016-05-03 00:08:00 +02:00
Martin Baulig 1075fffc65 Need another DISABLE_CAS_USE in _SecureChannel.cs. 2016-05-03 00:08:00 +02:00
Martin Baulig 7119ec0bba Add another DISABLE_CAS_USE conditional to _SecureChannel.cs 2016-05-03 00:08:00 +02:00
Marek Safar 2c5d0d3a82 Mono friendly enum 2016-05-03 00:08:00 +02:00
Atsushi Eno ec92efb378 Fix native pointer and endianness issue. Fixes bug #27258.
Patch by Neale Ferguson.
2016-05-03 00:08:00 +02:00
Atsushi Eno 32ed523a58 add XmlSerializer for mono support.
Even after we imported System.Xml referencesource, XmlSerializer is still
based on existing code. And we have some special trick for XElement
serialization support in System.Xml, by allowing access from
System.Xml.Linq.dll to use special type converter attribute.

It does not exist in referencesource and thus we lost serializability on
XElement, so we need to add the missing code to bring it back.
2016-05-03 00:07:59 +02:00
Marek Safar acbc67edd2 Mono friendly Activator 2016-05-03 00:07:59 +02:00
Marek Safar ee429115ca Fixes c0a529a421cb47145a32078770205e42545e7021 2016-05-03 00:07:59 +02:00
Marek Safar a7787ce55a Change Encoding key to workaround collision with Encoding parameter names used by string resources 2016-05-03 00:07:59 +02:00
Marek Safar b4332a47b7 Mono friendly Binder 2016-05-03 00:07:59 +02:00
Atsushi Eno 22d2edc5a8 some people claim they have old SYSMONO that cannot compile this source and demand to "fix" this code. 2016-05-03 00:07:59 +02:00
Atsushi Eno 93be8109e3 Add #if CONFIGURATION_DEP and #if XML_DEP in Trace class and co. 2016-05-03 00:07:58 +02:00
Atsushi Eno 1f9b218441 more BIGENDIAN fixes in UnicodeEncoding. 2016-05-03 00:07:58 +02:00
Marek Safar 279395c58c Inline string category resource keys 2016-05-03 00:07:58 +02:00
Marek Safar 68f7cec14d Include Stream::ObjectInvariant in mono build 2016-05-03 00:07:58 +02:00
Marek Safar bcdb1963e1 Revert no longer needed changes 2016-05-03 00:07:58 +02:00
Atsushi Eno 92cec4692a Alter #if BIGENDIAN code with run-time condition.
Should fix bug #27258.
2016-05-03 00:07:57 +02:00
Atsushi Eno ebb7ea27cd add DISABLE_XSLT_SCRIPT and DISABLE_XSLT_COMPILER.
The former condition is to disable <msxsl:script> element.
The latter is to disable XslCompiledTransform and co (though they are
mostly removed at *.dll.sources level).
2016-05-03 00:07:55 +02:00
Atsushi Eno 74692062be Reduce !MOBILE scope in XmlReaderSettings. They are in use. 2016-05-03 00:07:55 +02:00
Atsushi Eno d8af5d16df disable Win32 registry dependencies in XmlReaderSettings on MOBILE builds. 2016-05-03 00:07:55 +02:00
Atsushi Eno a1b52227d0 Add workaround for XmlSchema serialization.
Somewhere in System.Xml requires NameTable to be canonically reused when
deserializing XmlSchema, so that certain deserialization part can check
only reference equality.

Since we have hybrid System.Xml implementation for XmlSerializer, this
is not completely achieved and with reference comparison it causes some
schema deserialization failure. To avoid this problem, just disable
reference comparison. It should not affect outside XmlSchema serialization.
2016-05-03 00:07:55 +02:00
Atsushi Eno ae11025ba5 revert mono-specific XmlSchemas changes that is not necessary anymore. 2016-05-03 00:07:55 +02:00
Atsushi Eno b23200a668 Make changes for System.Xml merge into mono tree.
DISABLE_CAS_USE is required to avoid NotImplementedExceptions in CAS land.

MONO_HYBRID_XML is to preserve Mono's XmlSerializer which also allows
interpreter-based XML serialization (as opposed to run-time code generation
based XML serialization, which is not doable in iOS).

Though some Xml.Serialization classes are useful even with mono
implementation, so we partially import them (namely schema importer).
2016-05-03 00:07:55 +02:00
Marek Safar 665d462dc5 Disable eventsources in resources 2016-05-03 00:07:54 +02:00
Marek Safar 226e440d88 Revert "Add read-only interfaces to some System/System.Core collection classes."
This reverts commit b23609f81a95b384538dba01a1cbf49fe2a9b95a.

Confirmed by Brett Lopez as MSDN bug
2016-05-03 00:07:54 +02:00
dotnet-bot 332534dede Adding reference source for part of Workflow Foundation
Adding reference source for
System.Activities
System.Activities.DurableInstancing
System.Activities.Presentation
System.Runtime.DurableInstancing
System.Workflow.Activities
System.Workflow.ComponentModel
System.Workflow.Runtime
System.WorkflowServices
System.Xaml.Hosting
XamlBuildTask
2016-05-03 00:07:54 +02:00
dotnet-bot 287e106a1b Add resources for some referencesource projects
Add resources for:
mscorlib
System
System.ComponentModel.DataAnnotations
System.Core
System.Core
System.Data.DataSetExtensions
System.Data.Entity.Design
System.Data.Entity
System.Data.Linq
System.Data.SqlXml
System.Data
System.Net
System.Numerics
System.Runtime.Serialization
System.ServiceModel.Web
System.ServiceModel
System.Web.Mobile
System.Web
System.Xml.Linq
System.Xml
2016-05-03 00:07:52 +02:00
Marek Safar 6cf3e41695 Endianness handling in binary reader 2016-05-03 00:07:52 +02:00
Marek Safar 6acdf6a9ab Remove not useful !FEATURE_PAL from bufferedstream 2016-05-03 00:07:52 +02:00
Marek Safar 3cccc6b602 Add mono specific DataAvailable to streamreader 2016-05-03 00:07:51 +02:00
Marek Safar a71b2a2604 TextWriter without hardcoded line endings 2016-05-03 00:07:51 +02:00
Marek Safar 3ee70fc40a Bugfix WriteLineAsync(String value) to not crash on writing null string 2016-05-03 00:07:51 +02:00
Ludovic Henry 7cad99c9c9 Integrate the microsoft ThreadPool into it's own System.Threading.Microsoft namespace
This will let us have both the Mono and the Microsoft ThreadPool at the same time.
To switch to the Microsoft one, set the MONO_THREADPOOL environment variable to "microsoft". It will default to the Mono one.
2016-05-03 00:07:51 +02:00
Marek Safar 68a3fbc991 Mono friendly IO errors 2016-05-03 00:07:51 +02:00
Marek Safar 10c9b1bc1b Fix contradicting defines in Stream 2016-05-03 00:07:51 +02:00
Marek Safar c9739a3a23 Fix a bug when setting capacity to 0 on MemoryStream causes crash on ToArray call 2016-05-03 00:07:50 +02:00
Marek Safar f56b42d5b8 Inline contracts error messages for text replacement to work 2016-05-03 00:07:50 +02:00
Alex Rønne Petersen 94d2cda769 Add read-only interfaces to some System/System.Core collection classes. 2016-05-03 00:07:50 +02:00
Atsushi Eno a6edbc4328 avoid reflection here.
as per https://github.com/mono/mono/pull/1566#discussion_r24653304
2016-05-03 00:07:50 +02:00
Atsushi Eno 6f7cb1fc0a Add I18N assembly invocation support in Encoding. 2016-05-03 00:07:50 +02:00
Marek Safar 5c29480b4c Apply more DISABLE_CAS_USE 2016-05-03 00:07:49 +02:00
Marek Safar 6f032bb0e3 Disable more CAS on mobile 2016-05-03 00:07:49 +02:00
Marek Safar a2644f7be1 Mono friendly guid. Includes StringToLong fix for issue https://github.com/dotnet/coreclr/issues/182 2016-05-03 00:07:49 +02:00
Zoltan Varga f59490e89d Remove another unused decimal icall. 2016-05-03 00:07:49 +02:00
Zoltan Varga 11cc224de6 Remove unused decimal icalls. 2016-05-03 00:07:49 +02:00
Martin Baulig 1228b5b427 Need MONO_X509_ALIAS in _SslState.cs and _SecureChannel.cs. 2016-05-03 00:07:48 +02:00
Martin Baulig e994a2aed2 Introduce new MONO_X509_ALIAS conditional and use it in SslStream.cs. 2016-05-03 00:07:48 +02:00
Miguel de Icaza adee990fe1 Implement NumberBufferToDecimal in Mono, and make Decimal ctor build 2016-05-03 00:07:48 +02:00
Sebastien Pouliot e0e9f78aa8 Disable some CAS usage using DISABLE_CAS_USE 2016-05-03 00:07:48 +02:00
Martin Baulig 14c84a5e7c Merge the 'martin-ssl-integration' branch.
All changes are conditional to MONO_FEATURE_NEW_TLS.

In addition to that, all changes to their code are also conditional to 'MONO'; this
mostly applies to SecureChannel, which needed several changes to replace their native
SSPI implementation with Mono's new managed version.

* Net/SecureProtocols/SslStream.cs: Make partial and comment out 'SslStream.TransportContext'.

* Net/SecureProtocols/SslState.cs: Make partial and add new internal constructor; pass the
  'SSPIConfiguration' argument down to SecureChannel's .ctor.

* Net/SecureProtocols/_SslStream.cs: Make partial.

* Net/SecureProtocols/_SecureChannel.cs: Add Mono-specific SSPI APIs.

* Net/_SslSessionCache.cs: Make conditional.
2016-05-03 00:07:48 +02:00
Marek Safar 65dde8442d Add AmILittleEndian to bitconverter 2016-05-03 00:07:47 +02:00
Marek Safar 57957f4f32 Exclude legacy icalls from datetime 2016-05-03 00:07:47 +02:00
Alexander Kyte 2d6f01267e Fixed MethodAccessException in dynamically generated code 2016-05-03 00:07:47 +02:00
Marek Safar 1ea9ab5ad0 Disable legacy calls from timespan 2016-05-03 00:07:47 +02:00
Marek Safar 44325b1f5f Removes one culture #if 2016-05-03 00:07:47 +02:00
Marek Safar c0cb41e17b Mono friendly DateTimeFormatInfo 2016-05-03 00:07:47 +02:00
Sebastien Pouliot f115ec6d52 Disable CAS calls on System.Componentmodel.TypeDescriptor 2016-05-03 00:07:46 +02:00
Martin Baulig 7ad76389fb Add another small DISABLE_CAS_USE conditionals. 2016-05-03 00:07:46 +02:00
Martin Baulig 60c6562e41 Add 'MONO_FEATURE_LOGGING' conditional to disable Logging.cs.
Also put back the previous conditionals in this file.
2016-05-03 00:07:46 +02:00
Marek Safar a21891741f Correctly fix 857b021d78ea1e987b7e65493c6d926948926bb4 2016-05-03 00:07:46 +02:00
Marek Safar b1e058317a Reverts not needed changes 2016-05-03 00:07:46 +02:00
Martin Baulig 44ad73b31c FIXME: This completely breaks Xamarin Studio, making it impossible to compile anything.
See the detailed comment inside.
2016-05-03 00:07:45 +02:00
Martin Baulig c32be390e4 Add 'MONO_FEATURE_NEW_TLS' conditional to SslStreamContext.
This allows us to bring TransportContext.cs and conditionally enable it when needed.
2016-05-03 00:07:45 +02:00
Marek Safar 0e8ff9dca4 Disable com specific stringbuilder marshalling 2016-05-03 00:07:45 +02:00
Zoltan Varga 69f0e9b1ba Revert "[mscorlib] RuntimeWrappedException mono updates."
This reverts commit ea80438e7108d9d0a10b2b6b3dd0c6d123710232.

Revert this, it is now handled in the runtime.
2016-05-03 00:07:45 +02:00
Martin Baulig 034bc3419a Use "Thread.CurrentThread.ManagedThreadId" on Mono. 2016-05-03 00:07:45 +02:00
Martin Baulig b1325688c1 Add conditionals where needed.
This allows us to bring Internal.cs, Logging.cs and _LoggingObject.cs.
2016-05-03 00:07:44 +02:00
Martin Baulig 7e49341898 Add REAMDE.Mono with known conditional names.
Please update if you add any new conditionals.
2016-05-03 00:07:44 +02:00
Zoltan Varga 3e7c12ec79 RuntimeWrappedException mono updates. 2016-05-03 00:07:44 +02:00
Marek Safar 696286134b Mono Calendars compatibility 2016-05-03 00:07:44 +02:00
Marek Safar e19bfbc2e9 List<T> mono updates 2016-05-03 00:07:44 +02:00
Marek Safar 731d463fb5 Exclude never used method 2016-05-03 00:07:44 +02:00
Marek Safar ec643899c0 Add BigNumber runtime api 2016-05-03 00:07:43 +02:00
Marek Safar ac94587de2 Mono number formatting 2016-05-03 00:07:43 +02:00
Miguel de Icaza 5b782cf2da ComponentModel, make it build in the MOBILE profile 2016-05-03 00:07:43 +02:00
Ludovic Henry c8a99e52fc Add mono internal API support 2016-05-03 00:07:43 +02:00
Marek Safar 8abf084f5d Replace more Array.MaxArrayLength appearences 2016-05-03 00:07:43 +02:00
Marek Safar dcb1181a71 Remove windows api dependency from Timer 2016-05-03 00:07:42 +02:00
Marek Safar 63c969bd9d Conditionals for mobile profiles 2016-05-03 00:07:42 +02:00
Miguel de Icaza 189361bd71 Disable IL code generation until we figure out 25671 2016-05-03 00:07:42 +02:00
Miguel de Icaza 68d23c1567 Only initialize Etw on Windows 2016-05-03 00:07:42 +02:00
Miguel de Icaza d7a460f238 Remove code that depends on code that has not been open sourced.
Use the MONO define for this
2016-05-03 00:07:42 +02:00
Marek Habersack 781f927688 Use the DISABLE_CAS_USE macro instead of MOBILE to disable CAS
This augments commit 7dc4e513eafd3fb30d34111948ef14c981264463
2016-05-03 00:07:41 +02:00
dotnet-bot db1743eefb Adding reference source for System.Net 2016-05-03 00:07:41 +02:00
Marcos Henrich 8d443af0b7 Removed UnsafeNativeMethods calls on Mono. - MEMORYSTATUSEX usages were replaced with performance counters "Total Physical Memory and "Available Physical Memory"
- SafeRegistryHandle.ReleaseHandle is only called on code that is ignored on Mono.

 - Mono is using AppDomain.FriendlyName directly instead of UnsafeNativeMethods.GetModuleFileName.
2016-05-03 00:07:41 +02:00
Marcos Henrich 921c6a0bd8 Added Mono config variables. Variables __MonoEmulateOneCPU and __MonoTimerPeriod are used by some tests. 2016-05-03 00:07:40 +02:00
Marek Habersack 411739eb9b Exclude security code from the mobile targets.
Mobile doesn't support any of the security features of .NET, no point in
running the code and/or defining fake types.
2016-05-03 00:07:40 +02:00
Marek Safar 388317dba6 Disable UseCompatibleTypeConverterBehavior on mono 2016-05-03 00:07:40 +02:00
Marek Safar 61cbe91089 componentmodel tweaked to work with mono 2016-05-03 00:07:40 +02:00
Marcos Henrich 37a094d21d Disable use of CAS. The added ifdef is required to circumvent a compile error on older versions of mcs. 2016-05-03 00:07:40 +02:00
Marek Safar 00c9047fe5 Remove unused private using 2016-05-03 00:07:39 +02:00
Marcos Henrich 3112a50560 Removed unnecessary call to Thread.WriteVolatile. System.Threading.Volatile is internal on framework versions before 4.5. As corlib internals are visible from System.Core we can use Volatile. 2016-05-03 00:07:39 +02:00
Marcos Henrich c1189efcc6 ReaderWriterLockSlim.cs now builds with mono.
* Builds without [MethodImpl(MethodImplOptions.AggressiveInlining)]
  when target framework version is lower than 4.5.

* Use Thread.Volatile instead of Volatile.Read when target framework
  version is lower than 4.5.
2016-05-03 00:07:39 +02:00
Alexander Köplinger fc5ecbc2bd Add support to build with Mono 2016-05-03 00:07:39 +02:00
Sebastien Pouliot 0d4695cc7d Remove unused System.Web namespace from source (it does not exists in the mobile profile). 2016-05-03 00:07:39 +02:00
Miguel de Icaza 9843fa873d Disable use of CAS when compiling with DISABLE_CAS_USE 2016-05-03 00:07:39 +02:00
Miguel de Icaza 487d2d21f3 Fix the conditional, we disable Emit code on FULL_AOT 2016-05-03 00:07:38 +02:00
Marek Safar 46102d2417 Add support to build with Mono.
* Change location of internal Array constants. Mono runtime cannot handle
    array type with constants.

    * Removes some warnings from the build for unused fields.
2016-05-03 00:07:38 +02:00
Miguel de Icaza cbd37bcda1 Adjust to disable IL generation under FULL_AOT_RUNTIME 2016-05-03 00:07:38 +02:00
Miguel de Icaza 82baacad8f Add support to build build with Mono.
This patch does the following things:

* Adds support to build without Code Access Security, by using the new
  define DISABLE_CAS_USE.  The reason is that this is both slow, and
  Mono does not actually offer a Code Access Secured environment.  So
  avoid paying the price.

* Removes some warnings from the build for unused variables.

* Allows the code to be bootstrapped with a 2.0 compiler (which Mono
  does during the bootstrap phase currently).
2016-05-03 00:07:38 +02:00
dotnet-bot a026243bcc Adding System.Compo... System.Ident... System.Numer... System.Runti...
Adding reference source for
System.ComponentModel.DataAnnotations
System.IdentityModel
System.IdentityModel.Selectors
System.Numerics
System.Runtime.Caching
System.Runtime.Serialization
2016-05-03 00:07:38 +02:00
dotnet-bot 81cc9680d7 Update formatting of LICENSE.txt and PATENTS.TXT 2016-05-03 00:07:37 +02:00
dotnet-bot adf899c629 Adding System.Data..., System.ServiceModel..., and System.Web...
Adding reference source for
System.Data
System.Data.DataSetExtensions
System.Data.Entity
System.Data.Entity.Design
System.Data.Linq
System.Data.SqlXml
System.ServiceModel
System.ServiceModel.Activation
System.ServiceModel.Activities
System.ServiceModel.Channels
System.ServiceModel.Discovery
System.ServiceModel.Internals
System.ServiceModel.Routing
System.ServiceModel.WasHosting
System.ServiceModel.Web
System.Web
System.Web.ApplicationServices
System.Web.DynamicData
System.Web.Entity
System.Web.Entity.Design
System.Web.Extensions
System.Web.Mobile
System.Web.Routing
System.Web.Services
System.Xml
System.Xml.Linq
2016-05-03 00:07:37 +02:00
dotnet-bot 4c5e6261a7 Initial commit
_   _ _____ _____   ____            _        _
   | \ | | ____|_   _| |  _ \ ___   ___| | _____| |
   |  \| |  _|   | |   | |_) / _ \ / __| |/ / __| |
  _| |\  | |___  | |   |  _ < (_) | (__|   <\__ \_|
 (_)_| \_|_____| |_|   |_| \_\___/ \___|_|\_\___(_)
2016-05-03 00:07:31 +02:00
Marek Safar 871fcad377 [System.Runtime.Serialization] Remove redundant IVT to System.ServiceModel.Web 2016-05-02 16:07:12 +02:00
Marek Safar ed2ad96956 [System.Runtime.Serialization] Remove redundant IVT to System.ServiceModel 2016-05-02 15:36:30 +02:00
Zoltan Varga 096d2488cc [arm64] Dist arm64-codegen.h. Fixes #38223. 2016-04-29 23:23:49 -04:00
Alexander Köplinger f959605062 Merge pull request #1345 from mattleibow/websocket-continuation-frame-fix
[system] WebSocket continuation frame incorrectly handles the message type
2016-04-27 11:04:43 -04:00
monojenkins 8a0f18d53e Merge pull request #2947 from mfilippov/master
Socket.AcceptAsync should use SocketAsyncEventArgs.AcceptSocket

Socket.AcceptAsync shouldn't create new socket if SocketAsyncEventArgs.AcceptSocket isn't null.
2016-04-26 18:25:23 +01:00
Joao Matos 48b7036938 [runtime] Moved MONO_ZERO_LEN_ARRAY to mono-publib.h. 2016-04-26 13:03:21 -04:00
Alexander Köplinger f8390a4e36 Merge pull request #2960 from directhex/switchable-configure-in-jenkins
Switchable configure in jenkins
2016-04-26 11:37:06 -04:00
Jo Shields 04872540c0 [jenkins] introduce CI_TAGS env var, to alter flow of jenkins script 2016-04-26 16:32:46 +01:00
Mikhail Filippov 5128176e61 Refactoring SocketAcceptAsyncTest 2016-04-26 18:18:31 +03:00
Mikhail Filippov af14aaeb2c Fix SocketAcceptAsyncTest 2016-04-26 17:58:44 +03:00
Jo Shields a826d9cbb9 [jenkins] Don't overwrite EXTRA_CONF_FLAGS inside run-jenkins.sh
This means we can pass EXTRA_CONF_FLAGS to the script, to more easily change the script behaviour from Jenkins
2016-04-26 15:53:55 +01:00
Marek Safar 58245a39e4 Merge pull request #2949 from Unity-Technologies/xbuild-windows-mcs
Make xbuild on Windows use Mono instead of .NET
2016-04-26 07:19:44 -04:00
monojenkins ab9f5edfee Merge pull request #2957 from akoeplinger/fix-corlib-mobile-tests
Fix two corlib test issues on mobile

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

@monojenkins merge
2016-04-26 03:25:24 +01:00
Alexander Köplinger a9554fdcbc Merge pull request #2953 from mono/fix-fileinfo-delete
[corlib] Bring the FileInfo.Delete fix
2016-04-25 17:27:27 -04:00
Alexander Köplinger c602e3b04c [corlib] Fix FileInfoTest.MoveTo_SameName test that failed on mobile
The MoveTo target is in the current working directory instead of in the temp dir, so it runs into permission issues.
Use the temp dir instead. Fixes part 2 of #40624
2016-04-25 17:20:50 -04:00
Alexander Köplinger f0f9b6ac90 [corlib] Ignore a TimeZoneInfo test on mobile that doesn't make sense there
It failed on maccore because it uses reflection on code that's excluded on mobile.
Exclude the test too, fixes part 1 of #40624
2016-04-25 17:20:50 -04:00
Zoltan Varga 9e3c032ab2 [runtime] Remove dead mono_thread_get_and_clear_pending_exception () function. 2016-04-25 17:16:14 -04:00
Ludovic Henry ab4737fce5 Merge pull request #2946 from ludovic-henry/fix-process-40643
[Process] Fix Process.Start handle leak
2016-04-25 14:48:41 -04:00
Ludovic Henry 4bbe4d5e49 Merge pull request #2924 from ludovic-henry/fix-missing-gsharedvt-wb
[mini] Add missing gsharedvt write barrier
2016-04-25 14:46:47 -04:00
Alexander Köplinger 2df509653e [corlib] Bring the FileInfo.Delete fix
See https://github.com/mono/referencesource/commit/fdebd8a4d709002bb499555c35e1dfd3834e2f4f for details.

Also add a test for checking if deleting a non-existent file works (we were missing coverage there before).
2016-04-25 12:34:45 -04:00
Ludovic Henry 10a841ae2b [io-layer] Remove dead code 2016-04-25 12:32:09 -04:00
Alexander Köplinger c4ae0fa832 Merge pull request #2952 from mono/revert-2721-fix-mono_ms_ticks
Revert "[runtime] Fix potential overflow when using mono_msec_ticks"
2016-04-25 12:26:13 -04:00
Alexander Köplinger df3f7b268f Revert "[runtime] Fix potential overflow when using mono_msec_ticks" 2016-04-25 12:24:51 -04:00
Ludovic Henry 6b139f4c98 Merge pull request #2721 from ludovic-henry/fix-mono_ms_ticks
[runtime] Fix potential overflow when using mono_msec_ticks
2016-04-25 11:22:15 -04:00
Josh Peterson 2061cb2b57 Make xbuild on Windows use Mono instead of .NET
We don't have .NEt 4.6 installed on all of our build machines, to
running mcs.exe on Windows fails, as it was built with .NET 4.6.
Instead, we will run mcs.exe via Mono on Windows (which is what happens
on OSX, although there the low-level Process class handles it).

To accomplish this, we run mcs.bat instead of mcs.exe.
2016-04-25 11:01:52 -04:00
Mikhail Filippov 06e12b837f Socket.AcceptAsync shouldn't create new socket if SocketAsyncEventArgs.AcceptSocket isn't null 2016-04-25 16:06:31 +03:00
Ludovic Henry a39f7fce21 [Process] Fix handle leak on child process Creation
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=40643
2016-04-24 16:30:11 -04:00
Ludovic Henry 4d0f6bb138 [Process] Improve debugging info and slight refactor of CreateProcess 2016-04-24 16:08:12 -04:00
Ludovic Henry e19a2e2c40 [Process] Fix System.Diagnostics.ProcessTest.StandardInputWrite
The child process would simpky execute ls, then exiting right away. Writing to its stdin would then crash with "EPIPE: An attempt is made to write to a pipe that is not open for reading by any process." as the child process exited.
2016-04-24 16:04:46 -04:00
Alexander Köplinger 04162ffbbd Merge pull request #2941 from jogibear9988/patch-1
Bugfix DateTime in Sqlite: https://bugzilla.xamarin.com/show_bug.cgi?id=40603
2016-04-24 13:49:48 -04:00
Marek Safar 3aafc25cc4 Revert "[verifier] Do method visibility checks for virtual final methods. Enable type visibility for all methods. Fixes #5644."
This reverts commit 24ee5b8db0.
2016-04-24 16:08:52 +02:00
Marek Safar 20b564dd08 Revert "WIP - don't merge"
This reverts commit 359bb511d3.
2016-04-24 16:08:38 +02:00
Marek Safar 0a49f951f7 Revert "WIP fix the previous issue."
This reverts commit a26a533698.
2016-04-24 16:08:21 +02:00
Marek Safar def4458cdc [corlib] Reenable IsReadOnly test 2016-04-24 09:58:51 +02:00
Marek Safar 7f207ba946 [xbuild] Fix ApplicationIcon incremental build dependency 2016-04-24 09:58:51 +02:00
Marek Safar b3e2ebf9dd Merge pull request #2942 from jogibear9988/patch-2
bugfix numInfo of Cultureinfo NonSerialized on Windows
2016-04-24 09:49:59 +02:00
Marek Safar 15b054f53e Merge pull request #2945 from mono/xi-40574
[linker] Method decorated with System.Runtime.Serialization.*Attribut…
2016-04-24 09:04:31 +02:00
Sebastien Pouliot 309e7277de [linker] Method decorated with System.Runtime.Serialization.*Attribute must be marked, Fixes #40574
Some serialization attributes are unlikely to have direct reference,
from IL, but will be needed at runtime to correctly serialize (or
deserialize) objects.

* OnDeserializedAttribute
* OnDeserializingAttribute
* OnSerializedAttribute
* OnSerializingAttribute

This, along with aad627c5e8, fixed bug
40574. The later part will have new unit tests in XI.

references:
https://bugzilla.xamarin.com/show_bug.cgi?id=40574
2016-04-23 05:05:38 -04:00
Marek Safar aad627c5e8 [corlib] Disable core security icalls on mobile 2016-04-23 08:57:01 +02:00
Miguel de Icaza 55b3ef64ac Microsoft relicensed this fork of the Ajax library under the MIT license 2016-04-22 20:19:02 -04:00
Miguel de Icaza ed8bfd0b4a Microsoft relicensed this fork of the DLR under the MIT license 2016-04-22 20:18:34 -04:00
Aleksey Kliger (λgeek) 69b03a509b Merge pull request #2944 from lambdageek/dev/monoerror-thread_create
[runtime] MonoError-ize mono_thread_create{,_internal}
2016-04-22 15:18:33 -04:00
Aleksey Kliger 8d785f019f [runtime] MonoError-ize mono_thread_create{,_internal}
Mark mono_thread_create external only.  Runtime should use
mono_thread_create_checked.
2016-04-22 11:33:03 -04:00
Marek Safar bdd0de7ee5 [corlib] FileInfo from referencesource 2016-04-22 17:11:56 +02:00
Marek Safar 853884299e [corlib] Remove System.Core security types 2016-04-22 13:37:39 +02:00
Marek Safar eaf991dac2 [corlib] Remove duplicated sources 2016-04-22 10:35:44 +02:00
Marek Safar 4f8c66cd7c [System.Core] Add CommonCrypto dependencies 2016-04-22 10:30:09 +02:00
Marek Safar f996138183 [corlib] FileSystemInfo from reference source 2016-04-22 10:08:45 +02:00
Alexander Köplinger 12b29a1a8a [acceptance-tests] Move roslyn build dependencies to download server
storage.bos.internalx.com is only available via VPN now.

Also bump coreclr to get a recent minor fix.
2016-04-22 09:50:18 +02:00
Marek Safar b9425affd3 Merge pull request #2943 from mono/xi-40570
[System.Core] Add back AesManaged to tvOS and watchOS profiles. Fixes #40570
2016-04-22 07:55:16 +02:00
Kirill 7773099298 [WindowsBase] Serialization fix of Int32Rect, Point, Rect, Size, Vector, Matrix (#2873)
The problem is that private fields in described types doesn't start from _ prefix, but it should be so according to reference source.
That's way MONO can't deserialize that types correctly if source stream was created by MS .NET binary serializer.

This change is released under the MIT license.
2016-04-22 00:44:52 -04:00
Sebastien Pouliot eecca1fa0e [System.Core] Add back AesManaged to tvOS and watchOS profiles
Switching maccore to use mono-4.5.0-branch introduced this bug where
AesManaged is not available in System.Core for both tvOS and watchOS
profiles (iOS is fine).

This results in unit tests failures on bots building maccore/master.

This fix the problem by importing the "main" monotouch_System.Core.
dll.sources into the other profiles - since they all share the same
feature set (in this case) and make it less likely to forget something
else in the future.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=40570
2016-04-21 21:25:38 -04:00
Zoltan Varga 92bcc1db28 [runtime] Allow enums with base type of char in Enum.ToObject (), this is valid in f#. Fixes #40568. 2016-04-21 17:23:09 -04:00
monojenkins bd62c1e12b Merge pull request #2940 from xmcclure/disable-jit-gsharedvt
Fix gsharedvt compile on DISABLE_JIT platforms
2016-04-21 21:40:20 +01:00
Jochen Kühner 9a663d6be4 bugfix numInfo of Cultureinfo NonSerialized on Windows, https://bugzilla.xamarin.com/show_bug.cgi?id=35872
Cultureinfo numInfo is not NonSerialized on DotNet for windows, so it also should not on mono.

http://referencesource.microsoft.com/#mscorlib/system/globalization/cultureinfo.cs,76
2016-04-21 21:59:57 +02:00
Jochen Kühner a90d5d8e15 Bugfix https://bugzilla.xamarin.com/show_bug.cgi?id=40603 2016-04-21 21:41:05 +02:00
Atsushi Eno c641b32930 [I18N/CJK] iso-2022-jp GetChars() had some bogus conversion ranges. 2016-04-22 03:08:23 +09:00
Andi McClure bbbb941ee2 Fix gsharedvt compile on DISABLE_JIT platforms 2016-04-21 13:18:47 -04:00
Alexander Köplinger d5c88ebee2 Merge pull request #2939 from discofire/patch-1
Update OracleConnection.cs
2016-04-21 18:24:58 +02:00
discofire 705d0d319b Update OracleConnection.cs
Fix SQL syntax for GetSchemaProcedures function. (Should have been 'SELECT' instead of 'SSELECT')
2016-04-21 11:48:49 -04:00
Andi McClure 7a3356be22 Merge pull request #2918 from lateralusX/jlorenss/aot-x86-symbol-fix
Windows 32-bit x86 AOT assembler didn't compile due to incorrect symbol mangling.
2016-04-21 10:04:40 -04:00
Vlad Brezae a4a3aea41e Merge pull request #2869 from BrzVlad/feature-mod-union-opt
[sgen] Optimize mod union usage
2016-04-21 16:53:02 +03:00
monojenkins ed9211bae9 Merge pull request #2935 from kumpera/new-gc-test
[sgen] Add regression test for the interaction between the bridge and handles.

The bridge code was triggering handles to be considered deallocated thus leading
them to be overwritten.
2016-04-21 08:45:27 +01:00
monojenkins 7f5d060b9f Merge pull request #2932 from ludovic-henry/fix-waithandle-remoting
[corlib] Ifdef out calls to SynchronizationAttribute on monotouch

When WaitHandle was imported from referencesource in f6fa8f0, the code was refactored and basically all WaitHandle.Wait* calls end up in WaitOneNative or WaitMultiple now.

On monotouch those methods threw a NotSupportedException when exitContext == true even before the import, so this behavior got inherited to some other methods that didn't throw after the exception was removed from them in 93e31cb. This broke tests in maccore and other code that passed exitContext=true.

To fix this, we just ifdef out the calls to SynchronizationAttribute on monotouch since they don't make sense there anyway since remoting isn't available. The commit that initially added the exception in 2ce9fc1 only did that to make the behavior consistent when the linker is enabled. By removing the calls we get the same result.

Do the same for Monitor so we're consistent.

commit message from @akoeplinger
2016-04-21 07:30:26 +01:00
monojenkins 4e9160841d Merge pull request #2880 from kumpera/fix_5644
[verifier] Do method visibility checks for virtual final methods. Enable type visibility for all methods. Fixes #5644.

I cannot repro the issue mentioned in the comments of mono_method_can_access_method.

* FIXME:
* with generics calls to explicit interface implementations can be expressed
* directly: the method is private, but we must allow it. This may be opening
* a hole or the generics code should handle this differently.
* Maybe just ensure the interface type is public.

@monojenkins merge
2016-04-20 23:50:38 +01:00
Rodrigo Kumpera 9b7f5a0097 [sgen] Add regression test for the interaction between the bridge and handles.
The bridge code was triggering handles to be considered deallocated thus leading
them to be overwritten.
2016-04-20 15:15:18 -07:00
Joel Martinez 8ff2f4518e [docs] Added index.xml entry for CFNetworkHandler. (#2930)
This particular piece of documentation is added manually, because it's not in the regular BCL library, but is provided by Xamarin on the iOS platform. Because it was missing an entry in the index file, it was excluded from the published documentation when doing mdoc assemble.
2016-04-20 16:51:37 -04:00
Zoltan Varga cde767b6ba Merge pull request #2934 from vargaz/fix-36852
[sgen] Avoid returning NULL from null_link_if (), that means an empty…
2016-04-20 16:14:44 -04:00
Ludovic Henry 06dff0b90e [corlib] Ifdef out calls to SynchronizationAttribute on monotouch
When WaitHandle was imported from referencesource in f6fa8f0, the code was refactored and basically all WaitHandle.Wait* calls end up in WaitOneNative or WaitMultiple now.

On monotouch those methods threw a NotSupportedException when exitContext == true even before the import, so this behavior got inherited to some other methods that didn't throw after the exception was removed from them in 93e31cb. This broke tests in maccore and other code that passed exitContext=true.

To fix this, we just ifdef out the calls to SynchronizationAttribute on monotouch since they don't make sense there anyway since remoting isn't available. The commit that initially added the exception in 2ce9fc1 only did that to make the behavior consistent when the linker is enabled. By removing the calls we get the same result.

Do the same for Monitor so we're consistent.
2016-04-20 21:17:11 +02:00
Zoltan Varga e156dd586f [sgen] Avoid returning NULL from null_link_if (), that means an empty slot, not a handle pointing to null. Fixes #36852. 2016-04-20 14:53:45 -04:00
Rodrigo Kumpera a26a533698 WIP fix the previous issue. 2016-04-20 10:14:46 -07:00
Rodrigo Kumpera 359bb511d3 WIP - don't merge 2016-04-20 08:37:58 -07:00
Rodrigo Kumpera 24ee5b8db0 [verifier] Do method visibility checks for virtual final methods. Enable type visibility for all methods. Fixes #5644.
I cannot repro the issue mentioned in the comments of mono_method_can_access_method.

* FIXME:
* with generics calls to explicit interface implementations can be expressed
* directly: the method is private, but we must allow it. This may be opening
* a hole or the generics code should handle this differently.
* Maybe just ensure the interface type is public.
2016-04-20 08:37:58 -07:00
Marek Safar 11640a9e73 [build] Add missing empty assemblies needed by default csc config 2016-04-20 17:29:06 +02:00
Rodrigo Kumpera 6f7c5bdf4e [profile] Fix a regression from last commit. 2016-04-20 08:21:37 -07:00
Aleksey Kliger (λgeek) 8aaa40bc73 Merge pull request #2859 from lambdageek/dev/monoerror-object-c
[runtime] Grab bag of MonoError fixes in object.c
2016-04-20 10:46:47 -04:00
Marek Safar c8e8895c0d [mcs] Fixes crash during conversion error reporting. Fixes #40536 2016-04-20 15:56:46 +02:00
Marek Safar 7980adc6c5 [mcs] null operator receiver type needs to be convertible to null. Fixes #40493 2016-04-20 14:26:04 +02:00
Marek Safar 5718f12bd1 [tools] Fixes compiler tester error messages verification 2016-04-20 14:26:04 +02:00
Marek Safar 26b4a3d856 Merge pull request #2891 from xmcclure/bug-39669
Allow xml configuration sections to reference System.dll (bug#39669)
2016-04-20 08:09:32 +02:00
Rodrigo Kumpera cbf9ddad25 [profiler] Remove unneeded call to mono_lock_free_queue_node_init.
Remove calls to mono_lock_free_queue_node_init for nodes that just came out of mono_lock_free_queue_dequeue.

That call is superfluous as dequeue will set the returned node 'next' field to INVALID_NEXT, which is the
same thing the mono_lock_free_queue_node_init call did.
2016-04-19 15:59:07 -07:00
monojenkins 37e0ed9066 Merge pull request #2922 from akoeplinger/fix-tvos
[utils] Fix MONO_SIGNAL_USE_UCONTEXT_T not being defined on tvOS simulator

In the maccore tvossimulator tests we were seeing the following assertion with the Mono 4.5 preview:

```
error: * Assertion: should not be reached at /Users/builder/data/lanes/1381/0d6923b4/source/maccore/external/mono/mono/utils/mono-context.c:194

0   dont link                           0x000000010175702d mono_handle_native_sigsegv + 253
1   libsystem_platform.dylib            0x000000010a0cfeaa _sigtramp + 26
2   ???                                 0x0000000001bfc4db 0x0 + 29344987
3   libsystem_c.dylib                   0x0000000109e56cbc abort + 129
4   dont link                           0x00000001018d1503 _ZL12log_callbackPKcS0_S0_iPv + 67
5   dont link                           0x00000001018c26d0 monoeg_assertion_message + 192
6   dont link                           0x00000001018af6de mono_sigctx_to_monoctx + 30
7   dont link                           0x000000010183f473 sgen_suspend_thread + 323
8   dont link                           0x000000010183f58e sgen_thread_handshake + 126
9   dont link                           0x000000010183fb20 sgen_client_stop_world + 1296
10  dont link                           0x0000000101871283 sgen_stop_world + 67
11  dont link                           0x0000000101870d43 sgen_perform_collection + 99
12  dont link                           0x0000000101872576 sgen_gc_collect + 102
13  dont link                           0x00000001018d1886 _ZL7pump_gcPv + 54
14  libsystem_pthread.dylib             0x000000010a0b7c13 _pthread_body + 131
15  libsystem_pthread.dylib             0x000000010a0b7b90 _pthread_body + 0
16  libsystem_pthread.dylib             0x000000010a0b5375 thread_start + 13
```

This was caused by a4e257a07f, the issue is that the check was changed from UCONTEXT_REG_RAX to MONO_SIGNAL_USE_UCONTEXT_T, but that is only available when HAVE_SIGACTION is defined which it is not in this case.

Talked with Zoltan, fixing this by enabling MONO_SIGNAL_USE_UCONTEXT_T on all apple platforms for now.

/cc @vargaz @xmcclure 

@monojenkins merge
2016-04-19 23:40:34 +01:00
Rodrigo Kumpera 17c9e92ec0 Another round of profiler fixes/improvements. PR #2882 (Manually Merged)
https://github.com/mono/mono/pull/2882
2016-04-19 15:13:09 -07:00
Aleksey Kliger aa77ff4a78 [runtime] MonoError-ize mono_ldstr_metadata_sig 2016-04-19 18:07:21 -04:00
Aleksey Kliger 17a832fe80 [runtime] MonoError-ize mono_string_new_len
Mark it external only.  Runtime should use mono_string_new_len_checked.
2016-04-19 18:07:21 -04:00
Aleksey Kliger 81d93a12a9 [runtime] MonoError-ize mono_wait_handle_new 2016-04-19 18:07:21 -04:00
Aleksey Kliger 727db9b87b [runtime] MonoError-ize mono_array_new_cached 2016-04-19 18:07:21 -04:00
Aleksey Kliger 0b710d0c2e [runtime] MonoError-ize mono_array_new
Mark it external only.

Runtime should use mono_array_new_checked.
The icall is ves_icall_array_new.
2016-04-19 18:07:21 -04:00
Aleksey Kliger 955d40a60d [runtime] object.c don't raise in external only functions
- Variants of mono_object_new
- mono_object_clone
- mono_array_new_full

All these functions have _checked variants that are used by the runtime.
2016-04-19 18:07:21 -04:00
Aleksey Kliger 90aef8e9b3 [runtime] MonoError-ize mono_array_clone
1. Mark mono_array_clone external only.  Runtime should use
  mono_array_clone_checked.
2. Add MonoError* arg to mono_array_clone_in_domain.
3. Separate ves_icall_System_Array_Clone
2016-04-19 18:07:21 -04:00
Aleksey Kliger 9d7590a44a [runtime] Mark mono_object_new_from_token external only.
Does not appear to be used in the runtime.
Changed it not to raise exceptions.
2016-04-19 18:07:21 -04:00
Aleksey Kliger e491b1bb9f [runtime] Set pending, don't raise, in object.c icalls 2016-04-19 18:07:21 -04:00
Aleksey Kliger 65dc3f67e6 [runtime] MonoError-ize mono_object_xdomain_representation 2016-04-19 18:07:21 -04:00
Aleksey Kliger 589f479cb9 [runtime] MonoError-ize mono_property_get_value
Mark it external only.  Runtime should use mono_property_get_value_checked.
2016-04-19 18:07:21 -04:00
Aleksey Kliger eac5495a37 [runtime] MonoError-ize mono_property_set_value
Mark it external only.  Runtime should use
mono_property_set_value_checked.

Note: mono_property_set_value_checked always catches exceptions from
managed code and threads them out via MonoError.
2016-04-19 18:07:21 -04:00
Aleksey Kliger 2467bb0169 [runtime] Don't raise exns, set pending exception 2016-04-19 18:07:21 -04:00
Aleksey Kliger d1d204e252 [runtime] MonoError-ize mono_runtime_create_jump_trampoline 2016-04-19 18:07:21 -04:00
Aleksey Kliger af36aeb2c1 [attach] Don't raise in mono_attach_load_agent 2016-04-19 18:07:21 -04:00
monojenkins a94d2a7271 Merge pull request #2806 from lambdageek/dev/monoerror-marshal_remote
[runtime] MonoError-ize marshal and remoting code

Get rid of calls to `mono_raise_exception` in marshaling and remoting code.
2016-04-19 22:50:30 +01:00
Rodrigo Kumpera 92341ad8a0 [profiler] Don't link against libmono.
This would result in duplicate runtimes being loaded (as evidenced by
/proc/$pid/maps), which could lead to all sorts of breakage.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen e91ee2b0fd [profiler] Load the profiler with MONO_DL_EAGER.
We need to make sure all external references have been resolved so that we
don't invoke the dynamic linker in the mono_sample_hit () callback which is
called in async-signal context.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 49b60893e3 [utils/dl] Add a MONO_DL_EAGER enum value for clarity. 2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 8a461af0dd [profiler] Don't use a real-time signal on Android. 2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 72a86baf24 [profiler] Use 'start_unload' events instead of 'end_unload' events to avoid crashes.
'end_unload' events can receive mostly-freed structures.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 2e5b0e88e3 [profiler] Use a signal to interrupt the sampler thread's sleep if needed.
There is a slight problem when we're using CLOCK_PROCESS_CPUTIME_ID: If we're
shutting down and there's largely no activity in the process other than waiting
for the sampler thread to shut down, it can take upwards of 20 seconds
(depending on a lot of factors) for us to shut down because the sleep
progresses very slowly as a result of the low CPU activity.

We fix this by repeatedly sending the profiler signal to the sampler thread in
order to interrupt the sleep.

We do not need to do this on platforms where we use a regular sleep based on a
monotonic clock. The sleep will return in a reasonable amount of time in those
cases.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 3335358725 [profiler] Add some more counters. 2016-04-19 14:34:46 -07:00
Andi McClure 6637a6532c [profiler] Limit the number of allocated sample hit structures. 2016-04-19 14:34:46 -07:00
Andi McClure 962fcc1198 [profiler] Add counters for log buffers and sample hits. 2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 92b5bb6ecb [profiler] Rewrite the log profiler's handling of sample hits.
The old code had quite a few problems:

1. It would result in stack corruption under heavy load, somehow. This typically
   resulted in an assertion when starting the unwinding process because the
   unwinding flags would be inconsistent.
2. It sometimes wrote complete garbage into the statistical buffers.
3. As a result of using the helper thread to assemble collected samples into log
   buffers, it did not work on platforms where the helper thread is disabled.
4. Performance was poor under heavy load because waking up the helper thread to
   assemble events would always trigger a counters sample + dump.
5. The code was very complicated and hard to understand/maintain.

(Points (1) and (2) can probably be attributed to point (5).)

In the new sampling world order, we use a lock-free allocator and a lock-free
reuse queue to acquire memory for sample hit events in the sample hit callback.
We then fill it with the info we collect during the async stack walk. Finally,
we ship it off to a separate dumper thread (via another lock-free queue) where
it gets turned into a log buffer and then shipped off to the writer thread.

This new approach appears very stable; I've yet to make it crash in any of the
stress tests I typically run. In a heavy workload, the helper thread's CPU
usage was previously around 25-30%. It is now down to basically 0% while the
dumper thread is only around 15%. CPU usage by threads that are collecting
samples is a bit higher than before, but only until the reuse queue converges
on a size that is big enough to satisfy all sample event requests. At that
point, no more allocations from the lock-free allocator happen, and performance
improves.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 1f890d0095 [utils/lfa] Export the lock-free allocation code for use in the profiler. 2016-04-19 14:34:46 -07:00
Andi McClure 88758ef94d [profiler] Add counters for numbers of signals sent/received/accepted. 2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 4c6c318b2b [counters] Add a profiler category. 2016-04-19 14:34:46 -07:00
Alex Rønne Petersen c26ff53fa4 [profiler] Make the default sample frequency 100 Hz.
Our previous default (1000 Hz) was quite extreme and resulted in very high
overhead from the profiler for moderate workloads.

Also, fix the profiler to actually treat the 'freq' argument as a frequency
when passing it to the runtime. It was being incorrectly treated as a sleep
interval.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen c8b2029080 [domain] Report domain unloads to the profiler when finalizing the domain.
We would miss the unload event for the root domain because we reported it just
before freeing the domain, by which time the profiler was detached.
2016-04-19 14:34:46 -07:00
Alex Rønne Petersen 7083567661 [profiler] Only initialize the sampler thread once. 2016-04-19 14:34:46 -07:00
Marek Safar 39d63219ee [System.Configuration] Fail tests on standalone error 2016-04-19 23:24:12 +02:00
Andi McClure fee605ccc5 Add xml configuration section test (bug#39669) 2016-04-19 17:13:31 -04:00
Marek Safar 11059591da [System.Configuration] re-enable standalone tests 2016-04-19 23:10:21 +02:00
Alexander Köplinger 04669f1ea9 [utils] Fix MONO_SIGNAL_USE_UCONTEXT_T not being defined on tvOS simulator
In the maccore tvossimulator tests we were seeing the following assertion with the Mono 4.5 preview:

```
error: * Assertion: should not be reached at /Users/builder/data/lanes/1381/0d6923b4/source/maccore/external/mono/mono/utils/mono-context.c:194

0   dont link                           0x000000010175702d mono_handle_native_sigsegv + 253
1   libsystem_platform.dylib            0x000000010a0cfeaa _sigtramp + 26
2   ???                                 0x0000000001bfc4db 0x0 + 29344987
3   libsystem_c.dylib                   0x0000000109e56cbc abort + 129
4   dont link                           0x00000001018d1503 _ZL12log_callbackPKcS0_S0_iPv + 67
5   dont link                           0x00000001018c26d0 monoeg_assertion_message + 192
6   dont link                           0x00000001018af6de mono_sigctx_to_monoctx + 30
7   dont link                           0x000000010183f473 sgen_suspend_thread + 323
8   dont link                           0x000000010183f58e sgen_thread_handshake + 126
9   dont link                           0x000000010183fb20 sgen_client_stop_world + 1296
10  dont link                           0x0000000101871283 sgen_stop_world + 67
11  dont link                           0x0000000101870d43 sgen_perform_collection + 99
12  dont link                           0x0000000101872576 sgen_gc_collect + 102
13  dont link                           0x00000001018d1886 _ZL7pump_gcPv + 54
14  libsystem_pthread.dylib             0x000000010a0b7c13 _pthread_body + 131
15  libsystem_pthread.dylib             0x000000010a0b7b90 _pthread_body + 0
16  libsystem_pthread.dylib             0x000000010a0b5375 thread_start + 13
```

This was caused by a4e257a07f, the issue is that the check was changed from UCONTEXT_REG_RAX to MONO_SIGNAL_USE_UCONTEXT_T, but that is only available when HAVE_SIGACTION is defined which it is not in this case.

Discussed with Zoltan, fixing this by enabling MONO_SIGNAL_USE_UCONTEXT_T on all apple platforms for now.
2016-04-19 21:59:29 +02:00
Aleksey Kliger 338e190a86 [runtime] Remove use of mono_raise_exception in mono_object_isinst_mbyref_checked 2016-04-19 15:57:23 -04:00
Aleksey Kliger 192c495757 [remoting] Remove calls to mono_raise_exception
1. MonoError-ize mono_remoting_wrapper icall.
   This is a bit this method is allowed to use
   mono_error_raise_exception: it is called from a
   MONO_WRAPPER_REMOTING_INVOKE method which is considered a "protected
   wrapper" in which the usual pending exception interruption check is a no-op.
2. Use mono_set_pending_exception in mono_marshal_set_domain_by_id icall

fixup f5dc934
2016-04-19 15:54:58 -04:00
Ludovic Henry a6582f4405 [mini] Add missing gsharedvt write barrier
The following test would trigger a SIGSEGV during a GC collection:

```
object _Lock;
C5.HashedLinkedList<byte[]> _Set;
List<byte[]> _Candidates;

void Run ()
{
    _Lock = new object ();
    _Set = new C5.HashedLinkedList<byte[]>(new Core.CommonUtils.ByteArrayComparer());

    BuildList ();

    for (var i = 0; i < 10; ++i) {
	     Task.Run (() => WorkOnSet ());
	}
}

void BuildList() {
    _Candidates = new List<byte[]>();

    Random r = new Random();
	for(var i = 0; i < 20; ++i) {
	    var key = new byte[16];
		r.NextBytes(key);
		_Candidates.Add(key);
	}
}

void WorkOnSet() {
    Random r = new Random();
	for (;;) {
	    byte[] src = _Candidates [r.Next (_Candidates.Count)];
		byte[] key = new byte[src.Length];

        for (int i = 0; i < src.Length; ++i)
		    key [i] = src [i];

        lock(_Lock) {
		    if(r.Next (2) != 0)
			    _Set.Add(key);
			else
			    _Set.Remove(key);
		}
	}
}
```

The binary protocol just before the crash would be as follow:

```
collection_requested generation 0 requested_size 4096 force false
collection_begin index 14 generation 0
  copy from 0x3150658 to 0x47e0e40 vtable 0x189f1780 size 24
  gray_enqueue queue 0xa4a2d0 cursor 0x3b68178 value 0x47e0e40
  gray_dequeue queue 0xa4a2d0 cursor 0x3b68178 value 0x47e0e40
  scan_begin obj 0x47e0e40 vtable 0x189f1780 size 24
  scan_process_reference obj 0x47e0e40 ptr 0x47e0e48 value 0x3150618
  scan_process_reference obj 0x47e0e40 ptr 0x47e0e4c value 0x3150638
  scan_process_reference obj 0x47e0e40 ptr 0x47e0e50 value 0x0       <----- here the value is 0x0
  scan_process_reference obj 0x47e0db0 ptr 0x47e0dc0 value 0x47e0e40
collection_end 14 generation 0 scanned 0 unique 0 0.00%
 wbarrier ptr 0x3af8710 value 0x47e0e40 value_vtable 0x189f1780
collection_requested generation 0 requested_size 4096 force false
collection_begin index 15 generation 0
collection_end 15 generation 0 scanned 0 unique 0 0.00%
collection_requested generation 0 requested_size 4096 force false
collection_begin index 16 generation 0
  card_scan start 0x47e0df8 size 520
  scan_begin obj 0x47e0e40 vtable 0x189f1780 size 24
  scan_process_reference obj 0x47e0e40 ptr 0x47e0e48 value 0x47b4d40
  scan_process_reference obj 0x47e0e40 ptr 0x47e0e4c value 0x47b03c0
  scan_process_reference obj 0x47e0e40 ptr 0x47e0e50 value 0x3100800 <----- here the value is 0x3100800, but no WB in between
```

Object at 0x47e0e40 is a C5.HashSet<T>.Bucket with T a C5.KeyValuePair<byte[],C5.HashedLinkedList<byte[]>.Node>. The memory layout of C5.HashSet<T>.Bucket would be as follow:

class Bucket {
 item: offset 8 size 8
 overflow: offset 16 size 4
 hashval: offset 20 size 4
}

So the bug would manifest itself as a missing write barrier when writing to Bucket.overflow, leading to the premature sweeping of a Bucket object. The Bucket.overflow value would then point to the middle of an object, triggering a SIGSEGV when trying to access its vtable.
2016-04-19 21:47:33 +02:00
Marek Safar baf2db5cb7 [mcs] Don't do empty array interpolation on user code, weird code expects empty array not to be equal 2016-04-19 19:14:44 +02:00
lateralusX 09ba9118ce Windows 32-bit x86 AOT assembler didn't link correctly.
When running basic make check in mono/mini there are some hidden errors in the check-seq-points test. Current test compares output between JIT and AOT compile assemblies but doesn't pay attention to the result of the as and ld calls building the AOT:ed modules. It turns out that the linkage of the AOT compiled module on win32 x86 actually fails due to naming of symbols included in .def or .globl assembler expressions. The fix makes sure that local function symbols or global symbol definitions follows the cdecl win32 x86 convention and are prefixed with _. The fix tries to resolve this using two different strategies. Since there are many code paths in the AOT compiler emitting local/global symbols + referencing the emitted symbols, it doesn't look like there is one place to fix this (unless rename the symbol altogether and that could cause regressions elsewhere).

First, local function symbols are emitted using .def expression when used as debug symbols. By prefixing debug symbols with _ will resolve most of the local function symbols. By mangling the debug symbols we can fix both emitted symbols and references to these symbols in two location (get_debug_sym, get_plt_entry_debug_sym).

Second, in order to make sure all other symbols (local/global) ending up in .def or .globl expressions are correctly mangled, the functions to emit local/global symbols in aot-compiler.c have been extended to check mangling on passed in symbols before emitting. If passed in symbol doesn't follow the name mangling rule, the symbols will be mangled and the mangled symbol will be emitted together with a label to the mangled symbol. This is done to make sure we have a correct label for the emitted symbol that can be used by the linker. Since the rest of the code is unaware of the mangled name, it will continue reference the unmangled name and since there is already a label to the unmangled symbol, the mangling will be transparent for the rest of the code.

NOTE, the fix only applies to windows X86 build, other configurations are not affected by this issue.

This PR also includes a fix detected on windows when debugging and fixing above issue. The AOT compiler tries to rename linked module to the final target name, for example from basic.exe.dll.tmp to basic.exe.dll. If the file already exist, the rename will fail on windows causing a silent failure in the AOT compiler and this will "leak" the tmp file + ending up with the old basic.exe.dll. The fix is to check result of the rename function call and if it fails with "file already exist error", unlink target and redo rename operation. The rename can still fail due to other reasons ending up in the same problem, but to make a good fix, the error handling of the method needs to be revisited in order to properly clean up tmp files and allocations in error cases. This will be handled in a different PR.
2016-04-19 17:17:46 +02:00
Marek Safar 6fcf58023d [symbolicate] Switch to Cecil backend 2016-04-19 15:26:57 +02:00
Marek Safar 3bde0e1343 [monosymbolicate] Small cleanups 2016-04-19 15:26:57 +02:00
Marek Habersack 4dc84baeb6 Support custom Xamarin Android HttpClient handler
Make it possible to select a default System.Net.HttpClient handler
on Android. Selection of the handler is handled on the Xamarin Android
side.
2016-04-19 15:06:07 +02:00
Alex Rønne Petersen 0de3ceb482 Merge pull request #2863 from alexrp/windows-critsect-debug-info
[utils/mutex] Initialize Win32 critical sections without debug info.
2016-04-19 11:48:24 +02:00
Rolf Bjarne Kvinge f3ed954e3a [offsets-tool] Fix path to Options.cs 2016-04-19 10:41:31 +02:00
monojenkins f5f7357856 Merge pull request #2919 from lewurm/random-mini-stuff
Random mini stuff

@monojenkins merge
2016-04-19 08:15:21 +01:00
Rodrigo Kumpera 7b4a585094 [io-layer] Fail to modification time if it's beyond the limit allowed by the system. Fixes #40368
This is the case for 32bits OSX that uses 32bits time_t for everything.
2016-04-18 17:03:26 -07:00
Aleksey Kliger (λgeek) af8d667efa Merge pull request #2821 from lambdageek/dev/monoerror-assembly
[assembly loader] Don't raise in mono_assembly_open_full and mono_assembly_load_with_partial_name
2016-04-18 18:02:47 -04:00
monojenkins 976a327692 Merge pull request #2910 from cptjazz/compiler_warnings
Fix undefined behaviour in left-shift.

This PR fixes a left-shift that relied on undefined behaviour.

Clang emitted the following warning (prior to this patch):
```
sgen-descriptor.c:189:54: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
   return desc | VECTOR_SUBTYPE_REFS | ((gssize)(-1) << 16);
                                        ~~~~~~~~~~~~ ^
```
2016-04-18 23:00:48 +01:00
Bernhard Urban cbfbf3e083 [debug] print exception name for conditional exception OP 2016-04-18 13:47:06 -07:00
Aleksey Kliger 30ff102b13 [runtime] MonoError-ize mono_store_remote_field_new
Mark mono_store_remote_field_new external only.
Runtime should use mono_store_remote_field_new_checked.
Change mono_marshal_get_stfld_remote_wrapper to use
mono_store_remote_field_new_icall instead of a native call.
2016-04-18 16:36:56 -04:00
Aleksey Kliger d89bc33cbc [runtime] MonoError-ize mono_store_remote_field
Marked it external only.
Runtime should use mono_store_remote_field_checked.
2016-04-18 16:36:56 -04:00
Aleksey Kliger e761bf0bee [runtime] MonoError-ize mono_load_remote_field_new
Add mono_load_remote_field_new_checked.  Mark mono_load_remote_field_new
external only.  Add icall mono_load_remote_field_new_icall and use it in
remoting wrappers.
2016-04-18 16:36:56 -04:00
Aleksey Kliger 5d54ae64d8 [runtime] Add mono_load_remote_field_checked
Update it to use MonoError.

Mark mono_load_remote_field external only.
2016-04-18 16:36:56 -04:00
Aleksey Kliger 149106822f [runtime] MonoError-ize mono_method_return_message_restore 2016-04-18 16:36:56 -04:00
monojenkins 4ba928c1af Merge pull request #2814 from lambdageek/dev/monoerror-appdomain
[appdomain] Cleanup MonoError code

1. Assert in mono_get_corlib_version instead of raising an exn.
2. Don't raise in mono_domain_create_appdomain external API function.
3. Assert in mono_domain_assembly_postload_search instead of raising.
4. Don't raise in mono_domain_fire_assembly_load.
5. Use mono_error_set_pending_exception in
   ves_icall_System_AppDomain_InternalGetProcessGuid
6. Dont' raise in unload_thread_main, populate unload_data instead.
2016-04-18 20:15:22 +01:00
Alexander Köplinger 8fb1aa95b4 Bump version in configure.ac 2016-04-18 20:22:56 +02:00
Bernhard Urban 1a423521eb [marshal] use meaningful constant instead of hard coded value 2016-04-18 11:18:18 -07:00
Zoltan Varga cf36181a85 [jit] Fix the linking of bblocks in mono_replace_ins () by avoiding iterating over an array which is modified in place by mono_unlink_bblock (). 2016-04-18 13:27:00 -04:00
Rolf Bjarne Kvinge 28faf0a6d1 [tools] Add aot offsets generation tool.
List of original contributors:

Marek Habersack <[email protected]>
João Matos <[email protected]>
Zoltan Varga <[email protected]>
Rolf Bjarne Kvinge <[email protected]>
2016-04-18 19:26:17 +02:00
Ludovic Henry 9e11bda561 Merge pull request #2916 from ludovic-henry/fix-40306
[threadpool-io] Fix crash on shutdownin System.Net.Sockets.Socket:Close_internal
2016-04-18 18:58:42 +02:00
monojenkins d71d663db6 Merge pull request #2915 from poedgirl/master
Added support for SHA256, 384 and 512 in AuthenticodeDeformatter.

Due to the changes introduced by Microsoft to require signing with stronger algorithms, SHA-256, SHA-384 and SHA-512 support was needed.

This change is released under the MIT license.
2016-04-18 15:05:26 +01:00
Ludovic Henry fb6dbac941 [threadpool-io] Fix crash on shutdownin System.Net.Sockets.Socket:Close_internal
There could be a race between System.Net.Sockets.Socket:Close_internal and the io threadpool cleanup, which would lead to a native crash. That's because the io threadpool cleanup would clean the mutex, condition variables as well as close the sockets.

The easiest way to fix that is by cleaning only what's going to stop the runtime from shutting down, and in this case the background selector thread. The same is done for the threadpool where we just shutdown the monitor thread and the worker threads.
2016-04-18 15:40:44 +02:00
Michelle Allen 09463dc30d Added support for SHA256, 384 and 512 in AuthenticodeDeformatter.
Due to the changes introduced by Microsoft to require signing with stronger algorithms, SHA-256, SHA-384 and SHA-512 support was needed.

This change is released under the MIT license.
2016-04-18 19:30:57 +08:00
monojenkins 8b938bfb15 Merge pull request #2897 from kumpera/marshal_fixes
[marshal] Ensure marshal code emit the right indirect store when dealing with ref types.

The marshal code was using CEE_STIND_I for a lot of ref stores. This would not
generate a WB and is a heap corruption vector.
2016-04-18 06:00:21 +01:00
Kamil Rytarowski f4272716f4 Implement mono_threads_core_set_name() on NetBSD (#2914)
Part of man-page showing this interface:

PTHREAD_GETNAME_NP(3)      Library Functions Manual      PTHREAD_GETNAME_NP(3)

NAME
     pthread_getname_np - get and set descriptive name of a thread

LIBRARY
     POSIX Threads Library (libpthread, -lpthread)

SYNOPSIS
     #include <pthread.h>

     int
     pthread_getname_np(pthread_t thread, char *name, size_t len);

     int
     pthread_setname_np(pthread_t thread, const char *name, void *arg);

   -- pthread_setname_np(3)
2016-04-17 21:55:53 -04:00
Alexander Köplinger c15efc6bd0 Merge pull request #2913 from krytarowski/netbsd-support-11
Remove stale file in the repository
2016-04-18 00:52:40 +02:00
Kamil Rytarowski 82e996cb45 Remove stale file in the repository
The .orig files are traditionally files of patch(1) and diff(1) tools.
Remove stale file Makefile.orig as it is generating false positives for
grabbing patches from a directory tree.
2016-04-18 00:50:15 +02:00
Alexander Köplinger a5d23edf3b Merge pull request #2912 from krytarowski/netbsd-support-10
Remove unportable shell construct detected on NetBSD
2016-04-18 00:12:49 +02:00
monojenkins 95bce9b69c Merge pull request #2911 from akoeplinger/handleref
[metadata] Don't require HandleRef in domain.c

In 1da6b76297 loading of System.Runtime.InteropServices.HandleRef
was changed from optional to required. This caused errors in the maccore tests:

```
MONO_PATH=/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/64/Build /Users/builder/data/lanes/1411/5ca65b46/source/maccore/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/arm64-darwin-mono-sgen --debug -O=gsharedvt  --aot=mtriple=arm64-ios,data-outfile=/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/System.arm64.aotdata,static,asmonly,direct-icalls,full,dwarfdebug,no-direct-calls,outfile=/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/System.dll.arm64.s "/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/64/Build/System.dll"
Runtime critical type System.Runtime.InteropServices.HandleRef not found
AOT Compilation exited with code 134, command:
```

@monojenkins merge
2016-04-17 22:55:19 +01:00
Kamil Rytarowski 17b6dd5de0 Remove unportable shell construct detected on NetBSD 2016-04-17 22:45:26 +02:00
Alexander Köplinger b71914b011 [metadata] Don't require HandleRef in domain.c
In 1da6b76297 loading of System.Runtime.InteropServices.HandleRef
was changed from optional to required. This caused errors in the maccore tests:

```
	MONO_PATH=/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/64/Build /Users/builder/data/lanes/1411/5ca65b46/source/maccore/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/arm64-darwin-mono-sgen --debug -O=gsharedvt  --aot=mtriple=arm64-ios,data-outfile=/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/System.arm64.aotdata,static,asmonly,direct-icalls,full,dwarfdebug,no-direct-calls,outfile=/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/System.dll.arm64.s "/Users/builder/data/lanes/1411/5ca65b46/source/maccore/msbuild/tests/MyKeyboardExtension/obj/iPhone/Debug/mtouch-cache/64/Build/System.dll"
	Runtime critical type System.Runtime.InteropServices.HandleRef not found
	AOT Compilation exited with code 134, command:
```
2016-04-17 20:22:04 +02:00
Alexander Köplinger 1a207e45d3 Merge pull request #2908 from krytarowski/netbsd-support-8
Add new ./configure target & xtarget: arm*-netbsd*-eabi*
2016-04-17 20:08:00 +02:00
Alexander Köplinger a7142a010e Merge pull request #2907 from krytarowski/netbsd-support-7
Improve NetBSD target handling in ./configure
2016-04-17 20:07:38 +02:00
Alexander Köplinger 438c8f378c Merge pull request #2906 from krytarowski/netbsd-support-6
Welcome to ARM ucontext registers on NetBSD
2016-04-17 20:06:56 +02:00
Alexander Köplinger d5aa88456b [tests/verifier] Fix a few issues in the Makefile
gmcs and ilasm2 are no longer distributed with Mono.

The run-test step had several issues that prevented it from running,
e.g. the comments caused "unexpected end of line" issues on OSX.
2016-04-17 19:53:04 +02:00
Alexander Köplinger 4288ef6e24 Merge pull request 2899 from krytarowski/netbsd-support-1
Improve shell portability on NetBSD

The "test" command, as well as the "[" command, are not required to know
the "==" operator.

Comparing with empty strings ("") might lead to unspecified results.

Replace unportable shell loops:
    for I in {2..6}; do ..; done
with POSIX ones:
    I=2; while [ $I -le 6 ]; do ..; I=$((I + 1)); done
2016-04-17 19:24:59 +02:00
Alexander Jesner 697bbb6eb4 Fix undefined behaviour in left-shift. 2016-04-17 18:31:32 +02:00
Kamil Rytarowski 3e49908edb Add new ./configure target & xtarget: arm*-netbsd*-eabi*
Example GNU triplets:

evbarm	7.0	NetBSD	ignored	arm	arm-unknown-netbsdelf7.0
evbarm	7.0	NetBSD	ignored	armeb	armeb-unknown-netbsdelf7.0
evbarm	7.0	NetBSD	ignored	earmv6	armv6-unknown-netbsdelf7.0-eabi
evbarm	7.0	NetBSD	ignored	earmv6eb	armv6eb-unknown-netbsdelf7.0-eabi
evbarm	7.0	NetBSD	ignored	earmv6hf	armv6-unknown-netbsdelf7.0-eabihf
evbarm	7.0	NetBSD	ignored	earmv6hfeb	armv6eb-unknown-netbsdelf7.0-eabihf
evbarm	7.0	NetBSD	ignored	earmv7	armv7-unknown-netbsdelf7.0-eabi
evbarm	7.0	NetBSD	ignored	earmv7eb	armv7eb-unknown-netbsdelf7.0-eabi
evbarm	7.0	NetBSD	ignored	earmv7hf	armv7-unknown-netbsdelf7.0-eabihf
evbarm	7.0	NetBSD	ignored	earmv7hfeb	armv7eb-unknown-netbsdelf7.0-eabihf

-- http://git.savannah.gnu.org/cgit/config.git/tree/testsuite/config-guess.data

For now support just EABI targets (available since ARMv4).
2016-04-17 16:06:40 +02:00
Kamil Rytarowski 70189554b3 Improve NetBSD target handling in ./configure
Stop hardcoding libc and linbintl versions.
Add support for libsqlite and libsqlite3.
2016-04-17 15:47:20 +02:00
Kamil Rytarowski 90424b08f6 Welcome to ARM ucontext registers on NetBSD 2016-04-17 15:39:27 +02:00
Kamil Rytarowski d0f0b15bd0 Improve shell portability on NetBSD
The "test" command, as well as the "[" command, are not required to know
the "==" operator.

Comparing with empty strings ("") might lead to unspecified results.

Replace unportable shell loops:
    for I in {2..6}; do ..; done
with POSIX ones:
    I=2; while [ $I -le 6 ]; do ..; I=$((I + 1)); done
2016-04-17 15:27:24 +02:00
Alexander Köplinger 453c2d5489 Merge pull request #2900 from krytarowski/netbsd-support-2
Fix shell portability in configure.ac for NetBSD
2016-04-17 13:37:21 +02:00
Alexander Köplinger cff70522a6 Merge pull request #2904 from krytarowski/netbsd-support-5
Include <errno.h> for errno on NetBSD
2016-04-17 13:36:33 +02:00
Alexander Köplinger c0b300d4fc Merge pull request #2898 from ludovic-henry/fix-process-hasexited
[corlib] Fix WaitHandle.Wait{One,Any,All} when runtime returns WAIT_FAILED
2016-04-17 13:35:31 +02:00
Alexander Köplinger 908acf313c Merge pull request #2905 from directhex/force-dpkg-architecture
[jenkins] Force build arch = dpkg arch, on Debian systems
2016-04-17 13:10:15 +02:00
Jo Shields 144e64c911 [jenkins] Force build arch = dpkg arch, on Debian systems
Autotools misdetects architecture when using chroots, e.g. tries to do an x86_64 build on an x86_64 system in an i386 chroot
2016-04-17 09:28:54 +01:00
Alexander Köplinger a6f5b39f76 Merge pull request #2901 from krytarowski/netbsd-support-3
Define access to R8-R11 regs in ucontext on NetBSD/AMD64
2016-04-17 03:56:38 +02:00
Alexander Köplinger 0ba6902034 [System] Replace websocket echo test server with corefx one (#2902)
echo.websocket.org is down since yesterday. Let's use the one that corefx uses for now.
2016-04-16 21:33:24 -04:00
Kamil Rytarowski 5804ac2250 Include <errno.h> for errno on NetBSD
The <sys/errno.h> header on NetBSD declares only a list of ERROR values.

This fixes the following build issue:

In file included from ../../mono/utils/mono-proclib.h:7:0,
                 from mono-proclib.c:8:
mono-proclib.c: In function 'mono_cpu_usage':
mono-proclib.c:893:54: error: 'errno' undeclared (first use in this function)
   g_error ("getrusage() failed, errno is %d (%s)\n", errno, strerror (errno));
                                                      ^
../../eglib/src/glib.h:600:70: note: in definition of macro 'g_error'
 #define g_error(...)    do { g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, __VA_ARGS__); for (;;); } while (0)
                                                                      ^
mono-proclib.c:893:54: note: each undeclared identifier is reported only once for each function it appears in
   g_error ("getrusage() failed, errno is %d (%s)\n", errno, strerror (errno));
                                                      ^
../../eglib/src/glib.h:600:70: note: in definition of macro 'g_error'
 #define g_error(...)    do { g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, __VA_ARGS__); for (;;); } while (0)
2016-04-17 03:31:52 +02:00
Kamil Rytarowski 41e243af73 Define access to R8-R11 regs in ucontext on NetBSD/AMD64 2016-04-17 01:01:19 +02:00
Kamil Rytarowski 30604f6821 Fix shell portability in configure.ac for NetBSD 2016-04-16 23:40:01 +02:00
Ludovic Henry 95b8eb4942 [corlib] Fix WaitHandle.Wait{One,Any,All} when runtime returns WAIT_FAILED
In case the runtime would fail to wait on the wait handle(s), we would still return true, as if the WaitHandle was successfully signaled
2016-04-16 14:05:39 +02:00
Alexis Christoforides 2d68253ca7 Merge pull request #2890 from mono/alexischr/remove-managed-alloc-string-zeroing
[sgen] Remove unnecessary and wrong IL code on string managed allocators
2016-04-16 06:24:17 -04:00
Marek Safar 40a4dd7c94 [System] Remove MONO_X509_ALIAS 2016-04-16 08:56:38 +02:00
Marek Safar aa77a6ddcc [System] Remove PrebuiltSystem alias (it's not needed with any modern mcs) 2016-04-16 08:37:07 +02:00
Alexis Christoforides ba3384aa88 Merge pull request #2417 from razzfazz/guard_substr
handle path stripping correctly for root of watched tree
2016-04-15 22:57:33 -04:00
Alexis Christoforides d2d50dd0c8 Merge pull request #2889 from mono/alexischr/canary-sizecalc-change-impact
[sgen] "align-up" requested allocation sizes within the managed alloc…
2016-04-15 22:35:47 -04:00
Zoltan Varga 7355e71d8f [runtime] Fix warnings. 2016-04-15 20:11:25 -04:00
Marek Safar 32f2f7c898 Merge pull request #2894 from marek-safar/mono.security
[build] Fixes Mono.Security dependency
2016-04-16 00:41:02 +02:00
Rodrigo Kumpera 0a8f9cea84 [marshal] Ensure marshal code emit the right indirect store when dealing with ref types.
The marshal code was using CEE_STIND_I for a lot of ref stores. This would not
generate a WB and is a heap corruption vector.
2016-04-15 15:19:37 -07:00
monojenkins efcef476e3 Merge pull request #2893 from kumpera/fix_29585
Fix #29585.

@monojenkins merge.
2016-04-15 18:05:39 +01:00
Rolf Bjarne Kvinge 771d935b50 [mono-api-html] Fix path in csproj. 2016-04-15 17:38:22 +02:00
Marek Safar 3aacd09c28 [mcs] Better error message for conflict of types with the same name 2016-04-15 17:29:14 +02:00
Marek Safar c2ae64c264 [build] Fixes Mono.Security dependency 2016-04-15 15:41:14 +02:00
monojenkins 24418b8821 Merge pull request #2887 from lewurm/fix-jit-pass-name
[jit] fix stats name for method_to_ir pass

we settled for underscores


@monojenkins merge.
2016-04-15 13:41:00 +01:00
Alexander Köplinger 2b9d8d1d0b Merge pull request #2885 from ntherning/fix_test_op_il_seq_point_sh_on_cygwin_2_4_1
Fixes for  'make check-seq-points' on Cygwin
2016-04-15 13:49:53 +02:00
Rodrigo Kumpera 1ca65b172d Merge pull request #2878 from kumpera/mach_fixes
Add retry logic to mach function calls.
2016-04-15 02:11:46 -07:00
Marek Safar 5ca65b4624 [mcs] No optional parameters tie breaking rules for delegates overload resolution 2016-04-15 10:41:38 +02:00
Rodrigo Kumpera 6b68ce1ed7 Add regression test. 2016-04-14 17:53:55 -07:00
Alexander Köplinger 5ddcd3b972 [corlib] Fix CspParametersTest.Ctor test
This essentially reapplies ae2f50e57f which was inadvertently changed back in 27f07c8095.

It started failing again after 255ce320b0 reapplied a fix that was also inadvertently removed (https://github.com/mono/referencesource/commit/8c7937a9e7cc3f61f9ceb6a9d6f19fefdf1672b0).
2016-04-15 02:53:49 +02:00
Rodrigo Kumpera 2796abb60d [runtime] Fix mono_class_inflate_generic_method_full_checked handle of partially inflated generic methods. Fixes #29585.
The problem here was that the function was not correctly setting is_generic when handling partially inflated methods.

The working scenario was method 'Foo<A>::Bar<B>' inflated with (Something<Else>;)[1] resulting in Foo<Something<Else>>::Bar<B>.

This would work because the is_generic check would verify that the supplied context has no method_inst, thus had to remain a GMD.

The problematic one would be inflating Foo<Something<A>>::Bar<B> with (Else;) resulting too in Foo<Something<Else>>::Bar<B>.

To handle this, we would first extract the root method definition [2] and then inflate the original method context with the supplied
context. So we end up with Foo<A>::Bar<B> and inflate (Something<A>;B) with (Else;) resulting in (Something<Else>;B) *1*.

Finally, we would inflate Foo<A>::Bar<B>  with that new context, resulting in Foo<Something<Else>>::Bar<B>.

The resulting method is the same in both scenarios, but context used for inflation is different in that in the second case
it includes the GMD method instantiation (The B in *1*).

This would trip up the computation of whether we ended up with a GMD or not.

The right check, though, is not whether the inflation context has a method instantiation or not, but whether the resulting method
has the same method context as the root GMD[2].

This affected #29585 since disabling some optimizations triggered things to be inflated in different ways.

[1] (Something<Else>;) means a context with a class instantiation and no method instantiation
[2] The GMD defined on the GTD.
2016-04-14 17:39:44 -07:00
Andi McClure a2e91efda8 Allow xml configuration sections to reference System.dll (bug#39669)
<configuration><configSections><section> in a .config file takes a
type name as argument. Some of the allowed types are in System.dll.
The type lookup is done in System.Configuration.dll and does not find
these types. Check System.dll as a fallback to fix this.
2016-04-14 18:14:10 -04:00
Bernhard Urban d63352a16f [jit] fix stats name for method_to_ir pass
we settled for underscores
2016-04-14 14:14:45 -07:00
Alexis Christoforides 30f0795c82 [sgen] Remove unnecessary and wrong IL code on string managed allocators
This appears to have been copied from Boehm, but here we are not responsible for zeroing.
Also, 's->chars [len]' is not the same as 'align_up (s + size) - 2', so this was corrupting canaries.
2016-04-14 16:55:48 -04:00
Alexis Christoforides 2160413fd6 [sgen] "align-up" requested allocation sizes within the managed allocator, instead of sometimes before.
All code paths will still align-up the size to be allocated, but now it's easier to gather the real size of an object.
2016-04-14 16:43:20 -04:00
Zoltan Varga 5e80f625b9 [aot] Enable gsharedvt by default only when using --aot=full or --aot==llvmonly. 2016-04-14 16:39:30 -04:00
Alexander Köplinger 07c22a0e68 Merge pull request #2888 from xmcclure/serialize-exception-bump
Bump corlib version number following PR#2875
2016-04-14 22:28:20 +02:00
Andi McClure a3f8e50329 Bump corlib version number following PR#2875 2016-04-14 16:26:39 -04:00
Andi McClure 1cdde1253c Merge pull request #2875 from xmcclure/serialize-exception
Support SerializeObjectState for System.Exception (bug #39824)
2016-04-14 16:18:00 -04:00
Alexis Christoforides 255ce320b0 Bump to include referencesource/8c7937a9e7cc3f61f9ceb6a9d6f19fefdf1672b0. Fixes #38712 2016-04-14 15:41:32 -04:00
Vlad Brezae 4776afb4e2 [sgen] Don't reallocate mod_union at each major 2016-04-14 22:23:58 +03:00
Vlad Brezae adb2608e5e [sgen] Avoid allocating the mod_union card tables if not needed
The first nursery collection after the start of a concurrent collection allocated mod union card tables for all blocks. Allocate it only for blocks that have dirty cards. Blocks without a mod_union are not scanned in the major collector. This can reduce the pause time of those nursery collections by half.
2016-04-14 22:23:56 +03:00
monojenkins 3e81958f1d Merge pull request #2803 from BrzVlad/feature-conc-pinned-scan
[sgen] Scan pinned objects in nursery as part of concurrent mark

Objects pinned in the nursery can hide behind them a large graph of objects in the heap which is never scanned because we don't follow references in the nursery. After precleaning, we scan the latest set of pinned objects (while locking in order to make sure that the set doesn't change, so none are moved).
2016-04-14 20:15:35 +01:00
Rodrigo Kumpera a6c292335d [MACH] Add retry logic to all mach api calls in the case of interruption.
One overlooked aspect of mach is that its calls are interruptible and
we never really accounted for that.

This problem turned up when sampling at high frequency as they would
start to randomly fail.
2016-04-14 10:25:41 -07:00
Rodrigo Kumpera fe3996638c [OSX] Drop more support for OSX 10.5 and earlier.
10.5 is ancient enough at this point. Remove code dealing with the exception server
that is not needed after it.
2016-04-14 10:25:41 -07:00
Niklas Therning d89a5b27c6 Renamed SEP variable to PLATFORM_PATH_SEPARATOR. 2016-04-14 17:36:30 +02:00
Niklas Therning b2a7035386 * Fixes 'diff: /dev/fd/63: Not a directory' errors when running
'make check-seq-points' on Cygwin 2.4.1 64-bit.
* Added removal of *.exe.dll to the clean_aot() function to delete AOT output
  from previous 'make check-seq-points' runs.
* Use ';'' as separator in MONO_PATH if running under Cygwin rather than ':'.
2016-04-14 16:48:56 +02:00
Vlad Brezae a4f1baa3db [sgen] Scan pinned objects in nursery as part of concurrent mark
Objects pinned in the nursery can hide behind them a large graph of objects in the heap which is never scanned because we don't follow references in the nursery. After precleaning, we scan the latest set of pinned objects (while locking in order to make sure that the set doesn't change, so none are moved).
2016-04-14 17:26:17 +03:00
Alexander Köplinger 8ed1ada014 Fix the referencesource submodule commit 2016-04-14 16:00:31 +02:00
Alexander Köplinger ee05b73875 Merge pull request #2884 from ludovic-henry/fix-process-hasexited
[Process] Fix HasExited for non-child process
2016-04-14 15:58:31 +02:00
Ludovic Henry 122cc01e85 [Process] Fix HasExited for non-child process
NativeMethods.GetExitCodeProcess would inherently be broken on Unix platforms for non-child processes as it can't succesfully get the exit code. This would in turn break Process.HasExited, which should not break, as it is possible to check if a non-child process is alive or dead.
2016-04-14 13:15:21 +02:00
Ludovic Henry 08a631d96d [Process] Set haveProcessHandle to true when setting m_processHandle 2016-04-14 13:15:20 +02:00
Jo Shields 3b8d505c7c Revert "Fix missing CommonCrypto/Makefile.include in "make dist" tarballs"
Needed due to Marek's CommonCrypto changes

This reverts commit c0ea809052.
2016-04-14 09:40:29 +01:00
Marek Safar c0ed815cdc Revert "Revert "[Mono.Security] Fixes wrong path in makefile""
This reverts commit b0c6a92785.
2016-04-14 08:30:22 +02:00
Marek Safar 635cf9c103 Revert "Revert "[build] Clean up common crypto build""
This reverts commit ba9d141ed8.
2016-04-14 08:13:47 +02:00
Marek Safar 7612d3eaa5 [Mono.Security] Fixes build 2016-04-14 08:07:31 +02:00
Daniel Becker a06225626c use native realpath() function (#2877)
Instead of opening a file for the sole purpose of calling
F_GETPATH on the resulting descriptor, we can just use the
native realpath() function; as a side benefit, this also works
on *BSD where F_GETPATH isn't supported.
2016-04-13 22:53:34 -04:00
monojenkins c0a05a881c Merge pull request #2879 from lewurm/undo-breaking-changes
Undo breaking changes

@monojenkins merge
2016-04-14 03:15:22 +01:00
Bernhard Urban ba9d141ed8 Revert "[build] Clean up common crypto build"
This reverts commit ecd2f512ce.
2016-04-13 17:21:57 -07:00
Bernhard Urban b0c6a92785 Revert "[Mono.Security] Fixes wrong path in makefile"
This reverts commit 90611f9185.
2016-04-13 17:20:29 -07:00
Andi McClure b04a3a355f Support SerializeObjectState for System.Exception (bug #39824)
Per current .NET, exception serialization may be implemented using the
SerializeObjectState event. Use of this approach is mandatory for
certain classes, such as HttpRequestException subclasses. Mono does
not support it. The solution is to switch out our System.Exception
implementation for the referencesource one.

To accommodate this, classes that access System.Exception internal
fields directly must switch to the new field names; a new support
method is added to System.Environment; the "security level" methods
and icall are added to MonoCMethods; and the field order in
_MonoException must be adjusted. A new test is also added in the
System.Runtime.Serialization assembly.
2016-04-13 18:36:08 -04:00
Zoltan Varga 05f449eda9 [arm] Use a direct branch in the krait workaround to avoid clang generating extra code and moving it before the inline assembly block. Fixes #40239. 2016-04-13 16:28:21 -04:00
Alexander Köplinger e142636435 Move remaining System.Net.Http pieces from mono-extensions to mono
Discussed with @rolfbjarne, these were missed in the initial import of the mono-extension sources.
2016-04-13 18:58:43 +02:00
monojenkins 46f9cc2f97 Merge pull request #2874 from lateralusX/jlorenss/win-x64-support
jlorenss/win x64 support

Initial fixes needed in order to get pass on mono regression tests for windows x64 visual studio build,

--regression basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe

Before fixes there were failures in basic.exe, exceptions.exe and objects.exe for windows x64  Visual studio build.

Failures in basic.exe and exceptions.exe was due to a mix up of signal defines on windows platform in Visual Studio build  where SIGILL and SIGFPE was defined differently in different source files causing incorrect signal handler to be invoked at runtime, causing incorrect thrown .NET exception. Fix is to make sure signal.h is always included giving the same value for SIGILl and SIGFPE over all source files. 

Failures in objects.exe test_0_mul_ovf_regress_36052 caused a stack overflow crash when running togehter with branch optimization mode. This was due to incorrect lowering of x64 test instruction when optimization moved over to use R8 instead of RAX and current lowering didn't handle that correctly meaning that the actual test was performed against wrong register causing a loop that caused a stack overflow error. The specific amd64 codegen , amd64_test_reg_imm, is currently only used on x64 windows platform for the stackalloc call.
2016-04-13 17:35:31 +01:00
Marek Safar 90611f9185 [Mono.Security] Fixes wrong path in makefile 2016-04-13 18:18:37 +02:00
Marek Safar ecd2f512ce [build] Clean up common crypto build 2016-04-13 17:48:04 +02:00
Martin Baulig 0c6c338f8a Update X509CertificateImplApple. 2016-04-13 16:21:29 +02:00
Martin Baulig 522d4bedf0 [corlib]: Add X509CertificateImpl.GetNativeAppleCertificate().
In SSCX.OSX509Certificates.GetCertificate(), we cannot simply use
'X509Certificate.Handle' because it may point to something that's
not a SecCertificate.

(cherry picked from commit 3fc068f7e2)
2016-04-13 16:07:19 +02:00
Vlad Brezae 0db5f5ad0e Merge pull request #2800 from BrzVlad/feature-lazy-sweep
[sgen] Enable lazy sweep by default
2016-04-13 16:51:25 +08:00
Vlad Brezae 5bfdf6257d [sgen] Enable lazy sweep by default 2016-04-13 00:38:25 +03:00
Vlad Brezae 6ab30afc4b [sgen] Concurrently sweep blocks also in the lazy sweep case
In the lazy sweep case, the sweep job doesn't sweep the blocks. Instead, the blocks are swept when they are actually needed (when we want to allocate in the block, scan the block etc.). This delays the mutator or increases the nursery pauses. Try to sweep as many blocks as possible concurrently, immediately after we finish the sweep job.
2016-04-13 00:38:23 +03:00
Vlad Brezae 3544fc5690 Merge pull request #2822 from BrzVlad/feature-lshift-decomposition
[jit] Decompose long immediate shifts
2016-04-13 05:32:39 +08:00
Marek Safar ccdb941738 [corlib] Handle CreateDirectory with relative paths. Fixes #40187 2016-04-12 16:44:58 +02:00
Marek Safar 6381a73724 Bump reference source 2016-04-12 16:11:02 +02:00
Alex Rønne Petersen 40292be2b9 Merge pull request #2872 from alexrp/timer-dispose2-test
[corlib] Fix TimerTest.TestDispose2 () test.
2016-04-12 15:31:31 +02:00
Marek Safar 17193833a5 [corlib] SymbolType from reference source. Fixes #39911 2016-04-12 15:17:53 +02:00
lateralusX 9de5079322 Fixed incorrect lowering on x64 for test instruction when register r8-r15 where used.
Currently only triggered by objects.exe regression test on windows x64 with branch opt, since stackalloc gets lowered to this test and branch will start using R8 instead of RAX for the test.
2016-04-12 11:35:56 +02:00
lateralusX eedb5fcb00 Fixed issue on x64 windows Visual Studio builds where signal define values got mixedup.
Caused incorrect exception behavior and failures in basic.exe, exceptions.exe regression test on x64 windows. This was due to the fact that some source files didn't include signal.h while others did. In case where signal.h was not included incompatible defines were used for SIGILL and SIGFPE in mini-amd64.h.
2016-04-12 11:30:58 +02:00
Marek Safar f7c9e5c00b Bump referencesource 2016-04-12 11:29:38 +02:00
Alex Rønne Petersen a2350de0d9 [corlib] Fix TimerTest.TestDispose2 () test. 2016-04-12 07:01:01 +02:00
monojenkins abbb94537e Merge pull request #2870 from madewokherd/arginfo
x86 cleanups for register arguments

Best I can tell, cinfo->args and cfg->args need to be independent before implementing calling conventions where some arguments are in registers, at least if we want to do it cleanly. Also, storing the argument offset in a cfg->args instruction that claims to be for a register seems hacky and confusing to me.
2016-04-12 04:45:27 +01:00
Vlad Brezae 9a087d64fd [sgen] Fix compare function 2016-04-12 02:26:52 +03:00
Zoltan Varga e37b4bd124 [runtime] Avoid printing out the corlib version when running -v --version, it requires a working runtime. Fixes #40175. 2016-04-11 18:44:51 -04:00
Zoltan Varga 1523e667f3 [runtime] Fix the build of cominterop.c with DISABLE_JIT. 2016-04-11 18:33:30 -04:00
Vlad Brezae dfac8517b9 Merge pull request #2802 from BrzVlad/feature-evacuation-opt2
[sgen] Reduce number of evacuated objects
2016-04-12 04:38:19 +08:00
Vincent Povirk 8bb4495177 [x86] Don't use the inst_offset field of OP_REGVAR arguments. 2016-04-11 14:17:28 -05:00
Vincent Povirk bc4a2b0ee0 [x86] Store CallInfo in MonoCompileArch structure. 2016-04-11 14:17:27 -05:00
Marek Safar c5335b0020 [build] Remove unused lib paths 2016-04-11 20:36:10 +02:00
Marek Safar 415047c9ef [mcs] Dynamic context in constructor initializers or field initializers is static. Fixes #40088 2016-04-11 20:36:10 +02:00
Vlad Brezae 08a728d237 Merge pull request #2819 from BrzVlad/fix-major-log
[sgen] Fix major size logging
2016-04-12 00:23:50 +08:00
Vlad Brezae 81a6080fd4 [jit] Decompose long immediate shifts
We decompose them as part of the cprop pass to handle more immediates and to further propagate copies.

The native backend of some architectures (for example x86) may support long shifts with specialized instructions. Even there, this still makes immediate shifts 2 times faster because long ops are poorly handled by the jit.

On arm, where we were emulating, this makes long immediate shifts 3-5 times faster.
2016-04-11 19:21:32 +03:00
monojenkins 6bf65f009a Merge pull request #2867 from alexrp/sgen-block-size-ppc
[sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.

This fixes a problem that was happening on Debian ppc32 build machines. Since
they are set up as a 32-bit userland on a 64-bit kernel, Mono would be compiled
with an ARCH_MIN_MS_BLOCK_SIZE value of 16k. However, at runtime, the system
page size would be 64k (due to the 64-bit kernel with PPC_64K_PAGES set).

Signed-off-by: `Alex Rønne Petersen <[email protected]>`
2016-04-11 17:15:24 +01:00
Alex Rønne Petersen ea8f09a1d5 Merge pull request #2866 from alexrp/solaris-10-tls
[configure] Use __thread instead of pthread TLS on Solaris/x86.
2016-04-11 18:12:09 +02:00
Marek Safar 3d28ea307f [mcs] Use Array.Empty for empty arrays when available 2016-04-11 18:00:06 +02:00
Marek Safar e2d4e96fb4 [mcs] Tie-breaking rules are applied also for non-equivalent parameter types. Fixess #40183 2016-04-11 18:00:06 +02:00
Marek Safar 888c401f32 [mcs] Add tie breaking rule when candidate is in expanded form only and best has default arguments 2016-04-11 18:00:06 +02:00
monojenkins f2e5ddd6b6 Merge pull request #2868 from akoeplinger/maccore-fixes
[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case

It caused errors like the following on the maccore builds:

```
  CCLD     libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
  "_mono_reflection_get_custom_attrs_blob_checked", referenced from:
      _ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```

---

This is the last patch required for getting maccore master to build again with mono master.

@monojenkins merge
2016-04-11 16:50:26 +01:00
Miguel de Icaza 66a493cefe Compiler-less mkbundle support in Mono.
This is the support that makes it so that mkbundle can create self-contained executables without requiring a native toolchain to be present. Also is the foundation to allow cross-compilation of self-contained executables.

This works by concatenating the runtime with the various dependencies and configuration files, attaching a directory at the end of the file and a signature to flag this as a runtime that has embedded resources in the executable file itself.

This works by modifying the runtime startup to check for a special signature at the end of the main executable, if it is not present, execution resumes as usual. Otherwise a directory is read from the end of the file which contains both the kind of file (assembly, configuration file, and so on), as well as pointer to the contents in the file. Then the regular Mono APIs to load resources are used to load these.This is the support that makes it so that mkbundle can create self-contained executables without requiring a native toolchain to be present. Also is the foundation to allow cross-compilation of self-contained executables.

This works by concatenating the runtime with the various dependencies and configuration files, attaching a directory at the end of the file and a signature to flag this as a runtime that has embedded resources in the executable file itself.

This works by modifying the runtime startup to check for a special signature at the end of the main executable, if it is not present, execution resumes as usual. Otherwise a directory is read from the end of the file which contains both the kind of file (assembly, configuration file, and so on), as well as pointer to the contents in the file. Then the regular Mono APIs to load resources are used to load these.
2016-04-11 10:42:51 -04:00
Alexander Köplinger 93281806aa [metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case
It caused errors like the following on the maccore builds:

```
  CCLD     libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
  "_mono_reflection_get_custom_attrs_blob_checked", referenced from:
      _ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```
2016-04-11 15:50:42 +02:00
Alexander Köplinger ae1e1bdc4a Merge pull request #2865 from akoeplinger/maccore-fixes
A few small fixes for maccore
2016-04-11 14:05:06 +02:00
Mathieu Malaterre be10407867 [sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.
This fixes a problem that was happening on Debian ppc32 build machines. Since
they are set up as a 32-bit userland on a 64-bit kernel, Mono would be compiled
with an ARCH_MIN_MS_BLOCK_SIZE value of 16k. However, at runtime, the system
page size would be 64k (due to the 64-bit kernel with PPC_64K_PAGES set).

Signed-off-by: Alex Rønne Petersen <[email protected]>
2016-04-11 11:09:08 +02:00
Alex Rønne Petersen 14461850b1 [configure] Use __thread instead of pthread TLS on Solaris/x86.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=32020

Tested on Solaris/x86 by Rainer Orth <[email protected]>.
2016-04-11 09:51:24 +02:00
Alex Rønne Petersen 2fedf0423e [utils/mutex] Initialize Win32 critical sections without debug info.
Apparently Windows doesn't free this debug info in Vista+ when calling
DeleteCriticalSection [1], so just avoid allocating it in the first place by
calling InitializeCriticalSectionEx with the CRITICAL_SECTION_NO_DEBUG_INFO
flag. This function is only available in Vista+, but we've dropped support for
XP anyway.

[1] http://stackoverflow.com/a/889853
2016-04-11 09:19:04 +02:00
Alexander Köplinger 5b76fe2dcc [mini] Add a stub for mono_arch_create_handler_block_trampoline to tramp-arm64.c
Otherwise it's not defined in the DISABLE_JIT case.
2016-04-11 02:38:22 +02:00
Alexander Köplinger 9df489cfba [metadata] reflection.c: add missing MonoError parameter for mono_reflection_lookup_dynamic_token
It was missed in the recent refactoring in 96373eb62e
2016-04-11 01:34:11 +02:00
Alexander Köplinger 9c9e9bf70f [metadata] Guard access to mb->locals_list with DISABLE_JIT ifdef
The field is only available when DISABLE_JIT is not defined.
2016-04-11 01:29:10 +02:00
Alexander Köplinger 460e55434d [build] Remove EXTENSION_include and _exclude from library.make
We do not have any .sources or .exclude.sources in mono-extensions anymore so this is no longer needed.
2016-04-10 18:46:37 +02:00
Alexander Köplinger 7e14426ec4 Merge pull request #2864 from cptjazz/python3_compatibility
Make versions script compatible to python3: Add () when using `print'.
2016-04-10 18:02:35 +02:00
Miguel de Icaza 3d1752383d Merge pull request #2854 from alexrp/lock-free-queue-docs
[utils/lfq] Clarify and document the lock-free queue API.
2016-04-10 10:44:18 -04:00
Alexander Jesner 7846db7cd4 Make versions script compatible to python3: Add () when using `print'. 2016-04-10 16:19:56 +02:00
Vlad Brezae 5860214681 [sgen] Evacuate from emptier blocks to fuller ones
We don't evacuate from full blocks. When it comes to blocks that have free slots, instead of evacuating all of them to a new set of blocks, aim to keep the fuller blocks around and evacuate the emptier ones into them.
2016-04-10 14:08:47 +03:00
Vlad Brezae 2db8321b7b [sgen] Don't evacuate full blocks 2016-04-10 14:08:44 +03:00
Alexis Christoforides 7e2eed75b4 Merge pull request #2851 from mono/mono-symbolicate-ikvm-master
[mono-symbolicate] Use IKVM.Reflection instead of System.Reflection
2016-04-09 20:07:58 -04:00
Marek Safar 2635e010d2 [mcs] Codegen of try-catch-finally with await inside both try and catch. Fixes #39866 2016-04-09 09:47:25 +02:00
monojenkins 908eee2763 Merge pull request #2860 from lewurm/fix-cfgdump-related-stuff
Fix `cfgdump` related stuff
2016-04-08 23:45:18 +01:00
Bernhard Urban a688c0c11e [jit] include cfgdump.h in common_sources 2016-04-08 12:03:30 -07:00
Bernhard Urban 6e740ebb2e [cfg-dump] fix warning 2016-04-08 11:59:51 -07:00
monojenkins bde98eb9fe Merge pull request #2856 from alexrp/profiler-fix-sem
[profiler] Fix incorrect initial writer semaphore value.

This was used during debugging. I forgot to revert it back to 0 before posting
the pull request (#2838). This led to ~3-5% more CPU usage by the writer thread
than actually necessary; it now sits around 0-1% for typical workloads.
2016-04-08 18:55:19 +01:00
Alex Rønne Petersen 558553457b [utils/lfq] Clarify and document the lock-free queue API. 2016-04-08 19:55:10 +02:00
Martin Baulig 00baea510b [corlib]: Add internal callback to 'X509Helper' to use System's X509Helper2.
(cherry picked from commit 5eaf4db091)
2016-04-08 19:12:02 +02:00
Martin Baulig 56e1874c7b [Mono.Security]: Cleanup 'CertificateValidationHelper'.
The overloaded GetValidator() which takes both 'MonoTlsSettings'
and 'MonoTlsProvider' is actually used by the test suite, so let's
keep it public.

(cherry picked from commit 0977d531d2)
2016-04-08 19:12:02 +02:00
monojenkins c88703ca74 Merge pull request #2857 from malaterre/master
Remove an undefined behavior

Found using gcc -fsanitize=bounds
2016-04-08 17:40:17 +01:00
Alexander Köplinger 9df2a4dc53 [ci] Don't use babysitter on Windows/cygwin
babysitter generates some temp paths in python when running under cygwin, which breaks down
when those paths are passed to the native Windows mono.exe during testing:

    Exception in TestRunnerThread ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\cygdrive\c\WINDOWS\TEMP\tmpC4K5yK\babysitter_report_current_test_file.txt".
2016-04-08 17:23:16 +02:00
Martin Baulig 694d8c6a56 [System]: Use MonoTlsProviderFactory.GetDefaultProviderInternal() to cache the result.
(cherry picked from commit 6d41d1562f)
2016-04-08 14:59:21 +02:00
Mathieu Malaterre a16fa2271a Remove an undefined behavior
Found using gcc -fsanitize=bounds
2016-04-08 12:49:17 +02:00
Alex Rønne Petersen 35c5a968d7 Merge pull request #2855 from malaterre/master
Remove a simple memory leak
2016-04-08 12:44:17 +02:00
Alex Rønne Petersen a3b5a6ee02 [profiler] Fix incorrect initial writer semaphore value.
This was used during debugging. I forgot to revert it back to 0 before posting
the pull request (#2838). This led to ~3-5% more CPU usage by the writer thread
than actually necessary; it now sits around 0-1% for typical workloads.
2016-04-08 12:43:00 +02:00
Mathieu Malaterre 0560c08ffa Remove a simple memory leak 2016-04-08 08:50:19 +02:00
monojenkins 4c2f145149 Merge pull request #2852 from alexrp/master
[profiler] Fix usage of the lock-free queue API.

* Free nodes hazardously.
* No need to unpoison nodes since we're not reusing them.
* Fix memory leak when emptying coverage queues.
2016-04-08 05:20:40 +01:00
Alex Rønne Petersen 1cddcd7442 [profiler] Fix a warning. 2016-04-08 02:53:30 +02:00
Alex Rønne Petersen c89edfe3fc [profiler] Fix usage of the lock-free queue API.
* Free nodes hazardously.
* No need to unpoison nodes since we're not reusing them.
* Fix memory leak when emptying coverage queues.
2016-04-08 02:53:27 +02:00
Alexander Köplinger 2e90180856 Merge pull request #2850 from madewokherd/inetpton
[configure] Also check that inet_pton is defined when building for Windows.
2016-04-08 02:18:00 +02:00
Alex Rønne Petersen de28858b4d [utils/hp] Export mono_thread_hazardous_try_free () for use in the profiler. 2016-04-08 01:17:46 +02:00
Alexander Köplinger fd90d421b5 [ci] Remove quotes from windows msbuild command
Turns out it wasn't the right fix.
2016-04-08 01:17:41 +02:00
Alexander Köplinger 614178836c [ci] Don't enable the mobile profiles on the community archs
It only takes time and e.g. causes issues if e.g. AOT doesn't work.
2016-04-08 00:52:33 +02:00
Alexis Christoforides 766253566c Remove unused Mono.Cecil references 2016-04-07 18:01:42 -04:00
Alexis Christoforides 1585d1dad3 [mono-symbolicate] Use IKVM.Reflection instead of System.Reflection
This is so that the tool can work independently of runtime assembly resolution (ie. to load alternate corlibs)
2016-04-07 17:53:14 -04:00
monojenkins 8f1d9944a8 Merge pull request #2788 from lambdageek/dev/monoerror-reflection-no-more-raise
[reflection] No more mono_*_raise_*

No more `mono_error_raise_exception` and `mono_raise_exception` in `reflection.c`
2016-04-07 22:15:36 +01:00
monojenkins 6ac96752dd Merge pull request #2769 from lewurm/jit-cfg-dump
[jit] mini IR dumping feature for IGV

related doc PR: https://github.com/mono/website/pull/189
2016-04-07 21:26:04 +01:00
Martin Baulig e307a0e939 [Mono.Security]: Add new internal 'MonoTlsProvider' APIs.
(cherry picked from commit c02a885bd6)
2016-04-07 21:14:46 +02:00
Martin Baulig 0d51914b4e [BoringTls]: Register via 'MonoTlsProviderFactory'.
(cherry picked from commit e43a5f7332)
2016-04-07 21:07:08 +02:00
monojenkins 1af57bfcb6 Merge pull request #2824 from lambdageek/dev/monoerror-icalls-noraise
[runtime] Set pending exception in icalls instead of raising.
2016-04-07 20:06:02 +01:00
Vincent Povirk 66a328019e [configure] Also check that inet_pton is defined when building for Windows.
The version of mingw-w64 on Debian wheezy has this symbol in its libraries
but not its headers.
2016-04-07 13:18:47 -05:00
monojenkins b852848dab Merge pull request #2848 from alexrp/master
[libgc] Fix broken AC_TRY_COMPILE() invocation in configure.ac.

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

Tested on PowerPC by `Mathieu Malaterre <[email protected]>`.
2016-04-07 18:35:18 +01:00
Aleksey Kliger 728b251fd2 [SRE] Remove uses of mono_error_raise_exception
1. icall `mono_image_module_basic_init`
2. icall `mono_reflection_sighelper_get_signature_local`
3. icall `mono_reflection_sighelper_get_signature_field`
4. API function mono_module_get_object
5. API function mono_type_get_object
6. API function mono_method_get_object
7. API function mono_field_get_object
8. API function mono_property_get_object
9. API function mono_event_get_object
2016-04-07 13:31:53 -04:00
Aleksey Kliger 61fefd64cc [reflection] Remove last uses of mono_raise_exception
1. static function `create_custom_attr` (set MonoError exception instance)
2. icall `mono_reflection_resolve_custom_attribute_data` (set pending
exception from MonoError). Also rename it to
ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal
3. icall `mono_reflection_bind_generic_method_parameters` (set pending
exception from MonoError)  Not renaming this one because it's actually
used for two icalls:
System.Reflection.Emit.MethodBuilder.MakeGenericMethod and System.Reflection.MonoMethod.MakeGenericMethod_impl
2016-04-07 13:30:23 -04:00
Aleksey Kliger 05e70d71f3 [SRE] MonoError-ize reflection_methodbuilder_to_mono_method 2016-04-07 13:23:03 -04:00
Aleksey Kliger cd1760bff9 [SRE] MonoError-ize mono_reflection_create_generic_class
Change icall name to
ves_icall_System_Reflection_Emit_TypeBuilder_create_generic_class

Give mono_reflection_create_generic_class a MonoError argument,
and get rid of the redundant mono_reflection_create_generic_class_checked
2016-04-07 13:23:03 -04:00
Aleksey Kliger 26450098fc [assembly loader] Don't raise in mono_assembly_open_full and mono_assembly_load_with_partial_name
Set the return status instead.
2016-04-07 11:26:16 -04:00
Alexander Köplinger 89c209c78b [ci] Fall back to timeout command if babysitter doesn't work
Some Jenkins workers (e.g. the s390x one) have an earlier python version installed where the babysitter doesn't work.
Fall back to timeout in those cases.
2016-04-07 16:57:54 +02:00
Martin Baulig 8527bb09ec [BoringTls]: Merge the work branch.
* Mono.Security.Interface.ICertificateValidator2:
  new internal interface, deriving from ICertificateValidator.

* Mono.Security.Interface.CertificateValidationHelper:
  the internal GetValidator() now returns ICertificateValidator2.

* Mono.Security.Interface.MonoTlsProvider:
  make HasCustomSystemCertificateValidator and InvokeSystemCertificateValidator()
  internal and use ICertificateValidator2.

* Mono.Net.Security.ChainValidator:
  implement ICertificateValidator2; we may now be called with a
  fully-built X509Chain.

* corlib, System, Mono.Security:
  add [assembly: InternalsVisibleTo].
2016-04-07 16:42:10 +02:00
Jo Shields 7ac71b1dbf [ci] Escape run-step.sh invocations, for paths with spaces in 2016-04-07 15:28:59 +01:00
monojenkins 4ef9c5f92d Merge pull request #2847 from vargaz/get-type-reflection
[runtime] Fix type_from_parsed_name () to work in the presence of inl…

…ining done by LLVM.
2016-04-07 08:20:22 +01:00
monojenkins 3e1d49388d Merge pull request #2809 from lambdageek/dev/monoerror-threads
[runtime] Don't call mono_raise_exception in thread utilities
2016-04-07 07:45:21 +01:00
Alex Rønne Petersen 13f33daabf [libgc] Fix broken AC_TRY_COMPILE() invocation in configure.ac.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=40144

Tested on PowerPC by Mathieu Malaterre <[email protected]>.
2016-04-07 08:37:30 +02:00
monojenkins 346cd3d86c Merge pull request #2838 from alexrp/profiler-writer-thread-cpu2
[profiler] Use a semaphore to signal the writer thread.

We would previously constantly try to dequeue from the writer queue which would
result in extremely high CPU usage, making many apps (e.g. Xamarin Studio)
nearly unusable.
2016-04-07 05:00:33 +01:00
Zoltan Varga 07cda57eb1 [arm64] Enable Unwind_Backtrace () support on arm64. 2016-04-06 22:41:10 -04:00
Zoltan Varga 7eec08cbb3 [runtime] Fix type_from_parsed_name () to work in the presence of inlining done by LLVM. 2016-04-06 21:24:19 -04:00
monojenkins 895071150a Merge pull request #2841 from lambdageek/dev/bug-40060
[corlib] Type.GetType parser and resolver improvements

We have two type parsers the one invoked by `Type.GetType(string)` (and some others) which is implemented in C in `reflection.c`, and the one invoked by `Type.GetType(string, Func<...>, Func<...>)` implemented in managed code as `System.TypeSpec`.

In both cases `string→Type` conversion goes in two stages: parsing and resolution.  Parsing just changes the string into an AST.  And resolution crawls the AST and constructs the appropriate types.

This fixes [Bugzilla #40060](https://bugzilla.xamarin.com/show_bug.cgi?id=40060)

1. Fix the resolver on the native side for types like `"System.Generic.Collections.Dictionary[System.Int32,MyType]"` where the generic type is from corlib and a type argument is from the current assembly.
2. Fix `get_caller_no_reflection` to work correctly when the call stack has a System.Reflection method as the immediate caller of the icall.
3. Fix the resolver on the native side to work when it's called from corlib's System namespace, not just System.Reflection.
4. Fix the managed parser to work with types like `"MyGeneric[MyType]"` where the generic argument is not an assembly qualified name or there's a mixture of aqn and non-aqn type arguments.  Also rationalize how the code handles assembly qualification in general.
5. Test cases
2016-04-07 01:34:46 +01:00
Ankit Jain 9444d475a4 Merge pull request #2844 from radical/assign-proj-config
[xbuild] Fix bug #40094 - AssignProjectConfiguration should fallback to project path if ..
2016-04-06 20:29:06 -04:00
Alex Rønne Petersen d13d7b5bb3 [profiler] Use a semaphore to signal the writer thread.
We would previously constantly try to dequeue from the writer queue which would
result in extremely high CPU usage, making many apps (e.g. Xamarin Studio)
nearly unusable.
2016-04-07 01:15:01 +02:00
Alex Rønne Petersen fc55e27d0c Merge pull request #2839 from alexrp/profiler-thread-detach
[profiler] Detach helper/writer threads before shutting them down.
2016-04-07 01:12:10 +02:00
Aleksey Kliger df8a68c20a [appdomain] Cleanup MonoError code
1. Assert in mono_get_corlib_version instead of raising an exn.
2. Don't raise in mono_domain_create_appdomain external API function.
3. Assert in mono_domain_assembly_postload_search instead of raising.
4. Don't raise in mono_domain_fire_assembly_load.
5. Use mono_error_set_pending_exception in
   ves_icall_System_AppDomain_InternalGetProcessGuid
6. Dont' raise in unload_thread_main, populate unload_data instead.
2016-04-06 18:45:12 -04:00
Aleksey Kliger e4db288c0a [threads] Add MonoError arg to init_root_domain_thread 2016-04-06 18:04:30 -04:00
Aleksey Kliger 1da67ec31a [threads] MonoError-ize mono_thread_set_name_internal 2016-04-06 18:04:29 -04:00
Alexander Köplinger 165f604f83 Replace android-libunwind submodule with a local copy
We can't keep it as a real git submodule since the repo contains an "aux" folder that breaks on Windows.
2016-04-06 23:39:21 +02:00
Aleksey Kliger 79dd5739c4 [MonoError] Add mono_error_set_invalid_operation utility function
to construct System.InvalidOperationException
2016-04-06 17:14:20 -04:00
Aleksey Kliger 051e63398f [threads] Add MonoError arg to create_thread
instead of throw_on_failure flag, pass a MonoError outarg and let the
caller decide what to do with it.
2016-04-06 17:14:20 -04:00
Aleksey Kliger 0e830baba6 [runtime] Don't call mono_raise_exception in ves_icall_Mono_Runtime_GetNativeStackTrace 2016-04-06 17:14:20 -04:00
Alex Rønne Petersen a102f6a81e [profiler] Detach helper/writer threads before shutting them down. 2016-04-06 22:36:45 +02:00
Alex Rønne Petersen 147f30cf93 [threads] Export mono_thread_info_detach () for use in the profiler. 2016-04-06 22:36:45 +02:00
Alexander Köplinger 4a71f9eee7 [ci] Put windows msbuild command in quotes 2016-04-06 22:34:52 +02:00
Rodrigo Kumpera 50869dfe28 Merge pull request #2837 from alexrp/master
Bunch of improvements surrounding thread names and reporting of such to the profiler
2016-04-06 16:28:34 -04:00
Ankit Jain 890f40d7ad [xbuild] Fix #40094, part 2/2: AssignProjectConfiguration - Fallback to
.. project path for lookup, if lookup by guid fails.

Fixes bxc #40094 .
2016-04-06 14:40:31 -04:00
Ankit Jain f225bc3110 [xbuild] Fix #40094, part 1/2: SolutionParser: Emit AbsolutePath="..."
.. attribute for CurrentSolutionConfigurationContents .

   <CurrentSolutionConfigurationContents>
         <SolutionConfiguration xmlns="">
	   <ProjectConfiguration Project="{82323650-6C2A-4FAC-91C6-A715C2FE9CB2}" AbsolutePath="/Users/ankit/test/msbuild/bug40094/App1/App1\App1\App1.csproj">
		   Release|AnyCPU
	   </ProjectConfiguration>
	   ...

Related to fix for bxc #40094
2016-04-06 14:39:52 -04:00
Aleksey Kliger e915178746 [corlib] TypeSpec.Parse for non-assembly qualified names.
Previously for types like "Foo[P,Q]" the recursive call of the parser
would incorrectly consume the delimiter after a type argument (ie the
',' or ']') which would leave the caller potentially past the end of the
string which would signal a failed parse.  New behavior is to peek at
the delimiter but leave it up to the caller to consume.

Also `Type.GetType(name, null, null)` should behave like
`Type.GetType(name)` (previously it dropped generic type arguments).
2016-04-06 13:56:09 -04:00
Aleksey Kliger c521640567 [runtime] type_from_parsed_name can be called from System or System.Reflection
type_from_parsed_name is a helper for
ves_icall_System_Type_internal_from_name which is called directly from
System.Type as well as indirectly by System.TypeNameParse.  We should
skip over all those classes to find the managed caller.

This fixes the remainder of [40060](https://bugzilla.xamarin.com/show_bug.cgi?id=40060)
2016-04-06 13:56:08 -04:00
Aleksey Kliger 9be882ab60 [runtime] Fix bug in get_caller_no_reflection
In order to find the user code that called some corlib API
that calls an icall, we write:
	dest = m = mono_method_get_last_managed ();
	mono_stack_walk_no_il (get_caller_no_reflection, &dest);
	if (!dest) dest = m;

The get_caller_no_reflection walk works in two stages: in the first
stage we look for the target method (the initial value of dest) when we
find the target we set dest to NULL and then the second stage continues
walking upward past the reflection APIs.

However if the target method is itself in System.Reflection, the
old implementation would skip over it even in the first stage and we'd
never find the target method and exhaust the whole stack.

The fix is to move the check for the target method before the check for
the Reflection API methods.
2016-04-06 13:56:08 -04:00
Aleksey Kliger 45d03ae47d [runtime] Add a rootimage arg to mono_reflection_get_type_checked
And in type_from_parsed_name pass the calling image as the metadata
context even if the initial class we're looking for is in corlib.

This lets calls like
	Type.GetType ("System.Collections.Generic.Dictionary<int, MyClass<int>>")
succeed.  (Previously we would firs try to find
System.Collections.Generic.Dictionary in the calling assembly,
which would fail outside of corlib, and then we'd retry with the
rootimage as corlib which would find Dictionary, but fail to find
MyClass.  Note that this was only broken if the outermost type was in
corlib.  It always worked deeper in generic type arguments provided
we startd in the calling assmebly:
	Type.GetType ("MyClass<System.Collections.Generic.Dictionary<int, MyClass<int>>>")

This fixes part of [40060](https://bugzilla.xamarin.com/show_bug.cgi?id=40060)
2016-04-06 13:56:07 -04:00
Joao Matos 78ac65dd4a [runtime] Deduplicate MONO_ZERO_LEN_ARRAY into mono-compiler.h. 2016-04-06 18:06:29 +01:00
Joao Matos 22ebf4269c [runtime] Factor out (MonoMarshalConv)-1 into its own define.
Thanks to @marek-safar for suggestion.
2016-04-06 17:56:04 +01:00
João Matos 2f16750d83 Merge pull request #2842 from akoeplinger/fix-monodroid-build
Fix monodroid build
2016-04-06 17:46:56 +01:00
Alexander Köplinger 0cb0b1a48d Add android-libunwind submodule and fix path in mini-exceptions-native-unwinder.c
This was hosted in mono-extensions before. It is licensed under the MIT license:
https://android.googlesource.com/platform/external/libunwind/+/android-6.0.1_r24/LICENSE
2016-04-06 17:43:04 +02:00
Aleksey Kliger af181c5d02 [corlib] Test Type.GetType(string,null,null) and anonymous type parsing 2016-04-06 11:34:34 -04:00
Rodrigo Kumpera 36390e00be Merge pull request #2836 from kumpera/cwt_toggleref
Fixed a toggleref and CWT iteraction bug.
2016-04-06 11:24:52 -04:00
Alexander Köplinger 844bda3ad9 [mini] Remove duplicated methods from tramp-arm64-gsharedvt.c
They are already defined in arch-stubs.c
2016-04-06 17:20:11 +02:00
Alexander Köplinger 39655e73f9 [mini] Fix incorrect ifdef in the arm64 gsharedvt files
It used MONO_ARCH_GSHARED_SUPPORTED instead of MONO_ARCH_GSHAREDVT_SUPPORTED.
2016-04-06 17:19:36 +02:00
Alexander Köplinger 18e2ad29a0 [mini] Add missing include to mini-exceptions-native-unwinder.c
It complained about mono_runtime_printf_err() not being defined.
2016-04-06 17:16:49 +02:00
Alexander Köplinger a169dff4e8 [mini] Fix ARM assembler syntax for MRC
According to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/CIHEEIDJ.html the MRC instruction is documented as:

    MRC{cond} coproc, opcode1, Rd, CRn, CRm{, opcode2}

with coproc being "the name of the coprocessor the instruction isfor. The standard name is pn, where n is an integer in the range 0-15."

GCC seemed to accept the operand without the 'p' prefix but clang raised an "invalid operand for instruction" error.
2016-04-06 17:14:02 +02:00
Joao Matos 7f4a2f9e10 [runtime] Fixed invalid comparisons to MonoMarshalConv in marshal.c.
In some platforms, C enums might be considered unsigned, and in that case we'd get the following warning:

mono/mono/metadata/marshal.c:5108:12: warning: comparison of constant -1 with expression of type 'MonoMarshalConv' is always false
      [-Wtautological-constant-out-of-range-compare]
                if (conv == -1) {
                    ~~~~ ^  ~~

The explicit cast should do the right thing.
2016-04-06 16:09:06 +01:00
Alexander Köplinger 5a01872ddf Merge pull request #2833 from directhex/ci-script-in-repo
Keep Jenkins job script in Mono repo
2016-04-06 15:12:29 +02:00
Marek Safar 84845717a4 Merge pull request #2804 from radical/al-cecil
AL: Use IKVM.Reflection to get custom attributes from the template assembly,
2016-04-06 13:50:07 +02:00
Alexander Köplinger 3bd4ecade4 Merge pull request #2840 from directhex/fix_make_dist_commoncrypto
Fix missing CommonCrypto/Makefile.include in "make dist" tarballs
2016-04-06 11:24:56 +02:00
Jo Shields c0ea809052 Fix missing CommonCrypto/Makefile.include in "make dist" tarballs 2016-04-06 10:04:50 +01:00
Jo Shields 57efb1111f Keep Jenkins job script in Mono repo
This means we can change the script in different branches (right now, all pull requests against any branch share the same job script)
2016-04-06 09:24:23 +01:00
Marek Safar 693f414010 [Microsoft.Build.Tasks] Fix CodeTaskFactory to resolve user references 2016-04-06 08:55:45 +02:00
monojenkins 496309d60b Merge pull request #2835 from lewurm/fix-make-dist
[sqlmetal] fixup for a73fb31f2 in order to fix `make dist'
2016-04-06 02:40:27 +01:00
Alex Rønne Petersen f92d9d0674 [mprof-report] Don't print a thread with a zero thread ID in the summary.
Log buffers can end up with a zero thread ID when we synthesize events on the
writer thread, leading to mprof-report thinking a thread exists with that ID.
We simply ignore the "zero thread" in the thread summary.
2016-04-06 02:28:56 +02:00
Alex Rønne Petersen a408a2fa93 [profiler] Ensure that we zero out thread IDs for buffers written from helper/writer threads.
If we don't do this, mprof-report will pick up on the fact that the helper and
writer threads exist and print them in the thread summary with no names. It's
OK to zero out the thread ID as the kinds of events we write from these threads
cannot be meaningfully associated with the log buffer's thread ID (or in the
case of counters, any thread ID).
2016-04-06 02:28:56 +02:00
Alex Rønne Petersen 3ddcaed636 [mprof-report] Don't assume the first thread seen is the main thread.
The runtime now explicitly sets the native name for the main thread, so this
(faulty) assumption is no longer necessary.
2016-04-06 02:28:55 +02:00
Alex Rønne Petersen a899fef659 [mini] Set a native thread name for the main thread in the driver.
We only set the native name as MS.NET leaves the managed name for the main
thread as null. At least by setting the native name, we get a nice name in GDB.
2016-04-06 02:28:55 +02:00
Alex Rønne Petersen 92ec05a837 [threadpool] Explicitly use the root domain to allocate the thread name.
This is mainly for consistency with the rest of the runtime which explicitly
specifies the root domain when allocating thread name strings.
2016-04-06 02:28:54 +02:00
Alex Rønne Petersen 0145f5b44b [runtime] Add thread names to all internal runtime threads. 2016-04-06 02:28:54 +02:00
Alex Rønne Petersen 7543207947 [gc] Allow changing the finalizer thread's name.
This insanity is apparently allowed by MS.NET.
2016-04-06 02:28:53 +02:00
Alex Rønne Petersen ad78997a25 [gc] Set name of the finalizer thread from within the thread.
This ensures that its name is set with pthread_setname_np () on Mac.
2016-04-06 02:28:53 +02:00
Alex Rønne Petersen 1334501fa2 [threads] Export some functions so the entire runtime can set thread names. 2016-04-06 02:28:53 +02:00
Alex Rønne Petersen 323198ab52 [threads] Make mono_thread_info_set_name () work on Mac in some cases.
We can use pthread_setname_np () on OS X 10.6+ when we're setting the name for
the current thread. For other cases, we just do nothing.
2016-04-06 02:28:49 +02:00
Alex Rønne Petersen 6b75d57c7d [threads] Don't report tools threads that do a full attach to the profiler.
The profiler helper thread does a full attach for on-demand heapshots. Since we
collect no actual data for the helper thread, there's no reason to report it.
2016-04-06 02:14:39 +02:00
Alex Rønne Petersen 0778cacbc6 [threads] Make sure we change the native thread name if it was set before starting. 2016-04-06 02:14:39 +02:00
Alex Rønne Petersen 10db82a563 [sgen] Make mono_gc_base_init () double-init resistant like the other GCs.
A double init could happen when profiling as we'd call mono_gc_base_init ()
from mono_profiler_load () early on, and then later call it again during the
normal startup sequence.
2016-04-06 02:14:39 +02:00
Alex Rønne Petersen 8e6b87f97a [mini] Shut down the profiler after shutting down the major runtime components.
Previously, we would shut down the profiler so early that it would never see
unload events for threads, domains, etc. This sounds harmless at first, but
since the profiler dumps the remaining data in the thread-local log buffer to
disk from within the thread end callback, we would often miss events near the
end of a thread's lifetime.

Shutting down the profiler after the major runtime components doesn't appear to
have any negative effects, which makes sense as all managed threads should be
stopped by this point.
2016-04-06 02:14:39 +02:00
Rodrigo Kumpera f3a68ce223 [sgen] Mark togglerefs before processing ephemerons. Fixes #40108.
Strong Togglerefs must be considered as roots for the purpose of Ephemeron processing.

Otherwise you make it not possible to use a toggleref object as key.
2016-04-05 18:50:10 -04:00
Ankit Jain e4f1b8c13d AL: Use IKVM.Reflection to get custom attributes from the template assembly,
.. instead of System.Reflection. This allows AL to work even if the
dependent assemblies of the template are not available.
2016-04-05 18:30:27 -04:00
monojenkins 0ebac113fc Merge pull request #2834 from xmcclure/inflated_method_header_leak_followup
Fix uninitialized MonoError in mono_basic_block_split

Follow-up on PR #2781 which removed a mono_error_init leading to memory unsafety. This was causing crashes when verifying assemblies in the 4.4 branch although it does not seem to have caused any known problems in master for some reason.
2016-04-05 23:00:37 +01:00
Bernhard Urban 4f4b674e17 [sqlmetal] fixup for a73fb31f2 in order to fix `make dist' 2016-04-05 14:08:31 -07:00
Bernhard Urban 371efbec90 [msvc] add new module
but only compile stubs on windows
2016-04-05 13:02:03 -07:00
Alexander Köplinger b8893efbcc Merge pull request #2832 from razzfazz/handle_eintr
handle EINTR for kevent calls
2016-04-05 21:39:14 +02:00
Andi McClure d442618a0c Document mono_error_init convention in source 2016-04-05 14:51:25 -04:00
Andi McClure 4fb8e38567 [runtime] restore mono_error_init in mono_basic_block_split
Follow-up on PR #2781 which removed a mono_error_init. Ensure use in
helper functions for consistency. Fixes a potential crasher.
2016-04-05 14:32:18 -04:00
Marek Safar d166de315f [Microsoft.Build.Utilities] Fixes tests resources build 2016-04-05 20:08:41 +02:00
Marek Safar a73fb31f21 [sqlmetal] Remove wrong tests config 2016-04-05 19:52:07 +02:00
Bernhard Urban bac3da1b44 [jit] introduce CFG dumping feature, that enables dumping over to network to IGV 2016-04-05 10:19:11 -07:00
Bernhard Urban 69416cdc79 [jit] add function to print instruction description into string buffer 2016-04-05 10:18:23 -07:00
Marek Safar e86fb81c3f [mcs] Remove duplicate references 2016-04-05 19:17:57 +02:00
Marek Safar 598e40b9ab Bump referencesource 2016-04-05 15:56:24 +02:00
Alexander Köplinger 1639e26a6b Merge pull request #2831 from razzfazz/fix_dllimport
clean up DllImport attributes
2016-04-05 15:04:31 +02:00
Marek Safar 0c306a975f [System] Always pass -noconfig to codedom c# compiler 2016-04-05 13:39:19 +02:00
Alexander Köplinger 5d100970dd [build] Exclude generated .g.cs files from "make dist"
The recent changes to the mobile profiles introduced generated files in their .sources like CommonCrypto/MD5CryptoServiceProvider.g.cs
However, those are not generated when the mobile profiles aren't enabled at configure time.

This caused a problem during "make dist" since it tries to grab the entries in .sources from *all* profiles, causing errors like:

    cp: cannot stat ‘CommonCrypto/MD5CryptoServiceProvider.g.cs’: No such file or directory
    make[5]: *** [dist-local] Error 1

The easiest fix is to filter out those generated files.
2016-04-05 13:19:25 +02:00
Daniel Becker ac49990f3d clean up DllImport attributes
Any native function that can modify errno should have the
SetLastError attribute set to true. Also, no need to specify
EntryPoint if it's the same as the function name.
2016-04-05 00:35:21 -07:00
Zoltan Varga d9c32b372c [runtime] Allow the options in MONO_DEBUG to be passed as a command line option too. 2016-04-04 19:13:33 -04:00
Zoltan Varga 375bca4809 [llvm] Enable pinvoke call using the C calling conv in llvm-only mode. 2016-04-04 19:02:56 -04:00
Zoltan Varga c767607237 [corlib] Make some ExceptionDispatchInfo tests with BitcodeNotWorking because we don't truncate stack traces of exceptions at the catch site when running with bitcode. 2016-04-04 18:20:53 -04:00
Rodrigo Kumpera 8f745e3426 Merge pull request #2827 from xmcclure/profile-clean-0.1
Continued profiler loading cleanup (PR#2816 follow up)
2016-04-04 17:24:52 -04:00
monojenkins 69f207ee9e Merge pull request #2545 from ermshiperete/Xamarin-24974
[corlib] Fix exception in __ComObject finalizer during shutdown

* keep a reference to a __ComObject's proxy so it doesn't get garbage
  collected
* don't create __ComObjects unnecessarily
* Fix for bug [24974](https://bugzilla.xamarin.com/show_bug.cgi?id=24974)
2016-04-04 21:11:31 +01:00
Marek Safar 5e57fa3aa1 [build] Update nunit-console path for xbuild profiles 2016-04-04 17:30:08 +02:00
Marek Safar afaa29f3a9 [Microsoft.Build.Engine] Update test files 2016-04-04 17:25:22 +02:00
Marek Safar dfdd3cc4ab [mcs] Make more errors build explicit 2016-04-04 17:03:47 +02:00
Marek Safar 680321339d [System.Runtime.Serialization.dll] Update referencesource strings 2016-04-04 16:41:35 +02:00
Marek Safar b2dbfc7aac [tools] Update missing reference 2016-04-04 16:41:35 +02:00
Alexander Köplinger ef44704cef Fix make dist 2016-04-04 16:34:20 +02:00
Alexander Köplinger 0909ee8c3d [test-runner] Ignore exceptions during process kill
We hit this on Jenkins over the weekend:
https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/3845/parsed_console/log_content.html#WARNING1

```
Unhandled Exception:
System.InvalidOperationException: Cannot process request because the process (51792) has exited.
  at System.Diagnostics.Process.GetProcessHandle (Int32 access, Boolean throwIfExited) <0x10d7ea000 + 0x001b6> in <filename unknown>:0
  at System.Diagnostics.Process.GetProcessHandle (Int32 access) <0x10d7f2fd0 + 0x0001e> in <filename unknown>:0
  at System.Diagnostics.Process.Kill () <0x10d7f2ee0 + 0x00031> in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Kill ()
  at TestRunner+<Main>c__AnonStorey0.<>m__0 () <0x10a9b50b0 + 0x00e30> in <filename unknown>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x10c55bc90 + 0x0009a> in <filename unknown>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a210 + 0x001c6> in <filename unknown>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a1e0 + 0x00020> in <filename unknown>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x10c55a130 + 0x00059> in <filename unknown>:0
  at System.Threading.ThreadHelper.ThreadStart () <0x10c55be50 + 0x0002e> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Cannot process request because the process (51792) has exited.
  at System.Diagnostics.Process.GetProcessHandle (Int32 access, Boolean throwIfExited) <0x10d7ea000 + 0x001b6> in <filename unknown>:0
  at System.Diagnostics.Process.GetProcessHandle (Int32 access) <0x10d7f2fd0 + 0x0001e> in <filename unknown>:0
  at System.Diagnostics.Process.Kill () <0x10d7f2ee0 + 0x00031> in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Kill ()
  at TestRunner+<Main>c__AnonStorey0.<>m__0 () <0x10a9b50b0 + 0x00e30> in <filename unknown>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x10c55bc90 + 0x0009a> in <filename unknown>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a210 + 0x001c6> in <filename unknown>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a1e0 + 0x00020> in <filename unknown>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x10c55a130 + 0x00059> in <filename unknown>:0
  at System.Threading.ThreadHelper.ThreadStart () <0x10c55be50 + 0x0002e> in <filename unknown>:0
make[1]: *** [test-generic-sharing-managed] Error 1
```

We can't do anything about those errors, so just catch and ignore it.
2016-04-04 15:36:50 +02:00
Marek Safar 21bf330584 [build] Update mcs path in mini tests 2016-04-04 15:23:06 +02:00
Marek Safar 74bae27874 [Facades] Update list of full assemblies 2016-04-04 14:40:56 +02:00
Marek Safar 926cb696e6 [mcs] Basic boostrap references are always default ones 2016-04-04 14:12:51 +02:00
Marek Safar 5933e0a137 [Microsoft.Build.Engine] Simplify bd70a55ec7 2016-04-04 14:02:10 +02:00
Marek Safar bd70a55ec7 [Microsoft.Build.Engine] clean/copy mdb files as well 2016-04-04 14:01:02 +02:00
Marek Safar aeccd22792 [build] Change the way how mcs references are passed to compiler to always use full path.
One of csc prerequisites because csc uses -lib as path which is considered after
RuntimeEnvironment.GetRuntimeDirectory which makes -lib useless
2016-04-04 13:48:44 +02:00
Marek Safar 3d180029fb [System.Runtime.Serialization.Formatters.Soap] Make test output deterministic 2016-04-04 13:48:43 +02:00
Marek Safar c10e61a62e [Mono.C5] Make test output deterministic 2016-04-04 13:48:43 +02:00
Ludovic Henry 196497780f Merge pull request #2713 from gregoryyoung/master
handles AwaitAsync finishing synchronously
2016-04-04 11:15:08 +01:00
Zoltan Varga a26dad1a89 [amd64] Add a separate ArgStorage entry for gsharedvt return types instead of using a separate flag in CallInfo. 2016-04-02 21:02:57 -04:00
Alexander Köplinger 57d9d3595c [acceptance-tests] Fix test-runner.exe compilation after 136dd0 2016-04-03 02:56:50 +02:00
monojenkins 0fa33056a6 Merge pull request #2720 from mono/fix-39325
[Profiler] Keep a reference to assemblies while coverage is running

In certain circumstances, for example when running under nunit-console, assemblies could be unloaded while the profiler still had a reference to them in order to generate the coverage data. In these cases, the memory referred to by the profiler would be invalid and would crash.

Fix this by incrementing the reference count of the assemblies preventing them from being unloaded while coverage is being collected.

Fixes BXC #39325
2016-04-02 16:50:31 +01:00
Zoltan Varga 8e35235769 [runtime] Move the test for shutting down the stat profiler to mini_cleanup (). 2016-04-02 02:32:04 -04:00
Zoltan Varga 455d2b81e2 [arm64] Fix the generation of static rgctx trampolines when using aot on linux. 2016-04-02 01:38:43 -04:00
Zoltan Varga d93dab8278 [arm64] Implement handler block guard trampolines. 2016-04-02 01:27:27 -04:00
Zoltan Varga 184c0aaf58 [runtime] Fix a crash when shutting down the sampling thread. 2016-04-02 01:23:35 -04:00
Zoltan Varga 1ee0c21019 [tests] Increase the timeout in the test runner so running tests with llvm doesn't time out. 2016-04-01 22:36:21 -04:00
Alexander Köplinger c4962db608 [metadata] Remove invalid Win32 entry in object-offsets.h
The lmf_addr field in MonoLMF only exists for TARGET_X86.
2016-04-01 18:56:01 -07:00
Alexander Köplinger 780a0d58f6 [mini] Remove duplicate stubs from tramp-amd64/x86-gsharedvt.c
They already exist in arch-stubs.c and caused conflicts on the MSVC build.
2016-04-01 18:53:22 -07:00
Alexander Köplinger e612c5901f [msvc] Add missing files to MSVC project files 2016-04-01 18:49:15 -07:00
Alex Rønne Petersen 524a800e02 [mini] Fix build on systems without clock_nanosleep (). 2016-04-01 22:25:10 +02:00
Rodrigo Kumpera ef94cb1bc3 [jit] Handle verification failing with InvalidProgramException. Fixes #40040. 2016-04-01 13:15:56 -07:00
Zoltan Varga db5af7fe7e [runtime] Make a copy of the types passed to mono_mb_add_local () earlier since they could be transient. 2016-04-01 16:12:23 -04:00
Zoltan Varga af6179e584 [arm64] Fix clearing of stack traces when an exception is rethrown. Fix the calculation of struct sizes in pinvoke calls. Remove some dead code. 2016-04-01 16:03:28 -04:00
Andi McClure a59a008bf7 Continued profiler loading cleanup (PR#2816 follow up)
- Back out MONO_PROFILER_LIB_DIR change
- Profiler loading traces should use log mask “dll” not “asm”
- mono_dl_open_runtime_lib should preempt standard paths when loading
  profiler
- mono_dl_open_runtime_lib should check in profiler library directory
- mono_dl_open_runtime_lib contained a memory leak
- With above changes, ptestrunner.pl can remove some environment
  massaging
2016-04-01 15:39:38 -04:00
Rodrigo Kumpera 68cdee8103 Merge pull request #2825 from kumpera/loader_error_removal
GOOD RIDDANCE LOADER ERROR
2016-04-01 11:19:24 -07:00
Alexander Köplinger 372145ed24 Merge pull request #2826 from mattleibow/mono.options-update
[Mono.Options] Added support for Enums in the PCL version
2016-04-01 15:08:50 +02:00
Alexander Köplinger 670c746e7e [System.Web.Extensions] Add test for last fix 2016-04-01 14:11:03 +02:00
Jussi Sainio 5c8d6e96c1 [System.Web.Extensions] Use CultureInfo.InvariantCulture for number parsing
Fixes #4242, see bug comments. JsonSerializer seems to have been already
fixed in abe9dc62. The JsonDeserializer number conversion is now much
stricter, allowing only integer number style for integers and float number
style for floats.
2016-04-01 14:10:33 +02:00
monojenkins a7fb596803 Merge pull request #2805 from alexrp/profiler-sampling-thread2
[profiler] Use a background thread to send out sampling signals.

Previously, when using an interval timer, the initial profiling signal could be
delivered to *any* thread in the process. This is not normally a problem, but
if the signaled thread has not even finished its initialization inside libc, it
can happen that it hasn't even set up thread-local storage yet. We then blow up
spectacularly when trying to back up errno in the SIGPROF signal handler, as
it's a TLS variable. Even the SIGSEGV handler blows up immediately after as it
can't access JIT TLS data.

Since there appears to be no reliable and portable way for a library like Mono
to control which exact thread gets the initial timer signal, instead switch to
using a background thread that uses a high-resolution sleep and attempts to
switch itself to real time scheduling if possible. This way, we have full
control over which threads we send SIGPROF to, letting us avoid any threads
which aren't in a 'good' state for profiling.

This commit also gets rid of the multiplexing that was going on in the SIGPROF
signal handler, since we now send out the signals from a background thread. As
this was the only use of the async job API, that API has been removed. This
indirectly fixes the signal storming issue that sometimes popped up, where for
some reason multiple threads would think that they're the initiating thread,
resulting in way too many signals going out.

A nice side-effect of doing the signaling ourselves is that we can now use
real-time signals on systems that have them (e.g. Linux), resulting in a nearly
100% signal delivery rate in all cases. Previously, we would lose a tremendous
amount of signals when an application was under heavy load.
2016-04-01 08:00:18 +01:00
Zoltan Varga 01aa70d651 [arm64] Implement interruption checking in the trampoline code. 2016-04-01 00:27:53 -04:00
Matthew Leibowitz 3abbe5b7e6 [Mono.Options] Added support for Enums in the PCL version
- Support for String to Enum
 - Support for Number to Enum
 - Support for Flags to Enum
 - Added a UnitTest
2016-04-01 05:13:46 +02:00
Alex Rønne Petersen 2538a352f4 [profiler] Use a background thread to send out sampling signals.
Previously, when using an interval timer, the initial profiling signal could be
delivered to *any* thread in the process. This is not normally a problem, but
if the signaled thread has not even finished its initialization inside libc, it
can happen that it hasn't even set up thread-local storage yet. We then blow up
spectacularly when trying to back up errno in the SIGPROF signal handler, as
it's a TLS variable. Even the SIGSEGV handler blows up immediately after as it
can't access JIT TLS data.

Since there appears to be no reliable and portable way for a library like Mono
to control which exact thread gets the initial timer signal, instead switch to
using a background thread that uses a high-resolution sleep and attempts to
switch itself to real time scheduling if possible. This way, we have full
control over which threads we send SIGPROF to, letting us avoid any threads
which aren't in a 'good' state for profiling.

This commit also gets rid of the multiplexing that was going on in the SIGPROF
signal handler, since we now send out the signals from a background thread. As
this was the only use of the async job API, that API has been removed. This
indirectly fixes the signal storming issue that sometimes popped up, where for
some reason multiple threads would think that they're the initiating thread,
resulting in way too many signals going out.

A nice side-effect of doing the signaling ourselves is that we can now use
real-time signals on systems that have them (e.g. Linux), resulting in a nearly
100% signal delivery rate in all cases. Previously, we would lose a tremendous
amount of signals when an application was under heavy load.
2016-04-01 03:53:10 +02:00
Alexander Köplinger c642d898a4 [Mono.Security] Remove leftover .sources files 2016-04-01 02:34:44 +02:00
Rodrigo Kumpera b30ad2dbf0 [runtime] Remove mono_loader_clear_error, mono_loader_assert_no_error and set_failure_from_loader_error. The loader error is no more. 2016-03-31 17:23:26 -07:00
Rodrigo Kumpera c12dc0b86e [runtime] Remove mono_loader_get_last_error, nothing produces loader errors anymore. 2016-03-31 17:09:56 -07:00
Aleksey Kliger cd9b8eb791 [runtime] Set pending exception in icalls instead of raising. 2016-03-31 20:00:39 -04:00
Rodrigo Kumpera fd4f3021f2 [runtime] Remove mono_loader_error_prepare_exception, nothing can produce loader errors anymore. 2016-03-31 16:39:00 -07:00
Rodrigo Kumpera 38cf816b97 [runtime] Remove all functions that set the loader error. It's dead code now. 2016-03-31 16:10:57 -07:00
Rodrigo Kumpera b6a094f8c5 [mono-error] Remove mono_loader_set_error_from_mono_error, nothing uses it. 2016-03-31 15:53:33 -07:00
Rodrigo Kumpera c85824fde3 [mono-error] Since nothing sets the loader error anymore, mono_error_set_from_loader_error can be removed. 2016-03-31 15:44:37 -07:00
Zoltan Varga 4123f3b502 Fix warnings/remove dead code. 2016-03-31 18:28:47 -04:00
Zoltan Varga 470678dc5d Fix a warning. 2016-03-31 18:21:59 -04:00
Zoltan Varga 5fec6a7dec [runtime] Fix the arm linux build by using the fallback InterlockedCompareExchange64 () implementation for now. 2016-03-31 18:18:48 -04:00
Zoltan Varga fa825a2d91 [runtime] Fix some warnings/remove dead code. 2016-03-31 18:12:25 -04:00
Alexander Köplinger 9b8f1d125b [corlib] Ensure newline in .sources file
It causes build issues on .sources with #include on Linux otherwise.
2016-04-01 00:08:31 +02:00
Alexander Köplinger 3862b14cf9 [corlib] Fix monotouch_tv_runtime and monotouch_watch_runtime build 2016-04-01 00:02:04 +02:00
Martin Baulig ae77e5c4c4 Update X509CertificateImplApple to reflect latest X509CertificateImpl changes.
(cherry picked from commit 2fdfbe3479b0d3d24a5471ed7032eede80e58a2d)
2016-03-31 23:31:22 +02:00
Aleksey Kliger 35848e0338 [reflection] Fix leak in mono_reflection_get_custom_attrs_{by_type,data_checked}
If there's an error, first call mono_custom_attrs_free, then deal with
the error.
2016-03-31 17:26:19 -04:00
Aleksey Kliger b965e0e7a1 [security-core-clr] Fixup function signature to match header
mono_security_core_clr_ensure_reflection_access_method should return a
boolean now.
2016-03-31 17:25:28 -04:00
monojenkins 1c385f99e1 Merge pull request #2816 from xmcclure/profile-clean-0
Various cleanups on profiler

3 commits:

Assist on profiler module loading

- Add a MONO_PROFILER_LIB_DIR from which profiler modules are
  dynamically loading, in case it is not the normal library path
- Add information about profiler loading to mono_trace

Comments and clarity in proflog.c

- Add comments on structures
- Rename 'data' and 'data_end' to 'cursor' and 'buf_end' in LogBuffer/StatsBuffer as the old names were confusing
- Add new assert when processing samples

Improve a safety check when writing data into StatBuffer

- The safety check should occur such that if the new value for
StatBuffer::cursor is beyond the bounds of the StatBuffer, the cursor
is not updated.
2016-03-31 20:05:17 +01:00
monojenkins 58e8a9f851 Merge pull request #2810 from kumpera/fix_hazard_free
Fix hazard free

Replace usage of mono_thread_hazardous_free_or_queue and remove it.
    
    mono_thread_hazardous_free_or_queue has a fundamentally broken design.
    
    It allows arbitrary free code to run in the context of its caller.
    
    The sync/async split on where it's called is not enough to know whether
    we can run free'ing code or not.
    
    Since in sync context we called free functions that could take locks,
    it happened that those locks conflicted with the ones already taken.
    
    In particular, mono_jit_info_table_free did take a domain lock and
    quite a few of the sync context calls would hold locks that must
    not be held when taking a domain lock.
    
    This, is practice, means that we'd need to partition the free calls
    into 3 groups: async context, reentrant context (no runtime locks held)
    and sync context (maybe some locks held).
    
    There was no case where reentrant context would be usable meaning,
    in practice, that all calls happens in what effectively is async context
    where free functions can't be called.
    
    The new design is a lot more straightforward:
    
    - No implicit free queue pumping
    - A pair of free functions with well defined behavior.
    	mono_thread_hazardous_try_free - to be used where the caller expects the free function to be called
    	mono_thread_hazardous_queue_free - to be used where the caller don't expect the free function to be called [1]
    - Explicit pumping on places that known to be ok
    	Thread detach
    	Finalizer thread
    
    [1] This might sound like a weird condition, but a lot of lock-free code
    have compensation logic that trigger free'ing during lookups.
2016-03-31 20:00:19 +01:00
Zoltan Varga 5275f3f3c6 Fix warnings. 2016-03-31 14:12:05 -04:00
Zoltan Varga 39624a78c1 [gsharedvt] Change the --enable-gsharedvt configure option to a no-op, its always enabled by default. 2016-03-31 13:42:49 -04:00
Zoltan Varga 07c02c1568 [gsharedvt] Integrate mini-generic-sharing-gsharedvt.c into mini-generic-sharing.c. 2016-03-31 13:37:02 -04:00
Aleksey Kliger 7cce6e2585 [runtime] Use mono_object_isinst_checked
rather than mono_object_isinst.
2016-03-31 13:32:19 -04:00
Zoltan Varga d767b55064 [arm64] Fix passing of small gsharedvt argument on the stack on ios. Fixes #39528. 2016-03-31 13:24:48 -04:00
Zoltan Varga 56ad8f4e5d Merge pull request #2820 from kumpera/license-change-rebased
Change license and publish xamarin mono extensions
2016-03-31 13:18:26 -04:00
Rodrigo Kumpera 6ce453f2cf Update COPYING.LIB 2016-03-31 09:47:35 -07:00
Rodrigo Kumpera 5f05c5f3a2 [utils] Fix the build. 2016-03-31 09:12:22 -07:00
monojenkins df9c98dda1 Merge pull request #2394 from Mailaender/patch-1
Fixed runtime dependency on libgdiplus with developer soname

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34314.
2016-03-31 17:05:56 +01:00
hannakim123 b46e9c68a3 Update trademark 2016-03-30 18:40:40 -07:00
Miguel de Icaza e3a31c6854 Merge pull request #1 from xamarin/hannakim123-patch-1
Update for CLA
2016-03-30 18:24:09 -07:00
Rodrigo Kumpera 2ad72ecc3a [runtime] Cycle the finalizer thread if there are too many outstanding hazard pointers to free.
We add a callback to the HP so the GC can monitor the queue size and act on it.

The queue size was picked to keep the overhead limited even under high load.
2016-03-30 17:38:43 -07:00
iain holmes d1587ba5e6 [Profiler] Use the correct function to increment the refcount 2016-03-31 00:34:14 +01:00
Alexander Köplinger a41d501c72 Merge pull request #2807 from akoeplinger/gchandle
[corlib] Two small fixes for GCHandle
2016-03-31 00:36:57 +02:00
monojenkins e7319b9f58 Merge pull request #2786 from alexanderkyte/leaked_type_in_parse_header
[runtime] Free leaked short-lived MonoType
2016-03-30 22:11:01 +01:00
Andi McClure a80b7cc0a3 Improve a safety check when writing data into StatBuffer
The safety check should occur such that if the new value for
StatBuffer::cursor is beyond the bounds of the StatBuffer, the cursor
is not updated.
2016-03-30 17:09:08 -04:00
Andi McClure 1f47c6ed5c Comments and clarity in proflog.c
- Add comments on structures
- Rename 'data' and 'data_end' to 'cursor' and 'buf_end' in
  LogBuffer/StatsBuffer as the old names were confusing
- Add new assert when processing samples
2016-03-31 12:34:08 -04:00
Andi McClure a29d7015b9 Assist on profiler module loading
- Add a MONO_PROFILER_LIB_DIR from which custom profilers are
  dynamically loaded, in case it is not the normal library path
- Modify mono/profiler make check to use MONO_PROFILER_LIB_DIR
  (this fixes a bug where it would sometimes load the wrong profiler)
- Add information about profiler loading to mono_trace
2016-03-31 11:02:21 -04:00
Vlad Brezae 3e69ff3ae7 Merge pull request #2799 from BrzVlad/fix-conc-card-clean
[sgen] Fix concurrent card clean
2016-03-31 02:54:57 +07:00
monojenkins d9ccfc181c Merge pull request #2808 from lambdageek/dev/monoerror-security-core-clr
[security-core-clr] Use MonoError outarg instead of mono_raise_exception
2016-03-30 20:25:17 +01:00
Zoltan Varga 3df894d8e8 Merge pull request #2812 from madewokherd/threadpool-ms-rand
[threadpool-ms] Fix incorrect use of mono_rand.
2016-03-30 15:13:02 -04:00
Vincent Povirk b4a74942ad [threadpool-ms] Fix incorrect use of mono_rand.
This takes a pointer to an RNG handle, not the handle itself.
2016-03-30 11:16:12 -05:00
Marcos Henrich ff49850dfc Merge pull request #2698 from esdrubal/iosxmlarray
[System.Runtime.Serialization] Static writer fix.
2016-03-30 11:57:56 +01:00
Marcos Henrich f41e857d3f Merge pull request #2763 from esdrubal/mono-symbolicate-standalone2
Mono-symbolicate standalone
2016-03-30 08:55:15 +01:00
Marcos Henrich 028a573cd2 Merge pull request #2787 from esdrubal/endpointaddress10
[System.ServiceModel] Fixes reflection call to undefined method
2016-03-30 08:37:40 +01:00
Rodrigo Kumpera a01fb8227b Merge pull request #2781 from alexanderkyte/inflated_method_header_leak
[runtime] Fix leaking of inflated method headers
2016-03-29 17:15:24 -07:00
hannakim123 e28866dc55 Update CONTRIBUTING.md 2016-03-29 16:07:39 -07:00
Vlad Brezae 36a31a578e [sgen] Fix logging of major heap size with concurrent sweep
We used to log the major heap size before the sweep job finished. Remove the major heap logging at collection end time and add a separate log entry at sweep finish time.
2016-03-30 02:07:14 +03:00
Vlad Brezae 612fe5e1c6 [sgen] Fix log for last collection los memory usage 2016-03-30 01:49:54 +03:00
Rodrigo Kumpera 4778bd3064 [sgen] Don't pump the hazard free queue from sgen, the finalizer thread does it now. 2016-03-29 15:25:07 -07:00
Rodrigo Kumpera 45a08e331f [utils] Replace usage of mono_thread_hazardous_free_or_queue and remove it.
mono_thread_hazardous_free_or_queue has a fundamentally broken design.

It allows arbitrary free code to run in the context of its caller.

The sync/async split on where it's called is not enough to know whether
we can run free'ing code or not.

Since in sync context we called free functions that could take locks,
it happened that those locks conflicted with the ones already taken.

In particular, mono_jit_info_table_free did take a domain lock and
quite a few of the sync context calls would hold locks that must
not be held when taking a domain lock.

This, is practice, means that we'd need to partition the free calls
into 3 groups: async context, reentrant context (no runtime locks held)
and sync context (maybe some locks held).

There was no case where reentrant context would be usable meaning,
in practice, that all calls happens in what effectively is async context
where free functions can't be called.

The new design is a lot more straightforward:

- No implicit free queue pumping
- A pair of free functions with well defined behavior.
	mono_thread_hazardous_try_free - to be used where the caller expects the free function to be called
	mono_thread_hazardous_queue_free - to be used where the caller don't expect the free function to be called [1]
- Explicit pumping on places that known to be ok
	Thread detach
	Finalizer thread

[1] This might sound like a weird condition, but a lot of lock-free code
have compensation logic that trigger free'ing during lookups.
2016-03-29 15:09:49 -07:00
Aleksey Kliger bed8d586bd [security-core-clr] Add MonoError arg to
mono_security_core_clr_ensure_delegate_creation
2016-03-29 17:13:31 -04:00
Aleksey Kliger a55ec50a2e [security-core-clr] Add MonoError arg to mono_security_core_clr_ensure_reflection_access_method 2016-03-29 17:13:31 -04:00
Aleksey Kliger 4054000d9b [security-core-clr] Add MonoError to mono_security_core_clr_ensure_reflection_access_field 2016-03-29 17:13:31 -04:00
monojenkins ac22997313 Merge pull request #1718 from madewokherd/sgenthreadcleanup
[sgen] Clean up thread pool on shutdown.

Keeping threads around can cause processes to keep running when they shouldn't, particularly on Windows when the entry point returns.

(The reason this is important for me is that Wine provides _CorExeMain, which is an entry point that does return, unlike normal compiled C programs which appear to call exit() after main() returns. A Windows process doesn't exit until ALL threads have exited, so a thread that never exits means a hung process.)

It doesn't seem like we have other GC-specific cleanup code, so I don't know if this is a good approach. Feedback on that question would be appreciated.
2016-03-29 21:01:05 +01:00
Rodrigo Kumpera 0111cdec77 [util] Add mono_thread_hazardous_try_free and mono_thread_hazardous_queue_free.
Those two functions are intended to replace mono_thread_hazardous_free_or_queue.

The problem with that function is that it doesn't compose well given it forces
the whole call chain leader to a free call to follow its semantics.

Additionally, it's not enough safety to be in sync context to call the free functions
as they introduce reentrancy - they can be called from any other arbitrary free
call that doesn't claim to be in async context.

Given most data structures, in general, can't guarantee how they are used, they
must make the conservative assumption of being in async context, thus not allowing
any form of locking happening.
2016-03-29 11:41:37 -07:00
Zoltan Varga 136dd01035 [tests] Force tests to print thread dumps when they time out. 2016-03-29 14:32:09 -04:00
Vlad Brezae e097ce5111 Merge pull request #2801 from BrzVlad/feature-conc-cementing
[sgen] Cementing for the finishing pause
2016-03-30 00:45:10 +07:00
Rolf Bjarne Kvinge 854a162cf9 [corlib] Remove local variables inadvertently overriding class variables. 2016-03-29 19:05:59 +02:00
Rolf Bjarne Kvinge ae933c1979 [corlib] Add Console.[Input|Output]Encoding to the mobile profiles. 2016-03-29 18:38:00 +02:00
monojenkins 9bfe20cb4e Merge pull request #2794 from xmcclure/win-aot-basic
Make AOT compilation on 64 bit windows produce executables

This PR contains three commits (see commit descriptions) which:

- Fix 64-bit debug windows builds in MSVC 2015
- Make it possible to use the tool-prefix aot option with mono/mini make fullaotcheck (necessary if you are in cygwin and wish to invoke `x86_64-w64-mingw32-gcc`)
- Change mini so that `--aot=full` successfully emits 64-bit windows executables.

Building 32 bit executables will generally fail because we do not follow cdecl. The 64 bit executables do not run properly when executed.
2016-03-29 17:31:13 +01:00
monojenkins 4da080e2e8 Merge pull request #2767 from lambdageek/dev/monoerror-mono_lookup_dynamic_token
[runtime] MonoError-ize mono_loookup_dynamic_token{,_class}

Push `MonoError` through `mono_lookup_dynamic_token_class` and `mono_lookup_dynamic_token`

Also simplify the implementations of those functions so that they call `mono_reflection_lookup_dynamic_token` directly, rather than via a function pointer.  The old implementation was a holdover from when the runtime was implemented as separate libraries.
2016-03-29 16:15:20 +01:00
Alexander Köplinger a3e3f1d9cc [runtime] Use mono_object_isinst_checked for ppc and ia64
The usages were only partially changed in the move from mono_object_isinst in fbe1210790 and caused build errors.
2016-03-29 15:02:59 +02:00
Marek Safar 3391892e5c Bump referencesource 2016-03-29 13:24:32 +02:00
Marcos Henrich 8a1e9242f6 [System.Runtime.Serialization] Static writer fix.
While serializing any type into a contract member of type object an
exception would be thrown.

To avoid this XmlObjectSerializerWriteContext.InternalSerialize should
in this case be called using the object type instead of the member type,
similar how reference sources does in  type instead of the member type,
 referencesources seems to be doing omething similar [1].

Fixes #37116.

[1]
http://referencesource.microsoft.com/#System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs,619
2016-03-29 10:09:38 +01:00
Marek Safar 12b712c891 Merge pull request #896 from echampet/webresource
[Fix] ReusableHashAlgorithm doesn't set the Key of the ValidationAlgorit...
2016-03-29 09:33:39 +02:00
Vlad Brezae f93136b18b [sgen] Binary protocol entry for sweep finish 2016-03-29 09:10:30 +03:00
Vlad Brezae 7efe0456a3 [sgen] Clear the card table in the finishing pause
It is not used during a major collection. The collector will add the necessary global remsets afterwards, for the nursery collections.
2016-03-29 08:47:57 +03:00
Zoltan Varga 10c1f67904 [bcl] Avoid printing debug messages to stdout in the default trace listener when a debugger is connected. Fixes #13538. 2016-03-28 21:46:23 -04:00
Zoltan Varga 80ed8ebf3d [amd64] Avoid passing the pc/pc offset to the throw corlib exception trampoline in llvm mode, instead simply use the return address pushed by the call itself. In JIT mode, this is needed because the throw code is generated out of line so its not inside the try range, but in llvm mode, the try-range encompasses the call. 2016-03-28 20:44:40 -04:00
Miguel de Icaza 6beacc62c8 Update LICENSE including GPL 2016-03-28 17:36:53 -07:00
Miguel de Icaza 71f79f97bb Move all licenses to a single LICENSE file 2016-03-28 16:16:51 -07:00
Miguel de Icaza ad5eb0eca3 No more LGPL requirements 2016-03-28 16:16:47 -07:00
Miguel de Icaza bbcdd9e703 Added PATENTS.TXT file and link to it 2016-03-28 16:16:43 -07:00
Miguel de Icaza bf1a1fac5e Update LICENSE 2016-03-28 16:16:39 -07:00
Miguel de Icaza ef0ddf45c3 First set of licensing changes 2016-03-28 16:16:27 -07:00
Rolf Bjarne Kvinge 8831ab4f6b [System] Add new 'Mono.Security.Interface.MonoTlsProviderFactory' callback to let the framework libraries select the provider at runtime.
List of original contributors:

Martin Baulig <[email protected]>
2016-03-28 15:51:37 -07:00
Rolf Bjarne Kvinge 188ec88f30 Extend HttpClient to use infrastructure in Xamarin.Mac (via reflection) to pick right type.
List of original contributors:

Chris Hamons <[email protected]>
2016-03-28 15:51:36 -07:00
Rolf Bjarne Kvinge 4c368c394e [corlib] Add partial EncodingHelper type to let XI define its own default encoding [#29928]
List of original contributors:

Sebastien Pouliot <[email protected]>
2016-03-28 15:51:36 -07:00
Rolf Bjarne Kvinge dc79f64c7e [corlib] New lazily initialized X509Certificate.
List of original contributors:

Martin Baulig <[email protected]>
2016-03-28 15:51:35 -07:00
Rolf Bjarne Kvinge 0f0be91eae [corlib] Add a special method for XI so the linker does not always have to generate it.
List of original contributors:

Sebastien Pouliot <[email protected]>
2016-03-28 15:51:34 -07:00
Rolf Bjarne Kvinge e5a6537cc5 [corlib] Add back System/Guid.MonoTouch.cs implementation.
This is a partial reversal of 82a1747f (for this file only).
2016-03-28 15:51:34 -07:00
Rolf Bjarne Kvinge 77fb5c9ec4 [corlib] Add iOS specific code for System.Environment.
List of original contributors:

Sebastien Pouliot <[email protected]>
Rolf Bjarne Kvinge <[email protected]>
2016-03-28 15:51:33 -07:00
Rolf Bjarne Kvinge 437d77b5e7 [bcl] Add CommonCrypto to corlib, Mono.Security and System.Core.
List of original contributors:

Sebastien Pouliot <[email protected]>
Rolf Bjarne Kvinge <[email protected]>
Marek Safar <[email protected]>
Miguel de Icaza <[email protected]>
2016-03-28 15:51:33 -07:00
Rodrigo Kumpera cd5c13c980 [jit] Add native-types and enable them by default. Missing test suite.
List of original contributors:

Zoltan Varga <[email protected]>
Rodrigo Kumpera <[email protected]>
2016-03-28 15:51:30 -07:00
Zoltan Varga 5d10499fd6 [jit] Pass the type token index instead of the full type token to the throw corlib exceptions functions on most platforms to reduce the size of the generated code. 2016-03-28 18:33:58 -04:00
Rodrigo Kumpera 3cd04f9719 [jit] Add arm64 backend and gsharedvt code.
List of original contributors:

Zoltan Varga <[email protected]>
Rodrigo Kumpera <[email protected]>
Andi McClure <[email protected]>
Vlad Brezae <[email protected]>
Joao Matos <[email protected]>
Alex Rønne Petersen <[email protected]>
2016-03-28 15:31:39 -07:00
Rodrigo Kumpera 0050877abe [mini] Add x86 gsharedvt.
List of original contributors:

Zoltan Varga <[email protected]>
Joao Matos <[email protected]>
2016-03-28 15:31:38 -07:00
Rodrigo Kumpera 4622c081cd [jit] Implement gsharedvt on arm.
List of original contributors:

Zoltan Varga <[email protected]>
Joao Matos <[email protected]>
2016-03-28 15:31:38 -07:00
Rodrigo Kumpera 8cd0189fa3 [runtime] Move gsharedvt to public plus amd64 implementation.
List of original contributors:

Zoltan Varga <[email protected]>
Rodrigo Kumpera <[email protected]>
Andi McClure <[email protected]>
2016-03-28 15:31:32 -07:00
Rodrigo Kumpera a3d1c706e4 [mini] Try to use libcorkscrew or libunwind on Android when crashing.
List of original contributors:

Alex Rønne Petersen <[email protected]>
2016-03-28 13:36:41 -07:00
monojenkins 52cb2c951a Merge pull request #2798 from BrzVlad/fix-sgen-timestamp
[sgen] Fix sgen binary protocol timestamp

TV_ELAPSED was cast to long instead of gint64, overflowing on some platforms.
2016-03-28 21:12:07 +01:00
Zoltan Varga 98cd89232b [bcl] Avoid 'sed: net_4_x_System.ServiceModel_test.dll.excludes: No such file or directory' warnings during the build. 2016-03-28 16:02:05 -04:00
Zoltan Varga ed0fc118cb [arm] In the llvm throw corlib exception trampoline, use the normal caller ip instead of the argument passed in by the caller since that might not point directly to the call instruction. Fixes #39420. 2016-03-28 15:50:35 -04:00
Rodrigo Kumpera 43d2aed644 [runtime] Add runtime support for explicit offset files.
Explicit offset files are provided by configuring mono with --with-cross-offsets

List of original contributors:

Joao Matos <[email protected]>
Zoltan Varga <[email protected]>
Rolf Bjarne Kvinge <[email protected]>
Rodrigo Kumpera <[email protected]>
2016-03-28 12:48:20 -07:00
Rodrigo Kumpera 2d42e41af6 [runtime] Add cross helpers that both check offsets and produce headers.
List of original contributors:

Rodrigo Kumpera <[email protected]>
Zoltan Varga <[email protected]>
2016-03-28 12:48:19 -07:00
Rodrigo Kumpera 94f49405a1 [utils] Workarounds for 64bits atomics on mobile.
List of original contributors:

Rodrigo Kumpera <[email protected]>
Alex Rønne Petersen <[email protected]>
Zoltan Varga <[email protected]>
Rolf Bjarne Kvinge <[email protected]>
2016-03-28 12:48:19 -07:00
Rodrigo Kumpera 5de88ab307 [utils] Fix name clash on dlmalloc on x86 android devices. Fixes #13957
Android uses dlmalloc within bionic. For some reason, our x86 build
links against the libc implementation instead of our own.

This leads us allocating memory that is not executable which made
dynamic methods fail when executing.

List of original contributors:

Rodrigo Kumpera <[email protected]>
2016-03-28 12:48:19 -07:00
Zoltan Varga b4d7399768 [runtime] Make an argument name more descriptive. 2016-03-28 15:48:08 -04:00
Rodrigo Kumpera 2a7be75dfb [android] Add fallback for thread bounds calculation for Android.
On some junk Samsung x86 device, pthread_attr_getstack is completely broken.

If the returned value is not sane, we parse /proc/self/maps to find the right
memory regions for the current stack.

Fixes BXC #21550 and DESK #83333.

List of original contributors:

Rodrigo Kumpera <[email protected]>
2016-03-28 12:47:38 -07:00
Rodrigo Kumpera bebc7dd658 Merge pull request #2797 from kumpera/android_krait_bug
[android] Fix Krait CPU bug on Android.
2016-03-28 12:08:43 -07:00
monojenkins 1c6b82896f Merge pull request #2785 from alexanderkyte/cached_info_leak
[runtime] Free cached_info tables on cleanup
2016-03-28 19:56:03 +01:00
Alexander Köplinger d69f4d14e9 [corlib] Two small fixes for GCHandle
1) Free() throws on MS.NET when the handle was already freed, copied and adapted the referencesource implementation.

2) Explicit conversion from IntPtr to GCHandle throws InvalidOperationException when value is IntPtr.Zero on MS.NET, not ArgumentException.

This fixes two failing CoreCLR test cases.
2016-03-28 20:00:57 +02:00
Vlad Brezae bc17db4c90 [sgen] Cement objects for the finishing pause
With the concurrent collector, we used to reset cementing at the start of the finishing pause (we can uncement since we process all the remsets when the world is stopped, through the mod union entries). This processing means cardtable scan in the finishing pause. In order to reduce pause time and overhead, we extend cementing for the finishing pause. Now we don't uncement objects (during sgen_cement_reset) that are still pinned in the roots at the start of the concurrent collection. We won't mark mod_union entries for these objects and they will survive the collection in the nursery. They can become uncemented at the start of the next major collection, given that they are no longer pinned in the roots.
2016-03-28 20:56:27 +03:00
Vlad Brezae e222e31395 [sgen] Don't scan the roots on the worker
We used to enqueue the jobs on the worker only for us to wait for them to finish in the same pause.
2016-03-28 20:32:35 +03:00
Aleksey Kliger 497f16a441 [runtime] MonoError-ize mono_lookup_dynamic_token 2016-03-28 12:37:35 -04:00
Aleksey Kliger 1c96b12e8a [runtime] MonoError-ize mono_lookup_dynamic_token_class
It just calls mono_reflection_lookup_dynamic_token directly.
2016-03-28 12:37:35 -04:00
Aleksey Kliger 10745c153b [runtime] Remove MonoLookupDynamicToken indirection
Call mono_reflection_lookup_dynamic_token directly from
mono_lookup_dynamic_token.

Delete mono_install_lookup_dynamic_token () and the
MonoLookupDynamicToken typedef.
2016-03-28 12:37:35 -04:00
Aleksey Kliger 96373eb62e [reflection] MonoError-ize mono_reflection_lookup_dynamic_token
Since it gets installed as a callback, update the MonoLookupDynamicToken typedef.
2016-03-28 12:37:35 -04:00
Aleksey Kliger 9cc0c474c6 [SRE] Fix compile warning in encode_cattr_value
Landed mono_object_isinst_checked PR in a way that broke encode_cattr_value.
2016-03-28 12:36:07 -04:00
Vlad Brezae e899317ec2 [sgen] Fix sgen binary protocol timestamp
TV_ELAPSED was cast to long instead of gint64, overflowing on some platforms.
2016-03-28 19:34:38 +03:00
Vlad Brezae 4dba3647b8 Merge pull request #2621 from BrzVlad/feature-conc-preclean
[sgen] Concurrent precleaning of card table
2016-03-28 23:26:08 +07:00
Aleksey Kliger (λgeek) d86a194f61 Merge pull request #2795 from lambdageek/dev/marshal-no-raise
[marshal] Don't raise an exception, just assert
2016-03-28 11:27:36 -04:00
monojenkins c92b046a66 Merge pull request #2770 from lambdageek/dev/monoerror-object_isinst_mbyref
[runtime] MonoError-ize mono_object_isinst{,_mbyref}

Also mark them external only.  Runtime should use mono_object_isinst_mbyref_checked and mono_object_isinst_checked
2016-03-28 15:45:22 +01:00
Zoltan Varga c60098a18a [aot] Emit a .subsections_via_symbols directive on arm. 2016-03-27 20:45:07 -04:00
Zoltan Varga 8c52b398c5 [aot] Fix a memory leak. 2016-03-27 18:49:57 -04:00
Zoltan Varga a24d194910 [runtime] Avoid setting klass->instance_size if its already set, this can happen when loading cached class info from an AOT image. This could lead to random crashes/asserts since klass->instance_size is directly modified while it is computed. 2016-03-27 18:43:37 -04:00
Zoltan Varga b97ac00232 [runtime] Fix a memory leak in ves_icall_Type_GetNestedTypes (). 2016-03-27 18:43:37 -04:00
Alexander Köplinger 19f7526091 Merge pull request #2779 from akoeplinger/fix-socket-closed
[System] Use Monitor.Wait/Pulse in SafeSocketHandle instead of Thread.Sleep
2016-03-27 17:33:48 +02:00
Alexander Köplinger c44bb41913 [System] Use Monitor.Wait/Pulse in SafeSocketHandle instead of Thread.Sleep
We are quite frequently seeing an error on the ARM workers on Jenkins:

```
Test Case Failures:
1) MonoTests.System.Net.Sockets.SocketTest.SendAsyncFile : System.Exception : Could not abort registered blocking threads before closing socket.
at System.Net.Sockets.SafeSocketHandle.ReleaseHandle () [0x000be] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs:77
at System.Runtime.InteropServices.SafeHandle.DangerousReleaseInternal (Boolean dispose) <0x42cb0050 + 0x0020b> in <filename unknown>:0
at System.Runtime.InteropServices.SafeHandle.InternalDispose () <0x446ba758 + 0x00023> in <filename unknown>:0
at System.Runtime.InteropServices.SafeHandle.Dispose (Boolean disposing) [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/runtime/remoting/callcontext.cs:804
at System.Runtime.InteropServices.SafeHandle.Dispose () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/runtime/remoting/callcontext.cs:795
at System.Net.Sockets.Socket.Dispose (Boolean disposing) [0x00047] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/Socket.cs:3321
at System.Net.Sockets.Socket.Dispose () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/Socket.cs:3327
at System.Net.Sockets.Socket.Close () [0x00007] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/System.Net.Sockets/Socket.cs:3256
at MonoTests.System.Net.Sockets.SocketTest.SendAsyncFile () [0x000e7] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs:4331
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003d] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs:103
```

Let's see if implementing the suggestion from https://github.com/mono/mono/pull/1612/files#r26393224
fixes this. I couldn't reproduce the test failure even on the same ARM machine so this is a bit of
an opportunistic change, but it feels like the more "correct" solution anyway.

I decided to inline AbortRegisteredThreads as at the only place we're calling it we already know
blocking_threads can't be null and acquired the lock.
2016-03-27 03:59:26 +02:00
monojenkins 26c35ad402 Merge pull request #2789 from lambdageek/dev/monoerror-threading
[threadpool-ms] MonoError-ize

1. Convert icalls that throw `NotImplementedException` to do it via mono_error_set_pending_exception
2. Add MonoError outargs to `mono_threadpool_ms_enqueue_work_item` and `mono_threadpool_ms_begin_invoke`
2016-03-26 01:41:10 +00:00
Aleksey Kliger fbe1210790 [runtime] MonoError-ize mono_object_isinst
Mark it external only. Runtime should use mono_object_isinst_checked.
2016-03-25 18:11:12 -04:00
Aleksey Kliger 63ac55e2eb [threadpool-ms] MonoError-ize mono_threadpool_ms_begin_invoke 2016-03-25 17:23:01 -04:00
monojenkins 8e7561bc87 Merge pull request #2748 from lambdageek/dev/monoerror-mono_value_box
[runtime] Make mono_value_box use MonoError

Mark it external only.  Runtime should use mono_value_box_checked.
2016-03-25 20:55:38 +00:00
Aleksey Kliger 6be18d1f6c [runtime] MonoError-ize mono_object_isinst_mbyref
Also mark it external only.  Runtime should use mono_object_isinst_mbyref_checked
2016-03-25 15:36:47 -04:00
Aleksey Kliger 9f0dd935da [MonoError] change mono_error_set_pending_exception to return a bool
Return TRUE if pending exception was set, FALSE otherwise.

The idea is that you can write:
  if (mono_error_set_pending_exception (error)) {
    /* cleanup */
    return;
  }
2016-03-25 15:36:46 -04:00
Rodrigo Kumpera e3b4f547ec [android] Fix Krait CPU bug on Android.
Krait cpus don't ignore thumb ITT state in ARM mode (it's unspecified CPU behavior).
The linux kernel then didn't bother resetting that state when landing an ARM signal handler.

The end result was that Krait cpus would skip the first few instructions of the signal handler
and things would explode in the most amazing possible ways.

Patch by Mark Probst <[email protected]>.
2016-03-25 15:23:15 -04:00
Aleksey Kliger ca72936e8f [marshal] Don't raise an exception, just assert
Don't raise deep in the marshalling code, just assert.

(Raising means we'd have to convert the code to use MonoError and then
thread it out through all of the marshalling code resulting in a lot of
code churn)
2016-03-25 13:30:38 -04:00
Aleksey Kliger 7962352afa [runtime] MonoError-ize mono_nullable_box 2016-03-25 13:01:26 -04:00
Aleksey Kliger 31d655b5e3 [runtime] Make mono_value_box use MonoError
Mark it external only.  Runtime should use mono_value_box_checked.
2016-03-25 13:01:26 -04:00
Aleksey Kliger f86ab8b8a5 [threadpool-ms] MonoError-ize mono_threadpool_ms_enqueue_work_item
Take a MonoError outarg; return boolean on success/failure.
2016-03-25 11:38:19 -04:00
Aleksey Kliger c83750365f [threadpool-ms] MonoError-ize some not implemented icalls.
1. ves_icall_System_Threading_ThreadPool_ReportThreadStatus
2. ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus
2016-03-25 11:38:19 -04:00
Aleksey Kliger (λgeek) ac0cc68b7f Merge pull request #2791 from lambdageek/dev/monoerror-cleanup-deadcode
[runtime] Remove dead code and don't throw in embedding API functions
2016-03-25 11:33:37 -04:00
Vlad Brezae b555a68a06 [sgen] Add option for enabling/disabling precleaning 2016-03-25 02:12:57 +02:00
Vlad Brezae ff9488f11f [sgen] Preclean mod union entries before the finishing pause
When the concurrent mark ends, we have another concurrent phase where we scan the cardtable trying to clean as many cards as possible. The way we achieve this is by first copying all the mod union cards (for each block/los_obj) to a separate temporary card_table. When scanning we will only scan these cards. Therefore we will first preclean these cards in the actual mod_union card_tables, followed by a full memory barrier (which assures us that, when scanning, we will observe the changes that led to the corresponding card marks) and then by a normal mod_union scan, which can remark some of these cards, without any races with the preclean phase.
2016-03-25 02:12:57 +02:00
Vlad Brezae 93bc7c02fe [sgen] Move assert to the right place 2016-03-25 02:12:57 +02:00
Vlad Brezae f457f41dcb [runtime] Enclose define parameters in parentheses 2016-03-25 02:12:57 +02:00
Vlad Brezae 6a712c9d4e [sgen] Add separate scan function for handling a single pointer entry
This way we avoid duplicating cardtable marking code, making sure we have consistent code.

For example, when scanning los objects in the mod union scan step, we didn't check whether the object is cemented or not, leading to additional unnecessary global remsets for the next nursery collection.
2016-03-25 02:12:57 +02:00
Vlad Brezae 15fc3dabbc [sgen] Move scan vtype with the other object ops 2016-03-25 02:12:56 +02:00
Vlad Brezae ffa21caf85 [sgen] Simplify defines for object ops 2016-03-25 02:12:56 +02:00
Vlad Brezae 411e560fa7 [sgen] Allow read only access on block list without taking GC_LOCK
Still, block list should not be accessed while sweep is running.
2016-03-25 02:12:56 +02:00
Vlad Brezae 67275f09c0 [sgen] Allow read only access of los object list without taking GC_LOCK
Still, object lists should not be accessed while sweep is running.
2016-03-25 02:12:56 +02:00
Vlad Brezae 33beedda93 [sgen] Extract the handle array code for reuse
We add a new data structure which contains a bucket of entries, exponentially increasing in sizes. The structure is customizable through a few callbacks.

Setting is_slot_set_func enables us to also lookup empty slots, instead of only adding entries at the end of the list.

Setting set_slot_func enables the use of a customized function for setting the slot. If this function is not set, the slots and array fields will be set directly, therefore the structure won't be thread safe.
2016-03-25 02:12:56 +02:00
Vlad Brezae 32ec26d7f4 [sgen] Don't prefetch unused memory when scanning the card table
When doing the mod union scan, we use the block's cardtable (instead of the global one), which we also cannot prefetch, since that would mean dereferencing the block info.
2016-03-25 02:12:56 +02:00
Alexander Köplinger a9a485768f Merge pull request #2793 from radical/fix-mcs-args
[mcs] Accept and ignore command line args supported by csc that we don't
2016-03-25 01:05:23 +01:00
Aleksey Kliger 86776605f7 [runtime] mark mono_domain_unload external only
Runtime should use mono_domain_try_unload
2016-03-24 19:29:09 -04:00
Aleksey Kliger 50f9712da2 [runtime] Remove CHECK_MONOTYPE macro
It's dead code.
2016-03-24 19:27:22 -04:00
Aleksey Kliger f92d01d3e1 [runtime] Delete mono_assert and mono_assert_not_reached
Runtime should use g_assert and g_assert_not_reached or set a MonoError,
as needed.

Also remove REAL_PRINT_REG dead macros from mini-x86.c and mini-amd64.c
2016-03-24 19:27:22 -04:00
Aleksey Kliger 21b44cc5e0 [runtime] Change mono_object_castclass_mbyref not to throw
Mark the function external only. (There are no uses inside the runtime).

Change behavior to return NULL if unable to cast, instead of throwing.
2016-03-24 19:27:22 -04:00
Aleksey Kliger (λgeek) 0589a490e0 Merge pull request #2790 from lambdageek/dev/monoerror-corlib-execeptions
[MonoError] Helpers for some common corlib exceptions
2016-03-24 19:19:49 -04:00
Andi McClure 9a0806c1b6 Make --aot=full able to emit executables on 64 bit Windows
- COFF does not use .local or .size
- COFF does use .def to mark functions and .data to mark data
- The seh_handler functions should not be called on full aot builds (Zoltan says they are unnecessary in full aot, and they attempt to jit)

The executables do not yet run without crashing.
2016-03-24 14:11:48 -07:00
Andi McClure 20c21e17ce Support tool-prefix in mono/mini fullaotcheck
* Support MONO_FULLAOT_ADDITIONAL_ARGS env var for make fullaotcheck, appended to --aot parameters
* To support above, permit "blank" parameters (ie trailing commas on parameter list) to --aot=
* --aot tool-prefix parameter now supported for LD as well as AS
2016-03-28 17:30:56 -04:00
Andi McClure de6acf94b5 Fix debug Windows builds in MSVC 2015
We were sometimes passing invalid input to isalnum(). On the debug version of MSVCRT this would result in an assert.
2016-03-28 17:26:09 -04:00
Zoltan Varga 12d24c694f [arm] Fix support for soft breakpoints. 2016-03-24 20:04:59 +00:00
Ankit Jain 22a512306a [mcs] Accept and ignore command line args supported by csc that we don't
support:

	/analyzer
	/appconfig
	/baseaddress
	/deterministic
	/errorendlocation
	/errorlog
	/features
	/link
	/moduleassemblyname
	/pathmap
	/pdb
	/preferreduilang
	/publicsign
	/reportanalyzer
	/ruleset
	/sqmsessionguid
2016-03-24 15:21:58 -04:00
Zoltan Varga 9e469ff9b0 [runtime] Make the appdomain-unload.exe test more verbose. 2016-03-24 12:49:47 -04:00
Zoltan Varga 81b0643704 [aot] Reenable the emission of line number info using GAS .file/.loc directives, recent versions of clang seems to support it. 2016-03-24 12:06:33 -04:00
Zoltan Varga ef24a9be0c [jit] Fix the dwarf info structure when there is no line number table. 2016-03-24 11:45:56 -04:00
Zoltan Varga f0527c1d77 [jit] Remove the 'appending' support from the dwarf writer, its no longer used. 2016-03-24 11:28:38 -04:00
Zoltan Varga 6a857be649 [jit] Get rid of the create_delegate_trampoline_data () helper function which only has one caller. 2016-03-24 11:28:38 -04:00
Aleksey Kliger (λgeek) 1e764e5c29 Merge pull request #2768 from lambdageek/dev/monoerror-cominterop
[com] MonoError-ize cominterop.c
2016-03-24 11:19:42 -04:00
Alexis Christoforides 8004de2b79 Merge pull request #2663 from esdrubal/islocal
[System] Fixes HttpListenerRequest.IsLocal.
2016-03-24 10:45:48 -04:00
Chris Hamons 6d65ef281b Create xammac_net_4_5 variant of System.Runtime.Remoting 2016-03-24 08:47:40 -05:00
Alexander Köplinger c5789eb523 Trigger a rebuild of Mono.Security 2016-03-24 03:11:47 +01:00
Martin Baulig 2b3bd83a8a [Mono.Security]: MonoTlsProvider.InvokeSystemCertificateValidator() now takes 'ref X509Chain'. 2016-03-23 19:47:13 -04:00
Martin Baulig 204435045c [System]: Add private 'X500DistinguishedName' API to store the canonical encoding and use it for fast comparison. 2016-03-23 19:47:05 -04:00
Martin Baulig 2ff8515937 [System]: SystemCertificateValidator.CheckUsage(): lazily convert to X509Certificate2 if needed. 2016-03-23 19:46:51 -04:00
Martin Baulig e75c32654e [System]: Make 'X509Certificate2' and 'X509Chain' lazily-initialized.
Add new internal 'X509Certificate2Impl' and 'X509ChainImpl' classes similar to
'X509CertificateImpl' in corlib and only initialize them when actually needed.
2016-03-23 19:44:56 -04:00
Martin Baulig a9fc9c628e [corlib]: Cleanup the internal 'X509CertificateImpl' API. 2016-03-23 19:44:55 -04:00
Zoltan Varga 2129176357 [ppdb] Disable the metadata verifier for ppdb tables for now. Fixes #39631. 2016-03-23 17:11:28 -04:00
Aleksey Kliger fc8d1f17fd [MonoError] Use mono_error_set_execution_engine helper 2016-03-23 15:11:48 -04:00
Aleksey Kliger 8ea690b721 [MonoError] Use mono_error_set_not_supported helper 2016-03-23 15:11:48 -04:00
Aleksey Kliger 652c720de4 [MonoError] Use mono_error_set_not_implemented helper 2016-03-23 15:03:25 -04:00
Aleksey Kliger b1ca6ff58a [MonoError] add helpers for some corlib exceptions
System.ExecutionEngineException
System.NotSupportedException
System.NotImplementedException
2016-03-23 15:00:16 -04:00
Alexander Kyte 86878c3516 [runtime] Make memory allocation for method headers consistent, stop leaking 2016-03-23 14:40:26 -04:00
Zoltan Varga dc612228c0 [man] Remove documentation for the nonexistent MONO_ENABLE_SHM environment variable. 2016-03-23 14:10:16 -04:00
Alexander Köplinger 256f554592 Merge pull request #2784 from mhutch/msbuild-fixes
Fix regressions in Microsoft.Build.dll
2016-03-23 16:43:24 +01:00
Marek Safar 17bfe86a0f [cil-stringreplacer] Use Cecil as reference dependency 2016-03-23 15:44:25 +01:00
Marek Safar 0dc62df603 [cil-stringreplacer] Update debug symbol 2016-03-23 13:09:15 +01:00
monojenkins 54bb28c8a7 Merge pull request #2783 from alexanderkyte/strdup_memory_leaks
[runtime] Fix memory leaks related to short-lived strings
2016-03-22 22:35:21 +00:00
monojenkins c116b85fb9 Merge pull request #2775 from lambdageek/dev/monoerror-reflection-icalls
[SRE] MonoError-ize some icalls

* Cleanup some memory that would leak on failure; improve a few error messages
* Add MonoError to `mono_reflection_call_is_assignable_to` and `fieldbuilder_to_mono_class_field`.
* Update several SRE icalls to follow the pattern:
  ```c
    void
    the_icall (args... )
    {
       MonoError error;
       (void) the_real_work_function (args..., &error);
       mono_error_set_pending_exception (&error);
    }
    
    static gboolean
    the_real_work_function (args..., MonoError *error)
    {
       ... /* return TRUE on success, FALSE and set error on failure */ ...
    }
  ```
  Do this to:
        1. `mono_reflection_register_with_runtime`
        2. `mono_reflection_setup_internal_class`
        3. `mono_reflection_create_internal_class`
        4. `mono_reflection_generic_class_initialize`
        5. `mono_reflection_event_builder_get_event_info`
        6. `mono_reflection_initialize_generic_parameter`
        7. `mono_reflection_create_dynamic_method`
2016-03-22 22:35:16 +00:00
Alexander Köplinger f6de55f558 Merge pull request #2782 from madewokherd/process-sessionid
[System.Diagnostics] Return dummy value from Process.SessionId.
2016-03-22 18:58:06 +01:00
Vincent Povirk b151d03acb [System.Diagnostics] Return dummy value from Process.SessionId. 2016-03-22 12:46:13 -05:00
Joao Matos 38d3186f9e [sgen] Switch the default GC bridge to the new mode. 2016-03-22 17:45:57 +00:00
Alexander Kyte 6e9d37ed8a [runtime] Free leaked short-lived MonoType 2016-03-22 13:19:50 -04:00
Mikayla Hutchinson e306282d71 [Microsoft.Build] Shut down single-use build manager 2016-03-22 12:06:19 -04:00
Marcos Henrich e1403cc11a Merge pull request #2764 from esdrubal/fileinfo_tostring
[corlib] Fix FileInfo.ToString after MoveTo
2016-03-22 14:41:18 +00:00
Marcos Henrich 07eed74767 [mono-symbolicate] Use SeqPointInfo instead of PInvoking. 2016-03-22 14:22:49 +00:00
Marcos Henrich 11aa99476b [mono-symbolicate] Created SeqPointInfo.cs
SeqPointInfo is a c# implementation of the debug data decoding process
that is done natively by the runtime.
2016-03-22 14:22:49 +00:00
Marcos Henrich dec4f74c28 [corlib] Removed unused icall
icall StackFrame.GetILOffsetFromFile is no longer used by mono-symbolicate.
2016-03-22 14:17:42 +00:00
Marcos Henrich 1802414280 [System.ServiceModel] Fixes reflection call to undefined method
This fixes an issue while using WCF on android.

Fixes #36080
2016-03-22 14:09:05 +00:00
Marcos Henrich 2dd061dd2d [System.ServiceModel] Test EndpointAddress10
The issue only occurs in monodroid.

Covers #36080
2016-03-22 14:09:04 +00:00
monojenkins 51d88a0dc5 Merge pull request #2534 from mhutch/install-api-html
Install mono-api-html

We install its counterpart mono-api-info already
2016-03-22 01:35:28 +00:00
Alexander Kyte 6c15399918 [runtime] Free cached_info tables on cleanup 2016-03-21 19:52:14 -04:00
Alexander Kyte 1283043d09 [runtime] Prevent leaking inflated headers by marking them transient, only free in one place. 2016-03-21 19:19:07 -04:00
Alexander Kyte d7c7e97981 [runtime] Make mono_basic_block_split take the header it uses 2016-03-21 19:19:07 -04:00
mhutch 3bf54b6ddf Install mono-api-html
We install its counterpart mono-api-info already
2016-03-21 18:07:36 -04:00
mhutch b9dedbdca5 [Microsoft.Build] Set IsBackground on builder thread
It should not prevent the process from terminating. Fixes
issue where the thread is not shut down if ProjectInstances
are built directly instead of via the build manager.
2016-03-21 18:03:02 -04:00
mhutch fb1ee67560 [Microsoft.Build] Fix exception disposing BuildManager 2016-03-21 18:03:02 -04:00
Alexander Kyte 6287948e23 [runtime] Remove string memory leak related to basename 2016-03-21 17:54:57 -04:00
Alexander Kyte 470887fae2 [runtime] Fix reassignment over string-pointing var without freeing 2016-03-21 17:54:48 -04:00
Andi McClure 50f2a10358 Merge pull request #2778 from xmcclure/checked-build-updates-2
Fix patch merge error in PR#2753, was breaking checked build
2016-03-21 10:27:40 -04:00
Andi McClure 4d1e42ce27 Fix patch merge error in PR#2753, was breaking checked build 2016-03-21 10:24:13 -04:00
Alexander Köplinger f7e403c72b Add note about acceptance-tests to top level README 2016-03-21 14:28:25 +01:00
Alexander Köplinger 969e00e1dd Fix "make dist" 2016-03-20 20:20:39 +01:00
Zoltan Varga a0149991af [gsharedvt] Add a test for #39528. 2016-03-19 23:19:00 +01:00
Zoltan Varga 3a271bbebc [runtime] Remove some dead test code added by c736aba5c9. 2016-03-19 15:52:20 +01:00
Zoltan Varga c736aba5c9 [runtime] Implement support for passing icall methods as delegates in pinvoke. Fixes #39347. 2016-03-19 13:03:31 +01:00
Zoltan Varga eac8dbdb77 [runtime] Remove an mistaken assert. Fixes #39568. 2016-03-19 12:21:15 +01:00
Zoltan Varga 6c6ab8c0db [jit] Remove an mistaken assert. Fixes #39746. 2016-03-19 12:11:20 +01:00
monojenkins 65e51c54aa Merge pull request #2777 from xmcclure/win-makefile-aotcheck
Make `make fullaotcheck` in mono/mini runnable on Windows

Run with  
MONO_EXECUTABLE=/path/to/msvc/mono.exe LIST_SEPARATOR=";"  
This assumes you are running the test harness in Cygwin and you built mono with MSVC. Also, the test does not currently succeed.  
Being able to run the test is a zeroth step toward making the test pass.
2016-03-19 01:30:17 +00:00
Alexander Köplinger 074266c4c7 [System.Net.Http] Make HttpClientTest.RequestUriAfterRedirect test more reliable
It was the only test in the class that required network access (for looking up xamarin.com in the redirect).
Replacing the redirect target with a second local HttpListener should be more resilient to network/DNS issues.
2016-03-19 02:28:20 +01:00
Andi McClure 9a1720e9ab mono/mini make fullaotcheck can now be run on Windows
Test harness now uses the proper path separator and also now supports
MONO_EXECUTABLE if you built with MSVC.
2016-03-18 18:24:41 -04:00
monojenkins 23fbdb6643 Merge pull request #2753 from xmcclure/checked-build-updates
Changes to "checked build" feature

Here are some changes to checked builds I made while trying to debug some coop gc problems. The changes made are:

- Replace the checked build configure flags with a single --enable-checked-build= flag
- Runtime environment variable required for checked build asserts to run
- Report the thread transition history for more kinds of asserts
- For the `mono_threads_reset_blocking` functions, add an assert that guarantees proper nesting

In addition to this, I have documented the checked build feature as implemented here, see my pull request for the website: https://github.com/mono/website/pull/187

Overall my goals with this patch were

- Make it easier to do rapid-fire testing with the checked builds (runtime switch, default-off)
- Make the checked build implementation more internally consistent (more uniform names etc)

Notice I do make the change that instead of checked build sub-features being disabled with a blacklist, you now must enable them with a whitelist. I think this is an improvement because it makes it easier to just casually keep a checked build around  (for one thing I would have the option to ship debug builds to users with the checked build modes included but dormant) but I could be talked out of it if this change turns out to be controversial. The only thing I feel strongly about is that if the configure flag is changed back to a blacklist the environment variable should switch to a blacklist also.

If we accept this change the CI bots will need to adopt the new configure flag and environment variable.
2016-03-18 22:00:34 +00:00
monojenkins 4a1dbf8e22 Merge pull request #2746 from lambdageek/dev/monoerror-mono_reflection_create_runtime_class
[System.Reflection.Emit] MonoError in mono_reflection_create_runtime_class

Depends on #2745
Bubble MonoError up to `mono_reflection_create_runtime_class`.  Use `mono_error_set_pending_exception` instead of `mono_error_raise_exception` And try to release resources on the way out.
2016-03-18 22:00:24 +00:00
Aleksey Kliger f52e4e1a9d [SRE] Refactor a few icalls
The icalls follow the pattern:
    void
    the_icall (args... )
    {
       MonoError error;
       (void) the_real_work_function (args..., &error);
       mono_error_set_pending_exception (&error);
    }

    static gboolean
    the_real_work_function (args..., MonoError *error)
    {
       ... /* return TRUE on success, FALSE and set error on failure */ ...
    }

Do this to:
1. mono_reflection_register_with_runtime
2. mono_reflection_setup_internal_class
3. mono_reflection_create_internal_class
4. mono_reflection_generic_class_initialize
5. mono_reflection_event_builder_get_event_info
6. mono_reflection_initialize_generic_parameter
7. mono_reflection_create_dynamic_method
2016-03-18 14:41:26 -07:00
Aleksey Kliger 8f1bee6746 [SRE] Some cleanups in mono_method_body_get_object_checked
Don't leak method header on failure.
2016-03-18 14:41:25 -07:00
Aleksey Kliger 1132d61ac2 [SRE] MonoError for fieldbuilder_to_mono_class_field 2016-03-18 14:41:24 -07:00
Andi McClure 173e2d4ce6 Add mono_threads_reset_blocking nesting checks to gc checked mode 2016-03-18 15:18:38 -04:00
Andi McClure c89d68e055 Rename checked build assertion_fail to mono_fatal_with_history, use in more places 2016-03-18 16:07:14 -04:00
monojenkins 1652651cf4 Merge pull request #2772 from WeiHeCN/master
Update mini-llvm.c

These header files are already included in mini-llvm-cpp.h.
2016-03-18 18:15:24 +00:00
WeiHeCN 617e374a51 Update mini-llvm.c 2016-03-18 11:40:41 +08:00
Aleksey Kliger c2d8f707aa [reflection] MonoError for mono_reflection_call_is_assignable_to 2016-03-17 14:46:02 -07:00
Aleksey Kliger cde8064664 [SRE] MonoError for mono_reflection_create_runtime_class
1. Don't raise while holding locks.

2. Change remove_instantiations_of_and_ensure_contents (called via
  g_hash_table_foreach_remove) to populate a MonoError instead of
  throwing.  If there are multiple errors, we just stash the first one
  in user_data and clean up the rest.

3. Use mono_erro_set_pending_exception instead of
  mono_error_raise_exception since it's an icall.
2016-03-17 14:44:23 -07:00
monojenkins ca7b692f45 Merge pull request #2745 from lambdageek/dev/monoerror-sre-internals
[System.Reflection.Emit] Propagate MonoError through some more static functions

Some externally visible changes include:
* Bubble MonoError up to one more SRE icall: `System.Reflection.Emit.CustomAttributeBuilder.GetBlob()`
* `fix_partial_generic_class` and `ensure_generic_class_runtime_vtable` now expect their callers to set the class failure state which they do under slightly more circumstances now than previously (now: whenever there's an error set from the above functions; before: only when we had trouble initializing the generic type definition.)
* Previous API for `mono_reflection_bind_generic_parameters` didn't make it clear whether NULL was a valid return value or not.  Now when we return NULL we always set the `error` out-arg. So non-NULL is success and NULL is failure.
2016-03-17 21:35:31 +00:00
Aleksey Kliger 36bd9d8839 [reflection] MonoError for mono_marshal_spec_from_builder 2016-03-17 11:12:55 -07:00
Aleksey Kliger e987b3ec4f [reflection] Mark mono_reflection_get_custom_attrs_blob external only.
The runtime should use mono_reflection_get_custom_attrs_blob_checked.
The icall is now ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob.
2016-03-17 11:12:55 -07:00
Aleksey Kliger 83d8c46875 [reflection] MonoError for resolve_object 2016-03-17 11:12:54 -07:00
Aleksey Kliger f77174ed85 [reflection] MonoError for ensure_complete_type 2016-03-17 11:12:54 -07:00
Aleksey Kliger 504495a40d [reflection] MonoError for mono_reflection_get_dynamic_overrides 2016-03-17 11:12:54 -07:00
Aleksey Kliger c7d2742b8a [reflection] MonoError for mono_reflection_method_get_handle 2016-03-17 11:12:54 -07:00
Aleksey Kliger 3b053ac4fd [SRE] Don't set failiure flag in ensure_generic_class_runtime_vtable
Leave it up to the caller to set the flag.
2016-03-17 11:12:54 -07:00
Aleksey Kliger fff7cecf59 [SRE] Don't set class failure in fix_partial_generic class
Leave it to callers to set it based on the MonoError.

Also return a boolean indicating whether we succeeded or failed.
2016-03-17 11:12:53 -07:00
Aleksey Kliger 57fd64fcf5 [reflection] MonoError for fix_partial_generic_class 2016-03-17 11:12:53 -07:00
Aleksey Kliger 4b33c812d4 [SRE] Use MonoError for mono_reflection_bind_generic_parameters
This commit also changes the behavior of
mono_reflection_bind_generic_parameters slightly: if the passed in class
isn't generic, it sets error and returns NULL.  (It wasn't clearly
previously whether NULL was an error condition or not - with this commit
we clarify that a NULL result is an error).
2016-03-17 11:12:53 -07:00
Aleksey Kliger 51791a4014 [reflection] Use MonoError in encode_{cattr_value,named_val} 2016-03-17 11:12:53 -07:00
Aleksey Kliger 904b13af1d [reflection] MonoError in get_{prop,field}_name_and_type 2016-03-17 11:12:53 -07:00
Aleksey Kliger 2dc5eeb616 [reflection] MonoError in parameters_to_signature
And a few other static fns
2016-03-17 11:12:52 -07:00
Marek Safar ff7d80856e [gacutil] Add support for pdb file 2016-03-17 17:13:18 +01:00
Marek Safar 84a447da80 [build] Fix more incomplete mcs references names 2016-03-17 17:07:30 +01:00
Marek Safar aa4ca12eb2 [mcs] Allow local variables and parameters on lhs of nameof expression. Fixes #39455 2016-03-17 16:58:44 +01:00
Ludovic Henry 6277ba55de [runtime] Fix potential overflow when using mono_msec_ticks
Because mono_msec_ticks would previously return the number of milliseconds since boot time, it would overflow after ~49 days. That would mean that anywhere you would use it, you would need to be careful of arithmetic overflow.

By simply returning a gint64 we will not overflow before ~30k years.

Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=38666
2016-03-17 14:46:05 +00:00
Ludovic Henry 12ff2e4514 [io-layer] Remove dead code 2016-03-17 14:44:19 +00:00
Alexander Köplinger 8754b987e4 [mono] Remove al2/dmcs from TEST_SUPPORT_FILES too 2016-03-17 14:12:26 +01:00
Alexander Köplinger 3a403c38d8 [mono] Remove dmcs from temp install folder 2016-03-17 14:04:00 +01:00
Marek Safar d053f6600d [mono] Remove al2 from temp install folder 2016-03-17 13:57:35 +01:00
Alexander Köplinger 32c2049b85 [acceptance-tests] Bump ms-test-suite to pick up 4a95604fdf2c0523e68eaad64a17d22eebb051b3: 2016-03-17 13:55:42 +01:00
Zoltan Varga 3736375ac2 [runtime] Cleanup the debug info module before the images module since ppdb debug info depends on images. Fixes #39715. 2016-03-17 12:06:02 +01:00
Zoltan Varga 0b134076cf [ppdb] Avoid an assert if the ppdb image has an empty guid heap, it can happen if the assembly has no types thus no document guids. Fixes #39644. 2016-03-17 11:33:07 +01:00
Zoltan Varga 59887e3736 [arm] Avoid storing fp arguments below the stack pointer if the param area has size 0. Fixes #38161. 2016-03-17 11:14:53 +01:00
Marek Safar 07facde9a2 Bump referencesource 2016-03-17 10:23:49 +01:00
Aleksey Kliger dccb74f08a [com] Push MonoError through cominterop_get_ccw 2016-03-16 16:13:48 -07:00
Aleksey Kliger 85f8a3290f [com] Push MonoError through cominterop_get_idispatch_for_object 2016-03-16 16:13:47 -07:00
Aleksey Kliger e8011b9b9b [com] Push MonoError through cominterop_get_interface 2016-03-16 16:13:47 -07:00
Aleksey Kliger (λgeek) 11d21b86d2 Merge pull request #2766 from lambdageek/dev/monoerror-jit
[runtime] Propagate error from class loading when JIT-ing
2016-03-16 15:24:00 -07:00
Aleksey Kliger 43257ac125 [com] Change cominterop_raise_hr_exception to cominterop_set_hr_error
Don't throw the exception, just store the instance in a MonoError.
2016-03-16 14:39:39 -07:00
Alexander Köplinger 583567dc94 [acceptance-test] Ensure the exit code of the main test script is used
Due to our usage of chained commands it'd use the exit code of the last command,
which is not what we want. We use chaining because e.g. in the ms-test-suite
case we still want to run the systemruntimebringup suite even if the conformance
suite had a failing test.
2016-03-16 22:22:31 +01:00
Aleksey Kliger 9ff3f74910 [runtime] Propagate error from class loading when JIT-ing
This is another approach to a341404ecd
which was backed out because it was
stale (2a899492c3).
2016-03-16 10:41:59 -07:00
Marek Safar 09e4e3806a [bcl] Remove wrong IVT attributes 2016-03-16 18:36:33 +01:00
Marek Safar e78b5e75cc Merge pull request #2765 from akoeplinger/mcs-fix-test-windows-backslash
[compiler-tester] Fix incorrect failure with Windows paths in error messages
2016-03-16 18:18:27 +01:00
Marek Safar 2a899492c3 Revert "Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort"
This reverts commit a341404ecd, reversing
changes made to 04a177b2be.
2016-03-16 15:55:40 +01:00
Marek Safar 14f96f65f5 [build] Add missing explicit references in docs 2016-03-16 15:45:48 +01:00
Marcos Henrich ecc975f035 [corlib] Fix FileInfo.ToString after MoveTo
Fixes #38796
2016-03-16 10:07:06 +00:00
Marcos Henrich bd79fac689 [corlib] Test FileInfo.ToString after MoveTo
Covers #38796
2016-03-16 10:06:33 +00:00
Zoltan Varga a341404ecd Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort
[runtime] Fixes an abort caused by a TypeLoadException in certain ins…
2016-03-16 10:54:02 +01:00
Marek Safar 04a177b2be [corlib] RuntimeEnvironment from referencesource 2016-03-16 10:44:34 +01:00
Alexander Köplinger ef407901f8 [tests] Don't use AppDomain.AppendPrivateBinPath for assembly-load-remap.exe
It's not supposed to contain a full path to a directory, but rather a relative path
to a subdirectory of the ApplicationBase. However, this isn't enforced in all cases
by Mono so setting a full path worked when the path doesn't contain a '.' because then
the code in [1] doesn't clear the variable and the path is added to the domain->search_path.

This caused the test to fail on Wrench on the mono-4.4.0 lane because the path contains
a dot while confusingly it worked fine on master.

Fixing this by appending the xbuild_14 path via an alternative (albeit slightly hacky)
method related to the standard MONO_PATH env var. Because the variable is only read
once at app startup we need to call into the runtime to explicitly set the new path
before trying to load the MSBuild 14 assemblies. This is fine since we only
want to test that the correct assembly version is loaded and nothing else.

[1] https://github.com/mono/mono/blob/37b2b9fbc25a2199aba1d794117924d4828360a7/mono/metadata/appdomain.c#L1319-L1337
2016-03-16 03:33:24 +01:00
James Venning 9ca4e0ee28 [runtime] Fixes an abort caused by a TypeLoadException in certain instances 2016-03-16 10:20:36 +10:00
Martin Baulig 37b2b9fbc2 [System]: Fix certificate validation on Linux. Bug #39307. 2016-03-15 18:55:21 -04:00
Martin Baulig e21ff252af [System]: Properly propagate exceptions in 'MonoTlsStream'.
(cherry picked from commit a7ab399d09)
2016-03-15 18:45:54 -04:00
Martin Baulig af01f84119 [System]: Copy 'ServicePoint.Certificate' and 'ClientCertificate' from the referencesource.
(cherry picked from commit 76e0f64862)
2016-03-15 18:45:38 -04:00
Martin Baulig d7f52b74c9 [System]: In 'WebConnection.EndWrite()': always call EndWrite() on the underlying socket.
(cherry picked from commit dd9d66a7c2)
2016-03-15 18:44:58 -04:00
Alexander Köplinger 648414942c [System.Net.Http] Make HttpClientTest.GetString_Many test more reliable
It's flaky on Jenkins, removing the dependency on an external server and instead using a local HttpListener
to answer the requests should hopefully make it more reliable.
2016-03-15 21:16:24 +01:00
Marek Safar cf4f8ad342 [mcs] Partially revert c9d4cc55a1 2016-03-15 21:05:58 +01:00
Marek Safar c9d4cc55a1 [mcs] Don't sign sqlmetal and linker tools 2016-03-15 18:41:43 +01:00
Marek Safar 9f26108f3a [compiler-tester] Expand members error reporting to avoid problems with members called {} 2016-03-15 18:07:52 +01:00
monojenkins 195367f959 Merge pull request #2747 from lambdageek/dev/monoerror-mono_remote_class
[runtime] Add MonoError to mono_remote_class
2016-03-15 17:00:19 +00:00
Alexander Köplinger c5d740ff6a [tools] Don't install cil-stringreplacer
It's a tool that is only used during the Mono class lib build.
2016-03-15 15:44:10 +01:00
Miguel de Icaza f91bb070c1 [getline] Fix condition where Console.WriteLi<TAB><ENTER> completed to Console.WriteLinene 2016-03-15 10:25:57 -04:00
Miguel de Icaza 11b6f9b662 [repl] Further fine tuning; Show newlines as actual newlines in strings, plus fix quoting of chars < 32 2016-03-15 10:22:20 -04:00
Miguel de Icaza 998566db36 [repl] Do not escape space when pretty printing strings 2016-03-15 10:11:55 -04:00
Marcos Henrich 2a9c47b194 [corlib] Moved GetFullNameForStackTrace into StackTraceHelper
Moved StackTrace.GetFullNameForStackTrace into a new class
StackTraceHelper so the code can be reused by mono-symbolicate.

Reusing GetFullNameForStackTrace in mono-symbolicate allows the tool to
easily match a stack trace line with a method without doing a rather
complicate parsing of types and possible generic parameters
combinations.
2016-03-15 13:56:04 +00:00
Marcos Henrich 29c8d688db [mono-symbolicate] Load assemblies in reflection only context 2016-03-15 13:56:03 +00:00
Marek Safar 066f6b8ca8 [build] Use full filename for csc references 2016-03-15 13:58:30 +01:00
Marek Safar 788ee811f6 [compiler-tester] Remove moonlight build 2016-03-15 13:55:59 +01:00
Marek Safar 56d6468811 [monodoc] Remove redundant codepage argument 2016-03-15 13:55:30 +01:00
Marek Safar 916f39005c [System.Xml.Linq] Simplify dependencies 2016-03-15 13:53:54 +01:00
Marek Safar a12e9262e2 [Mono.Security.Providers.NewSystemSource] Use LIB_REFS to track references 2016-03-15 13:50:00 +01:00
Marek Safar d9ebd10b57 [system.runtime.serialization] Use correct IVT key for System.ServiceModel.Web 2016-03-15 13:48:24 +01:00
Alex Rønne Petersen 5fc03f6027 Merge pull request #2543 from ermshiperete/Xamarin-31021
Don't ignore drives with type "aufs" or "overlay" (Xamarin-31021)
2016-03-15 12:41:02 +01:00
Alexander Köplinger 1d828a45c9 Merge pull request #2757 from akoeplinger/fix-coreclr-test
Two coreclr test fixes
2016-03-15 01:16:54 +01:00
Zoltan Varga 966d6cbdd4 Fix the build. 2016-03-14 22:52:29 +01:00
Alexander Köplinger 00e71eef12 [corlib] Fix Delegate.Combine() to throw on non-matching types
This was inadvertently removed in https://github.com/mono/mono/commit/611a43ee0f672adbac3e25dc77731843a3d10cf1 from MulticastDelegate.CombineImpl().

Add the type check back in the Delegate base class, we already do the same in Remove().

Add unit tests to cover the behavior to the corlib test suite. (reverted from commit f29878dc713f4e148fe0a1e703fae8929e6fb6e0)

Needed to update some monodoc tests to match that an exception is now thrown again.
2016-03-14 19:19:13 +01:00
Andi McClure 3d44b341e1 Merge pull request #2755 from xmcclure/disable-omit-fp
"disable_omit_fp" option for MONO_DEBUG
2016-03-14 14:12:24 -04:00
Marek Safar 3fc399cb9b Merge pull request #2750 from radical/tasklogger
[xbuild] TaskLoggingHelper: Implement support for correctly using tas…
2016-03-14 18:47:22 +01:00
Ankit Jain aef44c0fdc [xbuild] TaskLoggingHelper: Implement support for correctly using task resources
- make task resources available to TaskLoggingHelper
- verify TaskLoggingHelper method args
- tests
2016-03-14 13:41:47 -04:00
Zoltan Varga e7c1138676 [jit] Remove some loader error usage. 2016-03-14 16:22:19 +01:00
Alexander Köplinger 4e2b2ff5af [corlib] Fix UIntPtr.ToString() 64bit implementation
Cast to ulong instead of uint, this is also what referencesource does:
https://github.com/Microsoft/referencesource/blob/d925d870f3cb3f6acdb14e71522ece7054e2233b/mscorlib/system/uintptr.cs#L114-L122

Also bump coreclr submodule to bring in another UIntPtr fix.
2016-03-14 15:46:59 +01:00
Marek Safar 57afae880b [mcs] Better check for automatically implemented property inside a type with an explicit StructLayout. Fixes #39574 2016-03-14 13:34:48 +01:00
Marek Safar ed05a531e8 [system.net.http] The backslash character may be used as a single-character quoting mechanism within quoted-string. Fixes #39569 2016-03-14 12:36:02 +01:00
Zoltan Varga f9f9746f98 Fix the build. 2016-03-14 10:15:33 +01:00
monojenkins 598062953a Merge pull request #2754 from markusbeth/fix-mono-config
fixed replacement of $mono_libdir in config file

strncpy does not NUL-terminate the destination string in this case so one cannot use strcat to append

This fixes the error "malloc: top chunk is corrupt" as reported on mono-devel-list back in 2015-10-20 (subject: "malloc error executing OBS-built mono") at least for me.
2016-03-14 04:35:14 +00:00
monojenkins d231e5bd62 Merge pull request #2756 from vargaz/llvm-jit-3.9
[llvm] Finish JIT support for llvm 3.9.
2016-03-13 20:35:18 +00:00
Zoltan Varga a9f5ba370a [llvm] Finish JIT support for llvm 3.9. 2016-03-13 19:49:10 +01:00
Bernhard Urban c7ccd6ef31 [mono-config] fix copying of prefix during replacement 2016-03-12 09:51:48 +01:00
Alexander Köplinger 56272d7ec1 [acceptance-tests] Bump coreclr and ms-test-suite to bring in some fixes
Also disable a test that makes no sense.
2016-03-12 01:12:12 +01:00
monojenkins d6c0ebf313 Merge pull request #2752 from kumpera/the_loader_error_highlander
This removed the last source of loader error from the runtime

The last source was on the AOT compiler in load_image.

I hooked enough MonoError to bubble the issue to a reasonably higher layer.

@vargaz please review.
2016-03-11 23:05:20 +00:00
Markus Beth c18c66ed64 fixed more srtncpy bugs 2016-03-11 22:52:34 +01:00
Rodrigo Kumpera d4404d563b Merge pull request #2740 from lambdageek/dev/monoerror-reflection-icalls1
[reflection] MonoError for a few icalls
2016-03-11 16:25:06 -05:00
Rodrigo Kumpera 389a34059a Merge pull request #2739 from lambdageek/dev/monoerror-type_load_class
[MonoError] Use class name for mono_error_set_type_load_class() exceptions
2016-03-11 16:06:25 -05:00
Rodrigo Kumpera 0579cc7b3c [aot] Load errors in mono_aot_get_method_from_vt_slot must not be fatal as failed slots will simply use the JIT. 2016-03-11 15:19:29 -05:00
Ankit Jain b9dd48c9c4 [xbuild] Remove ErrorTest.TestExecute1()
This was an incorrect test. Tasks can't really be used like this
especially this once since it tries to Log an error, but it hasn't been
assigned a BuildEngine yet!

Other fixes in TaskLoggingHelper expose this issue.
2016-03-11 14:48:33 -05:00
Andi McClure 0404254a15 "disable_omit_fp" can now be included in MONO_DEBUG
Option disables a compiler optimization that omits framepointers from the stack.
2016-03-11 14:30:49 -05:00
monojenkins 4fb6b12257 Merge pull request #2751 from akoeplinger/fix-msbuild-remapping
Fix msbuild remapping

First commit:
```
Revert "Do not remap framework assembly if it's version is higher than the runtime version"

It would cause issues on mobile, cause the runtime version is 2.0.5.0 there and loading
e.g. System.dll v4.0 would no longer be mapped to that version anymore after this change.
```
---
Second commit:
```
[runtime] Stop remapping higher versions of
 Microsoft.Build.Framework/Engine and remap Microsoft.Build.Utilities/Tasks
 (.v3.5)

The previous remapping was added in 725ed3f824, but it didn't actually
fix the bug in https://bugzilla.xamarin.com/show_bug.cgi?id=32561.

The underlying cause of the bug is that in Mono 4.0 we removed the 2.0/3.5 profiles.
This meant that Microsoft.Build.Utilities.dll and Microsoft.Build.Utilities.v3.5.dll weren't installed
in the GAC anymore, because MSBuild 4.0 uses Microsoft.Build.Utilities.v4.0.dll, so the app failed
to load the 2.0 version of the assembly. The same applies for the .Tasks variants.

We remap earlier versions of the Microsoft.Build.Utilities/Tasks assemblies to the v4.0 version.
I've introduced another item in the AssemblyVersionMap struct which allows remapping to target a different
assembly name, because MSBuild made the questionable decision to put the version number in the assembly name.
While strictly speaking this is not what .NET is doing (it just fails there if .NET 2.0 isn't installed)
on Mono there's no way to install those older profiles anymore, so we remap them to v4.0 to keep apps working.

Newer versions of Microsoft.Build.Framework/Engine (like 12.0, 14.0) however have the same name, so we need to be
more careful here and only do a remapping to the 4.0 version if it's an earlier version (e.g. 2.0 -> 4.0).
This avoids issues with accidentally remapping 14.0 -> 4.0.

I tested the app from the bug report and it now works fine.
```
2016-03-11 15:45:21 +00:00
Alexander Köplinger 5d4ab58d38 [runtime] Stop remapping higher versions of Microsoft.Build.Framework/Engine and remap Microsoft.Build.Utilities/Tasks (.v3.5)
The previous remapping was added in 725ed3f824, but it didn't actually
fix the bug in https://bugzilla.xamarin.com/show_bug.cgi?id=32561.

The underlying cause of the bug is that in Mono 4.0 we removed the 2.0/3.5 profiles.
This meant that Microsoft.Build.Utilities.dll and Microsoft.Build.Utilities.v3.5.dll weren't installed
in the GAC anymore, because MSBuild 4.0 uses Microsoft.Build.Utilities.v4.0.dll, so the app failed
to load the 2.0 version of the assembly. The same applies for the .Tasks variants.

We remap earlier versions of the Microsoft.Build.Utilities/Tasks assemblies to the v4.0 version.
I've introduced another item in the AssemblyVersionMap struct which allows remapping to target a different
assembly name, because MSBuild made the questionable decision to put the version number in the assembly name.
While strictly speaking this is not what .NET is doing (it just fails there if .NET 2.0 isn't installed)
on Mono there's no way to install those older profiles anymore, so we remap them to v4.0 to keep apps working.

Newer versions of Microsoft.Build.Framework/Engine (like 12.0, 14.0) however have the same name, so we need to be
more careful here and only do a remapping to the 4.0 version if it's an earlier version (e.g. 2.0 -> 4.0).
This avoids issues with accidentally remapping 14.0 -> 4.0.

I tested the app from the bug report and it now works fine.
2016-03-11 15:03:18 +01:00
Markus Beth eca635aa31 fixed replacement of $mono_libdir in config file
strncpy does not terminate the destination string in this case so one
cannot use strcat to append
2016-03-11 01:47:19 +01:00
Alexander Köplinger 4ceb8b72fe [System] Bump CTS timeout in BlockingCollectionTests
Saw a few failures on Jenkins on the slower ARM machines over the last days:

```
) MonoTests.System.Collections.Concurrent.BlockingCollectionTests.AddAnyCancellable : System.OperationCanceledException : The operation was canceled.
at System.Collections.Concurrent.BlockingCollection`1[T].TryAddToAnyCore (System.Collections.Concurrent.BlockingCollection`1[] collections, System.Collections.Concurrent.T item, Int32 millisecondsTimeout, CancellationToken externalCancellationToken) [0x00092] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/external/referencesource/System/sys/system/collections/concurrent/BlockingCollection.cs:1041
at System.Collections.Concurrent.BlockingCollection`1[T].TryAddToAny (System.Collections.Concurrent.BlockingCollection`1[] collections, System.Collections.Concurrent.T item, Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x00006] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/external/referencesource/System/sys/system/collections/concurrent/BlockingCollection.cs:971
at System.Collections.Concurrent.BlockingCollection`1[T].AddToAny (System.Collections.Concurrent.BlockingCollection`1[] collections, System.Collections.Concurrent.T item, CancellationToken cancellationToken) <0x4421bf18 + 0x0002b> in <filename unknown>:0
at MonoTests.System.Collections.Concurrent.BlockingCollectionTests.AddAnyCancellable () [0x00031] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs:276
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003d] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs:103
```

100ms is likely just too short, bumping it.
2016-03-11 00:39:56 +01:00
monojenkins 5a9dfc17d9 Merge pull request #2749 from BrzVlad/fix-suspend-deadlock
[runtime] Fix deadlock while unwinding the stack of suspended thread

A suspended thread, in non-coop case, can be holding runtime locks. When the suspender tries to unwind the stack for this thread, it might require taking of runtime locks (ex. in aot case we might search for the jit info in the aot image and then register it, which requires the domain lock). Mark the suspender thread as running in async context while it unwinds other threads.
2016-03-10 23:20:19 +00:00
Andi McClure 609e1617d8 Runtime enable for checked-build asserts
In addition to --enable-checked-build, it is now mandatory to put the
requested checked-build modes in the environment variable
MONO_CHECK_MODE at runtime.

Also add a MONO_CHECK_THREAD_TRANSITION_HISTORY environement variable
for thread transition history length (instead of hardcoding 3).
2016-03-10 17:42:06 -05:00
Andi McClure 7dea485a01 Replace the checked build configure flags with a single --enable-checked-build= flag
Also make the define names more consistent.
2016-03-10 17:39:57 -05:00
Rodrigo Kumpera 9542c16f35 [aot] Add MonoError to decode_method_ref. 2016-03-10 16:46:56 -05:00
Rodrigo Kumpera 4b8dec6bc7 [aot] Add MonoError to decode_method_ref_with_target. 2016-03-10 16:46:55 -05:00
Rodrigo Kumpera 6f5175d160 [aot] Introduce MonoError in decode_resolve_method_ref. 2016-03-10 16:46:50 -05:00
Alexander Köplinger de1c6b843a Revert "Do not remap framework assembly if it's version is higher than the runtime version"
This reverts commit 100bd760a4.

It would cause issues on mobile, cause the runtime version is 2.0.5.0 there and loading e.g. System.dll v4.0 would
no longer be mapped to that version anymore after this change.
2016-03-10 22:22:55 +01:00
Rodrigo Kumpera 8300c685ee [aot] Introduce MonoError in decode_generic_context. 2016-03-10 15:49:09 -05:00
Rodrigo Kumpera 8014f30b8b [aot] Add MonoError to load_image. 2016-03-10 15:49:09 -05:00
Rodrigo Kumpera 6365e34cd1 [aot] Wire up MonoError into decode_klass_ref, decode_type and decode_generic_inst. 2016-03-10 15:49:09 -05:00
Alexander Köplinger 1180491691 [runtime] Fix monodroid build 2016-03-10 19:44:02 +01:00
Marek Safar 4e86d2771d Merge pull request #2744 from akoeplinger/convert-fixes
[corlib] Fix Convert.ToUInt32 not throwing OverflowException with a too large number
2016-03-10 18:43:04 +01:00
Marek Safar faa1368df4 [mcs] Codegen update for specialized struct initialization with awaited element initializer. Fixes #39459 2016-03-10 18:04:35 +01:00
Aleksey Kliger 9a6211315c [runtime] Add MonoError to mono_remote_class 2016-03-10 11:52:17 -05:00
Alexander Köplinger 4e01ac5771 [tests] Add test for assembly remapping change from 100bd760a4
Testing for the remap message via grep isn't ideal, a better way to verify the assembly
version would be to check asm.GetName().Version, but unfortunately in the test environment
when MONO_PATH is set the assembly loading always fallsback to a simple file name matching
in the directory so we end up with the wrong (v4.0) assembly in that case.
2016-03-10 16:38:01 +01:00
Alexander Köplinger c1c0bc7b5c Merge pull request #2733 from ludovic-henry/fix-mono_cpu_count
[utils] Make distinction between configured and online CPU count
2016-03-10 16:02:40 +01:00
Zoltan Varga 40caace6db [jit] Add a separate header file for llvm-jit.cpp. 2016-03-10 15:45:37 +01:00
Alexander Köplinger d1a08e5957 [corlib] Fix Convert.ToUInt32 not throwing OverflowException with a too large number
This was revealed by the CoreCLR tests/src/CoreMangLib/cti/system/convert/converttouint3219.exe test.

When we tried to convert a number larger than UInt32.MaxValue (in this case 4933891728) we would cast
the intermediate result to uint which overflows and makes the end result smaller which means we don't throw.

Storing the intermediate result in a long before checking for the correct range fixes this.

Added a few additional tests that I felt were missing and/or only present for other Convert.* methods.
I found two more cases that don't throw OverflowException but fixing it looked more involved so I punted
and just ignored them with a FIXME for now.
2016-03-10 13:19:00 +01:00
Ludovic Henry 2debfb8803 [utils] Make distinction between ARM platforms for CPU count
ARM platform tends to try very hard to save power by switching off CPUs. This could lead to inconsistencies in the value returned by mono_cpu_count

Recap from Alexander Köplinger <[email protected]>:

When we merged the change from PR #2722, we started seeing random failures on ARM in the MonoTests.System.Threading.ThreadPoolTests.SetAndGetMaxThreads and MonoTests.System.Threading.ManualResetEventSlimTests.Constructor_Defaults tests. Both of those tests are dealing with Environment.ProcessorCount to verify some implementation details.

It turns out that on the Jetson TK1 board we use on public Jenkins and on ARM kernels in general, the value returned by sched_getaffinity (or _SC_NPROCESSORS_ONLN) doesn't contain CPUs/cores that are powered off for power saving reasons. This is contrary to what happens on x86, where even cores in deep-sleep state are returned [1], [2]. This means that we would get a processor count of 1 at one point in time and a higher value when load increases later on as the system wakes CPUs.

Various runtime pieces like the threadpool and also user code however relies on the value returned by Environment.ProcessorCount e.g. for deciding how many parallel tasks to start, thereby limiting the performance when that code thinks we only have one CPU.

Talking to a few people, this was the reason why we changed to _SC_NPROCESSORS_CONF in https://github.com/mono/mono/pull/1688 and why we added a special case for Android in https://github.com/mono/mono/commit/de3addcde5bf875dcd43d3e2c6536d61871e7675 to get the "real" number of processors in the system.

Because of those issues Android/Dalvik also switched from _ONLN to _SC_NPROCESSORS_CONF for the Java API Runtime.availableProcessors() too [3], citing:
> Traditionally this returned the number currently online,
but many mobile devices are able to take unused cores offline to
save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
cores that could be made available if there were no power or heat
constraints.

The problem with sticking to _SC_NPROCESSORS_CONF however is that it breaks down in constrained environments like Docker or with an explicit CPU affinity set by the Linux `taskset` command, They'd get a higher CPU count than can be used, start more threads etc. which results in unnecessary context switches and overloaded systems. That's why we need to respect sched_getaffinity.

So while in an ideal world we would be able to rely on sched_getaffinity/_SC_NPROCESSORS_ONLN to return the number of theoretically available CPUs regardless of power saving measures everywhere, we can't do this on ARM.

I think the pragmatic solution is the following:
* use sched_getaffinity (+ fallback to _SC_NPROCESSORS_ONLN in case of error) on x86. This ensures we're inline with what OpenJDK [4] and CoreCLR [5] do
* use _SC_NPROCESSORS_CONF exclusively on ARM (I think we could eventually even get rid of the PLATFORM_ANDROID special case)

Thoughts?

Helpful links:

[1] https://sourceware.org/ml/libc-alpha/2013-07/msg00383.html
[2] https://lists.01.org/pipermail/powertop/2012-September/000433.html
[3] https://android.googlesource.com/platform/libcore/+/750dc634e56c58d1d04f6a138734ac2b772900b5%5E1..750dc634e56c58d1d04f6a138734ac2b772900b5/
[4] https://bugs.openjdk.java.net/browse/JDK-6515172
[5] https://github.com/dotnet/coreclr/blob/7058273693db2555f127ce16e6b0c5b40fb04867/src/pal/src/misc/sysinfo.cpp#L148
2016-03-10 10:46:25 +00:00
Ludovic Henry 2323f293c5 [build] Define HOST_* architecture 2016-03-10 10:46:25 +00:00
monojenkins 2ed84027d9 Merge pull request #2732 from radical/asm_remap
Do not remap framework assembly if it's version is higher than the ru…

…ntime version

Currently, assemblies like Microsoft.Build.Framework and
Microsoft.Build.Engine get remapped to the current runtime version, at
load time. This means that if an assembly references the above
assemblies with a version like `14.1.0.0`, then that would get remapped
to `4.0.0.0`. This is incorrect behavior and breaks msbuild. Instead,
now we do the remapping only if the requested version is lower than the
runtime version.
2016-03-10 04:00:18 +00:00
Alexander Köplinger 3df1a68186 Merge pull request #2741 from akoeplinger/acceptance-tests-split
A few improvements to acceptance-tests
2016-03-09 23:42:27 +01:00
Marek Safar 4ddd0aff0f Merge pull request #2743 from qmfrederik/fixes/complete-eventsource-3
System.Diagnostics.Tracing: Add EventListener and related classes
2016-03-09 23:26:15 +01:00
Marek Safar d59a6e1931 [xbuild] Remove explicit warning level set when csproj does not have it and leave the default to compiler 2016-03-09 23:17:49 +01:00
Vlad Brezae ee8a9b3f6c [runtime] Fix deadlock while unwinding the stack of suspended thread
A suspended thread, in non-coop case, can be holding runtime locks. When the suspender tries to unwind the stack for this thread, it might require taking of runtime locks (ex. in aot case we might search for the jit info in the aot image and then register it, which requires the domain lock). Mark the suspender thread as running in async context while it unwinds other threads.
2016-03-09 23:34:28 +02:00
Ankit Jain 100bd760a4 Do not remap framework assembly if it's version is higher than the runtime version
Currently, assemblies like Microsoft.Build.Framework and
Microsoft.Build.Engine get remapped to the current runtime version, at
load time. This means that if an assembly references the above
assemblies with a version like `14.1.0.0`, then that would get remapped
to `4.0.0.0`. This is incorrect behavior and breaks msbuild. Instead,
now we do the remapping only if the requested version is lower than the
runtime version.

@akoplinger: This will actually impact xbuild too right now because
we're defaulting to xbuild 14.0 in Mono 4.4 now so we'd see messages
like Mono: The request to load the assembly Microsoft.Build.Framework
v14.0.0.0 was remapped to v4.0.0.0 in the assembly loading log, which
will break in very subtle ways.
2016-03-09 15:37:12 -05:00
Marek Safar 400fd94984 Bump ikdasm 2016-03-09 19:27:16 +01:00
Frederik Carlier 778dc786bf System.Diagnostics.Tracing: Add EventListener and related classes 2016-03-09 19:11:24 +01:00
Marek Safar d211287c27 Merge pull request #2742 from mono/revert-2738-fixes/complete-eventsource-2
Revert "Add EventListener and EventListenerEventArgs to Mono"
2016-03-09 18:58:29 +01:00
Marek Safar b2390a28ca Revert "Add EventListener and EventListenerEventArgs to Mono" 2016-03-09 18:58:13 +01:00
Alexander Köplinger 2be1eed169 [acceptance-tests] Better description in readme 2016-03-09 18:50:42 +01:00
Marek Safar ef92155bfa Merge pull request #2738 from qmfrederik/fixes/complete-eventsource-2
Add EventListener and EventListenerEventArgs to Mono
2016-03-09 18:47:33 +01:00
Alexander Köplinger e9ab609729 [acceptance-tests] Stop symlinking System.Console.dll facade
It should no longer be required after 6e81edfa24.
2016-03-09 18:34:05 +01:00
Alexander Köplinger b827d683c6 [acceptance-tests] Split the test suites out of Makefile.am into own files 2016-03-09 18:34:05 +01:00
Marek Safar 6970156500 [mcs] nameof operator can use static member. Fixes #39455 2016-03-09 17:59:30 +01:00
Aleksey Kliger 9e638a8013 [reflection] Use MonoError in mono_reflection_get_token
Mark it external only.  Runtime should use mono_reflection_get_token_checked.
2016-03-09 11:10:33 -05:00
Aleksey Kliger bfd3705c80 [reflection] Add MonoError-ized mono_reflection_get_type_checked
Mark mono_reflection_get_type external only.
2016-03-09 11:10:32 -05:00
Aleksey Kliger d9a026be4b [MonoError] Use class name for mono_error_set_type_load_class() exceptions
If MONO_ERROR_TYPE_LOAD is set and there's a error->exn.klass available,
try to grab the type name from the klass when preparing an exception.
2016-03-09 11:02:12 -05:00
Zoltan Varga 7084863662 [llvm] Add beginnings of JIT support for LLVM > 3.9. 2016-03-09 16:58:59 +01:00
Alexander Köplinger 4063befe57 [acceptance-tests] Move git "submodules" to acceptance-tests/external instead of next to Mono repo
A few people told me it's surprising that acceptance-tests checks out repos into <mono repo>/../
and it can cause unwanted changes when a repo with the same name already exists there.

While this structure is used in several internal repos I agree for Mono it's better to keep
everything inside the repo itself.
2016-03-09 16:54:09 +01:00
Aleksey Kliger 89513382d9 [reflection] MonoError in mono_method_body_get_object
Mark it external only.  Runtime should use mono_method_body_get_object_checked
2016-03-09 10:49:47 -05:00
Zoltan Varga 5a33ae7c7f [aot] Fix a buffer overflow in the statistics code. 2016-03-09 16:22:46 +01:00
Zoltan Varga cb87c8585f [runtime] Remove some unused code. 2016-03-09 14:28:36 +01:00
Frederik Carlier e5c8431849 Remove #if NET_4_6
Remove conditional compilation statement as per PR feedback
2016-03-09 09:05:38 +01:00
monojenkins 4dd277660f Merge pull request #2736 from xmcclure/more-trampolines
Increase default number of aot-compile trampolines

The current defaults are not enough to successfully run
`make fullaotcheck` in mono/mini
2016-03-09 05:20:19 +00:00
monojenkins 73cda12003 Merge pull request #2735 from xmcclure/early-lookup-addr
Early ICALL_ADDR lookup on pinvoke to fix checked-build assert

The pinvoke implementation in the failure case was creating a managed
exception object while in blocking mode, a rules violation. This patch
puts a redundant lookup early so that any exceptions occur before
blocking mode is entered. (The "real" lookup is unchanged because the
current pattern is optimized well by the JIT.)
2016-03-09 03:55:27 +00:00
monojenkins 9e4c2757e7 Merge pull request #2731 from Phyyl/master
Remove throw statement in IPAddress.TryParse

In Microsoft's implementation, no exceptions are thrown in this particular method. See here for details: http://referencesource.microsoft.com/#System/net/System/Net/IPAddress.cs,54a3a3f536d5a22c
2016-03-09 00:00:42 +00:00
monojenkins 257af4ff16 Merge pull request #2674 from lambdageek/dev/monoerror-mono_field_get_value_object
Use MonoError for mono_field_get_value_object

Mark it external only.  Runtime should use mono_field_get_value_object_checked.
2016-03-08 22:20:43 +00:00
Andi McClure d230022eeb Increase default number of aot-compile trampolines
The current defaults are not enough to successfully run
`make fullaotcheck` in mono/mini
2016-03-08 17:14:26 -05:00
monojenkins 4c0fe9aa74 Merge pull request #2718 from lambdageek/dev/monoerror-sre
[System.Reflection.Emit] Use MonoError in static functions
2016-03-08 21:50:33 +00:00
Andi McClure 98dbaf2bde Fix an assert in checked-build GC mode
The pinvoke implementation in the failure case was creating a managed
exception object while in blocking mode, a rules violation. This patch
puts a redundant lookup early so that any exceptions occur before
blocking mode is entered. (The "real" lookup is unchanged because the
current pattern is optimized well by the JIT.)
2016-03-08 16:44:49 -05:00
Zoltan Varga b2bf28d071 [runtime] Fix the support for coop in managed-native wrappers by finishing blocking inside the try clause before converting the result, and only unblocking in the finally clause if we didn't unblock in the try clause. 2016-03-08 21:52:46 +01:00
Phyyl bbe084366d Added null check in IPAddress.Parse
This check was previously handled in the IPAddress.TryParse method but, but the latter never throws anymore
2016-03-08 14:05:39 -05:00
Frederik Carlier 62c49f89ad Merge branch 'master' 2016-03-08 19:41:40 +01:00
Aleksey Kliger 9efee8e99a [SRE] MonoError in mono_image_emit_manifest 2016-03-08 11:42:21 -05:00
Aleksey Kliger acfca794f0 [SRE] MonoError in mono_image_fill_export_table 2016-03-08 11:42:20 -05:00
Aleksey Kliger 717d279795 [SRE] MonoError in mono_image_get_array_token 2016-03-08 11:42:20 -05:00
Aleksey Kliger c8f5294f27 [SRE] MonoError in mono_image_get_sighelper_token 2016-03-08 11:42:19 -05:00
Aleksey Kliger b81d94dfaa [SRE] MonoError in mono_image_get_generic_field_token 2016-03-08 11:42:19 -05:00
Aleksey Kliger 41b56ac777 [SRE] MonoError in add_custom_modifiers 2016-03-08 11:42:18 -05:00
Aleksey Kliger 96a188d034 [SRE] MonoError in create_generic_typespec 2016-03-08 11:42:17 -05:00
Aleksey Kliger 86cf9e9c72 [SRE] MonoError in mono_image_get_field_on_inst_token 2016-03-08 11:42:17 -05:00
Aleksey Kliger 098597398c [SRE] MonoError in encode_constraints 2016-03-08 11:42:16 -05:00
Aleksey Kliger 984a6f79aa [SRE] MonoError in mono_image_get_event_info 2016-03-08 11:42:16 -05:00
Aleksey Kliger e74bcb89a3 [SRE] MonoError in property_encode_signature 2016-03-08 11:42:15 -05:00
Aleksey Kliger 36040a8ad9 [SRE] MonoError in mono_image_get_field_info 2016-03-08 11:42:15 -05:00
Aleksey Kliger f8de085f98 [SRE] MonoError in encode_marshal_blob 2016-03-08 11:42:14 -05:00
Aleksey Kliger d0f8acdeea [SRE] MonoError in field_encode_signature 2016-03-08 11:42:14 -05:00
Aleksey Kliger 6052e07353 [SRE] MonoError in method_encode_clauses 2016-03-08 11:42:13 -05:00
Aleksey Kliger 5a74ca218e [SRE] MonoError in encode_locals 2016-03-08 11:42:13 -05:00
Aleksey Kliger b6566d0d34 [SRE] MonoError in encode_reflection_type and encode_custom_modifiers 2016-03-08 11:42:12 -05:00
monojenkins 5a35123636 Merge pull request #2706 from ludovic-henry/fix-unhandledexception
[runtime] Set exit code on unhandled exception even if a managed handler is present

In case we would add a AppDomain.CurrentDomain.UnhandledException callback, we would not exit the VM in case of unhandled exception.
This goes against the expected behaviour, as we should indeed call these managed callbacks in all cases, but they should not stop the VM from exiting.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39077
2016-03-08 16:25:25 +00:00
monojenkins c911cceab0 Merge pull request #2634 from ludovic-henry/coop-fix-managed-to-native
[coop] Fix managed-to-native wrapper
2016-03-08 16:25:20 +00:00
Aleksey Kliger 74237c9988 [runtime] Use MonoError in mono_field_get_value_object
Mark it external only.  Runtime should use mono_field_get_value_object_checked.
2016-03-08 11:03:22 -05:00
Jonathan Mitchell 1e843e0607 Embedded API. Fix method signature match failure for generic types with multiple type parameters.
Details are on the list.
http://mono.1490590.n4.nabble.com/Re-Embedded-API-ctor-method-signature-query-mono-td4667551.html

Robert Jordan said:

It looks like a bug in mono_method_desc_new ():

https://github.com/mono/mono/blob/master/mono/metadata/debug-helpers.c#L378

The function is treating

	.ctor(System.Func`2<string, string>)

like a method with 2 arguments:

	arg0 = System.Func`2<string
	arg1 = string>

This is obviously wrong :)

The function is then storing the (wrong) argument count
for optimization purposes, and the comparison of methods
is starting to fail.
2016-03-08 17:02:07 +01:00
monojenkins 65b4aaf118 Merge pull request #2707 from lambdageek/dev/monoerror-mono_image_load_module_dynamic
[sre] Propagate MonoError in mono_image_load_module_dynamic
2016-03-08 15:10:37 +00:00
Philippe Paré 3e1d158dbf Updated TryParse_IpString_Null for IPAddress tests
Now reflects the new behaviour in IPAddress class, not throwing any exceptions in the TryParse method
2016-03-08 09:20:03 -05:00
Philippe Paré 706046434e Remove throw statement in IPAddress.TryParse
In Microsoft's implementation, no exceptions are thrown in this particular method. See here for details: http://referencesource.microsoft.com/#System/net/System/Net/IPAddress.cs,54a3a3f536d5a22c
2016-03-08 08:18:33 -05:00
Marek Safar f9df298156 [mcs] Fixes codegen for lifted null bitwise operators with constant left side of null value 2016-03-08 13:41:14 +01:00
Ludovic Henry d6afa9b8c1 [tests] Add unhandled exception tests with AppDomain.UnhandledException managed handler 2016-03-08 11:32:18 +00:00
Ludovic Henry b7d32e7e24 [runtime] Set exit code on unhandled exception even if a managed handler is present
In case we would add a AppDomain.CurrentDomain.UnhandledException callback, we would not exit the VM in case of unhandled exception.
This goes against the expected behaviour, as we should indeed call these managed callbacks in all cases, but they should not stop the VM from exiting.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39077
2016-03-08 11:32:18 +00:00
monojenkins eaa4d8c440 Merge pull request #2708 from lambdageek/dev/monoerror-assorted-get_type
[reflection] MonoError for mono_reflection_{get_type_with_rootimage,type_from_name}
2016-03-08 11:25:24 +00:00
monojenkins 82041260ed Merge pull request #2668 from lambdageek/dev/monoerror-mono_security
[runtime] MonoError cleanup in mono-security.c

Some easy MonoError cleanup in mono-security.c: use set_pending_exception, don't raise in helper functions, free memory on errors.
2016-03-08 11:20:58 +00:00
monojenkins 9f6dc46ae3 Merge pull request #2670 from lambdageek/dev/monoerror-mono_runtime_object_init
[runtime] Use MonoError in mono_runtime_object_init

Mark mono_runtime_object_init checked external only.  Runtime should use mono_runtime_object_init_checked.
2016-03-08 11:20:52 +00:00
monojenkins 4ef4438ad9 Merge pull request #2687 from lambdageek/dev/monoerror-mono_param_get_objects_internal
[reflection] Use MonoError in mono_param_get_objects
2016-03-08 11:20:46 +00:00
Ludovic Henry 50b6d6f8cd [runtime] Wrap mono_prepare_blocking and mono_finish_blocking in try { ... } finally { ... } clause
This is to guarantee that even in the case an exception is thrown between both calls, we switch back and forth correctly from RUNNING to BLOCKING state.
2016-03-08 10:54:17 +00:00
Zoltan Varga cb23d8edde [runtime] Fix the emission of CEE_MONO_VTADDR opcodes, they need to be emitted right after native calls. 2016-03-08 10:54:16 +00:00
Zoltan Varga 9665e4dd6e [jit] Add a new ICALL_ADDR_CALL patch type which is only used on calls, since ICALL_ADDR might be used without a call. 2016-03-08 06:27:43 +01:00
Marek Safar 15082972b9 [mcs] Null conditional operator is never suppose to work with await according to current C# standard. Fixes #39266 2016-03-07 21:02:55 +01:00
Aleksey Kliger 622c172b26 [reflection] Fix mono_reflection_type_get_handle when
DISABLE_REFLECTION_EMIT is set

Fixup of 20a111a215
2016-03-07 14:05:32 -05:00
Marek Safar 62ecbc7d9c [mcs] Remove test as it cannot reliably depend on process shutdown 2016-03-07 19:50:57 +01:00
Greg Young 123aaa5db0 handles AwaitAsync finishing synchronously
A connect flood will break the async loop and take down the entire HttpListener instance (will stop accepting connections).

To reproduce. Take a HttpListener run say 2 wrk test instances against it (1000 connections each works here). After the run the HttpListener has broken its async loop and will no longer accept any connections after. The reason for this is that it was not previously handling the case that AcceptAsync can return synchronously. In this case event will not be called with args.

Patch handles this case and the above issue is not reproducible with.
2016-03-07 15:24:01 +02:00
monojenkins b129b29d4d Merge pull request #2727 from akoeplinger/fix-system-testports
[System] Fix more hardcoded test ports

A test failed on Jenkins today with "address already in use".
Opportunistically replaced a few more hardcoded test ports to avoid failures in the future.

@monojenkins merge
2016-03-05 16:10:17 +00:00
Alexander Köplinger 1492386668 [System/ServiceModel] Fix more hardcoded test ports
A test failed on Jenkins today with "address already in use".
Opportunistically replaced a few more hardcoded test ports to avoid failures in the future.
2016-03-05 15:50:28 +01:00
Marek Safar 17bd978756 [mcs] All returns with values from async block with finally need to be captured. Fixes #39153 2016-03-05 11:31:11 +01:00
Alexander Köplinger 52c79e1fe2 [corlib] Enable the shim __ComObject for other profiles than mobile_static too
Otherwise they crash in a similar way during verification tests.
2016-03-05 00:21:19 +01:00
Alexander Köplinger 202806306b [System] Switch DNS tests to a more stable domain/IP
info.diku.dk stopped resolving today. Use Google's public DNS server instead which should be much more stable.
2016-03-05 00:09:13 +01:00
Alexander Köplinger ee0bec4d89 [runtime] Compile arch before utils when INSTALL_MONOTOUCH is enabled
We'd run into an error before:

```
In file included from ../../mono/utils/mono-context.h:234:0,
                 from ../../mono/utils/mono-stack-unwinding.h:10,
                 from ../../mono/utils/mono-threads.h:14,
                 from mono-mmap.c:36:
../../mono/arch/arm/arm-codegen.h:936:41: fatal error: mono/arch/arm/arm_dpimacros.h: No such file or directory
```

This was done for the other cases in 637ee7cbaa, but not when the monotouch
special case was added in cf754cdb63.
2016-03-04 23:06:13 +01:00
monojenkins 7c7729117b Merge pull request #2714 from lambdageek/dev/monoerror-mono_reflection_type_get_handle
[reflection] MonoError for mono_reflection_type_get_handle

`mono_reflection_type_get_handle` is really a kind of normalization procedure that synthesizes real `MonoType`s from reflection's derived types such as `System.Reflection.Emit.ArrayType, ByRefType`, etc.  So we call it all over the place in System.Reflection.Emit runtime code.

That would all be fine, except that users are allowed to subclass `System.Type`, so we have to call the `UnderlyingSystemType()` method to get a real type.  Which means that an override can throw.  Which in coop mode means we have to thread around a `MonoError`.  So that's why this code is uglier.

But really this code is doing a lot of type inspection and high-level work that we should figure out how to migrate to managed.
2016-03-04 22:00:19 +00:00
Alexander Köplinger bed9bc56d8 [bcl] Ensure all .sources files have newline at the end
It causes an issue with gensources.sh when using #include on Linux otherwise.
2016-03-04 21:48:09 +01:00
Aleksey Kliger 20a111a215 [reflection] MonoError for mono_reflection_type_get_handle 2016-03-04 15:09:37 -05:00
Rodrigo Kumpera 7a94cbe3d4 Merge pull request #2704 from BrzVlad/fix-monitor-abort
[runtime] Fix monitor abort
2016-03-04 14:49:33 -05:00
Alexander Köplinger bfe239ca60 Fix filename casing in mobile_System.Data.dll.sources
It broke on Linux.
2016-03-04 20:35:19 +01:00
iain holmes e1dcf63505 [Profiler] Keep a reference to assemblies while coverage is running
In certain circumstances, for example when running under nunit-console, assemblies could be unloaded while the profiler still had a reference to them in order to generate the coverage data. In these cases, the memory referred to by the profiler would be invalid and would crash.

Fix this by incrementing the reference count of the assemblies preventing them from being unloaded while coverage is being collected.

Fixes BXC #39325
2016-03-04 18:54:53 +00:00
monojenkins 1dca08f943 Merge pull request #2722 from ludovic-henry/fix-39279-docker-cpu-count
[utils] Get processor count from scheduler affinity if available

In case the user has set a scheduler CPU affinity, we should use it as the number of available CPU for the runtime. This is particularly important on docket which uses cgroups that set the container a cpu affinity, and by not using that, the runtime report the total number of CPU the machine has, and not the number of CPU the container has.

Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=39279
2016-03-04 18:00:30 +00:00
monojenkins 4428d53812 Merge pull request #2700 from akoeplinger/monotouch-mobile-static
Enable building of monotouch/xammac profiles without mono-extensions and expose mobile_static in configure.ac

Relies on https://github.com/xamarin/mono-extensions/pull/17

This enables us to compile the monotouch, xammac and mobile_static profiles on public Jenkins without mono-extensions.
2016-03-04 17:20:16 +00:00
monojenkins cec2e9ac7e Merge pull request #2723 from akoeplinger/fix-decimal-test-culture
[corlib] Fix three decimal tests to not rely on current culture for formatting

They'd fail on cultures where "." is not the decimal separator before.

I've also reenabled them on mobile cause the workaround for #27269 is no longer necessary since all bots are now on Mono 4.0+.

@monojenkins merge
2016-03-04 16:30:31 +00:00
Rodrigo Kumpera 45c2792569 Merge pull request #2719 from kumpera/aot_cctor_encoding_in_method_info
[runtime] Explicitly encode the need of running a cctor on method infos.
2016-03-04 11:18:05 -05:00
Alexander Köplinger ec700aafb2 Add a shim __ComObject class to the mobile_static build
We need this because when the runtime is built without --enable-minimal=com the runtime crashes
when trying to AOT because it tries to find the __ComObject (even though nothing in mobile_static
actually uses COM). With this shim we can AOT the mobile_static assemblies even with a "normal"
runtime.
2016-03-04 16:46:27 +01:00
Alexander Köplinger edd133b371 [corlib] Fix three decimal tests to not rely on current culture for formatting
They'd fail on cultures where "." is not the decimal separator before.

I've also reenabled them on mobile cause the workaround for #27269 is no longer necessary since all bots are now on Mono 4.0+.
2016-03-04 15:53:25 +01:00
Marek Safar 24fb876247 [corlib] Fixes build to using correct build profile dependency 2016-03-04 15:37:44 +01:00
Ludovic Henry 6a635a42ce [utils] Get processor count from scheduler affinity if available
In case the user has set a scheduler CPU affinity, we should use it as the number of available CPU for the runtime. This is particularly important on docket which uses cgroups that set the container a cpu affinity, and by not using that, the runtime report the total number of CPU the machine has, and not the number of CPU the container has.

Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=39279
2016-03-04 13:35:29 +00:00
Marek Safar a2a8937393 [tools] Remove unused comment 2016-03-04 13:58:05 +01:00
Marek Safar 7af74e36c2 [lc] Remove Option.cs local copy 2016-03-04 13:44:17 +01:00
Marek Safar ab47527e0f [bcl] Redo referencesource resource string integration to not depend on mcs 2016-03-04 13:44:16 +01:00
Marek Safar c2097068e1 [corlib] Remove duplicate file entry 2016-03-04 13:44:16 +01:00
Rodrigo Kumpera 4d1784ded9 [runtime] Explicitly encode the need of running a cctor on method infos.
This removes the case where decode_klass_ref returning NULL would be ok.
2016-03-03 18:26:10 -05:00
Zoltan Varga e82fc16a1e [aot] Rename init_llvm_method () to init_method () since it is used for all methods, not just llvm ones. 2016-03-03 22:58:53 +01:00
Alexander Köplinger e4936dee55 [acceptance-tests] Work around an issue that caused Roslyn tests to stop working
xplat MSBuild uses a wrong, to be removed regex that doesn't catch our recent profile names. Temporarily work around it for now.
2016-03-03 22:11:43 +01:00
Vlad Brezae 032a79f8a2 Merge pull request #2716 from BrzVlad/fix-tramp-jinfo
[aot] Set null uw_info for tramps without unwind info
2016-03-03 21:56:47 +07:00
Rodrigo Kumpera d5a07c6532 Merge pull request #2268 from kumpera/coreclr-testsuite-fixes-1
First batch of bug fixes found in the CoreClr test suite.
2016-03-03 01:08:01 -05:00
Rodrigo Kumpera 31061124d6 Merge pull request #2710 from akoeplinger/fix-typo
[jit] Fix duplicated left-hand side in comparison
2016-03-02 22:43:50 -05:00
Rodrigo Kumpera d01b3054fd [jit] Fix target_type_is_incompatible to type check byref enums correctly. 2016-03-02 19:05:49 -05:00
monojenkins 42b099c71b Merge pull request #2709 from lewurm/jit-phase-typo
[jit] remove 'jit_' prefix in two phases in stats output

@monojenkins merge
2016-03-02 23:45:34 +00:00
Rodrigo Kumpera af315df3ab Merge pull request #2645 from alexrp/profiler-stability
Fix a crash in the MONO_LLS_FOREACH_SAFE macro
2016-03-02 15:33:07 -05:00
Alexander Köplinger 5fea0a5c0e [jit] Fix duplicated left-hand side in comparison
The typo introduced by 1a784475c0 caused the if to always be false,
because it would compare like if (true == MONO_EXCEPTION_FIELD_ACCESS).
2016-03-02 21:01:27 +01:00
Bernhard Urban 65b5cbcc3b [jit] remove 'jit_' prefix in two phases in stats output 2016-03-02 10:24:44 -08:00
Alex Rønne Petersen b8ebdb1e77 [sgen] Use regular, non-safe LLS foreach macro.
As it turns out, all these uses of FOREACH_THREAD_SAFE were inside regions
where the suspend lock is held. This effectively meant that no modifications
to the thread list could actually happen while the foreach was executing. Since
the guarantees provided by FOREACH_THREAD_SAFE are not needed in any of these
cases, switch to FOREACH_THREAD. The latter macro also happens to be much more
lightweight, so this should result in an overall (small) performance gain.
2016-03-02 17:30:08 +01:00
Alex Rønne Petersen 4d673f2793 [utils/lls] Make the node free function support more flexible.
The caller of mono_lls_init () can now specify whether the free function can or
cannot lock, rather than the LLS assuming that it can't. The only reason this
limitation existed was because the LLS wasn't extended to allow specifying this
information in/after 56a6ae2bd0.

In addition, all LLS functions are now callable from both safe and async
context; the caller must specify the context as an additional argument. If a
free function is in use and it may lock, we'll simply enqueue it for execution
at a later point if an LLS function is invoked in async context.
2016-03-02 17:26:43 +01:00
Alex Rønne Petersen 8a7a253912 [utils/hp] Improve the mono_thread_hazardous_free_or_queue () API.
1. The function suffered from the "too many bools" problem. Pass enum values
   instead so that call sites are clearer.
2. Don't restrict the combination of arguments. This makes it easier to use
   the function as part of data structures where the arguments aren't known
   ahead of time (e.g. the LLS).
2016-03-02 17:26:42 +01:00
Alex Rønne Petersen 4351feabd9 [utils/lls] Fix the safe foreach macro.
This fixes a bug that would manifest when running the profiler on a program
that rapidly spawns/joins threads.

The problem was this: Given T1 which is joining on T2, T2 which is returning
and removing itself from the thread list, and T3 which is currently in the
SIGPROF signal handler, it was possible for T3 to encounter a pointer to T2's
freed thread info structure in the thread list. This can happen because the
SIGPROF handler doesn't actually acquire the suspend lock (it can't) while
iterating the thread list.

The MONO_LLS_FOREACH_SAFE macro was supposed to protect against this case
specifically and, as a result, only provide a snapshot of the thread list.
However, it was missing some very important bits of the mono_lls_find ()
algorithm. The gory details can be found in the paper that the LLS is based on:

    http://www.research.ibm.com/people/m/michael/spaa-2002.pdf

In particular, refer to the "Using Other Memory Management Methods" section
on page 6. It describes why lines E1-2 and E3-4 are necessary in order to
safely iterate the list in an implementation using hazard pointers (such as
ours). Basically, the iteration of the list has to be restarted if any sort of
modification to the list is detected during iteration. Otherwise, it's possible
to read and follow removed/freed memory, leading to all sorts of Bad Things™
happening.

Now, obviously we can't just restart a foreach loop without further thought;
that would cause all sorts of breakage due to the loop body being executed on
the same elements multiple times. As it happens, the LLS is an ordered data
structure: Elements are arranged in ascending order by key. We can exploit
this fact when iterating the list and restarting the loop. By simply storing
the last key we successfully processed, when restarting the loop, we can just
skip all keys that are not greater than the last key we successfully processed.

In addition to this, the MONO_LLS_FOREACH_SAFE macro now assists in freeing
removed elements that it encounters, just like mono_lls_find ().

The end result is that MONO_LLS_FOREACH_SAFE is now truly safe to use at any
point. It does have the potential to be ever so slightly slower, however, since
it does do significantly more work than it used to, and might even have to
restart the loop multiple times if lots of threads are modifying the thread
list at the same time. This doesn't seem to be a problem in practice, though.

Finally, to reduce the maintenance burden, the non-filtered versions of the
macros are now implemented in terms of the filtered versions, using a static
inline filter function that always returns true. When using the non-filtered
macros, the compiler will just eliminate the check entirely through its usual
optimization passes.
2016-03-02 17:26:13 +01:00
Alexander Köplinger 7503fd6749 Merge pull request #2145 from dlech/patch-2
Strip extra null characters in socketAddress
2016-03-02 17:12:08 +01:00
Aleksey Kliger 33de469647 [reflection] Use MonoError in mono_reflection_type_from_name
Mark it external only.  Runtime should use mono_reflection_type_from_name_checked.
2016-03-02 11:11:12 -05:00
Aleksey Kliger 9d92d33c4e [reflection] Use MonoError in mono_reflection_get_type_with_rootimage 2016-03-02 11:11:12 -05:00
Aleksey Kliger 41b2967358 [sre] Propagate MonoError in mono_image_load_module_dynamic 2016-03-02 11:09:59 -05:00
Alexander Köplinger 3e947106f2 Merge pull request #2699 from pruiz/integrate-syswebrouting-master
Completely replace System.Web.Routing with implementation from reference source
2016-03-02 17:02:06 +01:00
Rodrigo Kumpera 595ff89bea [ilasm] When generating method signatures for method-defs, make sure they contain the full call conv. Fixes b35784.
When generating varargs signatures for method defs, ilasm would discard the rest of the call conv. Things
like instance or explicit this would be discarded.
2016-03-02 10:32:09 -05:00
Rodrigo Kumpera cdd1cf1dcc [mini] Weaken type check for byrefs to allow narrowing stores of primitive types. Fixes b59858.
CoreClr allows storing a wider primitive byref into a narrower one. int32& -> int16&, for example.

This is a safe weakening as there's no risk of overflows, undefined behavior or unaligned access.
2016-03-02 10:32:09 -05:00
Rodrigo Kumpera c5a8e92fe7 [jit] Using a literal field with stdsfld/ldsfld should trigger a MissingFieldException. Fixes b13452. 2016-03-02 10:32:08 -05:00
Rodrigo Kumpera 4b6b72f6b8 [runtime] Fail Void arrays with Invalid Program exception instead of a TLE. Fixes b353858. 2016-03-02 10:32:08 -05:00
Rodrigo Kumpera 02146ff903 [mini] ckfinite throws OverflowException and not ArithmeticException. Fixes JIT/Regression/VS-ia64-JIT/M00/b108366. 2016-03-02 10:32:07 -05:00
Rodrigo Kumpera eb91e08f3b [jit] Try blocks can end at the last instruction of the method. Fixes DevDiv2_11321.
Ass oddly as it sounds, it's valid to emit the catch handler before the try block
and have it be the last sequence of instructions in the method body.

This patch checks for that condition before looking the BB in cil_offset_to_bb.
2016-03-02 10:32:01 -05:00
monojenkins 3bd82f9fdf Merge pull request #2684 from ludovic-henry/monoerror-exception
[runtime] Use MonoError for mono_get_exception_type_initialization, mono_get_exception_reflection_type_load and mono_get_exception_runtime_wrapped
2016-03-02 15:30:51 +00:00
monojenkins 1f34699221 Merge pull request #2696 from lambdageek/dev/unlock-mono_class_create_runtime_vtable
[runtime] Don't raise exception while holding locks
2016-03-02 15:30:41 +00:00
Rodrigo Kumpera 6a122b823c [PEAPI] Fixed encoded token sizes for HasCustomAttribute, CustomAttributeType and MemberRefParent.
This would cause some large il files to be miscompiled as the token size would not be the expected one.

This was found in b28158/test.il.
2016-03-02 10:19:31 -05:00
Rodrigo Kumpera 2bd29b6ea2 [runtime] Null check the pointer argument of Interlocked::Exchange<T>. Fixes exchangetneg. 2016-03-02 10:19:31 -05:00
Alexander Köplinger 736f64940c [msvc] Update .def files to fix Windows build 2016-03-02 15:04:54 +01:00
Ludovic Henry 42ddfea489 [runtime] Use MonoError for mono_get_exception_type_initialization, mono_get_exception_reflection_type_load and mono_get_exception_runtime_wrapped 2016-03-02 13:27:26 +00:00
Vlad Brezae 1bd48e361b [runtime] Obey requests to abort when waiting on monitors
If we are clearing the interruption_requested flag, we also need to throw the corresponding exception, otherwise we miss it.

Fixes #39042
2016-03-02 11:50:04 +02:00
Vlad Brezae b772131cb4 [runtime] Don't return from Monitor.Wait without holding the lock
Even if we are interrupted we must throw the exception only after we have regained the lock. This prevents throwing an SynchronizationLockException in the finally clause of common scenarios like :

lock (obj) {
	Monitor.Wait (obj);
}

The downside of this is that, if another thread doesn't give up the lock, we could fail to abort the thread. But this is what MS does.
2016-03-02 11:50:04 +02:00
Vlad Brezae 636457dac5 [runtime] Remove unreachable code
A monitor enter internal method returns -1 for interrupted, 0 for timed out, 1 for acquired. When doing a monitor wait, we regain the lock using an infinite wait (which can't time out) and retrying in the case of interruption.
2016-03-02 11:50:04 +02:00
Vlad Brezae b9606d0e89 [runtime] Fix LOCK_DEBUG build, for monitor debugging 2016-03-02 11:50:03 +02:00
Vlad Brezae f54b3d4a8b [aot] Set null uw_info for tramps without unwind info
We don't register jit infos for tramps that don't have unwind info because we can't unwind from them. Explicitly set uw_info to NULL, instead of pointing to a zero length array in the aot image, to not confuse the runtime when registering the tramp.

Likely to fix #38267
2016-03-02 10:19:01 +02:00
Zoltan Varga 73beb1f50c [runtime] Move some mono_error_raise_exception () calls to icalls from utility functions. NFC. 2016-03-02 03:11:46 +01:00
Zoltan Varga c5f90e0023 [runtime] Rename some icalls to match the icall naming convention. NFC. 2016-03-02 03:11:03 +01:00
Rodrigo Kumpera f8a061ca98 Merge pull request #2705 from kumpera/loader-error-cleanup7
[runtime] Remove the loader error from the remaining of the loader.
2016-03-01 21:07:22 -05:00
Pablo Ruiz d750c58ae9 Replaced System.Web.Routing with referencesources own implementation. 2016-03-02 01:45:29 +01:00
Rodrigo Kumpera 6ef125709b [misc] Multiple small fixes and cleanups. 2016-03-01 18:20:52 -05:00
Rodrigo Kumpera bab7ea252b [utils] Add mono_error_move. 2016-03-01 18:03:04 -05:00
Rodrigo Kumpera f7a72826ee [runtime] Ban mono_method_get_header and promote mono_method_get_header_check to the API as the profiler needs it. 2016-03-01 14:38:21 -05:00
Jonathan Pryor 2a6e0ba6b6 Merge pull request #2662 from mattleibow/pcl-mono.options
[Mono.Options] Changed the code a bit so that it works with PCL
2016-03-01 09:20:28 -08:00
David Lechner abad361206 Fix marshaling of file name in Mono.Unix.UnixEndPoint.Create()
In some cases, the null terminator in the SocketAddress may not be the last
character. This changes the algorithm to ignore the null terminator and
anything after it instead of assuming that the last character is the null
terminator.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=35004
2016-03-01 10:52:17 -06:00
David Lechner 0f0d4804b1 Add unit tests for Mono.Unix.UnixEndpoint and Mono.Unix.UnixListener
Tests for regression of https://bugzilla.xamarin.com/show_bug.cgi?id=35004
2016-03-01 10:52:17 -06:00
Rodrigo Kumpera e4bb9420fd [runtime] Remove all usages of mono_method_get_header from the runtime. 2016-03-01 11:51:52 -05:00
Rodrigo Kumpera bcd5485c4d [runtime] Replace mono_method_get_header with mono_method_get_header_checked. 2016-03-01 11:51:52 -05:00
Rodrigo Kumpera 0952606a6f [runtime] Use mono_method_get_header_checked in debug-helpers.c 2016-03-01 11:51:52 -05:00
Rodrigo Kumpera 0a09d4e60c [gc] Use the new MonoMethodBuilder:init_locals field. 2016-03-01 11:51:52 -05:00
Rodrigo Kumpera 9fc47df284 [runtime] Add init_locals field to MonoMethodBuilder to make it easy to get it set to false. 2016-03-01 11:51:51 -05:00
Rodrigo Kumpera aae5a8af07 [runtime] Add mono_method_get_header_checked and implement mono_method_get_header using it. 2016-03-01 11:51:51 -05:00
Rodrigo Kumpera 3452a8224b [runtime] Ban mono_method_get_signature_full. It has no runtime usage left. 2016-03-01 11:51:51 -05:00
Rodrigo Kumpera 798f966c38 [runtime] Ban mono_method_get_signature. Nothing else uses it. 2016-03-01 11:51:51 -05:00
Rodrigo Kumpera 0dbb9a0501 [runtime] Ban mono_class_inflate_generic_type from usage by the runtime. Move code to use mono_class_inflate_generic_type_checked. 2016-03-01 11:51:50 -05:00
Rodrigo Kumpera a405895162 [runtime] Remove mono_class_inflate_generic_class, replace usage with mono_class_inflate_generic_class_checked. 2016-03-01 11:51:49 -05:00
Rodrigo Kumpera 299c2ee9ec [runtime] Add mono error to inflate_generic_header. Fix buglet in mono_method_get_signature_checked. 2016-03-01 11:51:49 -05:00
Rodrigo Kumpera a5e6ac82c9 [runtime] Ban mono_metadata_parse_mh from the runtime. 2016-03-01 11:51:49 -05:00
Rodrigo Kumpera 3b4a2938b5 [runtime] Introduce MonoError in mono_metadata_parse_mh_full. 2016-03-01 11:51:49 -05:00
Rodrigo Kumpera bd356a9269 [runtime] Remove dead function mono_metadata_parse_type_full. 2016-03-01 11:51:48 -05:00
Rodrigo Kumpera 8c863fbfab [runtime] Disallow usage of mono_metadata_parse_type, mono_metadata_parse_param and mono_metadata_parse_field_type. 2016-03-01 11:51:48 -05:00
Rodrigo Kumpera da536d72ea [mono-error] mono_metadata_parse_array is not longer used by the runtime, ban it. 2016-03-01 11:51:48 -05:00
Rodrigo Kumpera 2701121e94 [mono-error] mono_class_from_name and mono_class_from_name_case now can cleanly return NULL on failure. 2016-03-01 11:51:48 -05:00
monojenkins ce285efd3a Merge pull request #2686 from ludovic-henry/monoerror-mono_remoting_invoke
[runtime] Use MonoError for mono_remoting_invoke
2016-03-01 15:30:18 +00:00
Alexander Köplinger bee9ca6aab Automatically define MONO_DISABLE_GSHAREDVT variable when gsharedvt isn't enabled
Before when the variable wasn't set (= the default), the mobile_static profile would try to pass
the -O=gsharedvt flag even when gsharedvt is not enabled (e.g. when building without mono-extensions)
which causes AOTing to fail.

A better solution is to export the variable from configure.ac into the mcs build system depending
on whether gsharedvt is enabled at configure time.
2016-03-01 14:31:50 +01:00
João Matos b1aabf5b47 Merge pull request #2701 from akoeplinger/fix-async-read-test
Fix unreliability in async_read.exe test
2016-03-01 10:14:29 +00:00
João Matos 1232756868 Merge pull request #2702 from akoeplinger/bug-38933
[System.Security] Fix CryptographicException from ProtectedData.Protect with multiple threads
2016-03-01 10:10:59 +00:00
monojenkins 0368c0d931 Merge pull request #2703 from akoeplinger/pupitetris-Bug-35635
Don't trim TimeZone names ending in parenthesys

Replaces/Closes #2206

@monojenkins merge
2016-03-01 08:35:20 +00:00
Alexander Köplinger 3bbe1d5066 [corlib] Add test for #35635 2016-03-01 08:06:15 +01:00
Arturo Espinosa 33332daa00 Don't trim TimeZone names ending in parenthesys.
Such as "Central Standard Time (Mexico)"
2016-03-01 08:06:14 +01:00
Alexander Köplinger 70cb5fdd9f [System.Security] Fix CryptographicException from ProtectedData.Protect with multiple threads
The code in ManagedProtection.GetKey() instantiated a new RSACryptoServiceProvider singleton without proper
locking to avoid multiple threads running the initialization concurrently.
Since RSACryptoServiceProvider (or rather KeyPairPersistence underneath) uses an XML file with a name derived
from the parameters to store the data there could be a case where one thread writes while another tries to read
and gets garbage. This results in a CryptographicException later on.

Added locking to prevent this.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38933
2016-03-01 07:24:02 +01:00
Alexander Köplinger 016efd505f Fix unreliability in async_read.exe test
It failed on Jenkins today (https://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/3611/parsed_console/log_content.html#WARNING1)
and I could repro it after running the test in a loop.

While looking at the test, the "sum -= buf [0]" seemed suspicious to me. The final callback invocation after the last byte was read results
in buf [0] being 0 most of the time (because no bytes were read). However, due to the async nature of the test that final callback might happen
before another callback and buf then has a value, resulting in a wrong checksum if that value is substracted.

The fix is to remove the substraction. I have no idea why it was done in the first place, but it's been there since the test was added in 2003...

While at it, I've added another check for the number of bytes read and used proper Interlocked.* operations to ensure atomicity.
2016-03-01 06:15:25 +01:00
monojenkins 10813c8865 Merge pull request #2695 from vargaz/process-set-pending
[runtime] Use pending exceptions in process.c.
2016-03-01 03:45:21 +00:00
Alexander Köplinger a989ac959f Don't try AOTing Facades assemblies in the mobile_static profile
Facade assemblies don't have code so they don't need to be AOTd.
2016-03-01 02:42:10 +01:00
Alexander Köplinger d827987af7 Expose mobile_static profile in configure.ac
Pass --with-mobile_static to enable it.
2016-03-01 02:42:10 +01:00
Alexander Köplinger 82a1747f86 Enable building of monotouch and xammac profiles without mono-extensions
By using the <profile>_opt_<assembly>.sources file we can specify files
that are used when mono-extension is not enabled and add shims for the
classes or methods that are missing an implementation in that case.

This allows us to build the monotouch and xammac profiles on public Jenkins.
2016-03-01 02:37:34 +01:00
Zoltan Varga 9d596e5b2b [runtime] Use the return_if_nok () macros in socket-io.c. 2016-03-01 01:55:55 +01:00
Zoltan Varga 644a8cfbfe Merge pull request #2691 from vargaz/socket-io-pending-exception
[runtime] Use pending exceptions in socket-io.c.
2016-03-01 01:14:04 +01:00
Zoltan Varga 194dfd5ae1 [runtime] Use return_if_nok/return_val_if_nok to simplify error handling code in process.c. 2016-03-01 00:37:25 +01:00
monojenkins 4c4af589f3 Merge pull request #2694 from ludovic-henry/fix-sleep-overflow
[threads] Fix mono_thread_info_sleep overflow

This overflow would happen of the machine was up for more than 29 days, leading to an overflow in the value returned by mono_100ms_ticks.

The simplest solution is simply to resort to mono_100ns_ticks which would only overflow after more than 29247 years. So even the platform implement this value as the time since 0000-00-00 00:00:00, we still have more than 27000 years if front of us. It's also highly unlikely that we would overflow the `end' value when adding `ms', as that would mean we are in the last 29 days of that 29247 years.

@monojenkins merge
2016-02-29 22:35:35 +00:00
Aleksey Kliger f789e6d99d [reflection] Use MonoError in mono_get_object_from_blob 2016-02-29 16:28:36 -05:00
Aleksey Kliger 753f639a9d [reflection] MonoError in mono_param_get_objects_internal
Mark mono_param_get_objects external only.
2016-02-29 16:28:36 -05:00
monojenkins 797c536463 Merge pull request #2680 from lambdageek/dev/reflection-no-loadererror
[reflection] Get rid of loader error in reflection.c

Get rid of (direct and indirect) calls to `mono_loader_set_error_from_mono_error` in reflection.c:

- `mono_custom_attrs_from_index`
- `mono_custom_attrs_from_method`
- `mono_custom_attrs_from_class`
- `mono_custom_attrs_from_assembly`
- `mono_custom_attrs_from_module`
- `mono_custom_attrs_from_property`
- `mono_custom_attrs_from_event`
- `mono_custom_attrs_from_field`
- `mono_custom_attrs_from_param`

In all the functions, add a `_checked` variant that has a `MonoError*` out argument and for the  MONO_API functions.  The public API versions just clean up the error and return NULL.  Loader error isn't touched anymore.
2016-02-29 21:15:43 +00:00
Marcos Henrich e8744b6fc0 [System.Runtime.Serialization] DataContractSerializerTest
Added test that covers #37116.
2016-02-29 19:09:19 +00:00
monojenkins 185609a229 Merge pull request #2675 from lambdageek/dev/monoerror-mono_string_intern
Use MonoError in mono_string_{is_interned,intern}

Also mark mono_string_intern external only.  Runtime should use
mono_string_intern_checked.
2016-02-29 19:05:41 +00:00
Rodrigo Kumpera edaff9f900 [metadata] Don't abort if trying to fetch the header summary of a method with no body. Fixes #39200.
This assert made it impossible to fail gracefully when inlining broken methods.
2016-02-29 13:51:21 -05:00
Rolf Bjarne Kvinge 4741c8e208 [corlib] Fix tests to compile when Thread.Suspend/Resume is not supported. 2016-02-29 19:03:14 +01:00
Aleksey Kliger 94d3608661 [runtime] Don't raise exception while holding locks 2016-02-29 11:51:41 -05:00
Aleksey Kliger 50ae6746df [reflection] Expect no loader error in mono_reflection_get_custom_attrs_by_type anymore 2016-02-29 11:17:22 -05:00
Aleksey Kliger 915c5be91e [reflection] Use MonoError for mono_custom_attrs_from_param
Mark it external only.  Runtime should use mono_custom_attrs_from_param_checked
2016-02-29 11:17:22 -05:00
Aleksey Kliger d151380f20 [reflection] Use MonoError for mono_custom_attrs_from_field
Mark it external only.  Runtime should use mono_custom_attrs_from_field_checked.
2016-02-29 11:16:29 -05:00
Aleksey Kliger 2c1ad79f57 [reflection] Use MonoError for mono_custom_attrs_from_event
Mark it external only.  Runtime should use mono_custom_attrs_from_event_checked.
2016-02-29 11:15:27 -05:00
Aleksey Kliger 15158c01d7 [reflection] Use MonoError for mono_custom_attrs_from_property
Mark it external only.  Runtime should use mono_custom_attrs_from_property_checked.
2016-02-29 11:14:35 -05:00
Aleksey Kliger 58bf2901cd [reflection] Use MonoError for mono_custom_attrs_from_module 2016-02-29 11:12:46 -05:00
Aleksey Kliger daf526a452 [reflection] Use MonoError for mono_custom_attrs_from_assembly
Mark it external only.  Runtime should use mono_custom_attrs_from_assembly_checked.
2016-02-29 11:12:46 -05:00
Aleksey Kliger efd6fa136d [reflection] Use MonoError for mono_custom_attrs_from_class instead of loader error.
Also mark mono_custom_attrs_from_class external only.  Runtime should
use mono_custom_attrs_from_class_checked.
2016-02-29 11:10:49 -05:00
Aleksey Kliger aa0abb8067 [reflection] Use MonoError in mono_custom_attrs_from_{index, method} instead of loader error.
Also mark both as external only.  Runtime should use
mono_custom_attrs_from_index_checked and mono_custom_attrs_from_method_checked.
2016-02-29 11:09:24 -05:00
Ludovic Henry feac360890 [runtime] Fix compilation warning 2016-02-29 15:59:09 +00:00
Ludovic Henry 9ed6d805bb [runtime] Use MonoError for mono_remoting_invoke 2016-02-29 15:55:57 +00:00
Aleksey Kliger a44a9c4c7a Use MonoError in mono_string_{is_interned,intern}
Also mark mono_string_intern external only.  Runtime should use
mono_string_intern_checked.
2016-02-29 10:51:34 -05:00
Zoltan Varga bca31ce009 [runtime] Use pending exceptions in process.c. 2016-02-29 16:23:48 +01:00
Ludovic Henry 315e59dc35 [threads] Fix mono_thread_info_sleep overflow
This overflow would happen of the machine was up for more than 29 days, leading to an overflow in the value returned by mono_100ms_ticks.

The simplest solution is simply to resort to mono_100ns_ticks which would only overflow after more than 29247 years. So even the platform implement this value as the time since 0000-00-00 00:00:00, we still have more than 27000 years if front of us. It's also highly unlikely that we would overflow the `end' value when adding `ms', as that would mean we are in the last 29 days of that 29247 years.
2016-02-29 14:49:17 +00:00
monojenkins f23be9286b Merge pull request #2693 from dellis1972/master
[msbuild] Getting build error "Error initializing task XmlPeek: Not registered task XmlPeek".

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

Removes the uses of LogXXXFromResources from XmlPeek because
we do not use string resources in xbuild.
2016-02-29 13:30:19 +00:00
Dean Ellis b59807ecfa [msbuild] Getting build error "Error initializing task XmlPeek: Not registered task XmlPeek".
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38638

Removes the uses of LogXXXFromResources from XmlPeek because
we do not use string resources in xbuild.
2016-02-29 11:55:15 +00:00
monojenkins 53970822d0 Merge pull request #2692 from vargaz/process-coding-conv
[runtime] Use mono coding conventions in process.c.
2016-02-29 04:00:17 +00:00
Zoltan Varga 75bb097c88 [runtime] Use mono coding conventions in process.c. 2016-02-29 03:35:15 +01:00
Zoltan Varga 3050bbc285 [runtime] Use pending exceptions in socket-io.c. 2016-02-29 02:58:38 +01:00
Alexander Köplinger 046dacbc2d Merge pull request #2690 from steffen-kiess/json-operator-uint
Fix typo in JsonValue which broke the conversion to uint and add test case
2016-02-29 00:06:51 +01:00
Steffen Kieß 314568184c Fix typo in JsonValue which broke the conversion to uint and add test case 2016-02-28 18:40:22 +01:00
Miguel de Icaza ab7138d5c9 Bring new IKVM 2016-02-27 15:27:46 -05:00
João Matos 3c2f3d4ea9 Merge pull request #2580 from ItsVeryWindy/master
Updates to WebRequestHandler
2016-02-27 12:37:39 +00:00
João Matos 71e8d4d76f Merge pull request #2672 from Numpsy/sgenexception
[sgen] catch NotSupportedException from system.xml.serialization
2016-02-27 12:36:36 +00:00
Zoltan Varga c448cbe7a4 Merge pull request #2689 from vargaz/socket-io-cleanup
[runtime] Clean up the socket-io.c file to use the mono coding conven…
2016-02-27 06:46:01 -05:00
Zoltan Varga 3178ed38cc [runtime] Clean up the socket-io.c file to use the mono coding conventions. Rename 'error' to 'werror' so 'error' can be used to refer to MonoError as everywhere else. NFC. 2016-02-27 01:48:10 -05:00
monojenkins 6b665a8cdd Merge pull request #2688 from vargaz/marshal-set-pending
[runtime] Use pending exceptions instead of mono_raise_exception () i…

…n Marshal icalls.
2016-02-27 05:55:17 +00:00
Zoltan Varga 518af27e5d [runtime] Use pending exceptions instead of mono_raise_exception () in Marshal icalls. 2016-02-26 23:19:10 -05:00
Zoltan Varga d27bb08606 [aot] Fix the usage of MonoError in init-llvm_method (). 2016-02-26 22:40:29 -05:00
Marek Safar 7013a709c3 Merge pull request #2678 from esdrubal/filestream
[corlib] Fixed FileStream Write after Read issue
2016-02-26 15:12:18 -08:00
Aleksey Kliger (λgeek) cde5626319 Merge pull request #2685 from ludovic-henry/monoerror-mono_object_register_finalizer
[runtime] Use MonoError for mono_object_register_finalizer
2016-02-26 15:28:08 -05:00
monojenkins 4755f806bd Merge pull request #2671 from lambdageek/dev/monoerror-mono_runtime_class_init
[runtime] Use MonoError for mono_class_vtable_full and mono_runtime_class_init_full

Switch from a boolean `raise_on_error` arg to a MonoError outarg and let
callers decide what to do with the error.

Also mark mono_runtime_class_init external only.  Runtime should use
mono_runtime_class_init_full.
2016-02-26 18:00:20 +00:00
Aleksey Kliger d17b896095 [runtime] Use MonoError for mono_class_vtable_full and mono_runtime_class_init_full.
Switch from a boolean raise_on_error arg to a MonoError outarg and let
callers decide what to do with the error.

Also mark mono_runtime_class_init external only.  Runtime should use
mono_runtime_class_init_full.
2016-02-26 10:51:02 -05:00
Alexander Köplinger cae295aca4 [scripts] Point scripts like nunit-console2/mono-service2 to the 4.5 directory
The 2.0 profile doesn't ship with Mono anymore. To avoid breaking existing scripts we just point to the 4.5 version instead.
2016-02-26 15:28:53 +01:00
Alexander Köplinger a63b5d2f9f [System.ServiceModel] Fix a hardcoded port in a test
This failed with an "address already in use" error on Jenkins yesterday.
2016-02-26 15:28:53 +01:00
Ludovic Henry 8bbae7b059 [runtime] Use MonoError for mono_object_register_finalizer 2016-02-26 13:49:28 +00:00
Rodrigo Kumpera 17078213ce Merge pull request #2679 from lambdageek/dev/monoerror-reflection
[reflection] MonoError cleanups
2016-02-25 17:42:39 -08:00
Zoltan Varga 0936cea298 [runtime] Remove some declarations from marshal.h which are not used outside of marshal.c. 2016-02-25 17:10:04 -08:00
Alexander Köplinger 3478462128 Merge pull request #2683 from mfilippov/master
Add generation WepApplication.targets for v12.0 and v14.0 xbuild.
2016-02-26 01:23:19 +01:00
Mikhail Filippov 6b257ea753 Add generation WepApplication.targets for v12.0 and v14.0 xbuild. 2016-02-26 03:18:08 +03:00
monojenkins cc44053429 Merge pull request #2681 from kumpera/pedump_fix
[pedump] Fix init crash on pedump when using --verify.

@marek-safar  here's your fix

@monojenkins merge
2016-02-26 00:05:22 +00:00
Zoltan Varga 05f297f331 [aot] Move a mono_error_raise_exception () call higher up the call chain. 2016-02-25 13:53:53 -08:00
Rodrigo Kumpera 105325919d [pedump] Fix init crash on pedump when using --verify. 2016-02-25 13:40:10 -08:00
Zoltan Varga 07f91a9a68 [sdb] Remove some mono_error_raise_exception () calls. 2016-02-25 13:30:23 -08:00
Martin Baulig 9be67a219f [jit]: Correctly restore callee saved registers in mono_arch_get_call_filter() on amd64.
(cherry picked from commit 8c1ffe78cc)
2016-02-25 15:59:00 -05:00
Marcos Henrich 5878958ac2 [corlib] Fixed MonoIO.Write loop. 2016-02-25 18:47:22 +00:00
Marcos Henrich 2fd036928c [corlib] Fixed FileStream Write after Read issue
FileStream was writing to the wrong position When a value longer than
the FileStream buffer was written after a read.

This was fixed by doing a seek before doing the problematic write.

Fixes #11699
2016-02-25 18:47:09 +00:00
Marcos Henrich abaf937ca5 [corlib] Test FileStream with Read and Writes
Covers #11699
2016-02-25 18:38:05 +00:00
João Matos 1c4d28ddb4 Fixed the build. 2016-02-25 18:29:21 +00:00
João Matos ec0063b889 [support/zlib] Added API exports to exported calls from zlib-helper.c.
This is so we can re-use this code from libmonodroid, which currently has its own duplicated copy.
2016-02-25 17:37:49 +00:00
João Matos 1b82e02ea5 [support/zlib] Remove eglib link dependencies from zlib-helper.c.
This is so we can re-use this code from libmonodroid, which currently has its own duplicated copy.
2016-02-25 17:37:48 +00:00
Aleksey Kliger 833b07a4e9 [reflection] MonoError in mono_reflection_get_custom_attrs_info
Also mark that function external only.  Runtime should use
mono_reflection_get_custom_attrs_info_checked
2016-02-25 12:20:30 -05:00
Aleksey Kliger 1d7a1480dc [reflection] MonoError for mono_reflection_type_get_underlying_system_type 2016-02-25 11:30:12 -05:00
Ludovic Henry 53370ea717 Merge pull request #2655 from ludovic-henry/fix-wait-timeout
[WaitHandle] Fix Wait(One|Any|All) and SignalAndWait with timeout
2016-02-25 16:28:20 +00:00
Aleksey Kliger 8808162171 [reflection] MonoError for mono_custom_attrs_data_construct 2016-02-25 11:12:14 -05:00
Aleksey Kliger fc1f1adcf0 [reflection] MonoError for create_cattr_{typed,named}_arg 2016-02-25 10:52:52 -05:00
Aleksey Kliger 667103359d [reflection] MonoError for mono_reflection_method_on_tb_inst_get_handle 2016-02-25 10:52:32 -05:00
Zoltan Varga c8ed3d4e7b [jit] Remove a few mono_error_raise_exception () calls. 2016-02-25 00:36:57 -08:00
Zoltan Varga 7764aef8f6 Fix the build. 2016-02-24 23:30:33 -08:00
Zoltan Varga 1adda99f10 [jit] Add a MonoError argument to mono_create_jit_trampoline (), get rid of the mono_create_jit_trampoline_in_domain () variant. 2016-02-24 23:28:44 -08:00
Zoltan Varga 7736232995 [jit] Add a MonoError argument to mono_create_jump_trampoline (). 2016-02-24 23:15:22 -08:00
Zoltan Varga f343a79ed0 [llvm] Remove some unused argument passing conventions. 2016-02-24 13:50:16 -08:00
Marek Safar 07009a81b6 Merge pull request #2673 from serpentblade/master
[System.Data.SqlClient] Fix for bulk copy inserts via IDataReader
2016-02-24 12:21:16 -08:00
Dan Krieger 257f1e07d8 [System.Data.SqlClient] Fix for bulk copy inserts via IDataReader
Resolve same with DataTable requiring name problem fixed in 1858ce4a94
2016-02-24 11:57:20 -08:00
Richard Webb 50276ee436 [sgen] catch NotSupportedException from system.xml.serialization
System.Xml.Serialization.TypeDesc.CheckSupported might throw a
NotSupportedException, so catch it and ignore the current type
2016-02-24 13:18:12 +00:00
Zoltan Varga b5a35306e1 [llvm] Fix the loaded llvm build. 2016-02-24 01:23:58 -08:00
Zoltan Varga 9a99994e88 Fix the build. 2016-02-24 01:22:18 -08:00
Zoltan Varga 91cebc53f7 [llvm] Emit dwarf debug info when running with llvm 3.9. This is not enabled yet, since it doesn't seem to work, the dwarf info is in the object file emitted by llc, but disappears during linking. 2016-02-24 00:23:35 -08:00
Marek Safar ee16d551a3 [mcs] escaped quoted interpolated format specifier has no restrictions. Fixes #38992 2016-02-23 13:48:19 -08:00
Aleksey Kliger 0e76a2726a [runtime] Use MonoError in mono_runtime_object_init
Mark mono_runtime_object_init checked external only.  Runtime should use mono_runtime_object_init_checked.
2016-02-23 12:59:21 -05:00
monojenkins 978c84a68c Merge pull request #2664 from lambdageek/dev/monoerror-mono_rand
[runtime] Use MonoError in mono_rand_try_get_bytes
2016-02-23 17:30:20 +00:00
Aleksey Kliger 638dce48ca [runtime] MonoError cleanup in mono-security.c 2016-02-23 12:13:13 -05:00
João Matos 7c4d41a518 [System.IO.Compression.DeflateStream] Fixed end condition in decompression loop.
Keep track of total bytes read from input stream and break from the loop if it matches the number of bytes inflated by zlib.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34916.
2016-02-23 16:09:36 +00:00
Alexander Köplinger 22cc7b350e [msvc] %PATH% is sometimes empty in Jenkins, so "powershell" doesn't run
Try using a system-standard default variable which points to the required folder instead.
2016-02-23 17:03:11 +01:00
monojenkins 087088f3fa Merge pull request #2666 from lambdageek/dev/kill-InternalReplaceStrComp
[runtime] Remove ves_icall_System_String_InternalReplace_Str_Comp

It appears to be dead code.
2016-02-23 15:55:17 +00:00
Aleksey Kliger 2e8a703611 [runtime] Use MonoError in mono_rand_try_get_bytes 2016-02-23 10:50:10 -05:00
Alexis Christoforides d5785dcfa5 Bump Mono version -> 4.5.0 2016-02-23 09:25:09 -05:00
Aleksey Kliger 4895e70948 [runtime] Remove ves_icall_System_String_InternalReplace_Str_Comp
It appears to be dead code.
2016-02-22 18:45:16 -05:00
monojenkins 9f6238791f Merge pull request #2661 from ludovic-henry/fix-safehandle-abort
[SafeHandle] Avoid handle leakage in case of ThreadAbortException

If we get a ThreadAbortException while at SafeHandle.cs:124 (before this commit), we would not set release to true, even after incrementing the internal reference count of the SafeHandle. That could lead to potential leak, as the caller (following the common following pattern) would never call DangerousRelase, thus never calling PerformRelease. The finalizer or Dispose would not lead to the call of PerformRelease either, as the DangerousAddRef / DangerousRelase calls are unbalanced.

The common pattern for DangerousAddRef / DangerousRelease is the following:

bool release = false;
try {
  safeHandle.DangerousAddRef (ref release);
  /* do something with safeHandle.DangerousGetHandle () */
} finally {
  if (release)
    safeHandle.DangerousRelease ();
}

@monojenkins merge
2016-02-22 22:25:34 +00:00
monojenkins 26053ef5b5 Merge pull request #2657 from xmcclure/little-embed-fixes
Minor platform-support fixes

* Fix error in DISABLE_HW_TRAPS implementation
* Rename class in mono/tests/threadpool.cs to allow embedding
2016-02-22 19:45:29 +00:00
monojenkins 71a9582dda Merge pull request #2653 from lambdageek/dev/exception_type-1
[runtime] Don't access MonoClass::exception_type directly.

Use `mono_class_get_failure ()` and `mono_class_has_failed ()`

This is mostly just cleanup refactoring at this point that will make it easier to change how exception_type is used.

Also from this exercise we've learned that most of the class handling code just cares whether the class has an error or not, not what sort of error it was.
2016-02-22 19:30:33 +00:00
Ankit Jain 5317fbc0cd Merge pull request #2646 from ludovic-henry/fix-processwatch-dispose
[Microsoft.Build] Fix XS build error + Fix expected output newline from ProcessWrapper.OutputStreamChanged and ProcessWrapper.ErrorStreamChanged
2016-02-22 13:26:24 -05:00
Ludovic Henry 942bd2b8b2 [SafeHandle] Avoid handle leakage in case of ThreadAbortException
If we get a ThreadAbortException while at SafeHandle.cs:124 (before this commit), we would not set release to true, even after incrementing the internal reference count of the SafeHandle. That could lead to potential leak, as the caller (following the common following pattern) would never call DangerousRelase, thus never calling PerformRelease. The finalizer or Dispose would not lead to the call of PerformRelease either, as the DangerousAddRef / DangerousRelase calls are unbalanced.

The common pattern for DangerousAddRef / DangerousRelease is the following:

bool release = false;
try {
  safeHandle.DangerousAddRef (ref release);
  /* do something with safeHandle.DangerousGetHandle () */
} finally {
  if (release)
    safeHandle.DangerousRelease ();
}
2016-02-22 16:54:57 +00:00
Ludovic Henry 55492cbbee [WaitHandle] Fix Wait(One|Any|All) and SignalAndWait with timeout
In the case where we would call for example WaitHandle.WaitOne with a timeout, we could run in the case where we would wait way longer than the timeout would allow it (240s instead of 90s for example). This would be due to spurious wake, which would not be considered to be an error, but which would lead calling the `mono_os_cond_timedwait` function with the same timeout every time. That would mean that `mono_os_cond_timedwait` would return that it timedout, if and only if, it would timed out after N milliseconds, with N the millisecondsTimeout parameter to WaitOne in this example. That mean that any spurious wake would effectively lead to rewaiting with a full timeout every time.

That could lead to the following scenario:
 - T1 calls waitHandle.WaitOne(timeout = 1000ms) at T=0ms
 - T1 calls mono_os_cond_timedwait(timeout = 1000) at T=0ms
 - GC suspend T1 at T=500ms <- here it's not necessarily the GC, it can be anything suspending/signaling the thread
 - T1 spurious wake, and call mono_os_cond_timedwait(timeout = 1000) at T=500ms
 - GC interrupt T1 at T=1250ms
 - T1 spurious wake, and call mono_os_cond_timedwait(timeout = 1000) at T=1250ms
 - etc.

As you can see, T1 should have returned from waitHandle.WaitOne before the second spurious wake, but as it recalled mono_os_cond_timedwait with a timeout of 1000ms again, it didn't.

The fix consists in keeping track of when the call is supposed to finish, and pass an adaptable timeout to mono_os_cond_timedwait, which decreases as time goes on, to enventually reach 0, and return in a timely manner.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38382
2016-02-22 16:48:52 +00:00
Ludovic Henry c153626bdf Merge pull request #2620 from ludovic-henry/referencesource-waithandle
[corlib] Import System.Threading.WaitHandle
2016-02-22 16:04:36 +00:00
Marcos Henrich c7683d0cbd [System] Fixes HttpListenerRequest.IsLocal.
IsLocal was only returning true when the loopback address was used.
Fixes #38322.
2016-02-22 15:44:34 +00:00
Alexander Köplinger 0c3c632c32 Merge pull request #2651 from akoeplinger/dmcs-warning
[scripts] Add deprecation warning to dmcs
2016-02-22 16:43:44 +01:00
Aleksey Kliger 52ca8647ad [runtime] Don't access MonoClass::exception_type directly.
Use mono_class_has_failure () or mono_class_get_failure ()
2016-02-22 10:43:17 -05:00
Marcos Henrich 56f877287d [System] Test HttpListenerRequest.IsLocal.
Covers #38322.
2016-02-22 15:43:00 +00:00
Joao Matos 77b034cbe7 [System.IO.Compression] Lower minimum version in ZIP headers for compatibility.
This fixes compatibility with tools like MS Excel, file tool, and others that do not know how to recognize newer ZIP version formats.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=33553.
2016-02-22 14:53:09 +00:00
Matthew Leibowitz d95ccb2ca5 [Mono.Options] Changed the code a bit so that it works with PCL
- TypeDescriptor is unavailable, but basic conversion can be done using IConvertible
2016-02-22 16:45:28 +02:00
Ludovic Henry f558ee9034 Merge pull request #2593 from ludovic-henry/coop-fix-native-to-managed
[coop] Fix native-to-managed wrapper
2016-02-22 11:23:34 +00:00
Ludovic Henry 0a7389d4ba [WaitHandle] Call SafeWaitHandle DangerousAddRef / DangerousRelease around native calls
We do not want to wait on a handle that have been cleaned up, as that will lead to a warning message from the io-layer, without any error in managed code. That mean we could not detect this error case and recover from it.

By doing this DangerousAddRef / DangerousRelease before going to native, we ensure that the WaitHandle is and will stay alive while waiting on it. This same is done in CoreCLR, but in the marshalling code.
2016-02-22 11:22:56 +00:00
Ludovic Henry f6fa8f0359 [corlib] Import System.Threading.WaitHandle 2016-02-22 11:22:56 +00:00
Ludovic Henry 98f96e9559 [io-layer] Fix process_wait return value for current process
When waiting on the current process, we would return WAIT_FAILED, as waitpid would return -1, with errno set to ECHILD.
But the semantic of WaitForSingleObjectEx and WaitForMultipleObjectsEx when waiting on current process is to return WAIT_TIMEOUT. This is then a special case that we need to add to this code.
2016-02-22 11:22:46 +00:00
Alexander Köplinger 9e36a50147 [scripts] Add deprecation warning to dmcs
dmcs was deprecated in favor of mcs a while back, yet people are still creating new scripts with it.
Adding a message that shows up on each dmcs invocation should hopefully make this more obvious.
2016-02-22 11:50:26 +01:00
Vlad Brezae 28b7a83ff6 Merge pull request #2648 from BrzVlad/fix-cprop-vregs
[jit] Fix init of cprop defs for vregs
2016-02-22 17:49:35 +07:00
Zoltan Varga efa2d17df2 [llvm] Avoid setting the mono.nofail.load flag with the new llvm branch, its not supported there. 2016-02-22 02:43:36 -05:00
Rodrigo Kumpera 35190b72b5 Merge pull request #2660 from kumpera/loader-error-cleanup6
[mono-error] This PR eliminates mono_class_from_name and a couple of assorted fixes.
2016-02-21 17:46:35 -05:00
Rodrigo Kumpera 3ae2835c31 [runtime] Ban mono_class_from_name mono_class_from_name_case.
They are no longer in use by the runtime. Begone!
2016-02-20 13:28:45 -05:00
Rodrigo Kumpera 00b0d3c451 [tests] Pass cli args to test runner so we can pick which test to run 2016-02-20 13:28:45 -05:00
Rodrigo Kumpera 9e963b91f3 [util] When creating the TLE exception only provide aditional data if both type and assembly names are provided. Otherwise one would fail and we'd get an OOM instead. 2016-02-20 13:28:44 -05:00
Rodrigo Kumpera b5f738d8dc [runtime][jit] Replace usage of mono_class_from_name with mono_class_load_from_name for variable type lookups. 2016-02-20 13:28:43 -05:00
Rodrigo Kumpera 9c6331cd5d [runtime] Switch probing usage of mono_class_from_name to mono_class_try_load_from_name.
Those are call sites that can handle missing types correctly.
2016-02-20 13:28:43 -05:00
Rodrigo Kumpera 4bdeab0dbb [runtime] Add MonoError to search_modules. Fix signature of mono_class_from_name_checked_aux (MonoError MUST be last arg). 2016-02-20 13:28:42 -05:00
Rodrigo Kumpera 103a5097c0 [runtime] Switch GENERATE_GET_CLASS_WITH_CACHE to use mono_class_load_from_name. Kill dead macro. 2016-02-20 13:28:41 -05:00
Rodrigo Kumpera a2b7d129d1 [runtime] Add manually coded version of GENERATE_GET_CLASS_WITH_CACHE that uses System.dll 2016-02-20 13:28:41 -05:00
Rodrigo Kumpera 61b243e8ca [runtime] Replace mono_class_from_name with mono_class_load_from_name for explicit loads that must not fail. 2016-02-20 13:28:37 -05:00
Rodrigo Kumpera 4ebdf07bd1 [runtime] Add type load caching to one missing thing appdomain.c 2016-02-20 13:23:25 -05:00
Rodrigo Kumpera 1da6b76297 [runtime] Use mono_class_load_from_name to load types in mono_defaults.
We can use mono_class_load_from_name in all cases that we previously used to assert after loading.

All optional types have being moved over to use GENERATE_TRY_GET_CLASS_WITH_CACHE.

All but System.Runtime.ConstrainedExecution.CriticalFinalizerObject which is used within
sgen and we must ensure we don't try to lazy load it there.

I'm not 100% sure whether it should be optional, maybe it's a leftover from the 1.0 -> 2.0 timeframe?

The problem is that marking more types as required would be a burden on linkers as they might not force
it to be preserved.

I'm not particularly happy with the current large set of types that are loaded upfront. A significant
number of them could be lazy loaded.
2016-02-20 13:23:24 -05:00
Rodrigo Kumpera 29a95bafd8 [runtime] Replace explicit lookup with GENERATE_GET_CLASS_WITH_CACHE in cominterop.c
Last place with adhoc lookup & caching.
2016-02-20 13:23:24 -05:00
Rodrigo Kumpera 0cd805af4c [runtime] Add GENERATE_TRY_GET_CLASS_WITH_CACHE macro that generates a probing function.
This function generates probing functions that rely on mono_class_try_load_from_name.

In addition replace usage of hand crafted loading code from all around.
2016-02-20 13:23:24 -05:00
Rodrigo Kumpera d0e10f8670 [runtime] Add mono_class_load_from_name and mono_class_try_load_from_name.
Those are variants of mono_class_from_name_checked that implement two common type loading scenarios in the rutime.

The first is mono_class_load_from_name, that loads critical types that the runtime cannot function without.
This means we abort if the type is missing or broken. We should use it in places where today we crash when
either of those would happen.

The other is mono_class_try_load_from_name, which is ok if the type is not found, but will abort if the type is broken.
The reasoning for aborting on a broken type is that it's unclear on whether the runtime should be using the type or not,
specially given most of those optional types change behavior of the application. This, in practice, forces the linker to
not produce a broken corlib.
2016-02-20 13:23:24 -05:00
Alexander Köplinger 9fa6112821 Merge pull request #2647 from qmfrederik/fixes/eventsources
WSDualHttpBinding: Additional constructor overloads to match .NET 4.5
2016-02-20 16:42:23 +01:00
Marek Safar 640be884a4 Merge pull request #2659 from tritao/system_io_compression_reopen
[System.IO.Compression] Fixed re-opening of disposed Zip entry streams.
2016-02-20 09:41:08 +01:00
Vlad Brezae 89d73428e0 Revert "Revert "[jit] Don't allocate memory for unused vreg""
This reverts commit c4037092ac.
2016-02-20 09:25:29 +02:00
Vlad Brezae 5e07e270f3 [jit] Clear defs only for valid vregs used by the bblock's instructions
Also clean the most significant part of long vregs.
2016-02-20 09:25:29 +02:00
Alexander Köplinger 93df50c3c3 [System.Web.ApplicationServices] Add new file to EXTRA_DISTFILES
It was added in 383d80a785. Fixes tarball.
2016-02-20 05:21:21 +01:00
monojenkins 51c8a6e1a9 Merge pull request #2638 from gofman/fixprintsettings
[System.Drawing.Printing] CUPS default PageSize and InputSlot should …

[System.Drawing.Printing] CUPS default PageSize and InputSlot should override PPD defaults.

There is already a test case for that (PrintingServicesUnixTest.cs, Bug602934_PrinterSettingsReturnActualValues) which fails when user configured options are different from PPD settings. Patch also makes this test not to fail if "Resolution" option is not present in CUPS options.
2016-02-20 03:40:28 +00:00
Zoltan Varga 4014e7476e [llvm] Allow the llvm backend to work with a new version of the mono llvm fork based on llvm 3.9.
This version is at:
https://github.com/mono/llvm/tree/llvm-master
It has a mono api version starting from 100. Currently, using LLVM in JIT mode is not supported, only AOT.
2016-02-19 20:44:29 -05:00
Alexander Köplinger 0a4084de8e Merge pull request #2649 from kjuby8709gsome/master
[System]: System.TimeZoneInfo - implemented GetUtcOffset with DateTim…
2016-02-20 01:30:29 +01:00
Joao Matos 3745b6d369 [System.IO.Compression] Fixed re-opening of disposed Zip entry streams.
Fixes System.IO.Compression to work against Microsoft Office OpenXML SDK which depends on this behavior.

Also partial fix for https://bugzilla.xamarin.com/show_bug.cgi?id=33553.
2016-02-19 23:58:55 +00:00
Frederik Carlier 3309b3cb83 Add placeholders for missing methods:
* WSDualHttpBinding: Add additional constructor overloads to match .NET 4.5
* Dispatcher: Add support for the various InvokeAsync methods
2016-02-19 23:04:07 +01:00
Alexis Christoforides 959f4bd8ac Merge pull request #2656 from lambdageek/dev/bug-38600
[mkbundle] Support spaces, strange symbols in assembly names
2016-02-19 17:01:56 -05:00
Aleksey Kliger 7eec60e471 [mkbundle] Support spaces, strange symbols in assembly names
In the asm stubs, replace everything that isn't a-zA-Z0-9_ by an underscore.

Sprinkle quotes in commandline args when running the linker.

Fixes [Bugzilla #38600](https://bugzilla.xamarin.com/show_bug.cgi?id=38600)
2016-02-19 16:54:10 -05:00
Andi McClure ab43a32c0e Rename class in mono/tests/threadpool.cs to allow embedding 2016-02-19 16:51:03 -05:00
Andi McClure 4ca0f35d90 Fix error in DISABLE_HW_TRAPS implementation 2016-02-22 10:46:57 -05:00
Alex Rønne Petersen a339e6b286 Merge pull request #2652 from PAVBAN95/master
Fixed typo in README.md
2016-02-19 21:14:32 +01:00
PAVAN BANSAL e4f37a04f5 Fixed typo in README.md
slightly was misspelled as slighty.
2016-02-20 01:22:33 +05:30
Marek Safar 383d80a785 Merge pull request #2632 from kasthack/sysweb-import
[System.Web.*] Reference source import
2016-02-19 20:52:07 +01:00
Ludovic Henry 4ad73a5413 [runtime] Wrap mono_jit_attach and mono_jit_detach in try { ... } finally { ... } clause
This is useful for coop mode only, as coop needs additionnal thread state transition from BLOCKING to RUNNING and vice versa, and if both these transitions are not done properly, we finish in a incorrect state.
In non-coop mode, the mono_jit_detach only sets the domain to NULL, to avoid scanning threads unnecessarily, so not actually detaching properly is not hurting anything.
2016-02-19 18:05:22 +00:00
Ludovic Henry 289b6d55f7 [coop] Fix native-to-managed wrapper thread attach
Previously, when we would invoke a native-to-managed wrapper from a thread that has not been attached to the runtime, we would simply ensure to attach this thread to the runtime. The issue arise when using coop and needing to switch a thread which is not executing runtime or managed code to BLOCKING state.

That would arise on iOS when using dispatch_async:
 - the user would enqueue a Delegate, triggering a call to mono_delegate_to_ftnptr, generating this native-to-managed wrapper
 - the wrapper would be called asynchronously on a thread managed by the OS/dispatch_async
 - the thread would attach to the runtime, switching its state from STARTING -> RUNNING
 - the thread would finish executing the delegate, thus 'detaching' from the runtime, but without switching its state from RUNNING -> BLOCKING
 - during the next garbage collection, the GC would try to suspend this thread as it is still in RUNNING state, but because it's neither executing runtime code, neither managed code, it will never hit a safepoint, leading to a timeouting suspend.

To fix that issue, we need to support the following state switches:
 - STARTING -> RUNNING -> BLOCKING: happens when it's the first time this thread calls a native-to-managed wrapper
 - BLOCKING -> RUNNING -> BLOCKING: happens when it's not the first time this thread is called from a facility like dispatch_async, or if it is, for example, called as a callback from an external library
 - RUNNING -> RUNNING -> RUNNING: if we call this wrapper from runtime or managed code, see for example System.Reflection.Emit.ILGeneratorTest.TestEmitCalliWithNullReturnType

This facility also need to take care of the current domain, to ensure that we switch properly between domains, and set it to the one that was used when creating this delegate, then restoring the original one.
2016-02-19 18:05:22 +00:00
Marek Safar faef6b6520 Merge pull request #2650 from radical/csc-args
[mcs] Accept and ignore command line args supported by csc that we don't
2016-02-19 18:33:00 +01:00
Ankit Jain 889774c852 [mcs] Accept and ignore command line args supported by csc that we don't
support:

	/win32manifest
	/nowin32manifest
2016-02-19 12:16:11 -05:00
kchernyavskiy ebdbf10605 [System]: System.TimeZoneInfo - implemented GetUtcOffset with DateTimeOffset 2016-02-19 21:03:15 +04:00
Oliver Neal 2d1ab0ef20 updated client certificates to handle non-manual case 2016-02-19 15:41:52 +00:00
Oliver Neal 9dc8e0289d added support for client certificates and the server certificate validation callback 2016-02-19 15:41:52 +00:00
kasthack 36e026d6c1 [System.Web.*] Reference source import: System.Web.Profile.(ProfileInfoCollection, ProfileInfo, ProfileAuthenticationOption, DefaultProfile), missing System.Web.ModelBinding and System.Web.UI types, System.Web.ApplicationServices.(...) 2016-02-19 18:04:06 +03:00
Ludovic Henry fb85e55a98 [Microsoft.Build] Fix expected output newline from ProcessWrapper.OutputStreamChanged and ProcessWrapper.ErrorStreamChanged
The previous implementation of ProcessWrapper OutputStreamChanged and ErrorStreamChanged would manually launch a background thread to read on the process StandardOutput and StandardError, then simply passing the output to the OutputStreamChanged and ErrorStreamChanged events. This mean that even the newline characters would be passed to these events, leaving these events callbacks deal with splitting the output line by line.
On the other hand, Process.OutputDataReceived and Process.ErrorDataReceived already split the data line by line, and discard the newline character. That implies that, to keep the old ProcessWrapper behaviour, we need to add these newlines character before calling OutputStreamChanged and ErrorStreamChanged events callbacks.
2016-02-19 14:45:52 +00:00
Ludovic Henry 3dd741e9cb [Microsoft.Build] Fix XS build error
We observe the following error when building XS:

"Threadpool worker" tid=0x0x7f011bfff700 this=0x0x7f01394bfb30 thread handle 0x432 state : not waiting owns ()
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAll_internal (System.Threading.WaitHandle[],int,bool) <0x0005d>
  at System.Threading.WaitHandle.WaitAll (System.Threading.WaitHandle[]) <0x00026>
  at Microsoft.Build.Utilities.ProcessWrapper.<Start>m__0 (object,System.EventArgs) <0x0008f>
  at System.Diagnostics.Process.OnExited () <0x000ed>
  at System.Diagnostics.Process.RaiseOnExited () <0x0009f>
  at System.Diagnostics.Process.CompletionCallback (object,bool) <0x00017>
  at System.Threading.RegisteredWaitHandle.DoCallBack (object) <0x00088>
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) <0x00058>
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x001c6>
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x00020>
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x0004c>
  at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x001d6>
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x00008>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <0x0005a>

And the process output would contains a bunch of "_wapi_handle_ref: Attempting to ref unused handle 0x1234" and "_wapi_handle_unref_full: Attempting to unref unused handle 0x1234".

The expected behaviour is for WaitHandle.(WaitAll|WaitAny|WaitOne|SignalAndWait) and EventWaitHandle.Set to throw an ObjectDisposedException in case the WaitHandle (or one of them if calling WaitAll, WaitAny or SignalAndWait) have been disposed.

This error would be due to a race between ProcessWrapper.Dispose, which closes endEventOut and endEventErr, and the above Process.Wrapper.<Start>m__0 (the base.Exited) callback, which waits on endEventOut and endEventErr.
2016-02-19 14:39:36 +00:00
Marek Safar 1f5f38da2d [bcl] Add workaround for csc bug 2016-02-19 13:26:09 +01:00
Paul Gofman bbf7ea470a [System.Drawing.Printing] CUPS default PageSize and InputSlot should override PPD defaults.
There is already a test case for that (PrintingServicesUnixTest.cs,
Bug602934_PrinterSettingsReturnActualValues) which fails when user
configured options are different from PPD settings. Patch also makes
this test not to fail if "Resolution" option is not present in CUPS
options.

*Update: removed leftover debug Console.WriteLine from patch
2016-02-19 13:01:10 +03:00
Zoltan Varga 347cd69e66 [jit] Fix a regression introduced by c0b9be3e03. 2016-02-19 00:25:42 -05:00
Zoltan Varga 85fa53bab4 [runtime] Avoid a crash when trying to load a non-assembly file as an assembly. Fixes #38825. 2016-02-18 23:33:36 -05:00
Alexander Köplinger 2a6c3eb278 Revert accidental change to submodule from 40017f9 2016-02-19 02:51:28 +01:00
monojenkins c9957bc981 Merge pull request #2643 from xmcclure/disable-hw-traps
DISABLE_HW_TRAPS flag to disable signal reliance

Single switch for both explicit null checks and explicit illegal-divide checks.
2016-02-19 00:10:18 +00:00
Zoltan Varga 3a5dbc7e3d [jit] Add missing div check to OP_IREM_IMM. 2016-02-18 18:36:14 -05:00
monojenkins 8e663307d6 Merge pull request #2626 from lewurm/jit-time-track
[jit] add more detailed statistics for single phases

@vargaz: can I have a review on that please? :)
2016-02-18 23:08:36 +00:00
Zoltan Varga c0b9be3e03 [jit] Add div checks to OP_LDIV etc. opcodes. 2016-02-18 17:53:28 -05:00
monojenkins 2cf52cba07 Merge pull request #2642 from kumpera/monodis_fix
[monodis] Improve error handling so it can survive the broken assembly from #37393.
2016-02-18 22:40:24 +00:00
Andi McClure 2b4484b4d8 DISABLE_HW_TRAPS flag to disable signal reliance
Single switch for both explicit null checks and explicit illegal-divide checks
2016-02-18 17:16:29 -05:00
Alexis Christoforides 40017f9aa0 [mkbundle] Small fixes under Windows
* Quote source files before passing to cl.exe
* Use Windows subsystem instead of console but still use main() entry point and not WinMain()
2016-02-18 16:54:20 -05:00
Zoltan Varga 04636f9981 [jit] Add div checks to the OP_IDIV_IMM etc. opcodes if needed. 2016-02-18 15:56:21 -05:00
Miguel de Icaza ca6666ddbd [Mainsoft] Remove deprecated code: the Mainsoft code has not been maintained in years 2016-02-18 14:49:40 -05:00
Rodrigo Kumpera cec2b91483 [monodis] Improve error handling so it can survive the broken assembly from #37393. 2016-02-18 14:36:55 -05:00
Alexander Köplinger 051f49639d Merge pull request #2609 from directhex/xambug-30902
Use X509 serial number in Mono cert store filename
2016-02-18 12:45:52 +01:00
Ludovic Henry 1ad39faaa0 Merge pull request #2624 from ludovic-henry/monoerror-appdomain
[runtime] Use MonoError for appdomain.c functions
2016-02-18 11:11:41 +00:00
Ludovic Henry e455981212 Merge pull request #2630 from ludovic-henry/fix-registeredwaithandle-leak
[corlib] Fix potential RegisteredWaitHandle resource leak
2016-02-18 10:53:37 +00:00
Rodrigo Kumpera 5ad8e35be3 Merge pull request #2635 from xmcclure/timezoneinfo
Broaden readlink load failure check in TimeZoneInfo
2016-02-17 23:12:15 -05:00
Zoltan Varga 5ad7794575 [jit] Get rid of the non-checked variant of mono_resolve_patch_target (), its not used any more. 2016-02-17 22:23:40 -05:00
Martin Baulig 082a47eed5 Bump Makefile to trigger full build.
(cherry picked from commit 905088bb90)
2016-02-17 20:41:10 -05:00
Martin Baulig 80741c16fd [System]: 'ServicePointManager.CertificatePolicy': lazily initialize.
The internal GetLegacyCertificatePolicy() now returns null unless this
property has explicitly been assigned to, so the legacy handler will not
be used in ChainValidationHelper.

(cherry picked from commit e69e878405)
2016-02-17 20:40:59 -05:00
Martin Baulig e6e26d9231 [Mono.Security]: Make 'MonoTlsSettings.UseServicePointManagerCallback' a 'bool?'.
The default value is 'true' when using HttpWebRequest, but false when using SslStream
directly.

(cherry picked from commit c871ff63ff)
2016-02-17 20:40:44 -05:00
Martin Baulig 3680b3077b [System]: 'HttpWebRequest.Proxy' - update ServicePoint on assignment.
(cherry picked from commit 08e3a4120c)
2016-02-17 20:40:32 -05:00
Martin Baulig f8f7de7356 [System]: Properly propage exceptions in HttpWebRequest.BeginGetResponse().
(cherry picked from commit acf6c4bd37)
2016-02-17 20:40:19 -05:00
Martin Baulig a429d91690 [System]: Disallow "https" proxies in ServicePointManager.FindServicePoint().
(cherry picked from commit e734cd8b59)
2016-02-17 20:40:09 -05:00
Martin Baulig c56f5c199c [System]: Use correct default value for ServicePointManager.SecurityProtocol.
(cherry picked from commit ddf47829d9)
2016-02-17 20:39:58 -05:00
Martin Baulig 26d5b83fee [System]: Clone the X509Certificate instance that's stored in ServicePoint.
(cherry picked from commit 65afb9f640)
2016-02-17 20:38:52 -05:00
Andi McClure fc58345df6 Broaden readlink load failure check in TimeZoneInfo
Previously this caught only cases where libc was absent, now it catches cases where libc is present but does not contain readlink
2016-02-17 16:49:15 -05:00
monojenkins f1be12dd91 Merge pull request #2633 from xmcclure/fixmobile
Fix mobile/AOT build following System.Diagnostics.Process import

System.Diagnostics.Process was recently added to Mono. This introduced two problems for mobile builds:

- Support classes were not added to the mobile profile .sources.
- The imported referencesource code did not build on fullaot.

This PR fixes both issues.
2016-02-17 21:35:34 +00:00
Chris Hamons c4fe9721ff Prepare XM for Http additions 2016-02-17 14:20:15 -06:00
Alexander Köplinger 83af26bad5 [jit] Fix build on ppc
Declaration of the 'error' variable was missed in 3b438cfce3
2016-02-17 21:20:03 +01:00
Bernhard Urban f42da3fd21 [jit] add timers for several phases 2016-02-17 10:53:13 -08:00
Bernhard Urban 0daccc76e8 [jit] refactor branch fixups between basic blocks into function 2016-02-17 10:51:16 -08:00
Bernhard Urban 7b4e9a661d [jit] refactor basic block ordering in separate function 2016-02-17 10:40:50 -08:00
Bernhard Urban be89deceec [jit] update jit statistics during aot compilation 2016-02-17 10:40:01 -08:00
Bernhard Urban 2ca8b4fb56 [jit] refactor out time tracking function 2016-02-17 10:34:37 -08:00
João Matos c9e1f8f2ed [man] Updated Mono man page with AOT gen-seq-points-file option. 2016-02-17 17:48:09 +00:00
João Matos 066b506905 [aot] Remove debugging print. 2016-02-17 17:48:09 +00:00
monojenkins 25b04d16d9 Merge pull request #2631 from ludovic-henry/fix-microsoftbuild
[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelBuilds

The previous implementation of ProcessWrapper would launch its own threads to read on the process stdout and stderr. We can more simply use OutputDataReceived and ErrorDataReceived which will do the same under the hood. We use as well the Exited event to track the end of the Process.
2016-02-17 17:25:30 +00:00
Andi McClure f0b9f524fa Update referencesources (to fix full-aot build) 2016-02-17 11:25:19 -05:00
João Matos d7da0cc294 [aot] Reworked sequence points file AOT option to allow an explicit path passed.
This will be used to fix msym files being overwritten per ABI compilation in AOT compilation driven by Monodroid.
2016-02-17 15:59:26 +00:00
Ludovic Henry 8b8450d52c [tests] List files from the repo intead of / for process-stress-3.cs
On some machines, slow remote devices can be attached, leading to very slow find commands, leading to timeouts.
2016-02-17 15:48:35 +00:00
monojenkins 529a16fc14 Merge pull request #2628 from kumpera/misc-loader-error
[runtime] Small set of cleanups to the loader code.
2016-02-17 15:38:52 +00:00
Ludovic Henry 0d0f435afb [Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelBuilds
The previous implementation of ProcessWrapper would launch its own threads to read on the process stdout and stderr. We can more simply use OutputDataReceived and ErrorDataReceived which will do the same under the hood. We use as well the Exited event to track the end of the Process.
2016-02-17 15:22:26 +00:00
Ludovic Henry 48a0a73f84 [runtime] Use MonoError for mono_context_init 2016-02-17 13:53:12 +00:00
Ludovic Henry 44171d1f6b [runtime] Use MonoError for mono_runtime_init 2016-02-17 13:53:11 +00:00
Ludovic Henry 7f0c3d59f3 [runtime] Use MonoError for mono_domain_try_type_resolve 2016-02-17 13:52:21 +00:00
Ludovic Henry 8315bd378e [runtime] Mark mono_domain_create_appdomain as MONO_RT_EXTERNAL_ONLY 2016-02-17 13:46:30 +00:00
Ludovic Henry 63b999868b [runtime] Use MonoError for mono_try_assembly_resolve 2016-02-17 13:43:15 +00:00
Ludovic Henry 050742207f [runtime] Use MonoError for copy_app_domain_setup 2016-02-17 13:43:15 +00:00
Ludovic Henry 920ec35630 [corlib] Fix potential RegisteredWaitHandle resource leak
If we construct RegisteredWaitHandle with executeOnlyOnce = true, and never call Unregister, we will keep _waitObject.SafeWaitHandle reference count unbalanced. This will lead to never releasing the waitObject handle.

As we only need to ensure that the waitObject handle is alive while in the Wait method, we use the SafeHandle mechanism only there. The 2 possibles scenarios in the Wait method are:
 - waitObject has not been closed: we increment its ref count, so we ensure that it's alive as long as we use it here
 - waitObject has been closed: a ObjectDisposedException is thrown, we catch it and keep on without trying to wait on the handle
2016-02-17 10:54:49 +00:00
Marek Safar c2c22fa961 Merge pull request #2627 from kasthack/sysweb-import
[System.Web] Reference source import
2016-02-17 10:33:21 +01:00
Marek Safar 8a6828833c Merge pull request #2629 from gofman/fixtimezoneinfo
[System.TimeZoneInfo] Fix finding system time zone when /etc/localtim…
2016-02-17 10:31:11 +01:00
Paul Gofman 5d4f8f40a6 [System.TimeZoneInfo] Fix finding system time zone when /etc/localtime has a relative path. 2016-02-17 12:00:41 +03:00
Zoltan Varga 3b438cfce3 [jit] Use mono_resolve_patch_target_checked () in more places. 2016-02-16 23:57:55 -05:00
Zoltan Varga 868d624e68 [jit] Use mono_resolve_patch_target_checked () in more places. 2016-02-16 23:20:02 -05:00
kasthack 2c2ca5b296 [System.Web] Reference source import: System.Web.Util internal classes 2016-02-17 07:08:56 +03:00
kasthack fa101bb2b6 [System.Web] Reference source import: System.Web.Routing internal classes 2016-02-17 06:35:31 +03:00
kasthack 921b6aa041 [System.Web] Reference source import 2016-02-17 06:15:30 +03:00
Zoltan Varga cbef9ab952 Fix the build. 2016-02-16 21:56:27 -05:00
Zoltan Varga 41879bda03 [llvm] Remove some unfinished code committed by mistake. 2016-02-16 21:56:27 -05:00
monojenkins cc665cda43 Merge pull request #2625 from xmcclure/tinymemoryleak
Fix memory leak in mono_aot_plt_resolve when exiting with exception

We were not cleaning up our allocated memory on all code paths.
2016-02-17 02:45:17 +00:00
Rodrigo Kumpera 40ca6977af [mono-error] Replace mono_metadata_parse_type_full with mono_metadata_parse_type_checked. 2016-02-16 20:12:46 -05:00
Rodrigo Kumpera 0bda3474c1 [metadata] Introduce MonoError into mono_metadata_parse_type_internal. 2016-02-16 20:12:41 -05:00
Rodrigo Kumpera 8d6025df4f [metadata] Remove mono_metadata_parse_array_full, nothing uses it. 2016-02-16 20:12:37 -05:00
Zoltan Varga f88f82d766 [llvm] Fix a crash when a simd argument is returned from a method by reference. 2016-02-16 20:09:48 -05:00
Rodrigo Kumpera ce79e5cbfb [runtime] Fix the build. 2016-02-16 20:09:01 -05:00
kasthack 09e5099266 [System.Web] Reference source import 2016-02-17 04:08:57 +03:00
Rodrigo Kumpera 91f9eddc0a [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in method-to-ir.c and mini-exceptions.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:23 -05:00
Rodrigo Kumpera bb865afc34 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in threads.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:23 -05:00
Rodrigo Kumpera 814e3fa7d5 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in verify.c and remoting.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:22 -05:00
Rodrigo Kumpera 49883b4542 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in security-core-clr.c and security-manager.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:22 -05:00
Rodrigo Kumpera 9903715fa1 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in reflection.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:22 -05:00
Rodrigo Kumpera b5401a1488 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in object.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:22 -05:00
Rodrigo Kumpera 3de136f36f [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in marshal.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:21 -05:00
Rodrigo Kumpera bba695c8a1 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in locale.c.
The macro generates the right form of corlib type lookup & caching.
2016-02-16 19:28:21 -05:00
Rodrigo Kumpera b374449485 [runtime] Replace hand-written type look up/caching with GENERATE_GET_CLASS_WITH_CACHE in icall.c.
The macro generates the right form of corlib type lookup & caching. Plus it's shorter.
2016-02-16 19:28:21 -05:00
Andi McClure f3ebec8b5a Import System.Diagnostics.Process changes to mobile profile
Changes modeled on ludovic-henry commit 00b5517dd3. Fixes build.
2016-02-16 18:04:18 -05:00
Andi McClure 8cb221daeb Fix memory leak in mono_aot_plt_resolve when exiting with exception 2016-02-16 16:45:53 -05:00
Radek Doulik fc92955366 [linker] do not set scope of non-marked typerefs
- fixes #38818

 - setting the *unchanged* scope to non-marked types is harmful,
   because in case the type has declaring type, the scope of declaring
   type is set as well. see
   https://github.com/mono/cecil/blob/master/Mono.Cecil/TypeReference.cs#L132

   public virtual IMetadataScope Scope {
      get ...
      set {
          var declaring_type = this.DeclaringType;
          if (declaring_type != null) {
              declaring_type.Scope = value;
              return;
          }
          scope = value;
      }
   }

   so in our case, we first set correctly scope of
   System.Collections.Generic.Dictionary`2 to mscorlib, then (re)set
   scope of System.Collections.Generic.Dictionary`2/ValueCollection
   and
   System.Collections.Generic.Dictionary`2/ValueCollection/Enumerator
   to System.Collection (note that these types are not marked and are
   swept away by linker), which sets scope of its declaring type
   System.Collections.Generic.Dictionary`2 back to System.Collection

   and because the System.Collection is linked-out, the typeref is
   incorrectly written with the scope set to System later
2016-02-16 22:44:29 +01:00
Ludovic Henry 8b36e3afb7 [runtime] Bump corlib version 2016-02-16 20:42:57 +00:00
Ludovic Henry 75000f290a [Process] Add stress tests
That's to ensure we do not have regression in the Process implementation.
2016-02-16 20:11:59 +00:00
Ludovic Henry 00b5517dd3 [System] Import System.Diagnostics.Process 2016-02-16 20:11:58 +00:00
Ludovic Henry 1a69330766 [corlib] Fix race condition between RegisteredWaitHandle Wait and Unregister methods
In the following case we would have a race between Wait and Unregister methods:
 - T1 calls ThreadPool.RegisterWaitForSingleObject to wait on waitHandle
 - registeredWaitHandle is constructed to wait on waitHandle
 - registeredWaitHandle.Wait method is enqueued on the ThreadPool
 - T1 calls registeredWaitHandle.Unregister
 - T1 calls waitHandle.Close (happens in Process.StopWatchingForExit)
 - TTP (the threadpool thread) calls registeredWaitHandle.Wait
  - TTP calls WaitHandle.WaitAny (waitHandle, ...)

The last step try to access the waitHandle that has been previously closed, leading to a _wapi_handle_ref / _wapi_handle_unref_full error message.

The fix is to ensure that the RegisteredWaitHandle keeps the WaitHandle alive. To achieve this, we simply use the SafeWaitHandle inside the WaitHandle by: increasing its ref count when constructing the RegisteredWaitHandle, and decrementing it when unregistering it.
We also increase the count when using it in Wait, so if we execute Unregister and Wait concurrently, we guarantee that the WaitHandle is still valid in Wait, or get an exception if not.
2016-02-16 20:11:58 +00:00
Marek Safar 19c0bab243 [mcs] Add more known sdk paths redirections 2016-02-16 17:39:51 +01:00
Rodrigo Kumpera 9e17248c03 Merge pull request #2603 from kumpera/fix_set_pending_exception
[runtime] Move pending_exception from InternalThread to Thread to avoid crashing on domain unload.
2016-02-16 08:02:23 -08:00
Marcos Henrich 7c5ad4bc38 Merge pull request #2548 from esdrubal/discovery
[System.Web.Services] Fix DiscoveryClientProtocol
2016-02-16 15:54:54 +00:00
Marcos Henrich 455d287931 Merge pull request #2623 from esdrubal/fileinfo_moveto
[corlib] Fix FileInfo.MoveTo with same name.
2016-02-16 13:57:08 +00:00
Alexander Köplinger 58a583e39a Merge pull request #2615 from akoeplinger/fix-perfcounter-free-mem-calculation
[perfcounters] Fix calculation of free memory in mono_determine_physical_ram_available_size ()
2016-02-16 13:08:55 +01:00
Marcos Henrich a86179ebb1 [System.Web.Services] Test DiscoveryClientProtocol
Covers #36116
2016-02-16 11:56:02 +00:00
Marcos Henrich 80fd18926f [corlib] Fix FileInfo.MoveTo with same name.
FileInfo.MoveTo was not moving a file from one directory to another when
the file name did not change.

Fixes #18361.

An ArgumentException when destFileName is an empty array was added,
otherwise FileInfoTest.MoveTo_DestFileName_Empty would fail. Both
Path.GetFullPath and File.Move throw similar exceptions but
MoveTo_DestFileName_Empty expects the one from File.Move so it was added
to this method.
2016-02-16 11:17:19 +00:00
Marcos Henrich 83b7e81324 [corlib] Test FileInfo.MoveTo with files with same name
Covers #18361
2016-02-16 10:34:08 +00:00
Marek Safar 1ffa612eba Bump reference source to fix the build 2016-02-15 20:29:58 +01:00
Vlad Brezae 0e4acb2215 Merge pull request #2562 from BrzVlad/fix-drainstack-stats
[sgen] Drain the gray stack only in finish gray stack
2016-02-16 02:04:55 +07:00
Marek Safar 41af907ee1 [corlib] MethodInfo from reference source 2016-02-15 18:15:34 +01:00
Marek Safar 4574d1aed6 [mcs] Update expression tree generator to use .net 4.5 api when available. Fixes #38703 2016-02-15 17:00:25 +01:00
Alexander Köplinger 6c355350fc [io-layer] Add Get/SetThreadPriority to wapi-remap.h
The new functions were added in d5768a7f14 but not remapped.
2016-02-15 15:22:20 +01:00
Marek Safar d540bdce6d Merge pull request #2619 from directhex/dont_remap_npgsql
Don't remap all versions of Npgsql to 4.0.0.0
2016-02-15 15:20:59 +01:00
Jo Shields ffa6818b96 Don't remap all versions of Npgsql to 4.0.0.0
Mono has a list of assemblies considered "internal", whose versions are automatically remapped to the distro default version.

Since we no longer bundle Npgsql, it is up to individual distributions to package their own Npgsql - but Mono cannot load any version other than 4.0.0.0 from the GAC, due to this remapping:

Mono: Assembly Ref addref npghello[0x17e2fd0] -> mscorlib[0x1789c00]: 2
Mono: The request to load the assembly Npgsql v2.2.7.0 was remapped to v4.0.0.0
Mono: Assembly Loader probing location: '/usr/lib/mono/gac/Npgsql/4.0.0.0__5d8b90d52f46fda7/Npgsql.dll'.

Npgsql, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
2016-02-15 14:12:52 +00:00
Alexander Köplinger fa1cb5bbf4 [msvc] Update order.xml and csproj files 2016-02-15 15:03:37 +01:00
Alexander Köplinger 4b041deaba [genproj] Fix bashism in library.make
This was added in 2687866e99, but on systems where /bin/sh (which make uses by default) isn't bash this doesn't work.

Fix is to use a standard switch-case which works in all shells.
2016-02-15 15:02:13 +01:00
Alexander Köplinger 0093dcb9fb [msvc] Update .def files 2016-02-15 14:25:03 +01:00
Marcos Henrich 355d2c5eca Merge pull request #2400 from esdrubal/extrahead
[System] Fix extra head in config bug.
2016-02-15 12:21:29 +00:00
Marcos Henrich c1d81649cc Merge pull request #2323 from esdrubal/servicemodel
[System.ServiceModel] Fixes missing xsi xsd attributes
2016-02-15 12:08:21 +00:00
Marek Safar bc6dd59c11 Merge pull request #2613 from knocte/crypto-refsource
[Crypto] Include CngKeyBlobFormat from reference sources (rm old)
2016-02-15 12:39:28 +01:00
Marek Safar c39da8442e [mcs] Populate ProductVersion from all valid sources. Fixes #38553 2016-02-15 12:34:22 +01:00
Alexander Köplinger cd36778d5e [corlib] Add missing semicolon in StringTest 2016-02-14 00:33:34 +01:00
monojenkins c5000ab439 Merge pull request #2608 from ludovic-henry/monoerror-icall
[runtime] Use MonoError for icall.c functions
2016-02-13 11:50:17 +00:00
Alexander Köplinger 0b7588ee2e Merge pull request #2611 from akoeplinger/cleanup
[corlib] Remove FIXME_CORLIB_CMP section from Makefile
2016-02-13 12:45:56 +01:00
monojenkins 15d74eeea3 Merge pull request #2612 from xmcclure/largestring
Do not run 4GB string tests on low memory systems (fixes #38392)

"Low memory" here is defined as 32-bit, less than 6GB of physical RAM, or mobile (since mobile lacks the class for querying physical RAM).

Without this patch, one of the corlib tests allocates 4 GB of RAM, which causes OOM crashes on low-memory Jenkins instances and also mobile phones.
2016-02-13 06:05:32 +00:00
monojenkins e70b51b10b Merge pull request #2442 from schani/fix-larger-tlab-size
[automerge] Fix larger tlab size
2016-02-13 01:06:05 +00:00
Zoltan Varga 86a7259c28 [jit] Add a checked version to mono_resolve_patch_target () so exceptions are thrown in upper level code. 2016-02-12 19:58:46 -05:00
Alexander Köplinger 63a0af9de9 Revert "[Process] Add stress tests"
This reverts commit a7955a93f5.

The Process import commit was reverted in f74f703719,
this reverts the added tests as well since they fail on Jenkins now.
2016-02-13 01:17:35 +01:00
Mark Probst f91af83b92 Merge pull request #2573 from BrzVlad/fix-conc-memusage
[sgen] Improve memory usage with the concurrent collector
2016-02-12 15:09:38 -06:00
monojenkins 9c73dd16eb Merge pull request #2589 from gofman/master
sgen: fix bit counting in mword

Fixes GC crashe for 64-bit architecture when using libmono.
http://lists.ximian.com/pipermail/mono-devel-list/2016-February/043507.html
2016-02-12 20:25:20 +00:00
Alexander Köplinger 335ad88ff5 [perfcounters] Fix calculation of free memory in mono_determine_physical_ram_available_size ()
The implementation added in b5d0ffe7dd forgot to multiply vmstat.free_count (== number of free pages)
by the page size in the __APPLE__ case, making the reported number much smaller than the reality.
2016-02-12 20:56:35 +01:00
monojenkins bac05b3a82 Merge pull request #2585 from lambdageek/dev/bug-38222
[reflection] Signal pending loader error in mono_reflection_get_custom_attrs_data

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

While we're at it, convert `mono_reflection_get_custom_attrs_data` to use
`MonoError` and mark it external only.  Runtime should use
`mono_reflection_get_custom_attrs_data_checked`
2016-02-12 19:46:20 +00:00
Andi McClure 712bd53f5b Use Assert.Ignore for insufficient-memory test skips 2016-02-12 14:26:50 -05:00
Andrés G. Aragoneses c2d975db44 [Crypto] Include CngKeyBlobFormat from reference sources (rm old)
CngKeyBlobFormat was never included in the build, but anyway
we can include the one from referencesource now.

Detected by a user of Npgsql 3.0.5 which reported the problem
in stackoverflow:
http://stackoverflow.com/questions/35016066/failure-to-resolve-system-security-cryptography-cngkeyblobformat-when-using-npgs
2016-02-13 03:11:16 +08:00
Andi McClure 5e46772795 Do not run 4GB string tests on low memory systems (fixes #38392)
"Low memory" here is defined as 32-bit, less than 6GB of physical RAM,
or mobile (since mobile lacks the class for querying physical RAM).
2016-02-12 13:56:20 -05:00
Alexander Köplinger c18ed4a393 [corlib] Remove FIXME_CORLIB_CMP section from Makefile
Looks like this isn't needed anymore.
2016-02-12 19:34:54 +01:00
Aleksey Kliger (λgeek) 1113ca6b61 Merge pull request #2605 from lambdageek/dev/bug-38408
[io] Release Pipe and Console shared handles
2016-02-12 13:16:44 -05:00
Ludovic Henry f74f703719 Revert "[System] Import System.Diagnostics.Process"
This reverts commit d30e99d172.
2016-02-12 18:14:02 +00:00
Mark Probst 0054a3c7a8 [sgen] Allow TLABs larger than MAX_SMALL_OBJ_SIZE.
`sgen_ensure_free_space()` assumed that if `size` was larger than
`SGEN_MAX_SMALL_OBJ_SIZE`, it should find free space on the major
heap, so it wouldn't consider triggering a nursery allocation.  Making
TLABs larger than that would thus never trigger nursery collections
anymore.

Now we pass in the generation that says where we want space.
2016-02-12 10:03:34 -08:00
Mark Probst bf6787a531 [sgen] Add necessary type cast. 2016-02-12 10:03:34 -08:00
Ludovic Henry 4c632d9848 [runtime] Use MonoError for mono_module_get_types 2016-02-12 16:26:46 +00:00
Ludovic Henry 5366e1320c [runtime] Use MonoError for fill_reflection_assembly_name 2016-02-12 16:26:45 +00:00
Ludovic Henry d07adf1e23 [runtime] Use MonoError for create_version 2016-02-12 16:26:45 +00:00
Ludovic Henry 098fb60e1b [runtime] Use MonoError for type_from_parsed_name 2016-02-12 16:26:44 +00:00
monojenkins b98e050467 Merge pull request #2576 from ludovic-henry/referencesource-process
[System] Import System.Diagnostics.Process
2016-02-12 16:20:44 +00:00
Jo Shields 1c621b0e33 Use X509 serial number in Mono cert store filename
The Mono cert store traditionally uses the SKI for the filename of a certificate, but this does not handle cases where a cert has been reissued with the same SKI but different serial (seen in the wild with StartCom certs). This patch appends the serial to all new imported certs, and attempts to interoperate cleanly with existing serial-less certificate stores to avoid duplication.

Closes: #30902
2016-02-12 16:03:46 +00:00
Alexander Köplinger eb01e40bda Merge pull request #2604 from mattleibow/pcl-mono.dataconverter
[corlib] Ensure PCL compatibility with Mono.DataConverter
2016-02-12 16:38:32 +01:00
Aleksey Kliger f5d1b1f43b [io] Don't leak Pipe filename
Named FIFOs do indeed have names, but pipe_close doesn't free
it.  (Because CreatePipe doesn't set a filename).
2016-02-12 10:11:21 -05:00
Aleksey Kliger 917e4f39bb [io] Release Pipe and Console shared handles
Allows opening a character device or named fifo more than once with code like:

  using (var f = new FileStream ("/dev/zero", FileMode.Open))
  {
    ...
  }
  using (var f = new FileStream ("/dev/zero", FileMode.Open))
  {
    ...
  }
2016-02-12 10:11:21 -05:00
Aleksey Kliger 145064bb5f [io] Test repeatedly opening a character device
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=38408
2016-02-12 10:11:21 -05:00
monojenkins 49673b8318 Merge pull request #2606 from akoeplinger/fix-hardcoded-testports
[System] Fix a few more hardcoded ports in tests

They'd cause "address already in use" errors when two builds are running concurrently on the same machine on Jenkins.

@monojenkins merge
2016-02-12 15:10:24 +00:00
Miguel de Icaza d31a0b0d26 Add link to the updated location for the utf8 test file 2016-02-12 09:31:16 -05:00
Ludovic Henry a7955a93f5 [Process] Add stress tests
That's to ensure we do not have regression in the Process implementation.
2016-02-12 13:56:39 +00:00
Ludovic Henry d30e99d172 [System] Import System.Diagnostics.Process 2016-02-12 13:56:38 +00:00
Alexander Köplinger 1303a46521 [System] Fix a few more hardcoded ports in tests
They'd cause "address already in use" errors when two builds are running concurrently on the same machine on Jenkins.
2016-02-12 14:33:57 +01:00
Zoltan Varga 7751c24771 [jit] Fix the bblock linking in c5512c0d3e. 2016-02-11 23:05:27 -05:00
Martin Baulig a6289bcc41 [Mono.Security]: Make 'Mono.Security.Protocol.Ntlm' public and include in System.dll on mobile.
(cherry picked from commit 2026a0b408)
2016-02-11 17:53:53 -05:00
Miguel de Icaza 6fae7c2ace Remove old, unused code 2016-02-11 16:15:22 -05:00
Matthew Leibowitz aa3654d707 [corlib] Ensure PCL compatibility with Mono.DataConverter 2016-02-11 22:55:02 +02:00
Rodrigo Kumpera 15f5673e36 [runtime] Move pending_exception from InternalThread to Thread to avoid crashing on domain unload.
InternalThread is a fundamentally different type WRT to appdomain. All instances of Thread bound to the same
os thread have a reference to a shared InternalThread.

InternalThread is always allocated in the root domain, so it MUST NOT have references to other domains as
it will lead to crashes on unload.

This was the case with pending_exception. It could point to an exception meant to the domain unloading.

This bug became more and more frequent as we move to use mono_set_pending_exception in more places. I could
reproduce it in 10 minutes of looping appdomain-unload.exe.
2016-02-11 15:17:19 -05:00
Ludovic Henry 469cf0e8b1 Merge pull request #2560 from ludovic-henry/coop-threads-cleanup
[threads] Split abort/suspend into self and async cases
2016-02-11 18:47:49 +00:00
Aleksey Kliger (λgeek) 98a6a07078 Merge pull request #2587 from lambdageek/monoerror-api-cleanup-mistakes
[runtime] Better error handling in mono_{assembly,module_file}_get_object
2016-02-11 12:29:59 -05:00
Marcos Henrich 55648fae3a Merge pull request #2590 from esdrubal/wcf_req
BCL changes required by dotnet/wcf
2016-02-11 17:19:25 +00:00
Ludovic Henry 3b3c62096d Merge pull request #2595 from ludovic-henry/tests-sgen
[tests] Remove manual for loop to run sgen tests and use different make targets
2016-02-11 16:20:45 +00:00
Aleksey Kliger f03e7a86fd [reflection] Better error behavior for API functions
mono_assembly_get_object and mono_module_file_get_object should return
NULL on failure without raising an exception.
2016-02-11 10:28:27 -05:00
Ludovic Henry 430f0fabb1 [tests] Remove manual for loop to run sgen tests and use different make targets 2016-02-11 12:54:07 +00:00
Ludovic Henry 57fb17a533 [threads] Split abort/suspend into self and async cases
Separate the code path for async and self abort/suspend. This make the code intention more clear. It also allows us to remove some unused parameters (can_raise_excetpion which is always TRUE). Add some comments and harmonise locking behaviours : async_suspend_internal and self_suspend_internal now both call UNLOCK_THREAD.
2016-02-11 12:43:59 +00:00
Marek Safar fbae9f9c04 Merge pull request #2598 from dellis1972/master
[msbuild] Registered the XmlPeek Build Task in the Microsoft.Common.tasks
2016-02-11 11:27:51 +01:00
Dean Ellis 96cd1c9e9f [msbuild] Registered the XmlPeek Build Task in the Microsoft.Common.tasks
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=36183
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38638

The previous commit () was incomplete, while it added the source
file for XmlPeek it did not register them in the appropriate
MSBuild tasks files. As a result the XmlPeek task cannot be used.
2016-02-11 10:26:11 +00:00
Zoltan Varga 992da4b5f4 [aot] Fix the check in mono_aot_get_plt_entry () for thumb code, use 'code-4' instead of 'code', since the latter points to after a call, so it could point outside the range of llvm code. Fixes #36723. 2016-02-11 01:14:29 -05:00
Zoltan Varga c5512c0d3e [jit] Add a fastpath to Monitor.Enter () which doesn't have a wrapper, and add a slowpath which has a wrapper, so async stack traces work for threads blocked on monitors. Fixes #38525. 2016-02-10 21:27:23 -05:00
Zoltan Varga a50e09e99f Fix a warning. 2016-02-10 21:26:06 -05:00
Alexander Köplinger ecbcac8a92 [compiler-tester] Fix incorrect failure with Windows paths in error messages
On Windows we saw a failure like the following in mcs tests:

```
cs1589-2.cs...	REGRESSION (CORRECT ERROR -> WRONG ERROR MESSAGE)
Exp: Unable to include XML fragment `/foo/bar' of file `there-is-no-such-file'. Could not find file "*PATH*/there-is-no-such-file"
Was: Unable to include XML fragment `/foo/bar' of file `there-is-no-such-file'. Could not find file "C:\j\workspace\z\label\w64\mcs\errors\there-is-no-such-file"
```

Fixing it by replacing the backslash with forward slash before comparing it to the expected value.
2016-02-11 02:42:18 +01:00
Zoltan Varga 7b9da19971 [jit] Fix the peephole optimization added by 9fc7c1de3a, compare_imm+cond_exc_imm can only be eliminated if the comparison is false. 2016-02-10 20:09:18 -05:00
Miguel de Icaza fb1dcb42d6 Remove table that was not licensed under MIT 2016-02-10 18:15:27 -05:00
Martin Baulig 6a3d08c01b [Mono.Security]: MonoTlsProviderFactory.GetProvider(string) now returns null on error.
(cherry picked from commit 7f965e8220)
2016-02-10 18:14:30 -05:00
Alexander Köplinger 00a7ef8662 Merge pull request #2591 from gofman/cherry-branch
[System.Windows.Forms] Recreate FosterWindow when required in XplatUIWin32
2016-02-11 00:10:55 +01:00
Alexander Köplinger c795ee45d8 Merge pull request #2594 from akoeplinger/fix-facade-lookup-when-mono-path-overriden
[metadata] Fix Facades lookup in assembly.c when MONO_PATH is set
2016-02-10 23:50:44 +01:00
Alex Rønne Petersen 6c0aafcd4e [profiler] Remove perf_event.h from EXTRA_DIST, too. 2016-02-10 23:08:39 +01:00
Alex Rønne Petersen 504aff4244 [profiler] Only include perf_event.h when actually needed, and use the system header. 2016-02-10 22:34:09 +01:00
Alex Rønne Petersen 02d2c8beab [profiler] Remove the bundled perf_event.h header.
Bundling this in Mono is technically a GPL violation. We need to switch to the
system <linux/perf_event.h> header.
2016-02-10 22:26:59 +01:00
Martin Baulig b207a1f133 [Mono.Security]: Add 'MonoTlsProviderFactory.GetProvider(string)'.
Similar to 'SetDefaultProvider(string)', but return the provider instead
of installing it.

(cherry picked from commit 024241f424)
2016-02-10 16:21:10 -05:00
Zoltan Varga e7357b0f3a [llvmonly] Remove some leftover debugging code. 2016-02-10 15:29:29 -05:00
Marek Safar d5a93b13bf [swf] Flow SynchronizationContext through ExecutionContext. Fixes #38599 2016-02-10 20:24:13 +01:00
Alexander Köplinger 6e81edfa24 [metadata] Fix Facades lookup in assembly.c when MONO_PATH is set
When MONO_PATH is set, the corlib lookup returns early on in mono_assembly_load_corlib (),
without adding the Facades dir to default_path.

This causes any app/library that relies on the facades to fail at runtime.

Fixing this by always doing the Facades lookup when returning the found corlib image.
2016-02-10 19:03:31 +01:00
Marcos Henrich cabf2f2651 [corlib] Adds property AccessToken to WindowsIdentity
System.Security.Principal.WindowsIdentity.AccessToken is required for
dornet/wcf to compile.
2016-02-10 15:18:21 +00:00
Marcos Henrich 5aac2bf16e Impelements IDisposable in X509Store
This class implement IDisposable in .NET and dotnet/wcf depends on this
to compile.
2016-02-10 15:18:21 +00:00
Paul Gofman f082bf0a37 [System.Windows.Forms] Recreate FosterWindow when required in XplatUIWin32
Fixes #38614
2016-02-10 17:47:39 +03:00
Marcos Henrich 1710cecfa1 [System.Net.Security] Adds NegotiateStream methods
System.Net.Security was missing some methods that are used by
dotnet/wcf.
2016-02-10 13:41:11 +00:00
Marcos Henrich 94d400b9b0 [corlib] Added missing properties to EventAttribute 2016-02-10 13:41:10 +00:00
Paul Gofman 3926a95c65 sgen: fix bit counting in mword
Fixes GC crashe for 64-bit architecture when using libmono.
http://lists.ximian.com/pipermail/mono-devel-list/2016-February/043507.html
2016-02-10 13:58:26 +03:00
Marek Safar 35889d4bc2 [corlib] Use correct max/min value for DateTime overflows. Fixes #35876 2016-02-10 03:23:34 -06:00
Marek Safar 8d84a78684 [System] Simple readability changes to SimpleAsyncResult 2016-02-10 03:23:34 -06:00
Zoltan Varga 9fc7c1de3a [jit] Add a peephole optimization to remove the ldaddr+compare_imm 0+cond_exc checks inserted when using explicit null checks. 2016-02-10 01:59:22 -05:00
Zoltan Varga 2a2fac326c [llvmonly] Disable the 'overriding the module target triple with' clang warning when compiling the bitcode files. 2016-02-10 01:10:38 -05:00
Zoltan Varga 8fde659b0d [llvmonly] Fix a few issues passing and returning vtypes smaller than one machine word. 2016-02-10 00:46:57 -05:00
Zoltan Varga a6068096de [llvmonly] Fix the locking in the gsharedvt wrapper creation functions. 2016-02-09 21:55:44 -05:00
monojenkins 1b232dfb39 Merge pull request #2584 from lewurm/fix-mobile-compilation
[bcl] fix compilation of test on mobile

although a nunit category is specified, the compilation still failed on mobile.
2016-02-10 02:20:32 +00:00
Aleksey Kliger f758ac67e0 [reflection] Set pending loader exception in mono_reflection_get_custom_attrs_data
Fixes [Bugzilla 38222](https://bugzilla.xamarin.com/show_bug.cgi?id=38222)

While we're at it, convert mono_reflection_get_custom_attrs_data to use
MonoError and mark it external only.  Runtime should use
mono_reflection_get_custom_attrs_data_checked
2016-02-09 19:53:15 -05:00
Bernhard Urban d022f26e2e [bcl] fix compilation of test on mobile
fix for the following problem:
> [13:33:37] src/System/Test/System.Diagnostics/ProcessTest.cs(1048,19): error CS0103: The name `GetCrossPlatformStartInfo' does not exist in the current context
2016-02-09 15:07:19 -08:00
monojenkins 64c5ac3d07 Merge pull request #2582 from ludovic-henry/fix-threadpool-starvation
[threadpool] Improve the monitor thread heuristic

Because the ThreadPool heuristic is optimized for short lived work item, it has more difficulty when executing long lived work item. That case can lead to a starvation of the worker threads: they are all doing work, while there is outstanding request, and these requests are not satisfied because we reached the max number of working thread.

To fix that issue, we have the monitor thread, whose sole job is to unstuck this kind of starvation cases. Unfortunately, it only works when all the worker threads are in the ThreadState.WaitSleepJoin state, which excludes the case of calling an IO operation in a Task. That includes the case of FileStream.BeginRead/Write/... which implementation can be simplified as follows: FileStream.BeginRead(...) -> Task.Run(() => FileStream.Read(...)).

The way we implement it in this commit is: every MONITOR_INTERVAL (500ms here), we check if there is any outstanding request, and if so, we assume that we are in the starvation case, and we simply increase the max number of working thread. Also to reduce the number of false positives, we do that only if there has been no completed work item for more than at least MONITOR_INTERVAL (in case of low CPU usage, more otherwise, see monitor_sufficient_delay_since_last_dequeue). This case is typically the case where we have all working thread stuck in long running work items.

Finally we increase the monitor interval from 100ms to 500ms so we guarantee we do not create more than 2 threads per second in the monitor thread. That is the value used by the old threadpool.
2016-02-09 23:00:32 +00:00
Miguel de Icaza 9d35944f55 [Docs] handle code-markdown with dots on the names 2016-02-09 17:05:34 -05:00
Miguel de Icaza 871115c2d8 [Docs] Continue to improve the Mono runtime documentation 2016-02-09 15:52:58 -05:00
Aleksey Kliger (λgeek) 52b80e6c68 Merge pull request #2570 from lambdageek/monoerror-reflection-bubble-2
[reflection] Grab bag of MonoError commits
2016-02-09 15:52:52 -05:00
Ludovic Henry 35c13bfe55 [threadpool] Improve the monitor thread heuristic
Because the ThreadPool heuristic is optimized for short lived work item, it has more difficulty when executing long lived work item. That case can lead to a starvation of the worker threads: they are all doing work, while there is outstanding request, and these requests are not satisfied because we reached the max number of working thread.

To fix that issue, we have the monitor thread, whose sole job is to unstuck this kind of starvation cases. Unfortunately, it only works when all the worker threads are in the ThreadState.WaitSleepJoin state, which excludes the case of calling an IO operation in a Task. That includes the case of FileStream.BeginRead/Write/... which implementation can be simplified as follows: FileStream.BeginRead(...) -> Task.Run(() => FileStream.Read(...)).

The way we implement it in this commit is: every MONITOR_INTERVAL (500ms here), we check if there is any outstanding request, and if so, we assume that we are in the starvation case, and we simply increase the max number of working thread. Also to reduce the number of false positives, we do that only if there has been no completed work item for more than at least MONITOR_INTERVAL (in case of low CPU usage, more otherwise, see monitor_sufficient_delay_since_last_dequeue). This case is typically the case where we have all working thread stuck in long running work items.

Finally we increase the monitor interval from 100ms to 500ms so we guarantee we do not create more than 2 threads per second in the monitor thread. That is the value used by the old threadpool.
2016-02-09 19:55:05 +00:00
Aleksey Kliger adc643c1de [reflection] Fix decl of mono_image_create_token
For the DISABLE_REFLECTION_EMIT case
2016-02-09 13:34:39 -05:00
Aleksey Kliger 8525f17c29 [reflection] Mark mono_custom_attrs_construct external only
The function mono_custom_attrs_construct_by_type is available for the
runtime (though currently static) and uses MonoError for error handling.
2016-02-09 12:15:59 -05:00
Aleksey Kliger d02d6748cd [reflection] Use MonoError in mono_reflection_marshal_as_attribute_from_marshal_spec 2016-02-09 12:15:59 -05:00
Aleksey Kliger e3b6e1a437 [runtime] Use MonoError for mono_event_get_object
Mark mono_event_get_object external only.
Runtime should use mono_event_get_object_checked.
2016-02-09 12:15:58 -05:00
Aleksey Kliger bae91c3476 [runtime] Use MonoError for mono_property_get_object
Mark mono_property_get_object external only.
Runtime should use mono_property_get_object_checked.
2016-02-09 12:15:58 -05:00
Aleksey Kliger 410c12cc8d [reflection] Push MonoError through some static functions 2016-02-09 12:15:57 -05:00
Aleksey Kliger 61803caa3f [debugger] Don't call buffer_add_objid with NULL
Fixup 64778857e4
2016-02-09 12:15:57 -05:00
Aleksey Kliger b8958da981 [runtime] Cleanup MonoError after mono_runtime_try_invoke
If both an exception exc is set and the MonoError is not ok, we could
leak the MonoError memory.  Explicitly cleanup.
2016-02-09 12:15:15 -05:00
Aleksey Kliger caea43b94e [mini] Use catchExcInMonoError to decide if exc should be embedded in MonoError
Do the dyn_runtime_invoke decision the same way as other invokes.

Fixup to 45bd9bb5d5
2016-02-09 12:15:15 -05:00
Aleksey Kliger 407b2d359c [runtime] Don't raise MonoError when unloading appdomain
There's no managed code calling mono_domain_try_unload, so raising was
wrong.  Thread the error out through exc which gets checked by callers.

Fixup for 45bd9bb5d5
2016-02-09 12:15:14 -05:00
Miguel de Icaza 1ea52ba655 [Docs] document one of our most key APIs: mono_add_internal_call 2016-02-09 12:05:24 -05:00
Miguel de Icaza 81b7022800 [Docs] Improved the rendering, added some docs 2016-02-09 11:46:46 -05:00
monojenkins 3cdd142b66 Merge pull request #2579 from ludovic-henry/fix-asyncresult-unhandledexception
[AsyncResult] Fix unhandled exception behaviour in AsyncCallback

The AsyncCallback is called after the BeginInvoke has completed. In all cases, this AsyncCallback is called on the ThreadPool, meaning that an unhandled exception would lead to a process crash.

The correct behaviour, after verification on .NET, is to not swallow the exception, and to properly crash the process.

@monojenkins merge
2016-02-09 12:25:36 +00:00
Ludovic Henry f8d3526a7f [AsyncResult] Fix unhandled exception behaviour in AsyncCallback
The AsyncCallback is called after the BeginInvoke has completed. In all cases, this AsyncCallback is called on the ThreadPool, meaning that an unhandled exception would lead to a process crash.

The correct behaviour, after verification on .NET, is to not swallow the exception, and to properly crash the process.
2016-02-09 10:48:05 +00:00
Marek Safar 7ecd89abdb [corlib] AppContext from reference source 2016-02-09 11:35:09 +01:00
Miguel de Icaza b2b2db1b45 [Docs] Use an external style sheet, prefix the css classes with mapi to isolate, fix various processing problems 2016-02-08 22:00:13 -05:00
Alexander Köplinger 41262dbad6 Merge pull request #2578 from akoeplinger/fix-hardcoded-mono-2.0-path
[metadata] Fix hardcoded mono/2.0 path in assembly.c
2016-02-09 02:31:21 +01:00
Zoltan Varga 7500f5d7a2 [llvmonly] Compile the bitcode files using -O2. 2016-02-08 20:02:04 -05:00
monojenkins 2c18735a5d Merge pull request #2577 from xmcclure/bugzilla-37834
Recognize OS X file "locked" state (fixes #37834)

Quick fix for https://bugzilla.xamarin.com/show_bug.cgi?id=37834

IOLayer is_file_writable/System.IO.File.GetAttributes on posix systems looks only at the unix file permissions and does not consider special OS flags. This leads to an easily end-user-triggered bug on OS X if a mono app (the bug was observed in Xamarin Studio) uses GetAttribute on a file which has been "Locked" using the checkbox in Finder Get Info. This patch recognizes the "uchg" flag for non-writability which Finder uses.
2016-02-09 00:45:26 +00:00
Zoltan Varga 392f09c813 [llvmonly] Add unbox wrappers when invoking vtype instance methods through a delegate. 2016-02-08 19:21:53 -05:00
Miguel de Icaza b2cc4e2aba [Documentation] Fix the nesting of docs 2016-02-08 17:15:17 -05:00
Alexander Köplinger 769037d8b1 [metadata] Fix hardcoded mono/2.0 path in assembly.c
The performance team discovered this on their bots using the Jenkins snapshot packages. Mono would fail to start with a message like:

```
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/opt/mono-2016.02.08+15.25.39/lib/mono/4.5/mscorlib.dll' directory.
```

The one odd thing is that they are using Mono installed in a path which is different from the prefix used during compilation.

It turns out that the runtime has a hardcoded check for lib/mono/2.0 in https://github.com/mono/mono/blob/7d5a7ea7ac324bb4ee63094ddcf8e20ae9ba4322/mono/metadata/assembly.c#L633-L637.
Since we recently stopped shipping 2.0 in the packages (we moved to 2.0-api for the reference assemblies) this directory wasn't there,
so the code in fallback() called into mono_config_get_assemblies_dir() which just returns the MONO_ASSEMBLIES preprocessor symbol.

That preprocessor symbol is defined to the value of --prefix during compilation, so Mono couldn't find corlib there as well since it's installed in another path which ultimately results in the above error message.

The fix is to change the hardcoded value to 4.5, which is what we established as the directory with the "latest" assemblies now.
Ideally we should find a way to stop hardcoding those paths in the runtime.

PS: I grepped through the runtime source to make sure we don't hardcode 2.0/3.5/4.0 elsewhere and only found one instance in a test.
I fixed it there as well, though the test looks suspicious since it hardcodes /usr ...
2016-02-08 21:44:47 +01:00
Miguel de Icaza 7d5a7ea7ac [docs] Improve the rendering of our API binding APIs and runtime API documentation 2016-02-08 15:02:07 -05:00
Andi McClure 9c4cb7ff9d Support OS X "locked" state (fixes #37834)
IOLayer is_file_writable/System.IO.File.GetAttributes on posix systems
looks only at the unix file permissions and does not consider special
OS flags. This leads to an easily end-user-triggered bug on OS X if a
mono app (the bug was observed in Xamarin Studio) uses GetAttribute on
a file which has been "Locked" using the checkbox in Finder Get Info.
This patch recognizes the "uchg" flag for non-writability which Finder
uses.
2016-02-08 15:01:45 -05:00
Aleksey Kliger (λgeek) 79ccd5ed96 Merge pull request #2555 from lambdageek/monoerror-mono_runtime_invoke-2
Use MonoError for mono_runtime_invoke
2016-02-08 14:12:47 -05:00
Alexander Köplinger 1e1c4970c4 [mcs] Use $(PLATFORM_PATH_SEPARATOR) instead of ':' for MONO_PATH to fix Windows tests
./ was added to MONO_PATH in b5c2b5892f, but the Unix path separator ':' doesn't work on Windows.
2016-02-08 19:16:19 +01:00
Alexander Köplinger 0bfc83e5c0 [msvc] Fix Debug build by disabling outdated projects in sln 2016-02-08 19:16:13 +01:00
Aleksey Kliger (λgeek) 96ed839b0b Merge pull request #2571 from lambdageek/monoerror-mono_assembly_get_object
Use MonoError in mono_assembly_get_object
2016-02-08 13:08:28 -05:00
Alexander Köplinger a4f6ac0700 [System.Runtime.Caching] Make TestExpiredGetValues test more reliable
It failed twice on Jenkins over the weekend:

```
Test Case Failures:
1) MonoTests.System.Runtime.Caching.MemoryCacheTest.TestExpiredGetValues :   #EGV4
  Expected: 0
  But was:  9

at MonoTests.System.Runtime.Caching.MemoryCacheTest.TestExpiredGetValues () [0x0012b] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs:1304
```

We're sleeping just as long as the expiry time of the cache items (1s) which might not be enough.
Bumping the sleep time should fix this.
2016-02-08 17:05:07 +01:00
Alexander Köplinger dc085eacec [readme] Clarify --enable-parallel-mark description
It's Boehm only and not enabled by default on some platforms (e.g. it's disabled on OSX).
2016-02-08 17:05:07 +01:00
Aleksey Kliger 45bd9bb5d5 [runtime] Switch to mono_runtime_invoke_checked and mono_runtime_try_invoke
Mark mono_runtime_invoke external only.
Runtime should use mono_runtime_invoke_checked and mono_runtime_try_invoke.
2016-02-08 10:51:48 -05:00
Ludovic Henry 2ce7cde678 [runtime] Use MonoError for mono_jit_runtime_invoke and mono_llvmonly_runtime_invoke 2016-02-08 10:51:47 -05:00
Aleksey Kliger 64778857e4 [reflection] Use MonoError in mono_assembly_get_object
Mark mono_assembly_get_object external only.
Runtime should use mono_assembly_get_object_checked.

Also propagated MonoError through a few static functions in reflection:
mono_reflection_get_type_internal () and
mono_reflection_get_type_internal_dynamic ()
2016-02-08 10:47:49 -05:00
Rodrigo Kumpera 35c22df6fc Merge pull request #2574 from abrasive/gcc5_fix_gc
libgc: use __builtin_frame_address in GC_approx_sp
2016-02-08 06:30:16 -08:00
Rodrigo Kumpera e9639b0881 Merge pull request #2575 from alexrp/master
[profiler] Fix a rare crash when sending SIGPROF to a starting thread.
2016-02-08 06:27:34 -08:00
Vlad Brezae 69915c0c98 [sgen] Improve memory usage with the concurrent collector
The concurrent collector typically uses more memory because more memory is allocated during the concurrent phase, which also leads to more objects surviving the major collections and higher allowances. We improved the memory situation by forcing synchronous finishing of the concurrent mark if too much memory is allocated during the concurrent mark phase. Still, this doesn't tackle the underlying problem. Even if we have less memory allocated during the CMS phase, some is still allocated and leads to increased overall memory usage. And how much memory growth should we allow in the first place ? The even greater problem is that it appears to force a lot of synchronous finishes, significantly increasing finishing pause times.

This commit attempts to solve this problem by following an ideal mathematical approach. We use the following notations : H - heap size at start of major collection, Gs - heap growth during sync collection, Gc - heap growth during conc collection, s - survival rate of the collection, a - allowance ratio (0.33), Ts - trigger for next major sync, Tc - trigger for next major conc.

Assume we have the heap size H at the start of a major collection. For the two types of majors we would have :
Ts = (H + Gs) * s * (a + 1)
Tc = (H + Gc) * s * (a + 1)

Obviously the problem is that Gc > Gs, which leads to Tc > Ts and higher memory usage. In order to have the two triggers equal we need to find an X that we can subtract from Tc to obtain Ts. Considering Gs = 0 (only a few nursery objects are promoted during a major sync collection) and similar survival rates for the two types of collection, we get X = Gc * s * (a + 1). In order to get equal triggers we would need to subtract this value from the allowance computed after a concurrent collection.

The more the heap grows, the more X grows. If X gets bigger than the available starting allowance ((H + Gc) * s * a), it would mean that we are trying to set a trigger that it is lower than the actual heap size at the end of the collection (which means we already exceeded the target memory usage). In order to avoid this problem we need to enforce Tc - X > (H + Gc) * s. Doing the substitutions we get Gc < a * H. When the heap growth exceeds this value it means we need to force the finish of the concurrent collection.
2016-02-08 16:22:12 +02:00
Vlad Brezae 10130afaf5 [sgen] Drain the gray stack only in finish gray stack
This was also causing, at the statistics level, an increased time spent in scanning pinned objects rather than in finishing the gray stack.
2016-02-08 16:19:01 +02:00
Alex Rønne Petersen 6a8d4f97db [profiler] Fix a rare crash when sending SIGPROF to a starting thread.
When sample profiling is enabled and we send a SIGPROF signal to a thread that
hasn't yet transitioned to a running state (e.g. STATE_RUNNING), the signal can
sometimes be delivered at such an early point that libc has not even finished
initializing TLS for that thread yet. This is problematic because we then go
right on to crash in the SIGPROF signal handler when we try to save errno. We
then further crash in the SIGSEGV handler because we can't access the jit_tls
variable either.

The fix is fairly simple: Only send SIGPROF to threads that have transitioned
to a running state. Technically, TLS is initialized 'much' earlier than when
this state transition happens, but since the worst thing that can happen is
that we miss one sampling event (i.e. ~1sec by default) right at the beginning
of the thread's lifetime, this simple fix is good enough.

This crash seemingly only happened on OS X.
2016-02-08 12:06:35 +01:00
Zoltan Varga d7d12118ea [llvmonly] Disable tail calls as they break stack traces. 2016-02-08 02:28:28 -05:00
Zoltan Varga e530d9da73 [llvm] Make the stack walk code return. 2016-02-08 02:27:33 -05:00
James Laird-Wah cd293cc37a libgc: use __builtin_frame_address in GC_approx_sp
With GCC 5.x, the compiler optimises away the dummy load used to
estimate the stack pointer address in GC_approx_sp; it returns
zero. This leads to segfaults when embedding Mono.

Instead, use __builtin_frame_address, which GCC's libgc uses for
the same purpose.
2016-02-08 10:19:53 +11:00
Zoltan Varga a1d805a7f0 [llvmonly] Compile the bitcode files using -O2 (only in desktop llvmonly mode). 2016-02-06 21:11:10 -05:00
Zoltan Varga f66654814e [llvm] When storing valuetypes received in registers to the stack, store only the value parts of the register, the upper bits might container garbage. 2016-02-06 21:11:10 -05:00
Aleksey Kliger (λgeek) 636c0c95cc Merge pull request #2567 from lambdageek/monoerror-mono_module_file_get_object
[reflection] Use MonoError in mono_module_file_get_object
2016-02-06 11:08:39 -05:00
Zoltan Varga 14fa173b59 [jit] Disable to returning of trampolines from mini_jit_info_table_find () to see whenever that fixes failures on wrench. 2016-02-06 03:09:50 -05:00
Zoltan Varga 8f4576a988 [llvmonly] Remove the mono_llvmonly_get_calling_assembly () workaround since stack walks work in llvmonly mode now. 2016-02-06 01:59:38 -05:00
Aleksey Kliger 8f0ecc7960 [reflection] Use MonoError in mono_module_file_get_object
Mark mono_module_file_get_object external only.
Use mono_module_file_get_object_checked in runtime code.
2016-02-05 16:09:29 -05:00
Zoltan Varga b7b402c897 Fix the build. 2016-02-05 15:22:11 -05:00
Andi McClure a4dbd15840 Merge pull request #2569 from xmcclure/gshared-enable
Miscellaneous minor improvements around amd64 aot
2016-02-05 13:39:58 -05:00
João Matos 3a85d50602 Fixed compiler to wrap paths with embedded spaces when calling external tools.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34498.
2016-02-05 16:58:19 +00:00
Rolf Bjarne Kvinge dcd84c2014 [corlib] Disable ThreadLocalTests.DisposeOnThreadExit on MonoTouch, it's randomly failing. 2016-02-05 16:46:52 +01:00
Alexander Köplinger 5262fc2862 Merge pull request #2572 from akoeplinger/fix-monodoc-language
[monodoc] Fix literal formatting on systems where decimal separator is not a dot
2016-02-05 16:14:05 +01:00
Zoltan Varga efc6803ce0 [llvmonly] Various small fixes. Make mono_llvm_throw_exception etc. directly callable in static mode. Add support for directly calling pinvoke methods. Fix an assertion during EH. 2016-02-05 02:07:46 -05:00
Miguel de Icaza 4c3a5f8101 [Docs] More API docs 2016-02-04 23:14:06 -05:00
Zoltan Varga 6bca78d1bb [llvmonly] Don't set the invariant.load flag on loads from the GOT, they are initialized by a call to init_method () so they are not completely invariant. 2016-02-04 22:40:44 -05:00
Zoltan Varga c4037092ac Revert "[jit] Don't allocate memory for unused vreg"
This reverts commit 137c0999cc.

Revert this as leads to a memory overwrite on x86:

			defs [ins->dreg + 1] = NULL;
2016-02-04 19:03:20 -05:00
Andi McClure 8a0913da7c Move some amd64 constants out of source into header 2016-02-04 14:11:45 -05:00
Andi McClure 528b7e05ca Clarify trampoline error message in aot-runtime 2016-02-04 13:43:03 -05:00
Aleksey Kliger (λgeek) 7c8c564937 Merge pull request #2566 from lambdageek/monoerror-mono_module_get_object
[reflection] Use MonoError for mono_module_get_object
2016-02-04 10:26:54 -05:00
Aleksey Kliger (λgeek) bb60f239b7 Merge pull request #2535 from lambdageek/monoerror-reflection-bubble
[reflection] Push MonoError through misc methods
2016-02-04 10:26:25 -05:00
Marek Safar 3bab012ec8 [System] Remove explicit sdk target from CSharpCodeCompiler 2016-02-04 16:04:33 +01:00
Ludovic Henry 6632cfeb1b [io-layer] Print from which pipe we just read 2016-02-04 14:30:55 +00:00
Ludovic Henry 47d80e598b [Process] Fix possible double call to Begin(Output|Error)ReadLine
This is not allowed in .NET, as it could lead to unexpected results.
2016-02-04 14:30:25 +00:00
Ludovic Henry 50e93af96f [threads] Remove mono_thread_notify_pending_exc_fn dead code 2016-02-04 13:40:16 +00:00
Ludovic Henry c56f741382 [thread] Remove mono_thread_info_begin_suspend unused parameter 2016-02-04 13:38:51 +00:00
Ludovic Henry cf2366f2c0 [threads] Remove unecessary block/unblock suspend ACK signal
Blocking suspend_ack_signal_mask is only useful if we are notifying the initiator of suspend followed by waiting on the suspend_signal_mask.
2016-02-04 13:38:25 +00:00
Marek Safar 47a835d26f [mcs] Update sdk profile paths after 88b287f065 2016-02-04 14:09:59 +01:00
Alexander Köplinger 6f7aee2d55 [monodoc] Fix literal formatting on systems where decimal separator is not a dot
E.g. on a German language OS the "make check-mdoc-export-html" test fails with this:

```
diff --exclude=.svn -rup Test/en.expected/Mono.DocTest/Widget.xml Test/en.actual/Mono.DocTest/Widget.xml
--- Test/en.expected/Mono.DocTest/Widget.xml	2015-11-18 04:42:11.000000000 +0100
+++ Test/en.actual/Mono.DocTest/Widget.xml	2016-02-04 02:38:09.000000000 +0100
@@ -1061,8 +1061,8 @@
       </Docs>
     </Member>
     <Member MemberName="PI">
-      <MemberSignature Language="C#" Value="protected const double PI = 3.14159;" />
-      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3.14159)" />
+      <MemberSignature Language="C#" Value="protected const double PI = 3,14159;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3,14159)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -1070,7 +1070,7 @@
       <ReturnValue>
         <ReturnType>System.Double</ReturnType>
       </ReturnValue>
-      <MemberValue>3.14159</MemberValue>
+      <MemberValue>3,14159</MemberValue>
       <Docs>
```

The fix is to always use InvariantCulture for literal formatting.
2016-02-04 02:40:19 +01:00
Zoltan Varga bac71d3d9a [llvm] Zero extend unsigned enum arguments. Fixes #38379. 2016-02-03 18:16:09 -05:00
Andi McClure 9025515fa1 Add --exclude-test option to mono/mini test driver 2016-02-03 17:16:59 -05:00
Andi McClure 2eaf673309 Minor additions to comments around amd64 aot 2016-02-03 17:16:01 -05:00
Andi McClure e6ca0ea07f Changes to gsharedvt amd64 tests
Re-enable tests, add a test for long/float returning gsharedvt->normal
for a static method, add tests for sign extension.
2016-02-03 17:15:27 -05:00
Aleksey Kliger 429502c06d [reflection] Use MonoError for mono_module_get_object
Mark mono_module_get_object external only.
Runtime should use mono_module_get_object_checked.
2016-02-03 17:02:54 -05:00
Aleksey Kliger 979b268228 [reflection] Use MonoError in mono_image_get_{method,ctor}_on_inst_token 2016-02-03 15:32:07 -05:00
Aleksey Kliger be38cc5569 [reflection] Use MonoError for mono_image_get_{method,ctor}builder_token 2016-02-03 15:32:06 -05:00
Aleksey Kliger 813f22c8e7 [reflection] Use MonoError in mono_image_create_pefile 2016-02-03 15:32:06 -05:00
Aleksey Kliger e9a35ddd9e [reflection] Don't raise in mono_image_get_method_info 2016-02-03 15:32:05 -05:00
Aleksey Kliger 4a9e62ed95 [reflection] Don't raise in reflection_methodbuilder_from_{method,ctor}_builder 2016-02-03 15:32:05 -05:00
Aleksey Kliger f8c7f3bdf5 [reflection] Don't raise in mono_type_get_object_checked 2016-02-03 15:32:04 -05:00
Aleksey Kliger d062f8b938 [reflection] Use MonoError for mono_image_create_method_token 2016-02-03 15:32:03 -05:00
Aleksey Kliger 224ec8dd10 [reflection] Use MonoError for mono_image_build_metadata 2016-02-03 15:32:03 -05:00
Aleksey Kliger f2d480265a [reflection] Use MonoError in mono_image_create_token 2016-02-03 15:32:02 -05:00
Aleksey Kliger 15392a5d3f [reflection] Use MonoError in some static functions
Pass a MonoError argument to:
method_encode_code, mono_image_basic_method, mono_image_get_ctor_info
2016-02-03 15:32:02 -05:00
Alexander Köplinger 30490c7641 Merge pull request #2542 from akoeplinger/remove-changelog
Remove ChangeLog files from the repo
2016-02-03 21:09:24 +01:00
Rodrigo Kumpera 411d5d1397 Merge pull request #2554 from ludovic-henry/coop-blocking-interrupt
[coop] Use signals for blocking syscall interrupt
2016-02-03 15:08:35 -05:00
Rodrigo Kumpera 8d8d19ea88 Merge pull request #2559 from lewurm/hazard-pointer-clear
[hazard pointers] add write barrier on clear as well
2016-02-03 14:53:55 -05:00
Alexander Köplinger a44d3c650c [binary-reference-assemblies] Add a symlink from 4.0/mscorlib.dll to 4.0-api/mscorlib.dll
Some programs like NUnit check if a file exists there and break otherwise.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38331
2016-02-03 19:45:25 +01:00
Alexander Köplinger 84d0bbae5d [docs] remove a deleted file from EXTRA_DIST 2016-02-03 19:24:30 +01:00
Alexander Köplinger 62aa412f82 Revert "[rules.make] to support 'make dist' on MacOS"
This reverts commit a234d21471.

It isn't necessary after f1dad87178.
2016-02-03 19:23:21 +01:00
Miguel de Icaza 6cfa9c7d64 [Runtime Documentation] More work on runtime documentation 2016-02-03 13:18:42 -05:00
Bernhard Urban 09cf055584 [hazard pointers] add write barrier on clear as well 2016-02-03 10:09:37 -08:00
Ludovic Henry 9049d5a0f0 [coop] Use signals for blocking syscall interrupt 2016-02-03 16:56:19 +00:00
Miguel de Icaza b8462def3c [Documentation] Document some of Mono's embedding API, improve the style 2016-02-03 10:11:19 -05:00
Miguel de Icaza e0ac73928f Remove stale files 2016-02-03 09:26:40 -05:00
Miguel de Icaza a234d21471 [rules.make] to support 'make dist' on MacOS 2016-02-03 09:24:14 -05:00
Miguel de Icaza a173648983 Document Coop mode in README 2016-02-03 09:24:14 -05:00
Ludovic Henry b9844d2404 [test] Use using TimerTest 2016-02-03 13:51:41 +00:00
Ludovic Henry e83200abaf [tests] Use explicit delegates to get more information from stacktrace 2016-02-03 13:11:04 +00:00
Ludovic Henry ecb8958e29 [proc] Fix potential buffer overflow 2016-02-03 12:42:25 +00:00
monojenkins ac32aa114a Merge pull request #2530 from lambdageek/monoerror-mono_string_new
[runtime] Use MonoError for mono_string_new

We are refraining from changing runtime callers of `mono_string_new` to `mono_string_new_checked` in one commit. String creation is used in several hundred places and threading error handling through all the callers is very intrusive. Additionally, AFAIK the only error condition from mono_string_new is out-of-memory. In a lot of cases there's no way to meaningfully recover.

We should revisit individual callers when it makes sense, but just mechanically updating everywhere doesn't get us a lot of benefit.
2016-02-03 06:45:23 +00:00
Miguel de Icaza fcb3e8d260 Remove from the documentation non-public APIs, or move to files that flag them as internal 2016-02-02 22:32:14 -05:00
monojenkins 50fe4789db Merge pull request #2524 from lambdageek/monoerror-mono_string_new_utf16_checked
[runtime] Use MonoError for mono_string_new_utf16
2016-02-03 03:32:00 +00:00
Miguel de Icaza a33c828c85 Updated the runtime template documentation with all new APIs in Mono 2016-02-02 22:05:29 -05:00
monojenkins 58cc5d1bd1 Merge pull request #2518 from lambdageek/monoerror-mono_method_get_object
[runtime] Use MonoError for mono_method_get_object

Depends on #2532 

Issues:

- [x] ~~depends on #2486~~
- [x] ~~Should use `mono_object_new_checked` #2532~~ 
- [x] ~~Should use `mono_string_new_checked`~~ (`mono_string_new` will assert instead of raising an exception - #2530)
2016-02-03 02:25:22 +00:00
Zoltan Varga f2b539b95e [llvmonly] Implement support for stack walks if _Unwind_Backtrace () is available. 2016-02-02 19:35:26 -05:00
Aleksey Kliger f392080f21 [runtime] Switch to mono_method_get_object_checked
Mark mono_method_get_object external only.
2016-02-02 19:20:08 -05:00
Aleksey Kliger eeabfa9a06 [runtime] Use MonoError for mono_method_get_object 2016-02-02 19:20:08 -05:00
Aleksey Kliger b2697dd062 [reflection] Fix build breakage 2016-02-02 19:13:24 -05:00
monojenkins 477d3962f6 Merge pull request #2558 from lewurm/thread-suspension-race
[threads] avoid race between setting the state flag and suspension

there's a short window where we release the lock and another thread
could modify the state.  That is what we saw on the ARM machines for a
while, e.g. in `subthread-exit.cs` there's a race between
`mono_thread_execute_interruption` and `mono_thread_suspend_all_other_threads`:

> Thread 2 (Thread 0x429ff430 (LWP 5189)):  // SUB THREAD
> #0  0x40398e30 in nanosleep () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x0028c0ac in monoeg_g_usleep (microseconds=86650) at gdate-unix.c:53
> #2  0x0027b1d8 in suspend_sync_nolock (id=1079603792, interrupt_kernel=1) at mono-threads.c:913
> #3  0x0027b2d4 in mono_thread_info_safe_suspend_and_run (id=1079603792, interrupt_kernel=1, callback=0x1ab109 <suspend_thread_critical>, user_data=0x429fe534)
>     at mono-threads.c:935
> #4  0x001ab28a in suspend_thread_internal (thread=0x401c0120, interrupt=1) at threads.c:4807
> #5  0x001a91ec in mono_thread_suspend_all_other_threads () at threads.c:3297
> #6  0x00158d8c in ves_icall_System_Environment_Exit (result=0) at icall.c:6378
> #7  0x400e7d9c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> Thread 1 (Thread 0x40597250 (LWP 5186)):  // MAIN THREAD
> #0  0x4039a5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x4039796e in do_futex_wait () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #2  0x403979da in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #3  0x002788d8 in mono_os_sem_wait (sem=0x388248, flags=MONO_SEM_FLAGS_NONE) at ../../mono/utils/mono-os-semaphore.h:163
> #4  0x00279722 in mono_thread_info_wait_for_resume (info=0x388210) at mono-threads.c:144
> #5  0x0027ad5e in mono_thread_info_end_self_suspend () at mono-threads.c:700
> #6  0x001ab2d2 in self_suspend_internal (thread=0x401c0120) at threads.c:4822
> #7  0x001aab0a in mono_thread_execute_interruption () at threads.c:4337
> #8  0x001a6a82 in ves_icall_System_Threading_Thread_Sleep_internal (ms=1200) at threads.c:1217
> #9  0x400da75c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2016-02-03 00:00:29 +00:00
João Matos 39cb942254 Merge pull request #2563 from OffBase/master
Fix stream leak when failing to open a zip file
2016-02-03 00:00:02 +00:00
Aleksey Kliger 37630d26dd [runtime] Use MonoError for mono_string_new 2016-02-02 18:56:04 -05:00
Aleksey Kliger 3685b16f95 [runtime] Switch to mono_string_new_utf16_checked 2016-02-02 18:46:30 -05:00
Rodrigo Kumpera f8c90493e6 Merge pull request #2536 from lambdageek/monoerror-mono_field_get_object
[runtime] Use MonoError for mono_field_get_object
2016-02-02 18:37:33 -05:00
Rodrigo Kumpera 8a23cf5c1e Merge pull request #2532 from lambdageek/monoerror-mono_object_new
[runtime] Use MonoError for mono_object_new
2016-02-02 18:35:49 -05:00
Zoltan Varga 53bd4a7a23 [llvmonly] Implement limited support for stack walks so new StackTrace () works. 2016-02-02 17:47:46 -05:00
Matthew Orlando 5d67d566a4 Fix stream leak in all cases 2016-02-02 13:57:42 -08:00
Marek Safar c3a88ff72b [corlib] Fixes Environment version for .net 4.6 2016-02-02 22:30:25 +01:00
Matthew Orlando a9f9e3505e Fix stream leak when failing to open a zip file 2016-02-02 12:58:06 -08:00
Vlad Brezae 68db4c7548 Merge pull request #2556 from BrzVlad/feature-sgen-stats
[sgen] sgen stats
2016-02-02 20:56:11 +00:00
Zoltan Varga 856ddcb285 Fix the build. 2016-02-02 14:52:59 -05:00
Zoltan Varga dd0e1e7591 [llvm] Fix the loaded llvm build broken by 204f2985d7. 2016-02-02 13:52:02 -05:00
monojenkins 635a4cec6f Merge pull request #2557 from ludovic-henry/monoerror-return-macro
[MonoError] Add error checking macro
2016-02-02 16:30:26 +00:00
Ludovic Henry ddc3fcfb41 fixup! [MonoError] Add error checking macro 2016-02-02 15:01:34 +00:00
Bernhard Urban 03f71e6173 [threads] avoid race between setting the state flag and suspension
there's a short window where we release the lock and another thread
could modify the state.  That is what we saw on the ARM machines for a
while, e.g. in `subthread-exit.cs` there's a race between
`mono_thread_execute_interruption` and `mono_thread_suspend_all_other_threads`:

> Thread 2 (Thread 0x429ff430 (LWP 5189)):  // SUB THREAD
> #0  0x40398e30 in nanosleep () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x0028c0ac in monoeg_g_usleep (microseconds=86650) at gdate-unix.c:53
> #2  0x0027b1d8 in suspend_sync_nolock (id=1079603792, interrupt_kernel=1) at mono-threads.c:913
> #3  0x0027b2d4 in mono_thread_info_safe_suspend_and_run (id=1079603792, interrupt_kernel=1, callback=0x1ab109 <suspend_thread_critical>, user_data=0x429fe534)
>     at mono-threads.c:935
> #4  0x001ab28a in suspend_thread_internal (thread=0x401c0120, interrupt=1) at threads.c:4807
> #5  0x001a91ec in mono_thread_suspend_all_other_threads () at threads.c:3297
> #6  0x00158d8c in ves_icall_System_Environment_Exit (result=0) at icall.c:6378
> #7  0x400e7d9c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> Thread 1 (Thread 0x40597250 (LWP 5186)):  // MAIN THREAD
> #0  0x4039a5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x4039796e in do_futex_wait () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #2  0x403979da in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #3  0x002788d8 in mono_os_sem_wait (sem=0x388248, flags=MONO_SEM_FLAGS_NONE) at ../../mono/utils/mono-os-semaphore.h:163
> #4  0x00279722 in mono_thread_info_wait_for_resume (info=0x388210) at mono-threads.c:144
> #5  0x0027ad5e in mono_thread_info_end_self_suspend () at mono-threads.c:700
> #6  0x001ab2d2 in self_suspend_internal (thread=0x401c0120) at threads.c:4822
> #7  0x001aab0a in mono_thread_execute_interruption () at threads.c:4337
> #8  0x001a6a82 in ves_icall_System_Threading_Thread_Sleep_internal (ms=1200) at threads.c:1217
> #9  0x400da75c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2016-02-02 06:59:27 -08:00
Ludovic Henry 0ba4b9e2df [error] Use error_return_(val_)if_nok at some places 2016-02-02 14:27:45 +00:00
Ludovic Henry ddb2f6734c [MonoError] Add error checking macro 2016-02-02 14:27:44 +00:00
Alexander Köplinger f1dad87178 [binary-reference-assemblies] Make sure only .dll files are included in the wildcard
The wildcard `$(wildcard ../../../external/binary-reference-assemblies/v4.5/*)` would include the directory entry `../../../external/binary-reference-assemblies/v4.5/Facades/` which returns an error during "make dist".

Fixing this by including only the .dll files in the wildcards.
2016-02-02 14:29:46 +01:00
Alexander Köplinger c896d003e5 [binary-reference-assemblies] Include 4.5 Facades in tarball 2016-02-02 13:41:04 +01:00
Martin Baulig 97d5cc968b [Mono.Security.Providers.OldTls]: Don't build on mobile.
(cherry picked from commit f379b7df51)
2016-02-02 02:06:27 +01:00
Vlad Brezae 06157ba4ed [sgen] Add binary protocol entries for evacuation
This way we can detect which collections are doing evacuation, which can be useful both for debugging and performance reasons.
2016-02-02 02:19:56 +02:00
Vlad Brezae 5f06b81c0d [sgen] Remove fixed FIXME comment 2016-02-02 02:19:55 +02:00
Vlad Brezae 66e6ff2b21 [sgen] Add binary protocol entry for worker finish
This will allow us to detect actual concurrent M&S end and whether the concurrent M&S was forced to finish.
2016-02-02 02:19:55 +02:00
Vlad Brezae bcf81a85b0 [sgen] Add binary protocol entries for finishing the gray stack
These entries have a timestamp associated with them, allowing us to gather information about time spent during each collection.
2016-02-02 02:19:55 +02:00
Vlad Brezae daa8ee8d21 [sgen] Add binary protocol entries for cardtable scanning
These entries have a timestamp associated with them, allowing us to gather information about time spent during each collection.
2016-02-02 02:19:55 +02:00
Vlad Brezae 6d980143fe [sgen] Fix HEAVY_STATISTICS build warning 2016-02-02 02:19:55 +02:00
Miguel de Icaza ee65935935 [Makefile] fix make dist on libgc 2016-02-01 17:54:56 -05:00
Zoltan Varga 9a871fa705 [jit] Avoid merging some bblocks which are not after each other when inlining since it can cause the bblock between them to be ignored later. Fixes #38250. 2016-02-01 17:45:01 -05:00
Zoltan Varga 6929f360a4 [amd64] Fix the stack alignment check. 2016-02-01 17:45:01 -05:00
monojenkins 32122271cc Merge pull request #2551 from ludovic-henry/coop-products
[coop] Add support for entering/exiting GC safe/unsafe region for products
2016-02-01 22:35:22 +00:00
Ludovic Henry 738e03cc1e [coop] Add support for entering/exiting GC safe/unsafe region for products 2016-02-01 20:53:03 +00:00
Ludovic Henry 0c0ab39407 [coop] Ensure we exit blocking mode when invoking managed code
mono_runtime_invoke might be called by P/Invoked code, which is in blocking mode. Not switching back to running can lead to a crash when hitting a safepoint.
2016-02-01 20:53:02 +00:00
Zoltan Varga 2b3951446e [arm] Fix a code generation problem when a virtual call is made with a large offset, the offset generation code would overwrite a source register. Fixes #27303. 2016-02-01 14:51:23 -05:00
Zoltan Varga 72dac8baaa [aot] Emit gsharedvt wrappers only in llvmonly mode. 2016-02-01 14:28:40 -05:00
Marek Safar 509c9828d6 [mcs] Filter out nested private types of forwarded types 2016-02-01 16:33:20 +01:00
monojenkins 7dc7782f83 Merge pull request #2538 from ludovic-henry/fix-sgen-38012
[sgen] Fix register scanning on ARM

This bug would trigger a use after sweep in System.Threading.Tasks.Task.FinishContinuations:3621.

The issue would arise on ARM, as `MonoContext` and `ARCH_NUM_REGS` are defined as followed :

```
typedef struct {
  mgreg_t pc;
  mgreg_t regs [16];
  double fregs [16];
  mgreg_t cpsr;
} MonoContext;

\#define ARCH_NUM_REGS 14
```

As you can see, the MonoContext structure is bigger than 14 words, and it does not even covers the last 3 values of `regs`. By using pointer arithmetic, we ensure that we do not miss some parts of the `MonoContext` structure.

The observed behaviour in System.Threading.Tasks.Task.FinishContinuations would be that `continuationObject` would not be marked, and thus freed; `continuationObject` would still contains the pointer to the old location, meaning it wouldn't be null. We would then try to check its type via a call to the `as` operator. This would call the `isinst` IL opcode which would load `continuationObject->vtable->klass->supertypes [...]`, which would trigger a segfault, as `supertypes` would be null.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38012
2016-02-01 13:16:41 +00:00
monojenkins c9717d4807 Merge pull request #2541 from ludovic-henry/fix-coop-hang
[coop] Fix hang in ves_icall_System_Net_Dns_GetHostByName_internal
2016-02-01 12:55:11 +00:00
Marek Safar 22c7ad6237 [binary-reference-assemblies] Install 4.5 api facades 2016-02-01 12:48:23 +01:00
Ludovic Henry 8de9b41c3a [coop] Fix hang in ves_icall_System_Net_Dns_GetHostByName_internal 2016-02-01 09:56:37 +00:00
Zoltan Varga 204f2985d7 [llvm] Make mini-llvm-loader.c simpler by putting all the function pointers into a structure. 2016-02-01 03:09:53 -05:00
Zoltan Varga 61ec3cce68 [amd64] Add support for float arguments/return values to the dyncall code. 2016-02-01 00:03:43 -05:00
Zoltan Varga 36a8195b66 Merge pull request #2547 from ermshiperete/Xamarin-33183
[SWF] Fix behavior when scrollbar values change in TreeView
2016-01-31 23:06:31 -05:00
Zoltan Varga b94fa3be55 [llvm] Remove the goto based error handling code, use explicit error checks and returns instead. 2016-01-31 21:55:06 -05:00
Alexander Köplinger bfa642cd73 [msvc] Update order.xml and csproj files 2016-02-01 02:00:18 +01:00
Alex Rønne Petersen 87a427c8db Merge pull request #2546 from ermshiperete/libtoolize
Check for libtoolize rather than libtool
2016-01-31 16:49:01 +01:00
Marek Safar 993ac43208 [mcs] Stop after fields initializers resolve errors 2016-01-31 08:33:53 +01:00
Zoltan Varga c182d28c71 [runtime] Disable the constant-logical-operand warning. 2016-01-31 00:22:25 -05:00
Zoltan Varga ac76f94e7c [runtime] Make the MONO_CURRENT_ABI_ALIGNOF macros c++ safe. 2016-01-31 00:22:25 -05:00
Zoltan Varga ad7d62eb22 [jit] Remove unused MONO_PATCH_INFO_MONITOR_ENTER/EXIT. 2016-01-31 00:22:25 -05:00
Marek Safar 5d17a86fb8 Merge pull request #2544 from ermshiperete/Xamarin-24641
[corlib] Fix handling of ignorable chars when using ordinal comparison
2016-01-30 20:13:08 +01:00
Neil Mayhew 3bc3da8f4d Check for libtoolize rather than libtool
Current Debian packaging puts libtool in its own package (libtool-bin)
leaving only libtoolize in the main package. The mono build process
uses libtoolize not libtool, so during autogen check for libtoolize
not libtool.
2016-01-30 14:54:52 +01:00
Damien Daspit 500252cbf3 [corlib] Fix handling of ignorable chars when using ordinal comparison
* recognizes ignorable characters when CompareOptions.Ordinal is
  specified
* adds unit tests
* fixes bug 24641

Change-Id: I5102e7392fa54b5671c7f2536cb8778f847e9040
2016-01-30 14:30:40 +01:00
Damien Daspit 9a79413ebf [SWF] Fix behavior when scrollbar values change in TreeView
* only call EndEdit in scrollbar value changed handlers when currently
  editing a node
* fix for bug 33183

Change-Id: I54407e00314f4bfbdc175e883199d3d1ef057911
2016-01-29 23:00:42 +01:00
Damien Daspit fb4bc1b7cd [corlib] Fix exception in __ComObject finalizer during shutdown
* keep a reference to a __ComObject's proxy so it doesn't get garbage
  collected
* don't create __ComObjects unnecessarily
* Fix for bug 24974

Change-Id: Ia09237b7f1af996405134c250bbc29220f81f067
2016-01-29 22:50:10 +01:00
Zoltan Varga d37a42b83b [llvmonly] Fix stack trace calculation. 2016-01-29 16:39:40 -05:00
Eberhard Beilharz f2ac9bf6c3 Don't ignore drives with type "aufs" or "overlay" (Xamarin-31021)
Docker uses aufs or overlayfs to mount the root system in a
container. This change fixes Xamarin-31021 so that the drives
show up properly.

This change is released under the MIT license.

Change-Id: I5150b0e82f26e9dbd07bbcbc50e7ca50d856dde8
2016-01-29 22:33:41 +01:00
Zoltan Varga cdf23315f0 [amd64] Exclude the GSHAREDVT tests as well since they don't work yet. 2016-01-29 16:23:23 -05:00
Zoltan Varga a65739d195 [jit] Disable the DYNCALL tests on amd64 again, not all cases are supported right now. 2016-01-29 16:19:35 -05:00
Alexander Köplinger cb07018bca Remove ChangeLog references from Makefile and .gitattribute 2016-01-29 21:41:48 +01:00
Zoltan Varga 211b145281 [jit] Use mono_method_get_full_name () to print out method names in a few places. 2016-01-29 15:33:34 -05:00
Zoltan Varga faeeab9653 [llvmonly] Fix the fallback to no_gsharedvt_in_wrapper, which was broken by the error handling changes. 2016-01-29 15:32:48 -05:00
Zoltan Varga b3fdafbadb [llvmonly] Catch all exceptions in mono_jit_exec () to avoid terminating the runtime with an unhelpful libc++ assertion. 2016-01-29 15:03:46 -05:00
Marek Safar 8ad1f59aa8 [mcs] Rework naming convention of lifted state machine fields to include scope index. Fixes #32315 (1st part) 2016-01-29 20:24:20 +01:00
Ludovic Henry 32a89437a1 [sgen] Fix register scanning on ARM
This bug would trigger a use after sweep in System.Threading.Tasks.Task.FinishContinuations:3621.

The issue would arise on ARM, as `MonoContext` and `ARCH_NUM_REGS` are defined as followed :

```
typedef struct {
  mgreg_t pc;
  mgreg_t regs [16];
  double fregs [16];
  mgreg_t cpsr;
} MonoContext;

\#define ARCH_NUM_REGS 14
```

As you can see, the MonoContext structure is bigger than 14 words, and it does not even covers the last 3 values of `regs`. By using pointer arithmetic, we ensure that we do not miss some parts of the `MonoContext` structure.

The observed behaviour in System.Threading.Tasks.Task.FinishContinuations would be that `continuationObject` would not be marked, and thus freed; `continuationObject` would still contains the pointer to the old location, meaning it wouldn't be null. We would then try to check its type via a call to the `as` operator. This would call the `isinst` IL opcode which would load `continuationObject->vtable->klass->supertypes [...]`, which would trigger a segfault, as `supertypes` would be null.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38012
2016-01-29 18:37:57 +00:00
Alexander Köplinger b03e606287 Remove ChangeLog files from the repo
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-29 19:17:06 +01:00
Ludovic Henry aa5aff7b9d [sgen] Abort with a message on failure to initialize binary protocol 2016-01-29 18:10:10 +00:00
Alexander Köplinger bf5947a0fd [corlib] Improve CancellationTokenSource test
Get rid of the Thread.Sleep calls that are prone to timing issues.
2016-01-29 16:51:02 +01:00
monojenkins 02d4680c09 Merge pull request #2522 from ludovic-henry/test-socketresponder-task
[SocketResponder] Use Task instead of Thread + Use explicit delegate so it appears in stacktraces
2016-01-29 14:50:15 +00:00
Rolf Bjarne Kvinge 5bb760e65f [System.ServiceModel.Internals] Add a missing .sources file for watchOS. Fixes #38145.
https://bugzilla.xamarin.com/show_bug.cgi?id=38145
2016-01-29 12:23:10 +01:00
Vlad Brezae 69fd76078e Merge pull request #2448 from BrzVlad/feature-cprop-opt
[jit] Improve strength reduction handling within cprop
2016-01-29 11:21:17 +00:00
Marcos Henrich d56d046025 Merge pull request #2531 from esdrubal/systemweb
[System.Web] HeadersCollection read only exception
2016-01-29 09:35:27 +00:00
Zoltan Varga 70de6ee108 [llvmonly] Do a stack walk from mono_llvmonly_get_calling_assembly (), the runtime might support stack walks on some platforms. 2016-01-28 23:19:25 -05:00
Zoltan Varga 3d22da0f6e [runtime] Avoid an assert if a runtime compiled without DISABLE_COM is used with an mscorlib from the mobile_static profile. 2016-01-28 23:18:51 -05:00
Aleksey Kliger 350c4ff92b [runtime] mono_reflection_resolve_custom_attribute_data cleanup error handling 2016-01-28 20:45:47 -05:00
Aleksey Kliger fe72b0ed73 [runtime] Use MonoError for mono_field_get_object
Mark mono_field_get_object external only.
Use mono_field_get_object_checked in the runtime.
2016-01-28 20:45:47 -05:00
Zoltan Varga c52c794bcb [llvmonly] Remove bind-to-runtime-version from the aot flag used to compile the assemblies, it makes testing harder. 2016-01-28 20:06:52 -05:00
Zoltan Varga 4b085e7bf7 [llvmonly] Allow any value for MONO_LLVMONLY not just TRUE. 2016-01-28 20:05:40 -05:00
Zoltan Varga 9fd965bf0f Merge pull request #2533 from vargaz/gshared-errors
[jit] Add MonoError support for the generic sharing code.
2016-01-28 18:31:45 -05:00
monojenkins 68f233fc7c Merge pull request #2529 from lambdageek/monoerror-location
[runtime] mono_error_assert_ok() include location
2016-01-28 21:45:15 +00:00
Zoltan Varga 2e1116d02a [jit] Add MonoError support for the generic sharing code. 2016-01-28 15:48:48 -05:00
Aleksey Kliger 4369d53fa5 [runtime] Switch to mono_object_new_checked
Mark mono_object_new external only.
2016-01-28 15:44:46 -05:00
Aleksey Kliger fed0fa8b6c [runtime] Use MonoError for mono_object_new 2016-01-28 15:44:45 -05:00
Zoltan Varga 871eb0554b [jit] Move the raise version of mono_jit_compile_method () to metadata/. 2016-01-28 14:46:44 -05:00
Rodrigo Kumpera a86b5813a4 Merge pull request #2525 from kumpera/embedding-api
[api] Add API kill switch.
2016-01-28 14:22:09 -05:00
Zoltan Varga 5c3d125e79 Merge pull request #2528 from vargaz/jit-errors2
Jit errors2
2016-01-28 13:16:24 -05:00
Marcos Henrich 2002994d0c Merge pull request #2419 from esdrubal/xmlsubclassel
[System.Xml] Fix sub class serialization on lists
2016-01-28 17:57:15 +00:00
Marcos Henrich 1180f64665 [System.Web] HeadersCollection read only exception
In reference source HttpHeaderCollection [1] when Add, Set or Remove is
called and the collection is readonly a PlatformNotSupportedException is
thrown.

Mono HeadersCollection was throwing NotSupportedException and
Microsoft.Owin.Host.SystemWeb.OwinCallContext.RemoveAcceptEncoding was
not catching the exception because it was expecting
PlatformNotSupportedException.

Fixes #33809

[1] http://referencesource.microsoft.com/#System.Web/HttpHeaderCollection.cs,73
2016-01-28 17:21:37 +00:00
Marcos Henrich 861ab4c98d [System.Web] Test HttpRequest.Headers Add/Set/Remove
In .NET while calling Add, Set or Remove of a HttpRequest read only
collection a PlatformNotSupportedException is thrown.

Covers #33809
2016-01-28 17:17:27 +00:00
Aleksey Kliger 5297427fdf [runtime] mono_error_assert_ok() include location 2016-01-28 11:31:30 -05:00
Alexander Köplinger 205d9e09f0 [metadata] Fix duplicate variable declaration in coree.c that breaks msvc
A new 'error' variable was added in d790857278 that clashes with the existing one.
2016-01-28 16:13:44 +01:00
Rolf Bjarne Kvinge 3bc96e9c02 [mono-api-html] New interface members are only breaking if the interface existed. 2016-01-28 15:55:58 +01:00
Rolf Bjarne Kvinge 4d1c0d517c [mono-api-html] Fix compiler warning. 2016-01-28 15:33:53 +01:00
Rolf Bjarne Kvinge a8c6b0d380 [mono-api-html] Make it possible to hide/show non-breaking changes in the html output.
We now add data-is-[non-]breaking attributes to the generated
html elements, and then use some javascript logic to show/hide
non-breaking elements (and the javascript also looks in the
container elements show/hide containers that have only
non-breaking descendants).

Also use css classes/styles to colorize.
2016-01-28 15:32:56 +01:00
Rolf Bjarne Kvinge 4279991d27 [mono-api-info] Add an is-override attribute to determine if a method is overriding another method. 2016-01-28 15:32:52 +01:00
Alexander Köplinger 88b287f065 [xbuild] Use -api folder for 2.0/3.5/4.0 profiles as well
Similar to e2a79ed888. Those profiles are only contract/reference assemblies since Mono 4.0.
2016-01-28 15:18:18 +01:00
Rolf Bjarne Kvinge 81d2d4cfe8 Merge branch 'mono-api-info-improvements' 2016-01-28 14:49:29 +01:00
Rolf Bjarne Kvinge c918366bb9 [mono-api-info] CreateAttributeMapping: don't create dictionaries unless there is something to put in them. 2016-01-28 14:49:17 +01:00
Rolf Bjarne Kvinge f4ce19132a [mono-api-info] Rework AttributeData to use a static method instead of creating an instance every time. 2016-01-28 14:49:13 +01:00
Rolf Bjarne Kvinge f4f993f4bf [mono-api-info] Improve CleanupTypeName to not create 3 strings every time somethings needs to change. 2016-01-28 14:49:11 +01:00
Rolf Bjarne Kvinge 0f83276b64 [mono-api-info] First filter, then order, and use ordinal comparison. 2016-01-28 14:49:08 +01:00
Rolf Bjarne Kvinge 035c546b81 [mono-api-info] Rework SkipAttribute to use ordinal string comparison, and no string comparison unless needed. 2016-01-28 14:49:06 +01:00
Rolf Bjarne Kvinge f12fdef548 [mono-api-info] Use ordinal string comparison. It's much faster. 2016-01-28 14:49:03 +01:00
Rolf Bjarne Kvinge 4350e463b4 [mono-api-info] Remove unused method. 2016-01-28 14:49:00 +01:00
Rolf Bjarne Kvinge d21bbefe55 [mono-api-info] Use XmlWriter instead of XmlDocument to make this faster.
Generating all the API references (in parallel) for Xamarin.iOS goes from
5.5s to 4.5s.
2016-01-28 14:48:57 +01:00
Marek Safar e2a79ed888 [xbuild] Set .net 4.5 target to 4.5 restricted api 2016-01-28 14:19:18 +01:00
Marek Safar 62b4991bcd [system] Add DeliveryFormat to SmtpSection. Fixes #37891 2016-01-28 13:40:45 +01:00
Rolf Bjarne Kvinge 6cf7b10c54 [mono-api-info] Add support for writing output to a file specified using a command line argument. 2016-01-28 13:19:16 +01:00
Marek Safar 85490058c8 [mcs] Implements null operator for dynamic expressions. Fixes #37801, #37824 2016-01-28 13:09:43 +01:00
Ludovic Henry 08aa9adece [SocketResponder] Use Task instead of Thread
This allow us catching and rethrowing the exception on the main thread, as well as making sure we wait for the Listen thread to finish in a timely manner.
2016-01-28 11:10:53 +00:00
Ludovic Henry 83c7edc70e [SocketResponder] Start in constructor and Stop on Dispose
In conjuction with `using` we ensure that we Start and Stop the SocketResponder correctly, and everytime
2016-01-28 11:10:53 +00:00
Ludovic Henry 7f0b7cf022 [Tests] Use explicit delegate so it appears in stacktraces
In case of exception in this callback, the name of the test method will appear in the stacktrace, making debugging way easier.
2016-01-28 11:10:53 +00:00
Zoltan Varga 27f20bf400 Merge pull request #2497 from ludovic-henry/monoerror-mono_gsharedvt_constrained_call
[runtime] Use MonoError for mono_gsharedvt_constrained_call
2016-01-28 03:03:35 -05:00
Sebastien Pouliot 789f4b7651 [System] Move HttpListenerResponse.GetStatusDescription to ease linking
The use of HttpResponseMessage.ReasonPhrase means:

* marking the HttpListenerResponse.GetStatusDescription method;
* marking the HttpListenerResponse type;
* which implements IDisposable, so it's Dispose method is marked
* marking the Close method...

from there a metric ton of code gets recursively marked to the point
where the whole SSL/TLS server code gets inside the app.

To avoid this we move the GetStatusDescription to a different
type that won't bring the end of the civilized world so fast.
2016-01-27 22:12:13 -05:00
Zoltan Varga 2af945bb5d [runtime] Use MonoError in mono_jit_runtime_invoke () to return errors, the 'exc' parameter is still used to return the possible exception from the invoke call. 2016-01-27 22:06:47 -05:00
Alexander Köplinger cdd384ac72 [System.Web] Fix another wrong test assembly name
Didn't catch that one in 180e745cce as it hides itself pretty well :)
2016-01-28 03:56:59 +01:00
Zoltan Varga e24eee43ea Merge pull request #2527 from vargaz/jit-errors
[jit] Convert some of the error handling to use cfg->error instead of…
2016-01-27 21:33:53 -05:00
Zoltan Varga 5ff7c08a10 [jit] Use mono_error_set_pending_exception () to throw exceptions from the trampoline code. This only works if the generic trampoline code checks for exceptions after the call to the C function. 2016-01-27 20:15:14 -05:00
Zoltan Varga 82b5d81363 [jit] Use MonoError in mono_jit_compile_method () and the trampoline code. 2016-01-27 19:55:48 -05:00
Rodrigo Kumpera 1dfaf5d373 [api] GCC is much better at enforcing MONO_RT_EXTERNAL_ONLY. 2016-01-27 18:11:59 -05:00
Alexander Köplinger 41db6a54d3 Merge pull request #2526 from alexanderkyte/llvmonly_mobile_static_fixups
[mobile_static] Requested NunitLite comment and llvmonly configuration changes
2016-01-28 00:08:20 +01:00
Zoltan Varga 1630549e55 [jit] Pass a MonoError* instead of a MonoException** to mono_jit_compile_method_inner (). 2016-01-27 17:48:28 -05:00
Zoltan Varga 1c04cbffdf [runtime] Initialize the error fields in mono_error_set_exception_instance (). 2016-01-27 17:47:38 -05:00
Alexander Köplinger 180e745cce [bcl] Fix dll names and InternalsVisibleTo for test assemblies
The format of the test assembly name changed in 860334ff45
from System.Web_test_net_4_x.dll to net_4_x_System.Web_test.dll.

This fixes all the places where the old name was used.
2016-01-27 23:39:00 +01:00
Zoltan Varga 1a784475c0 [jit] Reduce the usage of the loader error more by converting it to a MonoError where it was detected. 2016-01-27 17:13:27 -05:00
Alexander Köplinger 2b2ca2dbf8 Merge pull request #2523 from akoeplinger/fix-profiler-test-reporting
[profiler] Fix test reporting success even though a test failed
2016-01-27 22:21:49 +01:00
Zoltan Varga bb015846ad [jit] Convert some of the error handling to use cfg->error instead of cfg->exception_type. 2016-01-27 16:01:41 -05:00
Neale Ferguson ef8c67a1d7 Use S390_SET to get addresses rather than the previous more convoluted method
[jit] Add a new jit icall mono_interruption_checkpoint_from_trampoline () and use that instead of mono_thread_force_interruption_checkpoint () so the latter can go away eventually.
2016-01-27 15:48:56 -05:00
Alexander Kyte c2ac146ca4 [mobile_static] Don't use gsharedvt with llvmonly 2016-01-27 15:48:25 -05:00
Aleksey Kliger 5fc9695003 [runtime] Use MonoError for mono_string_new_utf16 2016-01-27 15:35:09 -05:00
Ludovic Henry 97c02fbb45 [MonoError] Add ArgumentNull error case 2016-01-27 15:35:08 -05:00
Alexander Kyte 018d664cab [nunitlite] Documented console .config usage 2016-01-27 15:28:05 -05:00
Alexander Kyte 1a1864545a Merge pull request #2432 from alexanderkyte/compile_corlib_with_aot
[aot/bcl] Compile the BCL with AOT
2016-01-27 15:10:56 -05:00
Alexander Kyte f7010e65a9 [aot/bcl] Add Makefile configuration to build the bcl with aot, use it in mobile_static. 2016-01-27 15:10:18 -05:00
Alexander Kyte 1f5d985270 Merge pull request #2431 from alexanderkyte/tests_with_excludes
[mcs] Fix .sources/.excludes for tests, exclude corlib monotouch-excluded tests on mobile_static
2016-01-27 15:09:29 -05:00
Rodrigo Kumpera b118d2593e [api] Mark external Only: mono_get_method, mono_get_method_full and mono_get_method_constrained. 2016-01-27 15:03:26 -05:00
Rodrigo Kumpera afa75917e7 [build] Add MONO_RT_EXTERNAL_ONLY macro to the public API.
This macro should be used to decorate functions that are part of the public API but the runtime is
not supposed to call.

This is to allow us to keep them around but not go crazy with commit reintroducing their usage.
2016-01-27 14:55:47 -05:00
Alexander Köplinger 93ed825dcb [profiler] Fix test reporting success even though a test failed
I noticed this in https://jenkins.mono-project.com/job/test-mono-pull-request-armhf/1715/ which reported success in the "profiler" test step,
even though the step actually reported errors:

```
MONO_PATH=/media/ssd/jenkins/workspace/test-mono-pull-request-armhf/mcs/class/lib/net_4_x perl ./ptestrunner.pl ../..
Checking test-alloc.exe with report ...
Checking test-busy.exe with report ...
Checking test-busy.exe with report,sample ...
Error: Missing thread Finalizer.
Error: Missing thread Main.
Error: Wrong loaded images 2.
Error: Not enough compiled method.
Error: Not enough compiled code.
Error: Missing thread BusyHelper.
Total errors: 6
Checking test-monitor.exe with report ...
Checking test-excleave.exe with report ...
Checking test-heapshot.exe with report,heapshot ...
Checking test-heapshot.exe with heapshot,output=-traces.mlpd ...
Checking test-traces.exe with output=-traces.mlpd ...
Checking test-traces.exe with nocalls,output=-traces.mlpd ...
make[1]: Leaving directory `/media/ssd/jenkins/workspace/test-mono-pull-request-armhf/mono/profiler'
make: Leaving directory `/media/ssd/jenkins/workspace/test-mono-pull-request-armhf/mono/profiler'
++ bc
+++ date +%s
++ echo 1453874768 - 1453874741
+ echo -e '*** end(27): profiler: \e[42mPassed\e[0m'
*** end(27): profiler: Passed
```

The culprit is that ptestrunner.pl checks whether $total_errors is non-zero to determin the process exit code.
This is wrong, as $total_errors is cleared before each test so unless the last test fails the exit code would always be zero.

Introduced a new $global_errors variable which is only incremented and never cleared to fix this.
2016-01-27 20:17:18 +01:00
Zoltan Varga 7ee763525e Revert "[runtime] Use explicit loop checking to remove depth limitation of sequence point search."
This reverts commit 23ce21ede0.

Revert this as it is non-linear and can take a lot of time for complicated cfg structures.
2016-01-27 13:47:37 -05:00
Rodrigo Kumpera 6a724e9a6e Merge pull request #2520 from kumpera/loader-error-cleanup5
[mono-error] Another round of loader-error
2016-01-27 13:38:13 -05:00
monojenkins 97122fe004 Merge pull request #2521 from akoeplinger/fix-sockettest-endconnect-error
[System] Fix error in new BeginConnectToIPV4EndPointUsingDualModelSocket test

It was added with 78c758494a. The test fails on Jenkins:

```
Test Case Failures:
1) MonoTests.System.Net.Sockets.SocketTest.BeginConnectToIPV4EndPointUsingDualModelSocket : System.InvalidOperationException : EndConnect can only be called once per asynchronous operation
at System.Net.Sockets.Socket.ValidateEndIAsyncResult (IAsyncResult ares, System.String methodName, System.String argName) [0x0004a] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System/System.Net.Sockets/Socket.cs:3412
at System.Net.Sockets.Socket.EndConnect (IAsyncResult result) [0x00006] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System/System.Net.Sockets/Socket.cs:1584
at MonoTests.System.Net.Sockets.SocketTest.BeginConnectToIPV4EndPointUsingDualModelSocket () [0x0005d] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs:4365
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```

The reason is that BCCallback already calls EndConnect() so we need to remove it and just wait for the callback in the test itself.

@monojenkins merge
2016-01-27 16:15:23 +00:00
Marek Safar a8f7af783e [mcs] Reset null operator barrier in parenthesis expression 2016-01-27 17:00:24 +01:00
Chris Hamons 8aa899c20d Fix serialization under XM 4.5 Target Framework
- System.Configuration.ConfigurationErrorsException: Failed to load configuration section for dataContractSerializer
- Fixes #36401 #38064
2016-01-27 08:54:10 -06:00
Alexander Köplinger c386c7131d [System] Fix error in new BeginConnectToIPV4EndPointUsingDualModelSocket test
It was added with 78c758494a. The test fails on Jenkins:

```
Test Case Failures:
1) MonoTests.System.Net.Sockets.SocketTest.BeginConnectToIPV4EndPointUsingDualModelSocket : System.InvalidOperationException : EndConnect can only be called once per asynchronous operation
at System.Net.Sockets.Socket.ValidateEndIAsyncResult (IAsyncResult ares, System.String methodName, System.String argName) [0x0004a] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System/System.Net.Sockets/Socket.cs:3412
at System.Net.Sockets.Socket.EndConnect (IAsyncResult result) [0x00006] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System/System.Net.Sockets/Socket.cs:1584
at MonoTests.System.Net.Sockets.SocketTest.BeginConnectToIPV4EndPointUsingDualModelSocket () [0x0005d] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs:4365
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```

The reason is that BCCallback already calls EndConnect() so we need to remove it and just wait for the callback in the test itself.
2016-01-27 15:41:54 +01:00
Alexander Köplinger 39d172e190 [System.Runtime.Caching] Bump timeout in tests to make them more reliable
Failed on Jenkins on ARM today:

```
Tests run: 38, Failures: 1, Not run: 0, Time: 32.132 seconds

Test Case Failures:
1) MonoTests.System.Runtime.Caching.MemoryCacheTest.TimedExpiration :   #A4-4
  Expected: not null
  But was:  null

at MonoTests.System.Runtime.Caching.MemoryCacheTest.TimedExpiration () [0x002b6] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs:902
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```

100ms could be too short, bumping the timeout should make it more reliable on the slower ARM machines.
2016-01-27 12:29:45 +01:00
Ludovic Henry 78c758494a Merge pull request #2420 from stefansedich/master
Handle automatically mapping IPv4 addresses to IPV6 for dual mode sockets, fixes #36192
2016-01-27 09:51:42 +00:00
Zoltan Varga 7c9e71be5e [runtime] Use mono_error_set_pending_exception () instead of mono_error_raise_exception () in icall.c. 2016-01-27 01:05:38 -05:00
monojenkins eb4fdbd818 Merge pull request #2486 from ludovic-henry/monoerror-mono_type_get_object
[runtime] Use MonoError for mono_type_get_object
2016-01-27 04:45:23 +00:00
monojenkins df3efdc131 Merge pull request #2519 from ludovic-henry/fix-array-jiticalls
[array] Replace raise exception by pending exception in jit-icalls

The convention for jit-icalls is to set the pending exception, instead of raising it from native.
2016-01-27 04:05:23 +00:00
Rodrigo Kumpera a997c1c404 [mono-error] The reflection code still festered with hidden deps for loader-error. 2016-01-26 21:27:05 -05:00
Zoltan Varga 471b3ccf42 [x86] Change the way exceptions are thrown from trampolines: instead of calling mono_thread_force_interruption_checkpoint (), which would throw the exception using mono_raise_exception (), obtain the exception, unwind to the parent frame, and throw the exception normally there by calling the throw exception trampoline. 2016-01-26 20:31:08 -05:00
Rodrigo Kumpera 68795e4081 [jit] Fix error propagation when loading methods. Move more checks to rely on cfg->error. 2016-01-26 20:12:18 -05:00
Zoltan Varga 184e52daf9 Fix the build. 2016-01-26 19:43:20 -05:00
Zoltan Varga 343d46b2da [jit] Use mono_set_pending_exception () in one jit icall. 2016-01-26 19:40:39 -05:00
Ludovic Henry 727778565f [array] Replace raise exception by pending exception in jit-icalls
The convention for jit-icalls is to set the pending exception, instead of raising it from native.
2016-01-27 00:35:52 +00:00
Ludovic Henry 89ea5fa447 [runtime] Use MonoError for mono_gsharedvt_constrained_call 2016-01-27 00:08:09 +00:00
Ludovic Henry 2cd2f4a184 [runtime] Use MonoError for mono_type_get_object 2016-01-26 23:56:41 +00:00
Zoltan Varga 414fccaa21 [runtime] Get rid of mono_thread_force_interruption_checkpoint (), its not used anymore. 2016-01-26 17:53:23 -05:00
Zoltan Varga 2b20305876 [jit] Add a new jit icall mono_interruption_checkpoint_from_trampoline () and use that instead of mono_thread_force_interruption_checkpoint () so the latter can go away eventually. 2016-01-26 17:49:01 -05:00
Zoltan Varga 1df9e44ea8 [amd64] Change the way exceptions are thrown from trampolines: instead of calling mono_thread_force_interruption_checkpoint (), which would throw the exception using mono_raise_exception (), obtain the exception, unwind to the parent frame, and throw the exception normally there by calling the throw exception trampoline. 2016-01-26 17:33:44 -05:00
Rodrigo Kumpera d790857278 [mono-error] Replace legacy calls to mono_get_method(_full) with _checked variant. 2016-01-26 16:23:34 -05:00
Rodrigo Kumpera f100c2f5ff [mono-error] Remove usage of a couple of legacy functions from monodis. 2016-01-26 16:23:25 -05:00
Rodrigo Kumpera 36a9877998 [mono-error] Remove loader-error conversion for 3 functions that are not longer called by the runtime.
The following legacy functions are no longer used by the runtime and don't need loader-error conversion:
mono_method_get_signature_full
mono_method_get_signature
mono_field_from_token

May all that is unholy smite upon those attempting to use those functions again.
2016-01-26 16:07:39 -05:00
Alexander Köplinger 229f153294 Merge pull request #2517 from steffen-kiess/posix-socket-osx-test
[Mono.Posix] Fix the SocketTest.ControlMsg() test on OSX
2016-01-26 22:06:56 +01:00
Rodrigo Kumpera a8b276ed8c Merge pull request #2500 from ludovic-henry/monoerror-mono_string_alloc
[runtime] Use MonoError for mono_string_alloc
2016-01-26 15:15:12 -05:00
Zoltan Varga a3c7b19679 [runtime] Fix the computation of StackFrame.native_offset for managed-to-native wrappers. 2016-01-26 15:06:40 -05:00
Alexis Christoforides e978bcdc36 [mkbundle] More Windows linking fixes, added "--custom-main" option 2016-01-26 14:48:14 -05:00
Rodrigo Kumpera 040d26ee91 Merge pull request #2513 from lambdageek/monoerror-RESOLVE_TYPE
[runtime] Use MonoError for RESOLVE_TYPE
2016-01-26 14:42:49 -05:00
Rodrigo Kumpera a54eb57de5 Merge pull request #2508 from lambdageek/monoerror-check_array_for_usertypes
[runtime] Use MonoError for check_array_for_usertypes
2016-01-26 14:42:03 -05:00
Rodrigo Kumpera fb89d6495e Merge pull request #2506 from lambdageek/monoerror-mono_reflection_type_resolve_user_types
[runtime] Use MonoError for mono_reflection_type_resolve_user_types
2016-01-26 14:39:48 -05:00
monojenkins 0658b3879a Merge pull request #2516 from lambdageek/monoerror-exception_instance
[runtime] Add MONO_ERROR_EXCEPTION_INSTANCE MonoError

This kind of MonoError can encapsulate a managed MonoException
object.  (For example as a result of mono_runtime_invoke ()).

Issues:

- [x] Memory leak correctness.
    `MonoError` already leaks memory if you simply swallow it without calling `mono_error_cleanup` or some function that calls it (for example `mono_error_raise_exception` or `mono_error_convert_to_exception`).
    Now if we have an encapsulated exception, we'll leak a GC handle unless cleanup happens.
2016-01-26 19:15:17 +00:00
Steffen Kieß 343fc2253d [Mono.Posix] Fix the SocketTest.ControlMsg() test on OSX
Unlike Linux, OSX does not allow multiple SCM_RIGHTS control messages in
sendmsg().
The SocketTest.ControlMsg() test is split into two tests, one which sends
only a single control message (containing two FDs), and another one which
sends two control messages (each containing one FD). The second test is not
executed on OSX.
2016-01-26 19:46:38 +01:00
Sebastien Pouliot 1a2b21803c [System] Make SmtpClient fallback to it's old behaviour if the hostname cannot be resolved. Fix #37246
Warning: System.Net.Mail is broken by design and sends incorrect emails.

This is not to fix SmtpClient itself but to ensure it remains compatible
(even if incorrect/broken) with older Mono releases.

The commit associated with bug# 33551 [1] can cause issues on computer
and devices that cannot resolve their hostname using the Dns API (which
have their own issues).

This commit catch the exception that occurs when resolution fails and
continue to send an email without a fully qualified domain name - just
like earlier Mono versions did in the past.

This solve bug #32746 [2] where some, but not all, AppleTV devices fails
to execute some of the System.dll unit tests.

Note: Whenever possible stay clear of SmtpClient (and friends) and use
something else like MimeKit/MailKit for your email needs

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=33551
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=37246
2016-01-26 13:11:46 -05:00
Rodrigo Kumpera a87f458b48 Merge pull request #2490 from ludovic-henry/monoerror-mono_string_builder_to_
[runtime] Use MonoError for mono_string_builder_to_utf8 and mono_string_builder_to_utf16
2016-01-26 12:50:31 -05:00
Rodrigo Kumpera 5aecb24584 Merge pull request #2463 from ludovic-henry/monoerror-mono_object_new_pinned
[runtime] Use MonoError for mono_object_new_pinned
2016-01-26 12:41:56 -05:00
Jonathan Pryor 558f90e96d Merge pull request #2510 from jonpryor/jonp-MonoThread-accessors
[runtime] Allow getting thread name, managed id from embedding API
2016-01-26 12:30:27 -05:00
Rodrigo Kumpera 02d129eecc Merge pull request #2512 from ludovic-henry/fix-coop-test-runtime
[coop] Use mono_thread_info_usleep which transition to BLOCKING state
2016-01-26 12:20:29 -05:00
Aleksey Kliger 305bfbae4c [runtime] Add MONO_ERROR_EXCEPTION_INSTANCE MonoError
This kind of MonoError can encapsulate a managed MonoException
object.  (For example as a result of mono_runtime_invoke ()).
2016-01-26 11:42:17 -05:00
monojenkins 19f5033b7d Merge pull request #2449 from lambdageek/dev/no-chunks
[handle] Remove chunk_last field from MonoHandleArena

Remove the `chunk_last` field.  This changes MonoHandleArena from a queue of chunks to a stack of chunks.  More importantly, the MonoHandleArena has an initial chunk that is allocated on the stack together with the arena.  Previously that chunk was at the front of the list of chunks, but now it is at the end.
2016-01-26 14:50:17 +00:00
Alexander Köplinger 8fa2e19e2d Merge pull request #2514 from akoeplinger/disable-monoposix-test
[Mono.Posix] Disable new ControlMsg() test that fails on OSX for now
2016-01-26 13:13:10 +01:00
Ludovic Henry 3f262f6554 [runtime] Use MonoError for mono_string_builder_to_utf8 and mono_string_builder_to_utf16 2016-01-26 10:45:01 +00:00
monojenkins 6b8c3774c7 Merge pull request #2511 from ludovic-henry/fix-coop-debugger
[coop] Fix debugger BLOCKING transitions
2016-01-26 08:20:42 +00:00
Alexander Köplinger 770a4f217a [Mono.Posix] Disable new ControlMsg() test that fails on OSX for now
Added with https://github.com/mono/mono/pull/2097. Fails on Jenkins:

```
Test Case Failures:
1) MonoTests.Mono.Unix.Native.SocketTest.ControlMsg : System.ArgumentException : Invalid argument
  ----> Mono.Unix.UnixIOException : Invalid argument [EINVAL].
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () [0x00000] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs:460
at MonoTests.Mono.Unix.Native.SocketTest+<ControlMsg>c__AnonStorey2.<>m__0 (Int32 so1, Int32 so2) [0x0018f] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/Mono.Posix/Test/Mono.Unix.Native/SocketTest.cs:778
at MonoTests.Mono.Unix.Native.SocketTest.WithSocketPair (System.Action`2 f) [0x00025] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/Mono.Posix/Test/Mono.Unix.Native/SocketTest.cs:68
at MonoTests.Mono.Unix.Native.SocketTest.<ControlMsg>m__9 (Int32 inner_so1, Int32 inner_so2) [0x00014] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/Mono.Posix/Test/Mono.Unix.Native/SocketTest.cs:739
at MonoTests.Mono.Unix.Native.SocketTest.WithSocketPair (System.Action`2 f) [0x00025] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/Mono.Posix/Test/Mono.Unix.Native/SocketTest.cs:68
at MonoTests.Mono.Unix.Native.SocketTest.ControlMsg () [0x00000] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/Mono.Posix/Test/Mono.Unix.Native/SocketTest.cs:738
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/jenkins/workspace/test-mono-mainline@2/label/osx-i386/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
--UnixIOException
```
2016-01-26 02:12:18 +01:00
Zoltan Varga f0524aa471 [llvmonly] Call 'opt' when running with --aot=asmonly too. No optimizations enabled yet. 2016-01-25 19:37:40 -05:00
Zoltan Varga b382b97e67 [llvm] Add another missing opcode. 2016-01-25 19:14:03 -05:00
Rodrigo Kumpera 1684cfd594 Merge pull request #2483 from ludovic-henry/monoerror-mono_string_new_size
[runtime] Use MonoError for mono_string_new_size
2016-01-25 19:07:23 -05:00
Rodrigo Kumpera 6f9822ed9d Merge pull request #2493 from ludovic-henry/monoerror-mono_thread_attach_full
[runtime] Use MonoError for mono_thread_attach_full
2016-01-25 18:54:22 -05:00
Rodrigo Kumpera 744cfa4e71 Merge pull request #2489 from ludovic-henry/monoerror-mono_array_new_specific
[runtime] Use MonoError for mono_array_new_specific
2016-01-25 17:42:33 -05:00
Rodrigo Kumpera fcf31f59c8 Merge pull request #2481 from ludovic-henry/monoerror-mono_array_new_full
[runtime] Use MonoError for mono_array_new_full
2016-01-25 17:38:41 -05:00
Zoltan Varga 71ddc3f35b [llvmonly] Reenable running 'opt', it was disabled by mistake. 2016-01-25 16:56:41 -05:00
Zoltan Varga 8b6e622639 [llvmonly] Avoid inlining the original method into unbox trampolines. 2016-01-25 16:56:41 -05:00
Ludovic Henry 2e60eebcef [coop] Use mono_thread_info_usleep which transition to BLOCKING state
Because we could sleep for too long, while being in RUNNING state, the cooperative suspend would not finish in a timely manner. That would lead to the abort in `mono_threads_wait_pending_operations`.
2016-01-25 21:50:02 +00:00
Ludovic Henry bea61abd81 [coop] Fix debugger BLOCKING transitions
Make the transition as close as possible to the syscall, so we don't nest these BLOCKING transition, as they leads to a crash.
2016-01-25 21:08:37 +00:00
Ludovic Henry d37152e8e1 [runtime] Use MonoError for mono_object_new_pinned 2016-01-25 20:37:24 +00:00
Aleksey Kliger 1419a6775f [runtime] Use MonoError for RESOLVE_TYPE 2016-01-25 15:30:40 -05:00
Jonathan Pryor 44e2c53f8d Merge pull request #2097 from steffen-kiess/posix-sockets-3
[Mono.Posix] Add support for sending and receiving socket control messages
2016-01-25 15:03:53 -05:00
Aleksey Kliger 0f585640ff [runtime] Use MonoError for check_array_for_usertypes 2016-01-25 14:57:34 -05:00
Jonathan Pryor bbe1010ef4 [runtime] Allow getting thread name, managed id from embedding API
When tracing multi-threaded program execution, it is useful to have a
way of separating which events happen on which thread. The
System.Threading.Thread.Name and Thread.ManagedThreadId properties are
useful proxies for tracking program execution.

However, if program execution spans both managed and embedded mono
native code, there is no existing mechanism to read the Thread.Name or
Thread.ManagedThreadId properties from native code without using
delegates, and delegates may not be usable in all circumstances (e.g.
within a mono_gc_register_bridge_callbacks() callback).

Add the following APIs to the embedding API to permit reading the
Thread.Name and Thread.ManagedThreadId properties:

	char   *mono_thread_get_name_utf8 (MonoThread *thread);
	gint32  mono_thread_get_managed_id (MonoThread *thread);

mono_thread_get_name_utf8() returns the Thread.Name value as a UTF-8
string in newly allocated memory; the caller must g_free() this value.

mono_thread_get_managed_id() returns the Thread.ManagedThreadId value.
2016-01-25 14:29:00 -05:00
Zoltan Varga 7fae2542c5 [llvmonly] Rename MonoDelegate.rgctx to 'extra_arg' to better reflect its purpose. 2016-01-25 14:18:59 -05:00
Zoltan Varga 96c006b637 Merge pull request #2429 from alexanderkyte/nunit_lite_integration
[nunit-lite] Add nunit-lite runner to build system
2016-01-25 13:45:37 -05:00
Sebastien Pouliot 8d275a6388 [tests][System][ios] Avoid reflection usage when testing for Xamarin.iOS. Fixes #34133
When the linker is enabled (default for device builds) unused methods
are removed and cannot be reflected.

In this case we do not need reflection as the answer to port reuse is
always true.

https://bugzilla.xamarin.com/show_bug.cgi?id=34133
2016-01-25 13:45:11 -05:00
Aleksey Kliger 73ab563517 [runtime] Use MonoError for mono_reflection_type_resolve_user_types 2016-01-25 12:50:34 -05:00
Zoltan Varga 79870dabf8 [amd64] Fix d786f235eb. 2016-01-25 12:37:09 -05:00
monojenkins c5b1a68cba Merge pull request #2504 from ludovic-henry/fix-console-error
[Console] Fix Console.Error to terminal (tty)
2016-01-25 16:45:18 +00:00
Ludovic Henry a682d94799 [Console] Cleanup console setup 2016-01-25 15:07:55 +00:00
Ludovic Henry 15cc0d6be2 [Console] Fix Console.Error to terminal (tty)
We would previously open the standard output for the Console.Error StreamWriter. This behavior has never surfaced so far, because if you try to redirect the process standard output through a pipe or to a file, then the condition ConsoleDriver.IsConsole does not apply, and the other path does not have the same bug.

The only way to reproduce it is to redirect the standard error to another file, and observe that you would still have the Console.Error content. For example, with mono/tests/console-output.exe:

Expected output:

$> MONO_PATH=mcs/class/lib/net_4_x mono/mini/mono mono/tests/console-output.exe 2>/dev/null
Out

Actual output:

$> MONO_PATH=mcs/class/lib/net_4_x mono/mini/mono mono/tests/console-output.exe 2>/dev/null
Out
Error

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=36988
2016-01-25 15:07:33 +00:00
Marcos Henrich 80eb29884c [System.Xml] Fix sub class serialization on lists
Fixes failure, where XmlSerializer would crash while serializing
a list with multiple XmlElement when a sub class of the XmlElement is
used.

Fixes #36829.
2016-01-25 12:44:25 +00:00
Zoltan Varga 6b464858ad Remove libgc/depcomp and libgc/missing, newer automake versions seem to overwrite them. 2016-01-24 20:46:01 -05:00
Zoltan Varga 2de2730abf [llvm] Fix 32 bit platform support which got broken after c678533842. 2016-01-24 20:40:21 -05:00
Zoltan Varga d786f235eb [amd64] Add some more unwind info for generic trampolines. 2016-01-24 20:16:28 -05:00
Zoltan Varga e44a09a704 [llvmonly] Optimize delegate invocation. 2016-01-24 18:09:27 -05:00
Ludovic Henry 13c1a05d19 [runtime] Use MonoError for mono_string_alloc 2016-01-24 17:57:37 +00:00
Zoltan Varga 55df1b0b94 Merge pull request #2487 from alexanderkyte/wrapper_type_mismatch
[runtime] Fix type mismatch between runtime invoke and aot compiler
2016-01-23 22:29:30 -05:00
Zoltan Varga 54f7062bf7 [llvmonly] Fix the invocation of generic array helpers, they need an rgctx arg. 2016-01-23 22:09:40 -05:00
monojenkins 3d1cf80712 Merge pull request #2499 from alexrp/signal-sa-restart
[runtime] Add SA_RESTART to SIG{CONT,INT,PROF,QUIT,USR2,WINCH}.

We need this as these signals can be delivered at any point and can interrupt system calls that external (non-Mono) code is executing, which such code may not be written to handle gracefully.
2016-01-23 18:45:14 +00:00
Rodrigo Kumpera 3cc7093034 Merge pull request #2453 from kumpera/fix_ji_free
[runtime] Avoid a read-after-free in JI table that frees tomstones. Fixes some of the crashes in #36851.
2016-01-23 00:10:59 -05:00
Rolf Bjarne Kvinge 8bab3f81f2 [linker] Add API to notify subclasses of removed attributes. 2016-01-23 03:11:07 +01:00
Zoltan Varga 048a9be186 [arm] Emit more complete unwind info for generic trampolines. 2016-01-22 18:20:38 -05:00
Alexander Kyte c6e9e79a17 [mobile_static] Fixed AES class usage for mobile_static profile 2016-01-22 16:28:10 -05:00
Alexander Kyte 6f91fba64e [bcl/build] Move the config include before setting platform if it is missing, otherwise wrong platform file included 2016-01-22 16:28:10 -05:00
Alexander Kyte 5caddab1b7 [mobile_static] Work around a test that breaks with aot loading 2016-01-22 16:28:10 -05:00
Alexander Kyte 201f649750 [mobile_static] Fix test by replicating monotouch behavior 2016-01-22 16:28:10 -05:00
Alexander Kyte eddf4b4439 [mobile_static] Disable task test described to fail on Touch.Unit and clearly on mobile_static 2016-01-22 16:28:09 -05:00
Alexander Kyte 357046f340 [bcl] Mark finalizer-dependent test as not working because finalizers are not guaranteed, too flaky for bcl test suite 2016-01-22 16:28:09 -05:00
Alexander Kyte b5c2b5892f [bcl] Add current directory to reflection lookup path to fix nunit-lite tests. 2016-01-22 16:28:09 -05:00
Alexander Kyte 32f9d52b36 [mobile_static] Fixed test that needed test .dlls explicitly named 2016-01-22 16:28:08 -05:00
Alexander Kyte d1e3696e02 [mobile_static] Added missing mobile_static blacklists 2016-01-22 16:28:08 -05:00
Alexander Kyte 5796ab1122 [bcl] Remove trailing whitespace from corlib_test.dll.sources 2016-01-22 16:28:08 -05:00
Alexander Kyte d715c9e301 [mobile_static] Don't run vts tests on mobile_static 2016-01-22 16:28:08 -05:00
Alexander Kyte 6ce42c1b1e [mobile_static] Exclude the MobileNotWorking category on mobile_static 2016-01-22 16:28:07 -05:00
Alexander Kyte 48f75ebd8a [bcl/mobile] Fixed TimeZoneTest on non-xammac/non-monotouch mobile profiles 2016-01-22 16:28:07 -05:00
Alexander Kyte 4cf9303189 [bcl] Exclude tests for mobile_static excluded on monotouch 2016-01-22 16:28:07 -05:00
Alexander Kyte a5018ac8b4 [bcl] Add mobile_static sources/excludes based on monotouch excluded tests 2016-01-22 16:28:06 -05:00
Alexander Kyte 9dca28b44c [mobile_static] Remove include of Mono.Posix.dll on mobile static, which isn't build 2016-01-22 16:28:06 -05:00
Alexander Kyte 860334ff45 [bcl] Make the bcl build system respect .excludes for test suites 2016-01-22 16:28:06 -05:00
Alexander Kyte 8c2a325a97 [bcl] Fix gensources undesired behavior, see full message
So we were previously taking the set symmetric difference of the
.sources and the .excludes files. This is semantically wrong, and the
change makes us take the difference. What we were doing is concatenating
the two files and taking any lines that are only seen once. If a file is
in excludes and not in sources, then we will include it. This is wrong.
This change always duplicates excludes, so anything present in excludes
is seen at least twice. This has the effect of making sure that only
things in .sources but not in .excludes are in the output file.
2016-01-22 16:28:06 -05:00
Alexander Kyte 42e6da0861 [nunit-lite] Use nunit-lite in the build system if variable set, set for mobile_static 2016-01-22 16:28:05 -05:00
Alexander Kyte eb47d2ad19 [nunit-lite] Add NUnitLite fork as submodule and build through makefiles
in /mcs/tools/nunit-lite
2016-01-22 16:28:05 -05:00
Alex Rønne Petersen 6a9f742ef0 [runtime] Add SA_RESTART to SIG{CONT,INT,PROF,QUIT,USR2,WINCH}.
We need this as these signals can be delivered at any point and can interrupt
system calls that external (non-Mono) code is executing, which such code may
not be written to handle gracefully.
2016-01-22 21:22:28 +01:00
Sebastien Pouliot b901571647 [system] Avoid reflection use to create NtlmSession. Fixes #37732
commit d2325f1483 (only since 4.3.2, not
4.3.1) caused the failure when an application is linked.

The use of `GetOrCreateValue` uses reflection to create an `NtlmSession`
instance so the linker won't see it as used anymore (and removes it).

Fixed by avoiding reflection (which will also perform better).

https://bugzilla.xamarin.com/show_bug.cgi?id=37732
2016-01-22 14:19:46 -05:00
Ludovic Henry b1eb334287 [runtime] Fix warning 2016-01-22 18:25:38 +00:00
Marek Safar 65dfcdc853 [mcs] String interpolating of dynamic arguments does not behave like normal dynamic operation but assumes all arguments are object only (not dynamic). Fixes #37886 2016-01-22 18:23:14 +01:00
Zoltan Varga db4b457433 [amd64] Fix setting ainfo->pair_size[1] to 1 instead of 0 if the argument is only passed in one reg. 2016-01-22 11:27:51 -05:00
Alexander Köplinger 71a04c0cb7 Merge pull request #2494 from nealef/master
Adjust last fix to bypass another compiler failing
2016-01-22 16:40:41 +01:00
Neale 324c33e4a6 Adjust last fix to bypass another compiler failing 2016-01-22 10:36:28 -05:00
Ludovic Henry be14926028 [runtime] Use MonoError for mono_thread_attach_full 2016-01-22 14:39:51 +00:00
Ludovic Henry 174da030a7 [runtime] Use MonoError for new_thread_with_internal 2016-01-22 14:33:04 +00:00
Alexander Köplinger 0d787e165d Merge pull request #2476 from ludovic-henry/fix-process-readbuffer-nullref
[Process] Fix NullReferenceException in AsyncStreamReader.ReadBuffer after disposing the Process
2016-01-22 15:02:39 +01:00
Ludovic Henry 0a53cf8c92 [Process] Fix NullReferenceException in AsyncStreamReader.ReadBuffer after disposing the Process
The following exception would arise if we dispose the Process before making sure the AsyncStreamReader finished its work:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at System.Diagnostics.AsyncStreamReader.ReadBuffer (IAsyncResult ar) [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/System/services/monitoring/system/diagnosticts/AsyncStreamReader.cs:158
  at System.IO.Stream+ReadWriteTask.InvokeAsyncCallback (System.Object completedTask) [0x00015] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/io/stream.cs:670
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) [0x0008d] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.IO.Stream+ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke (System.Threading.Tasks.Task completingTask) [0x0005e] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/io/stream.cs:696
  at System.Threading.Tasks.Task.FinishContinuations () [0x0009a] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:3633
  at System.Threading.Tasks.Task.FinishStageThree () [0x00045] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2366
  at System.Threading.Tasks.Task.FinishStageTwo () [0x000f8] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2339
  at System.Threading.Tasks.Task.Finish (Boolean bUserDelegateExecuted) [0x00049] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2239
  at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) [0x00079] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2834
  at System.Threading.Tasks.Task.ExecuteEntry (Boolean bPreventDoubleExecution) [0x0006f] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2760
  at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2707
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/external/referencesource/mscorlib/system/threading/threadpool.cs:1212

This would arise in test-runner.cs when one of the test would timeout, leading to the Process being disposed. This would then dispose the AsyncStreamReader, setting its `stream` value to null. The callback to ReadBuffer would then try to access `stream`, but would throw a NullReferenceException. By not disposing the AsyncStreamReader explicitely, we close the stream first, which will trigger a call to ReadBuffer, thus not triggering the NullReferenceException.
2016-01-22 13:57:05 +00:00
Alexander Köplinger 497c6b9340 Merge pull request #2482 from akoeplinger/mono-posix-test-fix
[Mono.Posix] Make UnixSignalTest.TestRaiseStorm() more reliable
2016-01-22 14:38:16 +01:00
Ludovic Henry 71c1a8ad9b [runtime] Use MonoError for create_thread_object and create_internal_thread 2016-01-22 12:57:38 +00:00
Ludovic Henry 1ae4775fe3 [runtime] Use MonoError for mono_array_new_specific 2016-01-22 12:12:37 +00:00
Ludovic Henry 29830a7805 [runtime] Use MonoError for mono_array_new_full 2016-01-22 11:26:35 +00:00
Ludovic Henry 7a2f9e9ef9 Merge pull request #2477 from ludovic-henry/monoerror-mono_object_new_alloc_specific
[runtime] Use MonoError for mono_object_new_alloc_specific
2016-01-22 11:13:58 +00:00
Zoltan Varga 05d02a659f Merge pull request #2488 from nealef/master
…
2016-01-21 22:28:16 -05:00
Neale b205c72172 To get around a problem with gcc 4.4.7 on s390x, the SWAP macro is reworked so that it correctly processes all elements 2016-01-21 21:41:44 -05:00
Ludovic Henry 766a72b2c1 [runtime] Use MonoError for mono_string_new_size 2016-01-22 01:21:32 +00:00
Ludovic Henry 80fbe18d65 [runtime] Use MonoError for mono_object_new_alloc_specific 2016-01-22 01:13:22 +00:00
Rodrigo Kumpera 6af870bde0 Merge pull request #2485 from ludovic-henry/monoerror-mono_marshal_alloc
[runtime] Use MonoError for mono_marshal_alloc
2016-01-21 19:55:39 -05:00
Rodrigo Kumpera 33cc441b9b Merge pull request #2484 from ludovic-henry/monoerror-mono_string_get_pinned
[runtime] Use MonoError for mono_string_get_pinned
2016-01-21 19:54:37 -05:00
Rodrigo Kumpera f22404e2f2 Merge pull request #2480 from ludovic-henry/monoerror-mono_object_clone
[runtime] Use MonoError for mono_object_clone
2016-01-21 19:41:07 -05:00
Rodrigo Kumpera e7d47527e5 Merge pull request #2479 from ludovic-henry/monoerror-mono_object_new_mature
[runtime] Use MonoError for mono_object_new_mature
2016-01-21 19:39:45 -05:00
Rodrigo Kumpera 7eb4bdafff Merge pull request #2478 from ludovic-henry/monoerror-mono_object_new_fast
[runtime] Use MonoError for mono_object_new_fast
2016-01-21 19:39:13 -05:00
Rodrigo Kumpera 31ad052f43 Merge pull request #2462 from ludovic-henry/monoerror-mono_object_new_specific
[runtime] Use MonoError for mono_object_new_specific
2016-01-21 19:33:58 -05:00
Rodrigo Kumpera 08eb798c43 Merge pull request #2458 from ludovic-henry/monoerror-mono_domain_create_appdomain_internal
[runtime] Use MonoError for mono_domain_create_appdomain_internal
2016-01-21 18:47:35 -05:00
Rodrigo Kumpera c8536eb291 Merge pull request #2457 from ludovic-henry/monoerror-mono_make_shadow_copy
[runtime] Use MonoError for mono_make_shadow_copy
2016-01-21 18:46:22 -05:00
Alexander Kyte 883dda52ce [nunit-lite] Use nunit-lite in the build system if variable set, set for mobile_static 2016-01-21 18:20:55 -05:00
Alexander Kyte 1564b8fa1d [nunit-lite] Add NUnitLite fork as submodule and build through makefiles
in /mcs/tools/nunit-lite
2016-01-21 17:25:15 -05:00
Zoltan Varga 3556a48318 [bcl] Fix a System.Core test failure caused by a method linked away. 2016-01-21 17:23:53 -05:00
Alexander Kyte 748d01ce2a [runtime] Fix type mismatch between runtime invoke and aot compiler
We were using get_runtime_invoke_type () to reduce the number of
wrappers we were using by sharing the wrappers that have MONO_TYPE_I
with that of MONO_TYPE_PTR. They have the same size, but these are not
valid types to share because they have different levels of indirection,
so runtime wrappers that have been aot'ed for the MONO_TYPE_I will be
used for MONO_TYPE_PTR and will dereference the value in the first word
of the pointer. In the case that this is null, we observed a segfault.

Specifically, the wrapper code in marshal.c looks like so:

```
		case MONO_TYPE_I:
		case MONO_TYPE_U:
		case MONO_TYPE_I4:
		case MONO_TYPE_U4:
		case MONO_TYPE_R4:
		case MONO_TYPE_R8:
		case MONO_TYPE_I8:
		case MONO_TYPE_U8:
			mono_mb_emit_byte (mb, CEE_LDIND_I);
			mono_mb_emit_byte (mb, mono_type_to_ldind (sig->params [i]));
			break;
		case MONO_TYPE_STRING:
		case MONO_TYPE_CLASS:
		case MONO_TYPE_ARRAY:
		case MONO_TYPE_PTR:
		case MONO_TYPE_SZARRAY:
		case MONO_TYPE_OBJECT:
			mono_mb_emit_byte (mb, mono_type_to_ldind (sig->params [i]));
			break;
```

showing that the two types are not equivalent.
2016-01-21 16:37:26 -05:00
Zoltan Varga 9de58e5f75 [llvmonly] Fix the addition of gsharedvt out wrappers on calls from gsharedvt to normal code. 2016-01-21 16:29:57 -05:00
Rodrigo Kumpera 92d212ed3e Merge pull request #2474 from kumpera/compact_mono_error
[MonoError] Introduce fast (and short) macros for initing and checking MonoError. Optimize its size.
2016-01-21 16:19:31 -05:00
Rodrigo Kumpera a40063e0c1 [MonoError] Fix the definition of init_error. 2016-01-21 16:13:21 -05:00
Martin Baulig 10853876d0 [Mono.Security]: Add 'MonoTlsSettings.EnabledCiphers'.
(cherry picked from commit 79c7c38cc6)
2016-01-21 21:47:48 +01:00
Zoltan Varga 7003343902 [jit] Fix the reference type detection for Volatile:Read/Write (). Fixes part of #37846. 2016-01-21 14:31:02 -05:00
Ludovic Henry a81f0942b3 [marshal] Inline mono_gc_out_of_memory to explicitly raise an exception 2016-01-21 17:41:13 +00:00
Mark Probst 2c0682c70f Merge pull request #2387 from BrzVlad/feature-concurrent-scanfunc
[sgen] Use separate object ops when not evacuating in the concurrent case
2016-01-21 09:40:48 -08:00
Mark Probst 849623f0ae Merge pull request #2388 from BrzVlad/feature-los-caching
[sgen] Improve caching of los objects
2016-01-21 09:39:37 -08:00
Ludovic Henry 8b4240cd17 [runtime] Use MonoError for mono_marshal_alloc 2016-01-21 17:37:32 +00:00
Ludovic Henry 60b1e56ae4 [runtime] Use MonoError for mono_string_get_pinned 2016-01-21 17:01:01 +00:00
Ludovic Henry d0084b84dd [runtime] Use MonoError for mono_object_clone 2016-01-21 16:59:42 +00:00
Ludovic Henry 03f07a6d8c [runtime] Use MonoError for mono_object_new_mature 2016-01-21 16:59:11 +00:00
Ludovic Henry 20f411f317 [runtime] Use MonoError for mono_object_new_fast 2016-01-21 16:58:45 +00:00
Ludovic Henry 200d2e0e53 [runtime] Use MonoError for mono_object_new_specific 2016-01-21 16:56:47 +00:00
Rodrigo Kumpera b762ef0fa3 Merge pull request #2472 from kumpera/gc_api_fixes
[gc] Change the GC interface to be friendlier to coop and misc cleanups.
2016-01-21 11:54:02 -05:00
Alexander Köplinger 4f6d638a3f [Mono.Posix] Make UnixSignalTest.TestRaiseStorm() more reliable
The test was reenabled in 3f3df26945 and we were seeing it randomly fail
on Jenkins on OSX like that:

```
[...]
***** MonoTests.Mono.Unix.UnixSignalTest.TestNoEmitAny
***** MonoTests.Mono.Unix.UnixSignalTest.TestRaise
***** MonoTests.Mono.Unix.UnixSignalTest.TestRaiseAny
***** MonoTests.Mono.Unix.UnixSignalTest.TestRaiseStorm
/bin/sh: line 1: 40164 Hangup: 1               PATH="/Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/runtime/_tmpinst/bin:/opt/mono/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" MONO_REGISTRY_PATH="/Users/builder/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" MONO_PATH="./../../class/lib/net_4_x::$MONO_PATH" /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/runtime/mono-wrapper --debug ./../../class/lib/net_4_x/nunit-console.exe Mono.Posix_test_net_4_x.dll -noshadow -labels -exclude=NotOnMac,NotWorking,ValueAdd,CAS,InetAccess -labels -xml=TestResult-net_4_x.xml
make[1]: *** [run-test-lib] Error 1
make[1]: Leaving directory `/Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/Mono.Posix'
make: *** [do-run-test] Error 1
```

The problem is that (especially on OSX it seems) the signals raised by the threads in the test can be
delivered after we closed the UnixSignal, which means the default behavior of terminating the program kicks in.

The simplest fix is to just sleep for some time to make sure the signal is delivered and ignored before closing.
2016-01-21 17:11:18 +01:00
monojenkins 40b11bae27 Merge pull request #2471 from ludovic-henry/checkedbuild-disable-mempool
[checked-build] Add compile flag to disable checked-build tests selectively
2016-01-21 15:05:16 +00:00
Ludovic Henry 50322c1c84 [checked-build] Add compile flag to disable checked-build tests selectively 2016-01-21 11:37:55 +00:00
Marek Safar 2c4cb3db15 Merge pull request #2475 from sandyarmstrong/getcultureinfo-37848
[corlib] Throw correct exception for GetCultureInfo(0)
2016-01-21 09:32:25 +01:00
Sandy Armstrong e0ab3c92d1 [corlib] Throw correct exception for GetCultureInfo(0)
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=37848
2016-01-20 19:45:03 -08:00
Rodrigo Kumpera 48508e1f9e Add mono-error macros for init and check. 2016-01-20 20:34:10 -05:00
Rodrigo Kumpera 4df79f9383 [MonoError] Don't use type_name for the argument name, it will produce weird results with mono_error_get_message. 2016-01-20 20:32:25 -05:00
Rodrigo Kumpera 3779239a7c [MonoError] Reduce the size of MonoError to conserve stack space.
This eliminates the builtin 128 bytes char array in MonoError and forces the error message to be always malloc'd.

It makes the code simpler and sacrifices a bit in terms of what we can handle in the case of a malloc OOM.

Malloc OOM is not a solvable problem for a few reasons.
1) Overcommit and virtual memory makes relying on malloc returning zero not an useful thing.
2) Everything goes south when malloc starts to fail. There's nothing much the runtime can do beyond
give up.

OTOH, saving stack space is pretty nice for its own reasons.

1) Clang now generates stack guards by default for frames larger than 120 bytes on amd64. This
means that MonoError has a much bigger overhead than needed.

2) We conservatively scan the stack and, with this change, those are 128 bytes less for the gc to figure out.

On ABI compatibility. We promise backward but not forward compatibility. Meaning someone compiling against 4.4
can't expect it to works against 4.2, but vice versa is fine.

We can handle old users because the struct is now smaller and has always being opaque, meaning callers just
a bit of waste space and that's it.
2016-01-20 20:22:34 -05:00
Rodrigo Kumpera 41599512c9 [boehm] Fix the usage of G_UNLIKELY. 2016-01-20 19:44:20 -05:00
Zoltan Varga 1c6d79067a [llvmonly] Make sure the signature of unbox trampolines matches the method they are calling. 2016-01-20 17:23:56 -05:00
Rodrigo Kumpera c77c37c468 [gc] Simplify mono_object_new_pinned.
Remove #ifdef around that function and make it register objects for finalization as other alloc functions do.
2016-01-20 16:42:25 -05:00
Rodrigo Kumpera a7a3da0dd3 [gc] Introduce mono_object_new_mature in the same fashion as the other alloc functions.
This means the following:
mono_object_new_mature handles OOM and finalization.
GC glue code returns NULL on failure and doesn't deal with finalization.

Finally, correctly implement mono_gc_alloc_mature in boehm and null-gc instead of the
semantically different implementation we had before.
2016-01-20 16:42:25 -05:00
Rodrigo Kumpera 42ef42fcee [gc] Move OOM handling into the runtime from the GC.
The current gc interface requires the GC to call mono_gc_out_of_memory on allocation failure.

It won't work if we move away from implementing it with mono_raise_exception as we need to manually bubble
the OOM all the up to the m2n border.

The good thing is that this simplified the gc interface and actually fixes a corner case bug in sgen where
it did not call mono_gc_out_of_memory on alloc failure.
2016-01-20 16:42:25 -05:00
Zoltan Varga b10fa95c34 [llvmonly] Fix runtime invoke calls to gsharedvt methods without variable signatures. Add gsharedvt out wrappers and in wrappers for delegate invoke wrappers. 2016-01-20 15:47:30 -05:00
Zoltan Varga e555546568 [runtime] Add a new helper function mono_method_get_full_name (), which is similar to mono_method_full_name (), but the result includes the return type as well. 2016-01-20 15:33:49 -05:00
Zoltan Varga 3887f9efb5 Merge pull request #2465 from alexanderkyte/remoting_debugger_ifdef_fix
[runtime] ifdef out remoting function call in debugger
2016-01-20 11:28:38 -05:00
Alexander Kyte e20470b314 [runtime] ifdef out remoting function call in debugger 2016-01-20 11:13:38 -05:00
Ludovic Henry bd033e64e4 [runtime] Use MonoError for mono_domain_create_appdomain_internal 2016-01-20 15:30:20 +00:00
Ludovic Henry 147409d5a7 [runtime] Use MonoError for mono_make_shadow_copy 2016-01-20 12:57:26 +00:00
Zoltan Varga 4352e78759 [llvmonly] Fix the type of the vret_addr argument. 2016-01-19 21:40:50 -05:00
Martin Baulig 8a38b0f7fa [System]: Change namespace for some internal classes.
(cherry picked from commit 997513da02)
2016-01-20 01:52:02 +01:00
Martin Baulig 7cd40b8100 [System]: Remove unpredictable pluggable setup and cleanup APIs.
(cherry picked from commit 2d945d75bb)
2016-01-20 01:03:06 +01:00
Zoltan Varga ff2a0b83b9 [aot] Enable -O=gsharedvt by default when its supported on the platform. 2016-01-19 17:56:05 -05:00
Zoltan Varga cbf8bf588b [aot] Small refactoring for gsharedvt method lookup. 2016-01-19 17:49:49 -05:00
Zoltan Varga 688e12f498 [llvmonly] Set the del->rgctx field for delegates created using reflection as well. 2016-01-19 15:57:37 -05:00
Rodrigo Kumpera 9122de4503 [runtime] Avoid a read-after-free in JI table that frees tomstones. Fixes some of the crashes in #36851.
Due to how JI table search works, tombstones must be malloc'd as they must have the same address range
of the JI they are replacing.

Since tombstones are heap allocated, they must be freed together with the chunks they belong to.

The current code free tombstones when the chunk refcount goes to zero. The freeing code identify
tombstones by looping through the chunk entries.

The problem is that, under heavy contention, a domain can have multiple tables live at the same time.
It happens there's another thread using the old table while the first creates the new one.

During that period of multiple live tables, we don't free JIs straight away, we queue them to be
freed together with the next table to go through it.

So far so good. Here's the problematic scenario:

1) We expand the JI table, there's contention and the old old is delay freed.
While doing it, chunk X is split. Meaning its refcount will remain 1.

2) JI Y that belongs to chunk X is freed, the tombstone is installed in a chunk of the new table.
That chunk *is not* X.
Since there was contention in (1), Y is put in jit_info_free_queue.

3) We run mono_jit_info_table_free for the old table.

3.a) We free all delayed JIs. Y is freed.
3.b) The old table is freed, chunk X will be freed too, since its refcount dropped to zero.
We walk X looking for tombstones, which includes a pointer to Y, which is freed memory at this point.

I found this issue to be possible with delegates being marshaled to function pointers.
Part (1) just requires a process with high activity, like XS.
Part 2 & 3 requires really bad scheduling in that once sgen restarts the world, the finalizer thread
runs before mono_thread_hazardous_try_free_some (done right after dropping the GC lock).
An alternate to bad scheduling is that the finalizer thread was suspended holding the domain lock and
now after restart, it forces the GC initiator to deschedule when it tries to get that lock.

It goes without saying that this bug is EXTREMELY hard to reproduce. It required me to change the runtime
to force all the above conditions to happen. Let me mention them in case someone needs it:

- In mono_thread_hazardous_free_or_queue, I commented the calls to try_free_delayed_free_item to avoid
freeing the old table too early. I changed the conditional so free_func is never called straight away.

- In mono_thread_hazardous_try_free_some I added a sleep of 100ms, this gave the finalizer thread enough
time to free some JIs.

Finally, the fix itself, the solution is pretty straightforward. Stop scanning chunks and store a singly
linked list of tombstones installed in a given chunk. We build that list by coopting next_jit_code_hash
for this use.

This is safe because chunks are ref counted so we know nothing else could point to those tombstones and
when we copy a chunk into a new one we remove all tombstones.
2016-01-19 15:47:35 -05:00
Steffen Kieß 2225b6a260 [Mono.Posix] Add support for sending and receiving socket control messages
Add wrappers for struct cmsghdr, the macros for manipulating control
messages (CMSG_*) and recvmsg() and sendmsg().
2016-01-19 20:43:07 +01:00
Ludovic Henry 12bb0d6f11 [tests] Output more debug information in case of test-runner.exe crash 2016-01-19 18:46:37 +00:00
Alexander Köplinger 5436bc0e5c [io-layer] Fix tarball broken by 39393f118d
A new file io-trace.h was added but not listed in any Makefile sources anywhere so it didn't end up in the tarball.
2016-01-19 15:25:02 +01:00
Alex Rønne Petersen fb197673ce Merge pull request #2433 from alexrp/thread-volatile-semantics
[runtime] Make VolatileRead/VolatileWrite semantics compatible with MS.NET.
2016-01-19 14:02:51 +01:00
Zoltan Varga e9efdb6b4c Merge pull request #2399 from alexanderkyte/seq_point_nostop
[runtime] Use explicit loop checking to remove depth limitation of sequence point search.
2016-01-19 04:40:24 -05:00
Zoltan Varga 58fde58a62 Merge pull request #2397 from alexanderkyte/debugger_appdomain
[runtime] Read fields out of TransparentProxies correctly in debugger agent FIXES 36823
2016-01-19 04:39:54 -05:00
Marek Habersack cc986c39d6 Merge pull request #2450 from grendello/io-layer-trace
Replace the old DEBUG messages with calls to mono_trace.
2016-01-19 08:49:42 +01:00
monojenkins df739906a1 Merge pull request #2451 from akoeplinger/fix-osx
[Mono.Posix] Fix OSX build break by checking if accept4() is available

It's a Linux-specific extension and not available on OSX or Linux <2.6.28

/cc @steffen-kiess @jonpryor 

@monojenkins merge
2016-01-19 06:45:15 +00:00
Alexander Köplinger d243b9168c [Mono.Posix] Fix OSX build break by checking if accept4() is available
It's a Linux-specific extension and not available on OSX or Linux <2.6.28
2016-01-19 03:58:25 +01:00
monojenkins b1945bc0a6 Merge pull request #2447 from kumpera/amd64_gsharedvt
[amd64] First pass at fixing issues related to gsharedvt.
2016-01-19 00:30:57 +00:00
Zoltan Varga b5d8d7f9d0 [llvmonly] Avoid inlining methods which call MethodBase:GetCurrentMethod (). 2016-01-18 19:15:30 -05:00
Zoltan Varga fd4d07258f [llvmonly] Fix the passing of byref arguments in runtime invoke. 2016-01-18 18:41:18 -05:00
Marek Habersack 39393f118d Replace DEBUG messages with calls to mono_trace
The messages contain useful debugging information which is unavailable
unless the mono runtime is recompiled. The debugging information is
particularly useful on mobile platforms and in test runs on bots.

The I/O layer trace messages can be disabled on compile time by
defining the DISABLE_IO_LAYER_TRACE preprocessor symbol.
2016-01-19 00:35:03 +01:00
Marek Habersack 70c675baca Move mono_trace to header file
This commit moves mono_trace to a header file so that all the
calls are inlined, avoiding one function call at the small expense
of binary size.
2016-01-19 00:35:03 +01:00
Zoltan Varga ac3d005aa3 [llvmonly] Fix the MethodBase.GetCurrentMethod () intrinsic so it works with generic methods. 2016-01-18 18:25:53 -05:00
Jonathan Pryor 66321daeda Merge pull request #2006 from steffen-kiess/posix-sockets-2
[Mono.Posix] Add wrappers for struct sockaddr_*
2016-01-18 17:38:38 -05:00
Rodrigo Kumpera 002c8c8cea Merge pull request #2 from xmcclure/rodrigo-fix-build
Additional stubs to fix standard build following [amd64] changes
2016-01-18 17:35:20 -05:00
Andi McClure 511440c86b Additional stubs to fix standard build following [amd64] changes 2016-01-18 17:31:36 -05:00
Zoltan Varga 56c011a929 [llvm] Fix some type imcompatibility problems which happen when a vreg holding an objref is made global and stored into its location which has a different type (IntPtrType () vs ObjRefType ()). 2016-01-18 16:29:07 -05:00
Rodrigo Kumpera 830f44066c Merge pull request #2435 from xmcclure/x-refresh
Improve support for Xamarin platform extensions
2016-01-18 14:38:53 -05:00
Zoltan Varga 1c87be5961 [llvmonly] Fix the catching of exceptions of open types in shared methods by passing mrgctx/this to the mono_llvm_match_exception () function. 2016-01-18 14:02:29 -05:00
Aleksey Kliger e0a5b8b98f [handle] Remove MonoHandleArena chunk_last field.
This changes MonoHandleArena from a queue of chunks to a stack of
chunks.  More importantly, the MonoHandleArena has an initial chunk that
is allocated on the stack together with the arena.  Previously that
initial chunk was at the front of the list of chunks, but now it is at
the end.
2016-01-18 13:34:51 -05:00
Vlad Brezae a7c76b8fc8 [sgen] Don't get the BlockInfo before checking that the object is small
The object could be large and therefore not in a block.
2016-01-18 09:50:41 -08:00
Zoltan Varga 155fc2e401 [llvm] Add some missing opcodes. 2016-01-18 12:02:22 -05:00
Zoltan Varga 33104f6a78 [runtime] Fix native-to-managed calls to delegates which wrap a virtual method. Fixes #37695. 2016-01-18 11:43:07 -05:00
Radek Doulik eb839a4147 [linker] improve method dependencies dumping 2016-01-18 12:33:20 +01:00
Steffen Kieß ac52b7f458 [Mono.Posix] Add wrappers for struct sockaddr_*
Add wrappers for the sockaddr_* structures and add the syscalls using these
structures (bind(), accept(), ...).
2016-01-18 10:04:09 +01:00
Zoltan Varga 8132f83eb9 [llvmonly] Add an instrinsics for MethodBase.GetCurrentMethod () so it works on platforms without stack walks. 2016-01-17 18:25:17 -05:00
Marek Safar ce38fb23c5 [corlib] Improve CancellationTokenSource test 2016-01-16 07:59:33 +01:00
Vlad Brezae dbd9b34fe3 [jit] Move optimization to cprop in order to handle more cases
Cprop can convert more binops to their _IMM counterpart, which would otherwise not be detected at method_to_ir time, allowing us to do strength reduction.
2016-01-15 17:23:07 -08:00
Vlad Brezae f60b11a873 [jit] Simplify strength reduction code emitting when running cprop
We allocate a temporary bb where we can emit the optimization of an instruction. After doing strength reduction, we verify if the bb has instructions, in which case we need to replace the original instruction with the optimized code.
2016-01-15 17:19:27 -08:00
Vlad Brezae da562c22e2 [jit] We don't need to restart cprop if optimizations allocate new vregs
Definitions for these new vregs cannot exist yet since we just created the instructions and they will be scanned next. Just resize the def arrays.
2016-01-15 17:15:50 -08:00
Vlad Brezae 137c0999cc [jit] Don't allocate memory for unused vreg
cfg->next_vreg is not an allocated vreg
2016-01-15 17:13:00 -08:00
Alexander Köplinger 03dca8d1d4 [msvc] Fix Windows build
handle.c/h were missing from the projects.
2016-01-16 00:30:58 +01:00
Zoltan Varga d357db6336 [llvmonly] Share more wrapper types. Avoid adding out wrappers for calls from gsharedvt code to gsharedvt code with a normal signature. Fix the handling of pointer types in runtime invoke. Fix the passing of the same fixed gsharedvt argument in multiple calls. 2016-01-15 18:02:56 -05:00
Zoltan Varga 160798d82e [llvmonly] Avoid a crash in ves_icall_GetCurrentMethod () if the stack walk fails. 2016-01-15 18:02:56 -05:00
Vlad Brezae 9d3604e57b [jit] Refactor strength reduction handling within mono_local_cprop 2016-01-15 14:37:47 -08:00
Rodrigo Kumpera e23f76ad1e [amd64] Fix setting of MonoCompile:ret:dreg in mono_arch_allocate_vars.
The code in mono_arch_allocate_vars would set cfg->ret->dreg to cfg->ret->inst_c0
regardless. This is ok in some cases, but bad in others.

For OP_REGVAR this would do the right thing, dreg should be register that holds
that argument.

For when vret_addr is used, it would modify a var that is not used, so harmless.

For OP_REGOFFSET, inst_c0 alias with inst_offset, which is set to the offset from
RBP to read the var from. So we'd have a dreg set to, sometimes, a negative number.

This was not a problem as after mono_arch_allocate_vars only mono_spill_global_vars
is called and it only checks the dreg in the case of gsharedvt.

The fix is pretty simple, move setting from happening in all cases to only for OP_REGVAR.
2016-01-15 16:26:02 -05:00
Rodrigo Kumpera 1a61f46732 [amd64] Add arg_size field to ArgInfo and update it when storage is ArgOnStack 2016-01-15 16:26:02 -05:00
Rodrigo Kumpera 1af005e7bc [amd64] Properly emit loads to gsharedvt stack args. 2016-01-15 16:26:02 -05:00
Rodrigo Kumpera cafed8cc99 [amd64] Add is_gsharedvt_return_value to ArgInfo. Save to the stack ArgGSharedVtInReg args.
The usage of is_gsharedvt_return_value is easier than having a separate storage as supporting
it would require changing all usage sites and this is only needed by start_call.

All incoming arguments in registers must be saved on the stack as the rest of the JIT
expects to be able to load them from their well known places. Without this change, it would
load a random value instead.
2016-01-15 16:26:01 -05:00
Rodrigo Kumpera 670879e7ca [amd64] Add definition of GSharedVtCallInfo to mini-amd64.h
The GSharedVtCallInfo structure used is the same to the one used by
other targets.
2016-01-15 16:26:01 -05:00
Rodrigo Kumpera 75800eeb5a [amd64] Add some of the missing bits of gsharedvt.
This was enough to get mscorlib to FullAOT with gsharedvt enabled.

Makefile.am.in:
	Don't exclude GSHAREDVT from the tests.
	Removed DYNCALL too, as it's supported too.

mini-amd64.c (mono_arch_init):
	Register mono_amd64_start_gsharedvt_call jit icall.

mini-amd64.c:
	Fix a typo in the ifdef guarding inclusion of the gsharedvt extension.

mini-amd64.c (mono_arch_emit_outarg_vt):
	Implement decomposing of ArgGSharedVtOnStack to a simple store on the stack.

mini-amd64.h:
	define MONO_ARCH_GSHAREDVT_SUPPORTED
	Export mono_amd64_start_gsharedvt_call

tramp-amd64.c (mono_arch_create_sdb_trampoline):
	Add missing mono_profiler_code_buffer_new call.
	Add a couple of functions to !ENABLE_GSHAREDVT

aot-compiler.c (arch_emit_gsharedvt_arg_trampoline):
	Implement it for amd64 as a pair of GOT loads (same for other archs).
2016-01-15 16:26:01 -05:00
monojenkins 4a3addecd1 Merge pull request #2446 from akoeplinger/remove-leftover-file
[corlib] Remove left-over files from long ago (System.PAL/Linux)

They are no longer in use and cause confusion as they show up in search results.

@monojenkins merge
2016-01-15 20:15:17 +00:00
Andi McClure 4d8c202a6e Fix incorrect comment on mono_jit_init_version 2016-01-15 14:31:42 -05:00
Andi McClure a4e257a07f Clarify when ucontext_t is available
mono-context currently uses a mix of MONO_SIGNAL_USE_SIGACTION and
UCONTEXT_REG_RAX #ifs to determine whether ucontext_t is available.
UCONTEXT_REG_RAX is unreliable, and MONO_SIGNAL_USE_SIGACTION is
misnamed because it is nowhere used to gate use of sigaction.
Standardize on a new MONO_SIGNAL_USE_UCONTEXT_T, replacing SIGACTION.
2016-01-15 14:31:12 -05:00
Andi McClure 7a49816cd5 Bottleneck module loader platform macros
processes.c contains implementations for module loading for several
platforms. Rather than scattering PLATFORM_MACOSX etc through the
file, pick a loader at the top of the file and base #ifs on that. This
makes BSD code clearer and makes it easier to special-case OS variants
where the normal loader is not available.
2016-01-18 10:54:51 -05:00
Andi McClure 5d6a5f6b0d Fix build on platforms where native thread IDs are not pointer sized
Certain of our debug prints assume thread ids can be cast directly to
a pointer. This does not work on platforms where thread IDs are ints.
2016-01-15 14:18:56 -05:00
Alexander Köplinger 1b8aef4bbe [corlib] Remove left-over files from long ago (System.PAL/Linux)
They are no longer in use and cause confusion as they show up in search results.
2016-01-15 19:30:18 +01:00
monojenkins f73b752db5 Merge pull request #2444 from xmcclure/randfixes
Bugfixes in mono-rand.c

2 commits:

* Make mono-rand consistent (fixes threadpool on some UNIX systems)

  mono-rand.c defines a function interface and provides three implementations (Windows, modern UNIX, base C standard). The clients of this file (RNGCryptoServiceProvider.cs, threadpool-ms-io.c) appear to be consistent in how they use this interface, but the interface is not documented, and the C-only implementation deviates from it (the return value of init is different). The result is that threadpool-ms-io fails an assert when run on a system using the C-only implementation. I documented the interface and fixed the C-only quirk.

* Fix nonuniform distribution of mono_rand_try_get_uint32

  mono_rand_try_get_uint32 returns a value in a range min..max inclusive. Due to a math error the ‘max’ value will be returned only one out of every 2^32-1 calls to the function. This is currently harmless because the only current callers of this function (in threadpool-ms-io) will run fine even if their max value is never returned, but it could become a problem later.
2016-01-15 18:20:15 +00:00
Alexander Köplinger 61c070c63f Merge pull request #2445 from nealef/master
Fix certmgr when a unicode encoded null is used as password
2016-01-15 18:52:22 +01:00
Neale 819147f693 Fix certmgr when a unicode encoded null is used as password 2016-01-15 11:30:56 -05:00
Andi McClure 68209ec30f Fix nonuniform distribution of mono_rand_try_get_uint32
mono_rand_try_get_uint32 returns a value in a range min..max
inclusive. Due to a math error the ‘max’ value will be returned only
one out of every 2^32-1 calls to the function. This is currently
harmless because the only current callers of this function (in
threadpool-ms-io) will run fine even if their max value is never
returned, but it could become a problem later.
2016-01-15 11:19:35 -05:00
Andi McClure 88ccc14361 Make mono-rand consistent (fixes threadpool on some UNIX systems)
mono-rand.c defines a function interface and provides three
implementations (Windows, modern UNIX, base C standard). The clients
of this file (RNGCryptoServiceProvider.cs, threadpool-ms-io.c) appear
to be consistent in how they use this interface, but the interface is
not documented, and the C-only implementation deviates from it (the
return value of init is different). The result is that
threadpool-ms-io fails an assert when run on a system using the C-only
implementation. I documented the interface and fixed the C-only quirk.
2016-01-15 11:01:31 -05:00
Miguel de Icaza aee167f8ff [getline] Improve the embedded sample 2016-01-15 10:26:16 -05:00
Miguel de Icaza 642b064379 [getline] Fix the logic for advancing the top item 2016-01-15 10:21:44 -05:00
Ludovic Henry 907ee86dbc [Process] Fix monodroid build 2016-01-15 15:14:17 +00:00
Zoltan Varga 7d706b98ce [llvm] Split long bblocks instead of disabling llvm for methods with them. 2016-01-15 10:05:39 -05:00
Zoltan Varga 5580898c82 [llvm] Fix a type conversion problem when calling the same method with two different signatures. 2016-01-15 10:05:39 -05:00
Ludovic Henry 65515ceedc Merge pull request #2362 from ludovic-henry/fix-process-missedoutput
[Process] Use ReferenceSource process async output/error reader
2016-01-15 14:32:32 +00:00
Marek Safar 7788d28f77 Bump reference source for CancellationTokenSource fixes 2016-01-15 15:28:45 +01:00
Marek Safar 991f5a9145 [mcs] Update project file 2016-01-15 10:00:12 +01:00
Marek Safar e57bcfe95d [mcs] Use probing like aproach for member access completion 2016-01-15 10:00:12 +01:00
Vlad Brezae c678533842 Merge pull request #2403 from BrzVlad/feature-emulation-delay
[jit] Delay opcode emulation to allow optimization passes to run on these opcodes
2016-01-15 02:00:17 +00:00
Zoltan Varga 459aee6ee4 [llvmonly] Fix mono_patch_info_equal () for MONO_PATCH_INFO_GSHAREDVT_IN_WRAPPER. 2016-01-14 19:54:54 -05:00
Zoltan Varga acbc18cce4 [llvmonly] Fix the addition of gsharedvt in wrappers around unbox wrappers. 2016-01-14 18:39:03 -05:00
Zoltan Varga 96191ba229 [llvmonly] Fix the gsharedvt parameter passing code so it emits valid llvm il. 2016-01-14 18:00:47 -05:00
Zoltan Varga 2cc337f230 [llvmonly] Add unwind info for unbox wrappers, not the get_unbox_tramp () generated function. 2016-01-14 17:04:54 -05:00
Zoltan Varga 34d130c051 [llvmonly] Fix initialization of static gshared methods, they receive a vtable as the rgctx argument, not a MonoMethodRuntimeGenericContext. Emit unwind info for unbox wrappers. Fix calls to gsharedvt methods from non-shared delegate invoke wrappers. 2016-01-14 16:47:56 -05:00
Aleksey Kliger (λgeek) 687bbf2f71 Merge pull request #2438 from lambdageek/cherry-pick-coop-handle
Cherry pick handles work
2016-01-14 15:15:51 -05:00
Zoltan Varga 7e6188f569 Merge pull request #2439 from akoeplinger/fix-seqpoint-test
[mono] test_op_il_seq_point test should use a temp file for NUnit results
2016-01-14 14:42:17 -05:00
Alexander Köplinger 7d38caa06d [mono] test_op_il_seq_point test should use a temp file for NUnit results
We were seeing red builds on Jenkins because the NUnit xml was malformed when something bad happened
during the test_op_il_seq_point tests and Jenkins couldn't parse it.

To fix this, write the results into a temp file and only rename to .xml at the end when everything worked.

Additionally, fixed a small typo in cleaning the .so files.
2016-01-14 20:29:10 +01:00
João Matos f272c39cf4 [runtime] Fixed ARM cross compiler builds. 2016-01-14 18:05:46 +00:00
Vlad Brezae 73f6173eeb [jit] Delay emulation to allow optimizations to happen on these ops
Emulation used to happen at emitting time (method_to_ir). Now it is done after the copy propagation pass, where we propagate immediates and can do strength reduction on some of these ops. Because the call to the native function might imply an inlined wrapper which compiles more IL instructions, we need to run the decomposition pass again.
2016-01-14 19:34:46 +02:00
Vlad Brezae 389f0ce6b9 [jit] Support decomposition of long imm ops to simple long ops 2016-01-14 19:34:46 +02:00
Vlad Brezae 523b643660 [jit] Don't crash in mono_op_imm_to_op if opcode is not handled
Mimic the behaviour of its counterpart, mono_op_to_op_imm, since crashing limits the usage of the function and it is the responsability of the upper layer.
2016-01-14 19:34:46 +02:00
Vlad Brezae 1cfcd43184 [jit] Don't decompose into unsupported instructions
If we emulate these ops, it means we don't support the *_2 ops and we shouldn't decompose into them.
2016-01-14 19:34:46 +02:00
Vlad Brezae e820587b57 [jit] Don't hardcode the long vreg components 2016-01-14 19:34:46 +02:00
Aleksey Kliger b47b55e73b [handle] rename mono_handle_arena_(initialize|deinitialize)
to mono_handle_arena_init and mono_handle_arena_cleanup, respectively.
2016-01-14 12:18:54 -05:00
Aleksey Kliger 1694283c8f [handle] Make MONO_HANDLE_ARENA_POP a function-like macro 2016-01-14 12:18:50 -05:00
Ludovic Henry 1a45c48351 [sgen] Remove DISABLE_CRITICAL_REGION as it's never defined 2016-01-14 11:41:09 -05:00
Ludovic Henry 8ed4ec1b5b [checked-build] Add in GC critical region assertion 2016-01-14 11:40:17 -05:00
Aleksey Kliger d1c34ca48d [checked] Nest MONO_{PREPARE,FINISH}_GC_CRITICAL_REGION 2016-01-14 11:38:15 -05:00
Aleksey Kliger b580227d02 [coop] store MonoHandleArena pointer in MonoThreadInfo 2016-01-14 11:38:15 -05:00
Aleksey Kliger e2719f79b6 [handle] Add _SETREF_NULL macros for MonoObjectHandle and MonoArrayHandle 2016-01-14 11:38:14 -05:00
Ludovic Henry 1384da6248 [handle] Rename MonoHandleStorage->obj to MonoHandleStorage->__private_obj 2016-01-14 11:38:14 -05:00
Ludovic Henry 0c05fb864f [handle] Add mono_handle_obj_is_null utility function 2016-01-14 11:38:13 -05:00
Zoltan Varga 042146997e [llvmonly] Implement Assembly.GetCallingAssembly () in llvmonly mode by saving the current assembly in the calling method. Enable it for Activator.CreateInstance () for now. 2016-01-14 11:26:27 -05:00
Ludovic Henry 75ea2386a1 [Process] Use ReferenceSource process async output/error reader
By using the referencesource one, we remove a buggy part of the Process class. It will now simply use Stream.{Begin/End}Read, and not a custom implementation that introduces its own bugs.
2016-01-14 16:03:01 +00:00
Alexander Köplinger 3a9fa982ea [man/mono.1] Fix typo from 9115bf0a 2016-01-14 16:28:55 +01:00
Zoltan Varga 97d9498c0e [runtime] Make sure ptr-to-structure and structure-and-ptr wrappers are unique, this is needed by full aot. Fixes #20186. 2016-01-14 10:12:01 -05:00
Marek Safar 4cf5ddee6d [mono] Update predefined Hebrew negative sign. Fixes #37681 2016-01-14 15:12:59 +01:00
Marek Safar 600f28367f [corlib] Bump reference source for #37583 2016-01-14 14:40:00 +01:00
monojenkins 18098049bc Merge pull request #2427 from alexrp/socket-responder-dedup
[bcl] Deduplicate the SocketResponder test helper class.

A number of fixes were made to the version in System but these fixes were never applied to the System.Web.Services version. Merge the two and place the class in the test-helpers directory to avoid this sort of maintenance problem.
2016-01-14 13:10:19 +00:00
Marek Safar fb327d037e Merge pull request #2434 from knocte/bitmapattributes
[System.Drawing] Include new .NET4.5 attributes (OWIN)
2016-01-14 08:56:50 +01:00
Andrés G. Aragoneses d8b83353b9 [System.Drawing] Include new .NET4.5 attributes (OWIN)
These stubs should fix this OWIN issue brought up in StackOverflow:
http://stackoverflow.com/questions/34751771/system-drawing-bitmapsuffixinsameassemblyattribute-missing-in-mono

Docs:
* https://msdn.microsoft.com/en-us/library/system.drawing.bitmapsuffixinsameassemblyattribute%28v=vs.110%29.aspx
* https://msdn.microsoft.com/en-us/library/system.drawing.bitmapsuffixinsatelliteassemblyattribute%28v=vs.110%29.aspx

Patch contributed under the terms of the MIT/X11 licence.
2016-01-14 10:37:10 +08:00
Alex Rønne Petersen ceff52c9ae [bcl] Deduplicate the SocketResponder test helper class.
A number of fixes were made to the version in System but these fixes were never
applied to the System.Web.Services version. Merge the two and place the class
in the test-helpers directory to avoid this sort of maintenance problem.
2016-01-14 03:32:23 +01:00
Alex Rønne Petersen 9a1769db68 Merge pull request #2426 from alexrp/http-test-remove-abort
Revert "[bcl] Fix System.Net.HttpWebRequestTest.GetRequestStream hang"
2016-01-14 03:11:41 +01:00
Alex Rønne Petersen bb2209b851 Merge pull request #2424 from alexrp/task-unobserved-exceptions
[TPL] Add support for the <ThrowUnobservedTaskExceptions /> config element.
2016-01-14 03:10:00 +01:00
Alex Rønne Petersen e0f17122d5 [runtime] Make VolatileRead/VolatileWrite semantics compatible with MS.NET.
We previously followed the spec semantics for these which meant weaker memory
barriers than MS.NET. However, since we've been importing large amounts of
code from the reference sources, it makes sense to switch these methods to
the MS.NET semantics as we don't generally audit the reference source code for
compatibility with our (spec-compliant) memory model. It's safe to assume that
most MS.NET code is written with the assumption of strong memory barriers in
these methods.
2016-01-14 02:08:20 +01:00
Zoltan Varga 8051b58749 [llvm] Add a missing r4 opcodes. 2016-01-13 16:47:31 -05:00
Zoltan Varga e17a7e891f [llvmonly] Create empty stacktraces if backtraces are not supported by the platform. 2016-01-13 16:47:23 -05:00
Zoltan Varga 8281216415 [runtime] Disable a test which fails with bitcode. 2016-01-13 16:45:42 -05:00
Alexander Köplinger 63371c9b03 Merge pull request #2428 from akoeplinger/fix-ipv6-test
[System] Ignore ReceiveIPv6() UdpClient test when IPv6 is not available
2016-01-13 18:11:33 +01:00
Zoltan Varga 0f88e839ef [aot] Avoid overwriting entries in domain->seq_points if decode_exception_debug_info () is called more than once. Fixes #37582. 2016-01-13 12:10:12 -05:00
Alexander Köplinger 998fbdb7da [System] Ignore ReceiveIPv6() UdpClient test when IPv6 is not available
The test hangs on Jenkins otherwise.
2016-01-13 16:48:47 +01:00
Rolf Bjarne Kvinge c010ebc09e [System] xamarin_start_wwan is not available for tvOS and watchOS. 2016-01-13 15:13:03 +01:00
Ludovic Henry ddb269bd97 [handle] Add macro to push/pop arena 2016-01-13 13:13:28 +00:00
Ludovic Henry 25c9d081c0 [handle] Make handle.h use exclusively public headers and MONO_API functions 2016-01-13 13:11:43 +00:00
Ludovic Henry 91f5dbb6ca [handle] Remove SGen dependency 2016-01-13 13:10:21 +00:00
Ludovic Henry b5a786b021 [handle] Fix typo 2016-01-13 13:10:21 +00:00
Ludovic Henry e330e2bbc5 [handle] Implement mono_handle_(new|elevate) functions 2016-01-13 13:10:19 +00:00
Ludovic Henry b7db0b7b8f [handle] Inline handle-private.h in handle.h
MonoHandleArena functions need to be as public as MonoHandle functions, as we cannot have one without the other.
2016-01-13 13:08:16 +00:00
Marcos Henrich b21767e01c Merge pull request #2274 from esdrubal/udpclientreceive
Fixes UdpClient.Receive with IPv6 endpoint
2016-01-13 10:17:38 +00:00
Marek Safar ff008e9cea Merge pull request #2423 from radical/mcs-args
[mcs] Accept and ignore command line args supported by csc ..
2016-01-13 08:37:24 +01:00
Alex Rønne Petersen 6cf6b95367 Revert "[System] Tweak tests to work with Thread.Interrupt as well."
This reverts commit bb50c3f3c9.
2016-01-13 05:48:04 +01:00
Alex Rønne Petersen 902f758f91 Revert "[bcl] Fix System.Net.HttpWebRequestTest.GetRequestStream hang"
This reverts commit b3fa096e5e.

The Abort () call is problematic on many platforms and is no longer necessary
as we properly close the listening socket since 1103abf383.

Conflicts:

	mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SocketResponder.cs
	mcs/class/System/Test/System.Net/SocketResponder.cs
2016-01-13 05:42:45 +01:00
Alex Rønne Petersen 111565d367 [TPL] Add support for the <ThrowUnobservedTaskExceptions /> config element.
Improves the situation wrt: https://bugzilla.xamarin.com/show_bug.cgi?id=36560
2016-01-13 04:52:36 +01:00
João Matos 1f914414b4 Merge pull request #2422 from akoeplinger/environment-is64bitoperatingsystem
[corlib] Properly implement Environment.Is64BitOperatingSystem
2016-01-13 01:55:01 +00:00
Alexander Köplinger 2fa5d255ab [corlib] Properly implement Environment.Is64BitOperatingSystem
Before we only checked if IntPtr.Size == 8, but this returns false for a 32bit Mono running on a 64bit OS.
Added an icall that gets the correct value from the runtime instead.

Note: this currently only whitelists x86_64, aarch64 and ppc64 as 64-bit platforms.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=37414
2016-01-13 02:46:37 +01:00
Vlad Brezae 95f1d9f467 Merge pull request #2261 from BrzVlad/fix-arm-fast-tls-master
[arm] Fix arm fast tls
2016-01-13 03:31:33 +02:00
Ankit Jain d6ed00cd14 [mcs] Accept and ignore command line args supported by csc ..
.. that we don't support:

	/utf8output
	/subsystemversion
	/highentropyva
	/highentropyva+
	/highentropyva-
2016-01-12 17:01:16 -05:00
Zoltan Varga 282edf8494 [llvmonly] Avoid disabling llvm for the Selector.GetHandle () intrinsics. 2016-01-12 14:39:55 -05:00
Zoltan Varga 55c3b05839 [llvmonly] Fix support for variant interface methods, they work similarly to generic virtual methods. 2016-01-12 14:23:28 -05:00
Joao Matos 18f49fd0ce Revert "Apple has introduced the System Integrety Protection in OS X 10.11. This prevents writes to /usr amongst other paths. /usr/local is still writable though."
This reverts commit b723c89628.

@migueldeicaza thinks this is the wrong approach, reverting until we figure out the right way to go about this.
2016-01-12 17:41:58 +00:00
Zoltan Varga 18282151ad [llvm] Ignore OP_IL_SEQ_POINT. 2016-01-12 12:26:34 -05:00
Stefan Sedich a30b26eeaa handle automatically mapping IPv4 addresses to IPV6 for dual mode sockets 2016-01-12 09:05:13 -08:00
Aleksey Kliger (λgeek) 33fe41835b Merge pull request #2418 from lambdageek/dev/bug-12205
[reflection] Correct ReflectedType for generic methods
2016-01-12 11:50:10 -05:00
Zoltan Varga 5da42b1a1f [aot] Add support for name mangling for more types. 2016-01-12 10:33:36 -05:00
Marcos Henrich e58fe58ef1 [System.Xml] Test sub class serialization on lists
Covers #36829
2016-01-11 18:03:43 +00:00
Aleksey Kliger 76b0f592c0 [reflection] Test MethodInfo.ReflectedType property
Test cases for [#12205](https://bugzilla.xamarin.com/show_bug.cgi?id=12205)
2016-01-11 12:18:43 -05:00
Rolf Bjarne Kvinge e7961fa20d [mscorlib] Add support for intercepting threadpool work, and use it for Xamarin.iOS/Mac.
This is used to Xamarin.iOS/Mac to wrap threadpool work in an NSAutoreleasePool.

Also open up corlib's internals to Xamarin.iOS/Mac so that the linker
doesn't have to be involved when accessing internal API.
2016-01-11 18:13:42 +01:00
Aleksey Kliger de74da81bf [reflection] remove override get ReflectedType for MonoGenericMethod and MonoGenricCMethod
Should return the type that was queried, not the type where the method
is declared.

Fixes [#12205](https://bugzilla.xamarin.com/show_bug.cgi?id=12205)
2016-01-11 12:11:35 -05:00
Zoltan Varga ddf334d030 [runtime] Bump version to 4.3.3. 2016-01-11 12:01:10 -05:00
Alexander Köplinger 6a796dc348 Merge pull request #2382 from akoeplinger/system-net-mime-referencesource
[System] Port System.Net.Mime namespace from referencesources
2016-01-11 14:13:37 +01:00
Marek Safar 2ab35ec231 [mcs] Fixes inconsistent accessibility check for partial types. Fixes #37232 2016-01-11 13:51:02 +01:00
Zoltan Varga 58d269cc81 [llvm] Allow support for emitting some methods using 'linkonce' linkage. This allows the linker to get rid of duplicate copies. Enable it for gsharedvt wrappers. 2016-01-10 07:57:32 -05:00
Alexander Köplinger a4e29fb865 Merge pull request #2415 from razzfazz/fix_timespec
fix struct timespec member name
2016-01-09 22:42:14 +01:00
Zoltan Varga 35466f798d Merge pull request #2414 from akoeplinger/fix-threadpool-test-hang
[corlib] Don't throw exception for null locale to fix threadpool-exceptions5.exe hang
2016-01-09 15:45:56 -05:00
Daniel Becker 773729f807 handle path stripping correctly for root of watched tree 2016-01-09 12:28:33 -08:00
Daniel Becker 1b1f395bd4 handle EINTR for kevent calls
A kevent() syscall may "fail" with EINTR if the process receives
a signal before the timeout expires and before an event is placed
in the kqueue; in this case, rather than erroring out, the
syscall should simply be retried.
2016-01-09 12:17:52 -08:00
Daniel Becker a261f0806c fix struct timespec member name
The second member of struct timespec is actually called tv_nsec
(nanoseconds), not tv_usec (microseconds); this was likely
confused with struct timeval, where the second member is in fact
called tv_usec.
2016-01-09 12:17:20 -08:00
Alexander Köplinger 2b60cc97c1 [corlib] Don't throw exception for null locale to fix threadpool-exceptions5.exe hang
We were seeing persistent hangs in the threadpool-exceptions5.exe test on the Jenkins ARM machines.
Tracing the execution showed the following exceptions:

```
[0x7f65e3284700:] EXCEPTION handling: System.Threading.ThreadAbortException:
[0x7f65e3284700:] EXCEPTION handling: System.Exception: From OnCBFinished
[0x7f65e3284700:] EXCEPTION handling: System.ArgumentNullException: Value cannot be null.  <-- from CultureInfo.CreateSpecificCulture()
Parameter name: name
[0x7f65e3284700:] EXCEPTION handling: System.Threading.ThreadAbortException:
exception inside UnhandledException handler:

... program hangs here ...
```

It turns out that the machines don't have the LANG/LC_ALL env vars set, resulting in a null string returned
from get_current_locale_name(). The code then tries to construct a locale from that and throws an ANE which is
normally catched and turned into the InvariantCulture.

However, in the threadpool-exceptions5 test the first time a CultureInfo is created is in the OnUnhandledException
event handler when calling ToString(). This means that an exception is thrown while we are in the unhandled exception
handler and the runtime apparently just stops there (despite the exception actually being catched, probably because of
the thread abort) so we never get to signaling the monitor object -> we hang in Main().

The fix is to not rely on catching the ArgumentNullException when we get a null locale, which is a better approach anyway.

To easily reproduce the issue before the fix, use the following (on Linux only, we don't use LANG for locale on OSX):

```
~/dev/mono/mono/tests$ LANG=C MONO_PATH=../../mcs/class/lib/net_4_x/ ../mini/mono-sgen --trace=N:nothing threadpool-exceptions5.exe
```

Note: If you pass an invalid LANG=foo, the hang is still there as we throw a CultureNotFoundException and hit the same issue.
As the behavior looks like a runtime bug to me I filed https://bugzilla.xamarin.com/show_bug.cgi?id=37547
2016-01-09 21:11:08 +01:00
Zoltan Varga 96fb7a905d [llvmonly] Avoid creating an empty output file for the JITted code. 2016-01-09 12:21:51 -05:00
Zoltan Varga c71ae13235 [llvmonly] Avoid emitting the 'globals' aot table, its not used in llvmonly mode. 2016-01-09 11:19:48 -05:00
Zoltan Varga 5c5b3b9b77 Merge pull request #2412 from akoeplinger/disable-thread-test
[corlib] Disable Thread test that started failing after d5768a7f14
2016-01-09 08:08:55 -05:00
Alexander Köplinger 5d74d555dc [corlib] Disable Thread test that started failing after d5768a7f14
Setting the priority before starting a Thread doesn't work right now as there's no handle to the native
thread at that point (the current implementation doesn't store the priority, it just tries setting it
on the native thread) so the test would remember the default 'Normal' priority instead of 'BelowNormal',
causing the test to fail later on.

Added an assert to verify that the thread priority can be set before starting and disable the test for now.

Note: variable names 'before' and 'after' were switched in the test, fixed those as well.
2016-01-09 03:50:27 +01:00
Zoltan Varga 2a17ba39bb [llvm] Error out when using --aot=llvmonly if the runtime is not compiled with --enable-gsharedvt. 2016-01-08 16:22:14 -05:00
Miguel de Icaza a7a4958fff [csharp/getline] Add support for completion popup windows
This adds supprot to the getline.cs library to provide popup windows with
completion results.   There is a new public string property surfaced,
HeuristicsMode, that if set to "csharp" will trigger the completion window
independently of the "tab" character, based on the user input.

This mode triggers completion after the "." character is entered, and will
continue to trigger it as long as you type, or you backspace and the completion
succeeds.   The heuristic also ignores scenarios like "1.2", so there is no
compeltion provided after entering numbers by default.

Perhaps we can later introduce a "OnKeyEntered" command that users could
use to provide their own heuristics to control whether to popup the window
or not.
2016-01-08 16:20:58 -05:00
Radek Doulik e6164da1dc [linker] do not use System.IO.Path on assembly resource names
- fixes #37305

  - resource name can be general string and using it as path
    might throw

       System.ArgumentException: Illegal characters in path.

  - it would be possible to check for the path's invalid characters in
    the resource name. that would cause crossplatform issues
    though.

    various platforms have different invalid charactes sets for path
    names. for example using assembly built on mac with embedded
    linker blacklisting xml file, which's name contains characters in
    its filename which are invalid on windows. so the windows built
    app using that assembly would fail mysteriously, because the
    important parts wouldn't be preserved.

    thus we use just string comparison
2016-01-08 22:10:30 +01:00
Alexander Köplinger 7d40215052 [io-layer] Revert 31f13881a4 and fix it in a simpler way
We don't need the configure.ac check as we can just directly check if the macro is defined.
2016-01-08 21:58:40 +01:00
Zoltan Varga d3b2816c57 [runtime] Bump AOT file format version. 2016-01-08 15:45:33 -05:00
Alexander Köplinger 31f13881a4 [io-layer] Fix build on OSX
This got broken by d5768a7f14, SCHED_BATCH isn't available on OSX or Linux before 2.6.16
2016-01-08 21:39:02 +01:00
Zoltan Varga e4eed3f0aa [llvmonly] Enable more tests. 2016-01-08 15:18:59 -05:00
Zoltan Varga ee51321d2f [llvmonly] Fix gsharedvt calls from gsharedvt methods. 2016-01-08 15:18:59 -05:00
Alexander Köplinger 71b4ebc9c0 Merge pull request #2384 from akoeplinger/system-net-sockets-referencesource
[System] Initial port of System.Net.Sockets types from referencesource
2016-01-08 21:06:31 +01:00
Alexander Köplinger 0950f55eaf [System.Web] Add test for 9c25439320
Test case from https://bugzilla.xamarin.com/show_bug.cgi?id=13909
2016-01-08 20:54:54 +01:00
James Venning 9c25439320 Fix RouteCollection not correctly clearing itself 2016-01-08 20:47:59 +01:00
Neale d5768a7f14 Implement a SetPriority/GetPriority facility for real-time threads: if
mono is executed using the SCHED_RR policy, we will map POSIX priorities
to .NET priorities. Under this policy a thread running under this policy
which uses the SetPriority API will have its priority remapped and a
call to pthread_setschedparam() made to change its priority.

The following code fragment may be used to run a mono application
without requiring all root privileges other than the CAP_SYS_NICE
capability which enables priority manipulation:

void
runMonoRT(const char *const name, const int policy, char **argv)
{
    const pid_t         me = getpid();
    struct sched_param  param;

    param.sched_priority = sched_get_priority_min(policy);
    if (sched_setscheduler(me, policy, &param) == -1)
        fprintf(stderr, "sched_setscheduler(getpid(), %s, { %d }): %s.\n",
			name, param.sched_priority, strerror(errno));
    else
        execvp("mono", argv);
}

int
main(int argc, char **argv)
{
    uid_t       user;
    cap_value_t root_caps[2] = { CAP_SYS_NICE, CAP_SETUID };
    cap_value_t user_caps[1] = { CAP_SYS_NICE };
    cap_t       capabilities;

    /* Get real user ID. */
    user = getuid();

    /* Get full root privileges. Normally being effectively root
     * (see man 7 credentials, User and Group Identifiers, for explanation
     *  for effective versus real identity) is enough, but some security
     * modules restrict actions by processes that are only effectively root.
     * To make sure we don't hit those problems, we switch to root fully. */
    if (setresuid(0, 0, 0)) {
        fprintf(stderr, "Cannot switch to root: %s.\n", strerror(errno));
        return 1;
    }

    /* Create an empty set of capabilities. */
    capabilities = cap_init();

    /* Capabilities have three subsets:
     *      INHERITABLE:    Capabilities permitted after an execv()
     *      EFFECTIVE:      Currently effective capabilities
     *      PERMITTED:      Limiting set for the two above.
     * See man 7 capabilities for details, Thread Capability Sets.
     *
     * We need the following capabilities:
     *      CAP_SYS_NICE    For nice(2), setpriority(2),
     *                      sched_setscheduler(2), sched_setparam(2),
     *                      sched_setaffinity(2), etc.
     *      CAP_SETUID      For setuid(), setresuid()
     * in the last two subsets. We do not need to retain any capabilities
     * over an exec().
    */
    if (cap_set_flag(capabilities, CAP_PERMITTED, sizeof root_caps / sizeof root_caps[0], root_caps, CAP_SET) ||
        cap_set_flag(capabilities, CAP_EFFECTIVE, sizeof root_caps / sizeof root_caps[0], root_caps, CAP_SET)) {
        fprintf(stderr, "Cannot manipulate capability data structure as root: %s.\n", strerror(errno));
        return 1;
    }

    /* Above, we just manipulated the data structure describing the flags,
     * not the capabilities themselves. So, set those capabilities now. */
    if (cap_set_proc(capabilities)) {
        fprintf(stderr, "Cannot set capabilities as root: %s.\n", strerror(errno));
        return 1;
    }

    /* We wish to retain the capabilities across the identity change,
     * so we need to tell the kernel. */
    if (prctl(PR_SET_KEEPCAPS, 1L)) {
        fprintf(stderr, "Cannot keep capabilities after dropping privileges: %s.\n", strerror(errno));
        return 1;
    }

    /* Drop extra privileges (aside from capabilities) by switching
     * to the original real user. */
    if (setresuid(user, user, user)) {
        fprintf(stderr, "Cannot drop root privileges: %s.\n", strerror(errno));
        return 1;
    }

    /* We can still switch to a different user due to having the CAP_SETUID
     * capability. Let's clear the capability set, except for the CAP_SYS_NICE
     * in the permitted and effective sets. */
    if (cap_clear(capabilities)) {
        fprintf(stderr, "Cannot clear capability data structure: %s.\n", strerror(errno));
        return 1;
    }
    if (cap_set_flag(capabilities, CAP_PERMITTED, sizeof user_caps / sizeof user_caps[0], user_caps, CAP_SET) ||
        cap_set_flag(capabilities, CAP_EFFECTIVE, sizeof user_caps / sizeof user_caps[0], user_caps, CAP_SET)) {
        fprintf(stderr, "Cannot manipulate capability data structure as user: %s.\n", strerror(errno));
        return 1;
    }

    /* Apply modified capabilities. */
    if (cap_set_proc(capabilities)) {
        fprintf(stderr, "Cannot set capabilities as user: %s.\n", strerror(errno));
        return 1;
    }

    /*
     * Now we have just the normal user privileges,
     * plus user_caps.
    */
    runMonoRT("SCHED_RR", SCHED_RR, argv);

    return 0;
}
2016-01-08 20:42:52 +01:00
João Matos 1625a45791 Merge pull request #2411 from rolfbjarne/parse-debug-optionsapi-doc
Document mini_parse_debug_option
2016-01-08 18:00:49 +00:00
Rolf Bjarne Kvinge 2457338cf8 [mini] Document mini_parse_debug_option. 2016-01-08 18:36:14 +01:00
Rolf Bjarne Kvinge da51b1c427 [mini] Rename mini_parse_debug_option's argument to match the header file (and match better the usage). 2016-01-08 18:36:14 +01:00
Rolf Bjarne Kvinge c9faf02f6e [man/mono.1] Fix typo. 2016-01-08 18:36:03 +01:00
Alexander Köplinger a0cd461e27 [System] Initial port of System.Net.Sockets types from referencesource
These are the more trivial ones.

Needed a mono_corlib_version bump because some Socket field names changed to the MS version.
2016-01-08 18:01:10 +01:00
João Matos c23b96a99e Merge pull request #2363 from eriklarko/master
SpecialFolder.CommonApplicationData support for El Capitan
2016-01-08 15:26:25 +00:00
João Matos 4b4b612986 Merge pull request #2410 from steffen-kiess/fix-monop
[monop] Fix NullReferenceException in monop
2016-01-08 15:15:30 +00:00
Steffen Kieß ef2c349dfc [monop] Fix NullReferenceException in monop
Fix a NullReferenceException in monop when printing a type name in a
namespace somewhere below System while working on a class which does not
have a namespace.
2016-01-08 16:04:03 +01:00
Zoltan Varga 182f5e71ec [llvmonly] Extract the runtime invoke code into a separate function. 2016-01-08 10:02:37 -05:00
João Matos 177d973ef7 Merge pull request #2390 from schani/feature-bisector
Automatic optimization bug bisector.
2016-01-08 14:03:32 +00:00
João Matos 61150275c6 Merge pull request #2409 from rolfbjarne/parse-debug-options-api
[runtime] Add API to set debug options without going through MONO_DEBUG.
2016-01-08 13:39:22 +00:00
Zoltan Varga 063fb64def [aot] Print the number of different kinds of methods when printing stats. 2016-01-08 07:34:47 -05:00
Rolf Bjarne Kvinge 8a552061a3 [runtime] Add API to set debug options without going through MONO_DEBUG.
This is useful for embedders.
2016-01-08 13:34:09 +01:00
Zoltan Varga 954c58b87f [llvmonly] Add support for nullable return types in runtime invoke code, so it can be used for all methods. Avoid emitting most runtime invoke wrappers in llvm-only mode, they are not needed any more. 2016-01-08 07:12:52 -05:00
Zoltan Varga 1716506d14 [llvmonly] Enable some tests which now work. 2016-01-08 06:13:33 -05:00
Zoltan Varga 34629ae5e2 [llvmonly] Fix support for gsharedvt delegate invoke wrappers, they need to dynamically check whenever the called method uses a gsharedvt calling conv. 2016-01-08 06:13:33 -05:00
Zoltan Varga ce13c3d515 [amd64] Only use the gsharedvt calling conv for variable sized gsharedvt arguments. 2016-01-08 06:13:33 -05:00
Zoltan Varga dac6059932 [runtime] Set the wrapper info correctly for generic delegate-invoke wrappers. 2016-01-08 06:13:33 -05:00
João Matos 533d9a2b6c Merge pull request #2406 from vkargov/master
Fix the format statements in mono-gdb.
2016-01-08 00:43:11 +00:00
Vladimir Kargov 8cbd16e9c7 Fix the format statements in mono-gdb. 2016-01-07 15:37:14 -08:00
Zoltan Varga 6a5f1f9e17 [ppdb] Fail fast when trying to load an .mdb file from memory. 2016-01-07 15:59:50 -05:00
Zoltan Varga 3a2b5353af [llvmonly] Share more signatures. 2016-01-07 15:29:03 -05:00
Ludovic Henry f048e17f41 [handle] Make arena chunk fixed size 2016-01-07 18:35:07 +00:00
Zoltan Varga 36bc196bde [llvmonly] Change the way delegate invokes are implemented, use a new CEE_MONO_CALLI_EXTRA_ARG il instruction so most of the logic is in the JIT, not in marshal.c. 2016-01-07 13:08:26 -05:00
Zoltan Varga 074c8a9deb [llvmonly] Remove the old llvmonly runtime support code, its not needed anymore. 2016-01-07 12:39:59 -05:00
Jonathan Pryor 66e33aa2ee Merge pull request #2333 from joelmartinez/docs-classic-fix
[mdoc] Added -api-style parameter.
2016-01-07 11:06:54 -05:00
Rolf Bjarne Kvinge ac69bf1f9b Bump referencesource to get changes for multiple appdomain removal. 2016-01-07 13:45:22 +01:00
Rolf Bjarne Kvinge 85da43008a [corlib] Remove multiple appdomain support (AppDomain.CreateDomain, etc) from tvOS/watchOS. 2016-01-07 13:04:27 +01:00
Zoltan Varga 72f22200ae [llvm] Fix support for aot data files. 2016-01-07 06:58:41 -05:00
Zoltan Varga e60af82853 [llvmonly] Remove some duplicate code. 2016-01-07 06:43:11 -05:00
Zoltan Varga 636639cffa [llvmonly] Share more signatures in the gsharedvt in/out wrappers. 2016-01-06 11:56:09 -05:00
Zoltan Varga f2c520ac2f [llvmonly] Fix a case where a non-virtual method was called using callvirt. 2016-01-06 11:55:31 -05:00
Joel Martinez 1dc0dba379 [mdoc] Added -api-style parameter.
You must now add the -api-style parameter when running mdoc update for a set of classic or unified assemblies.
This was added in order to properly support types and members that exist only in one or the other set.
Previously, there was an assumption that all types and members would be reflected in both classic and
unified versions of an assembly.
2016-01-06 09:47:24 -05:00
Rolf Bjarne Kvinge 45a86f2116 [aot] Fix emission of external aot data by aligning tables in the file.
The table reading code depends on data being aligned, so make sure it is.
2016-01-06 08:46:32 -05:00
Zoltan Varga d16e7ed0fc [runtime] Fix the DISABLE_JIT build. 2016-01-06 07:57:59 -05:00
Zoltan Varga 1a5bc40a03 [llvmonly] Add support for runtime invokes with nullable arguments. 2016-01-06 07:51:22 -05:00
Alex Rønne Petersen 2dc628d36f Merge pull request #2174 from stukselbax/master
[WCF] WebHttpBinding must use http scheme in case when SecurityMode == WebHttpSecurityMode.TransportCredentialOnly
2016-01-06 11:32:28 +01:00
Zoltan Varga e98f02b71b [llvmonly] Implement runtime invokes to gsharedvt methods. 2016-01-06 04:56:06 -05:00
Zoltan Varga a0d5b21a45 [jit] Fix the handling of virtual generic methods on interfaces in the delegate virtual invoke optimization. Fixes #37436. 2016-01-06 03:59:06 -05:00
Martin Baulig 1b616ca127 Revert "[corlib] Fixed the mobile build in System.Security.Cryptography.X509Certificates."
This reverts commit 0ed6c0f5bf.
2016-01-05 15:38:29 -05:00
Zoltan Varga bac8b504e0 [amd64] Enable LLVM for more parameter passing conventions. 2016-01-05 14:55:51 -05:00
Alexander Kyte 37b489765f [runtime] Read fields out of TransparentProxies correctly in debugger agent 2016-01-05 13:56:46 -05:00
Martin Baulig e442c34af4 [bcl]: Fix 'mobile_static' build. 2016-01-05 13:36:02 -05:00
Alexander Kyte 23ce21ede0 [runtime] Use explicit loop checking to remove depth limitation of sequence point search. 2016-01-05 13:07:29 -05:00
Zoltan Varga f04a83ca39 [llvm] Fix the linking of the bblocks containing endfinally instructions with the targets of leave instructions, previously we would link the first bblock instead of the last one. Fixes #37412. 2016-01-05 12:33:17 -05:00
Martin Baulig ae23fba121 Merge pull request #2401 from alexanderkyte/mobile_static_fixes
Minor mobile-static profile fixes
2016-01-05 12:13:24 -05:00
Aleksey Kliger (λgeek) f7fd77fa10 Merge pull request #2385 from lambdageek/dev/checked-imageset-subset
[checked] ImageSet may reference corlib implicitly in another ImageSet.
2016-01-05 11:45:22 -05:00
Alexander Kyte d6d786c07a [bcl] Fix Win32 network api exclusion on non-monodroid mobile 2016-01-05 11:38:06 -05:00
Alexander Kyte 93a4f8c833 [bcl] Take mobile_static profile into account in preprocessor directive 2016-01-05 11:36:32 -05:00
Joao Matos 048ed1a6b2 [Mono.Security] Fixed bootstrap build. 2016-01-05 16:19:35 +00:00
Martin Baulig a1e8c5265d [System]: Cleanup the internal 'MonoTlsProviderFactory'. 2016-01-05 16:19:35 +00:00
Martin Baulig 7b59ed35eb [System]: Include Mono.Security sources in XamMac profile to make it consistent with the other mobile profiles. 2016-01-05 16:19:35 +00:00
Martin Baulig ebbf7640cc [Mono.Security]: Add MonoTlsProviderFactory.GetMonoSslStream(SslStream). 2016-01-05 16:19:35 +00:00
Martin Baulig 8422335e52 [Mono.Security]: Add 'IMonoSslStream.Provider' and 'GetConnectionInfo()'. 2016-01-05 16:19:35 +00:00
Martin Baulig 1683084102 Fix some compiler warnings in Mono.Security and System. 2016-01-05 16:19:35 +00:00
Martin Baulig 9fa16c3adc [System]: Only use the 'MONO_SECURITY_ALIAS' conditional to determine whether or not to use 'extern alias MonoSecurity'. 2016-01-05 16:19:35 +00:00
Alexander Köplinger 9be02d456c Merge pull request #2396 from akoeplinger/flaky-osx-socket-test
[System] Fix flaky AcceptBlockingStatus test that sometimes failed on OSX
2016-01-05 16:35:07 +01:00
Zoltan Varga 527c92867b Revert "[amd64] Remove some restrictions on passing/returning vtypes in registers."
This reverts commit 25105bd605.

Revert this as it breaks tests.
2016-01-05 10:30:59 -05:00
Zoltan Varga fd8972132d [runtime] Fix the loaded llvm build. 2016-01-05 09:06:19 -05:00
Marcos Henrich f43a2563d7 [System] Removed dead code. 2016-01-05 11:56:26 +00:00
ArsenShnurkov 9c088b38e2 [System] Fix extra xml header in configs.
Fixes #36388.
2016-01-05 11:56:26 +00:00
Marcos Henrich 4d56564adc [System] Test configuration extra xml headers bug
Covers #36388
2016-01-05 11:56:25 +00:00
Marcos Henrich c1a732c452 [System.Configuration] Fix exception on bad xml.
When XmlException is thrown while loading the configuration file,
the XmlException should be encapsulated into a ConfigurationErrorsException.
2016-01-05 11:56:25 +00:00
Marcos Henrich 4980c52fff [System.Configuration] Test bad xml loading.
When ConfigurationManager.OpenMappedMachineConfiguration loads broken
xml ConfigurationErrorsException should be trown instead of
XmlException.
2016-01-05 11:56:24 +00:00
Zoltan Varga 5a9c73e7a9 [runtime] Allocate a parameter array in mono_jit_runtime_invoke () using g_alloca. 2016-01-05 05:32:53 -05:00
Zoltan Varga 25105bd605 [amd64] Remove some restrictions on passing/returning vtypes in registers. 2016-01-05 05:30:45 -05:00
Zoltan Varga 65e10b1622 [jit] Disable the support for -O=shared, use it only for icall wrappers. 2016-01-04 15:58:47 -05:00
Matthias Mailänder bec6f78249 reference libgdiplus with the proper .so name 2016-01-04 21:58:11 +01:00
Zoltan Varga 74c3fafd17 [llvmonly] Introduce a MonoFtnDesc structure to represent an address+argument pair, use this to explicitly mark functions returning function descriptors. 2016-01-04 14:38:37 -05:00
Zoltan Varga 364d06d722 [llvmonly] Remove some jit icalls which are no longer used. 2016-01-04 14:08:06 -05:00
Zoltan Varga a725737e3d [llvmonly] Add an optimized implementation for generic virtual calls on interfaces. 2016-01-04 14:01:44 -05:00
Vlad Brezae f607f01a76 [sgen] Avoid having all los objects pagesize aligned
Since we allocate los objects in page_size chunks, we randomly slide the objects within this space to have them start at different offsets. This improves caching behavior, especially when traversing multiple los objects at the same time.
2016-01-04 20:59:58 +02:00
Vlad Brezae 93b422cd89 [sgen] Use separate object ops with the concurrent collector when there is no evacuation
When we concurrently drain the gray stack, we check to see if there are any blocks that need evacuation. If there aren't, we can drain the gray stack using functions that don't check evacuation related block information. As we do with the serial collector.
2016-01-04 20:49:50 +02:00
Zoltan Varga 0a1bb664e0 [llvmonly] Clean up the optimized virtual call code a bit. 2016-01-04 13:09:11 -05:00
Marek Safar f105ad2620 [System] Fixes Process::WaitForExit to honour EnableRaisingEvents setting 2016-01-04 18:45:31 +01:00
Vincent Povirk d34b34c449 [sgen] Clean up thread pool on shutdown.
Keeping threads around can cause processes to keep running when they
shouldn't, particularly on Windows when the entry point returns.

This commit licensed as MIT/X11.
2016-01-04 11:01:29 -06:00
Zoltan Varga d580f33ae2 [llvmonly] Add an optimized implementation for generic virtual calls. 2016-01-04 11:40:10 -05:00
Alexander Köplinger d3f0e74076 [System] Fix flaky AcceptBlockingStatus test that sometimes failed on OSX
We were sometimes seeing the following failure on Jenkins on OSX:

```
Test Case Failures:
1) MonoTests.System.Net.Sockets.SocketTest.AcceptBlockingStatus : System.Net.Sockets.SocketException : Operation on non-blocking socket would block
at System.Net.Sockets.Socket.Accept () [0x00033] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System/System.Net.Sockets/Socket.cs:896
at MonoTests.System.Net.Sockets.SocketTest.BlockingConnect (Boolean block) [0x0003e] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs:129
at MonoTests.System.Net.Sockets.SocketTest.AcceptBlockingStatus () [0x0001e] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs:147
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```

In non-blocking mode accept() is specified to return this error when no client connection is available right now.
It looks like on OSX we don't immediately get that connection.

To fix this issue, we try to accept in a loop for 100ms and only fail when we don't get a connection in this time.
2016-01-04 17:32:06 +01:00
Marcos Henrich fdb5cadefb [ServiceModel] Fixes missing xsi xsd attributes
While serializing operations with XmlSerializerFormatAttribute,
attributes xmlns:xsi and xmlns:xsd were not added to the message body.

XmlBodyWriter now adds the missing attributes.

Fixes #34413.
2016-01-04 15:42:26 +00:00
Marcos Henrich 22dff27fb9 [System.ServiceModel] Test XmlAttributes
Tests that ClientBase is handling XML attributes correctly.

Covers #34413.
2016-01-04 15:42:25 +00:00
Zoltan Varga d901015f4e [aot] Add another special case for wrappers+gshared methods. 2016-01-04 10:25:26 -05:00
Alexander Köplinger a203534b42 Merge pull request #2393 from akoeplinger/servicemodel-collection-modified
[System.ServiceModel] Fix "collection was modified" exception in tests
2016-01-04 16:11:04 +01:00
Marek Safar d87420027c Bumpr reference source for mobile profile fixes 2016-01-04 15:01:26 +01:00
Marek Safar a9b812ac1a [mcs] Fixes typo 2016-01-04 15:01:23 +01:00
Marek Safar da556a3571 Merge pull request #2395 from akoeplinger/rijndael
[corlib] Remove RijndaelManaged test that makes no sense with referencesource impl
2016-01-04 09:31:05 +01:00
Alexander Köplinger 528d985f29 [corlib] Remove RijndaelManaged test that makes no sense with referencesource impl
The CreateEncryptor_KeyNull and CreateDecryptor_KeyNull tests tried to verify the previous Mono
behavior of throwing a CryptographicException when a null key is passed to the methods [1].

However, with the move to referencesource this no longer happens since when a null key is passed
a random one is generated instead [2].

The existing tests passed out of pure luck because a different CryptographicException is thrown later on:

```
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
  at System.Security.Cryptography.RijndaelManagedTransform.DecryptData (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, System.Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) [0x007b5] in /Users/alexander/dev/mono/external/referencesource/mscorlib/system/security/cryptography/rijndaelmanagedtransform.cs:751
  at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x000bb] in /Users/alexander/dev/mono/external/referencesource/mscorlib/system/security/cryptography/rijndaelmanagedtransform.cs:336
  at MonoTests.System.Security.Cryptography.RijndaelManagedTest.CreateDecryptor_KeyNull () [0x00066] in /Users/alexander/dev/mono/mcs/class/corlib/Test/System.Security.Cryptography/RijndaelManagedTest.cs:233
```

Unfortunately, sometimes it happens with the random key that this exception *doesn't* get thrown as the padding is valid, which makes the test randomly fail on Jenkins.
Deleting those tests is the simplest fix.

[1] https://github.com/mono/mono/blob/mono-4.0.0-branch/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs#L107
[2] https://github.com/mono/referencesource/blob/33edf60ec4d35aba11850872777c8b3a484ca484/mscorlib/system/security/cryptography/rijndaelmanaged.cs#L66
2016-01-04 04:05:08 +01:00
Alexander Köplinger d33a7df441 [System.ServiceModel] Fix "collection was modified" exception in tests
We sometimes see the following exception in the ServiceModel tests:

```
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
  at System.ThrowHelper.ThrowInvalidOperationException (ExceptionResource resource) [0x00000] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/external/referencesource/mscorlib/system/throwhelper.cs:99
  at System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () [0x00016] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/external/referencesource/mscorlib/system/collections/generic/list.cs:1180
  at System.Collections.Generic.List`1+Enumerator[T].MoveNext () [0x00050] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/external/referencesource/mscorlib/system/collections/generic/list.cs:1174
  at System.Linq.Enumerable.FirstOrDefault[TSource] (IEnumerable`1 source, System.Func`2 predicate) [0x00041] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/external/referencesource/System.Core/System/Linq/Enumerable.cs:960
  at System.ServiceModel.Channels.Http.HttpListenerManager.TryDequeueRequest (System.ServiceModel.Dispatcher.ChannelDispatcher channel, TimeSpan timeout, System.ServiceModel.Channels.Http.HttpContextInfo& context) [0x00016] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpListenerManager.cs:93
  at System.ServiceModel.Channels.Http.HttpListenerManager.TryDequeueRequest (System.ServiceModel.Dispatcher.ChannelDispatcher channel, TimeSpan timeout, System.ServiceModel.Channels.Http.HttpContextInfo& context) [0x000ab] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpListenerManager.cs:104
  at System.ServiceModel.Channels.Http.HttpReplyChannel.TryReceiveRequest (TimeSpan timeout, System.ServiceModel.Channels.RequestContext& context) [0x00003] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpReplyChannel.cs:154
  at System.ServiceModel.Channels.ReplyChannelBase+<BeginTryReceiveRequest>c__AnonStorey0.<>m__0 (TimeSpan tout, System.ServiceModel.Channels.RequestContext& ctx) [0x00056] in /var/lib/jenkins/workspace/test-mono-mainline/label/debian-amd64/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReplyChannelBase.cs:129
```

I managed to repro this consistently on the debian-7-x64-1 Jenkins machine by running the test in a loop with the following code for about 15mins:
    while [ $? -eq 0 ]; do make check FIXTURE=System.ServiceModel.Dispatcher; done

The problem happens when RegisterListenerCommon/UnregisterListenerCommon is invoked through HttpChannelListener.OnOpen/OnAbort/OnClose which modifies the 'Entries' collection on another thread.

The fix is to add locking around the collection accesses.
2016-01-03 17:12:19 +01:00
Joao Matos da63cf5b2d [mini] Fixed non-JIT runtime support in generic sharing. 2016-01-03 15:03:32 +00:00
Joao Matos 0ed6c0f5bf [corlib] Fixed the mobile build in System.Security.Cryptography.X509Certificates. 2016-01-03 15:03:32 +00:00
Zoltan Varga 3451418af0 Add an optimized implementation for interface calls.
This works by using the imt entries in the vtable to store 'imt thunks', which in llvm-only mode, are C functions
which receive an info structure and the imt method and return the real method which needs to be called. Thus
interface calls are compiled into two calls: one to the imt thunk, and one to the method address returned by
the thunk.
2016-01-03 05:45:22 -05:00
Zoltan Varga 04d1f41629 [runtime] Pass the vtable to the vtable/imt trampoline creation functions so they can return a vtable specific value. Not yet used. 2016-01-03 05:45:22 -05:00
David Karlaš 8b8111af7e Merge pull request #2380 from alexanderkyte/pdb_fix_local_vars
[runtime] Fixed off-by-one bug in local variable counting for ppdb files.
2016-01-03 07:18:04 +01:00
Zoltan Varga 59c352646c [llvmonly] Optimize virtual calls by storing a function descriptor in vtable slots, and using an icall to initialize it if needed. 2016-01-03 00:49:38 -05:00
Zoltan Varga 92efab91ab [runtime] Avoid a crash if a generic type definition is passed to RuntimeHelpers.RunClassConstructor (). Fixes #37313. 2016-01-01 23:28:23 -05:00
Zoltan Varga 6aa7d30d96 [sgen] Avoid asserting if the tls offsets used by the managed allocators cannot be determined. This can happen when using shared libraries on linux. Fixes #30594. 2016-01-01 23:03:48 -05:00
Zoltan Varga 81e1e072c8 [llvm] Disable support for nested clauses, it still doesn't work. Fixes #37273. 2016-01-01 22:04:53 -05:00
Zoltan Varga 84a5f71d4d [llvm] Add missing OP_LMUL_IMM opcode. 2016-01-01 20:50:51 -05:00
Zoltan Varga daac6e51c0 [llvm] Add support for passing dummy arguments before arm64 hfa structures so they get passed completely on the stack, there was a mismatch between the cconv used by the JIT and LLVM, leading to problems if the caller was llvm and the callee was not, and vice versa. Part of the fix for #37236. 2016-01-01 20:13:19 -05:00
Alexander Köplinger 35c5089c2c Merge pull request #2392 from akoeplinger/web-wizard-sharing-violation
[System.Web] Fix WizardStepBase_Theme sharing violation error during test
2016-01-01 17:25:47 +01:00
Alexander Köplinger 12db763951 [System.Web] Fix WizardStepBase_Theme sharing violation error during test
We were sometimes seeing the following test failure on Jenkins:

```
Test Case Failures:
1) MonoTests.System.Web.UI.WebControls.WizardStepBaseTest.WizardStepBase_Theme : System.IO.IOException : Sharing violation on path /var/folders/wm/jvn0yl0d39q9sm9glcrhdrmw0000gn/T/tmp672264ba.tmp/App_Themes/Theme1/WizardTest.skin
at System.IO.File.SetLastWriteTime (System.String path, DateTime lastWriteTime) [0x00029] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/corlib/System.IO/File.cs:474
at MonoTests.SystemWeb.Framework.WebTest.CopyBinary (System.Byte[] sourceArray, System.String targetUrl) [0x00098] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs:364
at MonoTests.SystemWeb.Framework.WebTest.CopyResource (System.Type type, System.String resourceName, System.String targetUrl) [0x00059] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs:307
at MonoTests.System.Web.UI.WebControls.WizardStepBaseTest.WizardStepBase_Theme () [0x00000] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs:311
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```

This happens because System.Web.UI.WebControls/ThemeTest.cs copies the WizardTest.skin file to the same App_Themes/Theme1 path in its setup method.
Since we're not interested in any particular theme in WizardStepBase_Theme we fix this by just using a different theme name (WizardStepBase instead of Theme1) so the two test fixtures don't clash.
2016-01-01 15:05:15 +01:00
Alexander Köplinger 306b8c16ca Merge pull request #2391 from Utsav2/Utsav2-patch-1
Fix typo in AL man page
2016-01-01 12:22:39 +01:00
Utsav Shah f1e8be234f Fix typo 2015-12-31 22:56:00 -05:00
Mark Probst 121f253944 Automatic optimization bug bisector. 2015-12-31 10:23:08 -08:00
Miguel de Icaza 9115bf0abd [man/mono.1] Add details on --aot=data-outfile option 2015-12-30 23:13:02 -05:00
Vlad Brezae 4791a674a1 Merge pull request #2386 from BrzVlad/fix-jit
[jit] Some jit fixes
2015-12-30 00:23:31 +02:00
Aleksey Kliger 5b6ed15ebd [checked] Imageset may reference corlib implicitly in another imageset. 2015-12-28 11:49:14 -05:00
Vlad Brezae 571c1a149f [arm] Fix codegen for multiply instructions
The code worked because we never used mul with CPSR update and the code for ARMOP_MUL happens to be 0.
2015-12-27 11:51:29 +02:00
Vlad Brezae 2cc8a2f266 [jit] Fix specs for some conv instructions 2015-12-27 11:49:13 +02:00
Vlad Brezae 8e71adca75 [jit] Fix signed division by power of 2 optimization.
Add more division tests.
2015-12-27 11:46:45 +02:00
Alexander Köplinger 3bfea0a776 [System] Port System.Net.Mime namespace from referencesources
A few helper methods that existed in ContentType were moved into MailMessage.
I verified the test changes are required to match MS.NET behavior.
2015-12-24 13:27:12 +01:00
Marek Safar 53fb233e90 Merge pull request #2383 from akoeplinger/authenticated-stream-referencesource
[System] Port AuthenticatedStream from referencesources
2015-12-24 09:04:38 +01:00
Zoltan Varga 1d806f2b9b [runtime] Move the HAVE_MOVING_COLLECTOR define to config.h instead of the command line. 2015-12-24 00:40:46 -05:00
Zoltan Varga 2324a7ad93 [runtime] Make libmono point to libmonosgen instead of libmonoboehm. 2015-12-23 23:45:28 -05:00
Zoltan Varga 59ca29cd71 [runtime] Make the code in mini-llvm.c more C++ compatible. 2015-12-23 21:16:15 -05:00
Alexander Köplinger 6fdc0a8cef [System] Port AuthenticatedStream from referencesources 2015-12-24 02:01:51 +01:00
Zoltan Varga 71c35afcf1 Merge pull request #2381 from alexanderkyte/pdb_method_assert
[runtime] Make the pdb lookup function return NULL for runtime-generated methods rather than asserting.
2015-12-23 19:22:11 -05:00
Alexander Kyte 940c306e73 [runtime] Fixed off-by-one bug in local variable counting for ppdb files. 2015-12-23 19:19:06 -05:00
Alexander Kyte fba307e79d [runtime] Make the pdb lookup function return NULL for runtime-generated methods rather than asserting. 2015-12-23 19:15:38 -05:00
monojenkins 88dbb8625b Merge pull request #2379 from xmcclure/babysitter-contd
scripts/babysitter stdout logging improvements

Always print stdout log statements, even when all babysitter features
are turned off, even when the test suite does not support the protocol.
2015-12-23 19:25:16 +00:00
Andi McClure 8f800a33c8 scripts/babysitter stdout logging improvements
Always print stdout log statements, even when all babysitter features
are turned off, even when the test suite does not support the protocol.
2015-12-23 12:49:53 -05:00
Rolf Bjarne Kvinge 4365a2a8a2 [mkbundle] Add support for --quiet. 2015-12-23 12:03:03 +01:00
Rolf Bjarne Kvinge f7f66cb6d0 [mkbundle] Fix compiler warnings. 2015-12-23 12:01:40 +01:00
Zoltan Varga 6295dc7dbd [llvm] Fix LLVM support after e7166e4f9c. 2015-12-23 01:09:19 -05:00
Miguel de Icaza 9b17811bb7 ucm2cp: Remove the deprecated '#if NET_2_0' fence 2015-12-22 23:28:32 -05:00
Alexander Köplinger 6c728b6cc0 [System.Xml.Linq] Reenable a test that was commented out
It works fine now, the underlying mcs bug was fixed long ago.
2015-12-23 02:04:06 +01:00
Alexander Köplinger 266345ec8f Merge pull request #2366 from xmcclure/scripts-babysitter
Adds babysitter script for PR tests
2015-12-23 00:17:42 +01:00
Andi McClure 718a63ebb5 Support process-group killing in babysitter script
The babysitter script was failing to act as a GNU timeout replacement
because it was delivering signals to the spawned process only, whereas
GNU timeout would create a process group. This lead to a problem where
timeout kills by the babysitter would leave children of the spawned
process still running. To fix this, the babysitter script now follows
the exact steps that GNU timeout does (or as close as is possible in
Python). An attempt at a Windows process-group implementation is also
included, but I have not tested it.

Also changed the 'retry_support' key to 'babysitter_protocol' in the
JSON logs, because it was pointed out the old key was misleading (it
is true even when retries are deactivated).
2015-12-22 17:38:16 -05:00
Andi McClure 18da391e21 Have scripts/babysitter use MONO_BABYSITTER_LOG_FILE configuration
Instead of configuring logs with WORKSPACE dir
2015-12-22 15:04:57 -05:00
Andi McClure 0a63e216ff More peer review changes on scripts/babysitter
- Using “iteration” for # of retries instead of ambiguous “passes”
- More clearly document what environment keys are for in-script
- Remove CRASH_RESUME key, make setting always true
- Print explicit human-readable messages for stdout log
2015-12-22 14:47:28 -05:00
Alexander Köplinger 44a04d5bd6 Merge pull request #2375 from akoeplinger/servicemodel-remove-portfinders
[ServiceModel] Remove custom free port finder code
2015-12-22 18:42:35 +01:00
Rolf Bjarne Kvinge b9cc37c7d6 Merge pull request #2376 from rolfbjarne/bitcode-without-undefined-references
Do not allow undefined references if bitcode is enabled.
2015-12-22 17:38:09 +01:00
Rodrigo Kumpera e137ff6f7e Merge pull request #2034 from alexrp/ctx-cleanup
[runtime] Actually clean up context-static data segments.
2015-12-22 11:05:30 -05:00
Miguel de Icaza ccdf8c3274 Merge pull request #1896 from meum/patch-1
Fix dot stuffing in SmtpClient
2015-12-22 10:20:19 -05:00
Aleksey Kliger (λgeek) 5c7b6ea220 Merge pull request #2374 from lambdageek/dev/bug-37035
[WCF] ServiceHost should look for inherited ServiceBehaviorAttribute
2015-12-22 07:33:03 -05:00
Rolf Bjarne Kvinge 93469b3569 Do not allow undefined references if bitcode is enabled.
The linker does not allow the '-undefined' flag when bitcode
is enabled, so we can't pass it to the linker at all.
2015-12-22 13:05:53 +01:00
Alexander Köplinger 579a2cd705 [ServiceModel] Remove custom free port finder code
We have a common one in NetworkHelpers now.
2015-12-22 01:59:01 +01:00
Aleksey Kliger f92547dc16 [WCF] ServiceHost should look for inherited ServiceBehaviorAttribute
Fixes #37035
2015-12-21 17:33:11 -05:00
Zoltan Varga b362500d85 [aot] Add hooks which can be used by embedders to load the aot data for aot images compiled with --aot=data-outfile=... 2015-12-21 17:06:56 -05:00
Miguel de Icaza ee3eec088d Add documentation for MONO_ENABLE_COOP 2015-12-21 14:16:49 -05:00
João Matos 6f4db43170 Merge pull request #2373 from akoeplinger/servicemodel-tcpreplychannel-race
[ServiceModel] Make TcpReplyChannel.OnClose thread-safe
2015-12-21 17:44:41 +00:00
Marek Safar ca587aad35 Merge pull request #2372 from abock/dcs-iserializable-bxc37171
XmlObjectSerialier: fix ISerializable (bxc#37171)
2015-12-21 18:33:47 +01:00
Aaron Bockover f76b8b4df1 XmlObjectSerialier: fix ISerializable (bxc#37171)
The shim/bridge between Mono and the RS implementation of
XmlObjectSerializer, DataContractSerializer, etc. did not properly
invoke the constructor required by ISerializable, as it completely
omitted passing the populated SerializationInfo object.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=37171
2015-12-21 11:00:46 -05:00
Alexander Köplinger 672cc68198 [ServiceModel] Make TcpReplyChannel.OnClose thread-safe
We were seeing the following unhandled exception on Jenkins:

````
Unhandled exceptions:
1) MonoTests.System.ServiceModel.OperationContextTest.Current : System.NullReferenceException: Object reference not set to an instance of an object
  at System.ServiceModel.Channels.NetTcp.TcpReplyChannel.OnClose (TimeSpan timeout) [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpReplyChannel.cs:141
  at System.ServiceModel.Channels.CommunicationObject.Close (TimeSpan timeout) [0x0001c] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs:140
  at System.ServiceModel.Channels.CommunicationObject.Close () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs:131
  at System.ServiceModel.Dispatcher.ListenerLoopManager.TryReceiveRequestDone (IAsyncResult result) [0x00027] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs:583
```

This happens because multiple threads can call OnClose() and so `client` can be null.

Fixed this by taking code from HttpReplyChannel.OnClose which handled this already and also fixed the race condition there (the checks need to happen under a lock).
2015-12-21 14:33:14 +01:00
Marek Safar aaca175b44 Merge pull request #2370 from DavidKarlas/replaceQuote
[XBuild] Fixed method invocation with string argument containing ",` or '
2015-12-21 10:00:20 +01:00
Zoltan Varga e7166e4f9c Add preliminary support for storing the AOT metadata outside the AOT image. This can save about 10-20% from the executable size when statically linking AOT images. Needs callbacks to allow embedding apps to load the aot data. 2015-12-20 22:08:30 -05:00
monojenkins 2400cc6195 Merge pull request #2371 from akoeplinger/symbolicate-quoted
[symbolicate] Make sure MONO_PATH is quoted

Without it we saw a " ./../../class/lib/net_4_x: Is a directory" error in the cygwin build.

@monojenkins merge
2015-12-20 16:55:59 +00:00
Alexander Köplinger 412d06b373 [symbolicate] Make sure MONO_PATH is quoted
Without it we saw a " ./../../class/lib/net_4_x: Is a directory" error in the cygwin build.
2015-12-20 16:20:31 +01:00
David Karlaš 49f2a66d25 [XBuild] Fixed method invocation with string argument containing ",` or '
Before this commit string value starting or ending with this char was malformed because Trim removed also part of string value
Also fixed recent regression from 42c0a94445 which failed to split arguments if doubleQuote was inside singleQuoute
2015-12-20 10:41:01 +01:00
Zoltan Varga cb6ccf37a4 [llvmonly] Avoid emitting runtime invoke wrappers for the signatures which the gsharedvt based invoke wrappers can handle. 2015-12-19 18:43:09 -05:00
Zoltan Varga d1e6645b42 [llvmonly] Share more gsharedvt wrappers. 2015-12-19 18:29:41 -05:00
Zoltan Varga d2508abd9e [llvmonly] Avoid generating gsharedvt in wrappers for method signatures, they are not needed. 2015-12-19 18:06:45 -05:00
Alexander Köplinger 48020350b0 [csproj] Refreshed order.xml and csproj files 2015-12-19 17:58:35 +01:00
Frederik Carlier ce24528b41 Update the System.Diagnostics.Tracing namespace to better match the .NET API 2015-12-19 17:58:34 +01:00
Aleksey Kliger (λgeek) 9af477b63b Merge pull request #2364 from lambdageek/dev/checked-critical
[coop] checked build GC critical regions
2015-12-19 11:57:01 -05:00
João Matos f5adb4c2f8 Merge pull request #2367 from BillSeurer/master
[powerpc] New macros and utility functions for v2 elf ABI function calls
2015-12-19 16:16:49 +00:00
João Matos c1653b9bf8 Merge pull request #2369 from akoeplinger/msvc-win64-crash
[sgen] Disable freeing of OS memory on 64bit Windows build too
2015-12-19 16:15:23 +00:00
Alexander Köplinger e786c9b946 Merge pull request #2368 from DavidKarlas/portablePdbTargetsSupport
[XBuild] Add support for copying/cleaning portable .pdb files generated by Roslyn compiler
2015-12-19 15:31:28 +01:00
Alexander Köplinger 0f27da61ea [sgen] Disable freeing of OS memory on 64bit Windows build too
This was applied for the x86 build in 398c7fc21f.
Moved the check so that it applies to the x64 MSVC build as well.

We were hitting the same assert in mono_vfree() on Jenkins and this fixes it.
2015-12-19 15:17:02 +01:00
David Karlaš 6db292b470 [XBuild] Add support for copying/cleaning portable .pdb files generated by Roslyn compiler 2015-12-19 12:29:50 +01:00
Zoltan Varga ceeab929cc [llvmonly] Avoid adding some gsharedvt wrappers which are already added. 2015-12-19 01:39:03 -05:00
Zoltan Varga d08183ff48 [jit] Only emit the gsharedvt runtime invoke wrappers in llvm-only mode. 2015-12-19 01:19:37 -05:00
Zoltan Varga 9764580b0a [runtime] Factor out a part of mono_jit_runtime_invoke () into a separate function. 2015-12-19 01:19:37 -05:00
Zoltan Varga b6b9f61122 [runtime] Disable the check-seq-points tests on arm, it cannot be made to reliably work without major changes since arm cannot encode all 32 bit immediates inside instructions, which means that opcodes which call is_rotated_imm8 () would need special handling whe the 'single-imm-size' option is used. 2015-12-19 03:38:36 +00:00
Zoltan Varga f13b642d7f [jit] Enable gsharedvt in llvmonly mode by default if ENABLE_GSHAREDVT is defined. 2015-12-18 17:05:58 -05:00
Aleksey Kliger 3a60d3564c [coop] Checked build GC critical regions.
For local handles in coop suspend configuartions we need the idea of a
"critical region": a situation when transitioning from GC
Unsafe (running) to GC Safe (blocking) mode constitutes a bug. In
checked builds, we'd like to assert when that happens.

This PR adds MONO_PREPARE_GC_CRITICAL_REGION,
MONO_FINISH_GC_CRITICAL_REGION and MONO_REQ_GC_NOT_CRITICAL.

In regular build, these are nops. In checked build, they use a new
thread-local flag to prevent transitions from running to blocking.
2015-12-18 15:15:49 -05:00
Marek Safar 25497f5308 [mcs] Propagate null operator flag during standalone to extension methods promotion. Fixes #37080 2015-12-18 21:14:06 +01:00
Andi McClure de51d0e998 Peer feedback changes for babysitter script PR 2015-12-18 15:04:19 -05:00
Aleksey Kliger (λgeek) f2b8c44a91 Merge pull request #2314 from lambdageek/dev/local-handles
Just the low-level bits of the handles API
2015-12-18 14:55:12 -05:00
Bill Seurer 99902cec93 [powerpc] New macros and utility functions for v2 Elf ABI function calls. 2015-12-18 13:23:40 -06:00
Andi McClure 1dc0598bad Adds babysitter script for PR tests
I see two problems with our current automated PR tests:
- Many false negatives— PR tests often fail due to recurring failures
  unrelated to the PR
- Information about what failed is awkward to retrieve, scattered in
  multiple places

This commit adds a Python script, `scripts/babysitter`. Currently our
Jenkins test suites are each run wrapped with the `timeout` command.
The babysitter acts as a drop-in replacement for GNU timeout but adds
the following features:
- Logs machine readable output about each test suite (as
  line-delimited json)
- If the test suite uses NUnit, can detect if a test case failed or
  crashed (terminated mono in mid-test), and retry unsuccessful tests
  (up to a limit).

The reasoning here is that tests which fail inconsistently are
currently most likely due to one of our outstanding recurring failures
rather than the change made in the PR. Therefore, if a failing test
succeeds on retry, the PR itself is probably valid (although the
failure should be logged and looked at).

In addition to the script itself, changes to NUnit were required in
order to support the retry feature and allow fine-grained logging for
NUnit suites.

Major TODOs:
- Add retry support for our non-NUnit-based test suites
- Save the XML files NUnit produces (since reruns stomp XMLs from
  previous runs)
- Add some kind of sensible feature for dealing with timeouts
2015-12-18 13:15:18 -05:00
Miguel de Icaza e20cd1cf85 [icall/GetMachineName] Use sysconf if available to capture the whole host name, fall back to a fixed size buffer otherwise 2015-12-18 13:10:46 -05:00
Ludovic Henry 223af711a1 [coop] Cleanup 2015-12-18 11:21:46 -05:00
Ludovic Henry 3a22518833 [coop] Introduce new runtime handle API 2015-12-18 11:21:45 -05:00
Zoltan Varga 3cfbb97b17 [runtime] Remove some debug printfs. 2015-12-18 01:38:23 -05:00
Zoltan Varga a705a45de2 Add an alternative implementation for runtime invokes in llvmonly mode
which uses gsharedvt out wrappers. We invoke the wrappers, and the
wrappers invoke the methods themselves. The advantage of this approach is
that the set of possible signatures for gsharedvt out wrappers is small,
so the set of runtime invoke wrappers needed to invoke them is also small,
thus only a small number of them need to be generated.
Not yet enabled.
2015-12-18 00:42:20 -05:00
Zoltan Varga 27302ec451 [runtime] Add a mono_marshal_get_runtime_invoke_for_sig () helper function to create a runtime invoke wrapper for a signature. 2015-12-18 00:42:20 -05:00
Alexis Christoforides 682bd7ab48 [mkbundle] Fix --nomain option for Windows 2015-12-17 21:38:20 -05:00
Alexis Christoforides 84d7f7e888 [mkbundle] Allow override of embedded assemblies.
If they exist, name-matched assemblies in the current directory will be embedded instead of the properly resolved ones.
2015-12-17 21:38:19 -05:00
Zoltan Varga d6c522d5ed Merge pull request #2365 from akoeplinger/fix-llvm-method
[mini] Ensure mono_llvm_create_vars() is only present in ENABLE_LLVM
2015-12-17 21:10:07 -05:00
Alexander Köplinger a8a3253def [mini] Ensure mono_llvm_create_vars() is only present in ENABLE_LLVM
It caused a build error on msvc debug builds because the symbol wasn't there.
2015-12-18 02:59:23 +01:00
Vlad Brezae fff669316e [sgen] Pagesize is already cached in mono_pagesize 2015-12-18 01:55:51 +02:00
Vlad Brezae 99d608a7e0 [sgen] Add align defines. 2015-12-18 01:55:49 +02:00
Alexander Köplinger 0de646eb4c Merge pull request #2350 from akoeplinger/signcode-sha1
[signcode] Change default hashing algorithm from MD5 to SHA1
2015-12-17 23:38:09 +01:00
Alexis Christoforides 34c202a092 [mkbundle] Fix typo 2015-12-17 17:02:55 -05:00
Alexis Christoforides 62eca45496 [mkbundle] Correct some linking options for Windows 2015-12-17 13:45:20 -05:00
Alexis Christoforides 48cf6194d0 [mkbundle] Allow overriding linked Mono library path 2015-12-17 13:45:20 -05:00
Alexis Christoforides 3e40c70cf4 Merge pull request #2342 from lewurm/mkbundlefix
[mkbundle] restore old behavior of -c flag
2015-12-17 13:44:56 -05:00
Erik Larkö b723c89628 Apple has introduced the System Integrety Protection in OS X 10.11. This prevents writes to /usr amongst other paths. /usr/local is still writable though.
System.Environment.SpecialFolder.CommonApplicationData returns /usr/share on OS X 10.11, which is now not a very good place to put things :) This patch changes this folder to /usr/local/share.

This change is released under the MIT license.
2015-12-17 17:30:29 +01:00
Sebastien Pouliot f663abeaf1 [test][System.Runtime.Serialization] Ensure test compile on XI (avoid more than one Main method) 2015-12-17 09:02:49 -05:00
Jo Shields fcb5e103e7 Fix "make dist" WITHOUT accidentally un-bumping referencesources 2015-12-17 10:29:57 +00:00
Jo Shields f66b5973d6 Revert "Fix typo in dde9ee9e (Fixes make dist)"
This reverts commit 85cbe23b99.
2015-12-17 10:29:17 +00:00
Jo Shields 85cbe23b99 Fix typo in dde9ee9e (Fixes make dist) 2015-12-17 09:45:37 +00:00
Zoltan Varga b8285895e7 [jit] Fix the support for gshared types in mini_emit_initobj (), previously we were treating them as reference types, leading to stack overwrites. Fixes #37079. 2015-12-17 01:20:13 -05:00
Vlad Brezae ce8077bd4c [sgen] Use SGEN_ALIGN_UP in more places 2015-12-17 03:46:00 +02:00
Zoltan Varga 68c21f2734 [jit] Make it possible to enable gsharedvt in llvmonly mode even if MONO_ARCH_GSHAREDVT_SUPPORTED is not enabled. 2015-12-16 16:07:34 -05:00
Zoltan Varga eb8745e71a [jit] Remove a superfluous assert. 2015-12-16 15:38:05 -05:00
Zoltan Varga 51ae069cda [jit] Reorganize mono_jit_runtime_invoke () a bit so info->ret_box_class is set even if dyncall is not supported. 2015-12-16 15:17:41 -05:00
Zoltan Varga 756c659ca6 Add support for translating between normal and gsharedvt calling conventions in llvmonly mode.
This is implemented by generating two wrappers for each concrete signature found in the assembly:
* an 'in' wrapper translates from the normal to the gsharedvt signature
* an 'out' wrapper translates from the gsharedvt to the normal signature

The wrappers take an extra argument, which points to a function descriptor, which is an <addr, arg> pair. They
make a call to ADDR which ARG as an extra argument. ADDR/ARG is either a gsharedvt method with an rgctx
argument, or another gsharedvt wrapper with a function descriptor argument.

All calls made out of gsharedvt methods with a variable signature use the gsharedvt calling convention. If the
callee is also gsharedvt, no wrapper is needed. If the callee is not gsharedvt, the call goes thought
a gsharedvt out wrapper.
Calls made from normal methods to gsharedvt methods go though a gsharedvt in wrapper.

    * mini-generic-sharing.c (mini_get_gsharedvt_in_sig_wrapper): New function to generate gsharedvt in
    wrappers as IL code.
    (mini_get_gsharedvt_out_sig_wrapper): Ditto for out wrappers.

    * method-to-ir.c (emit_llvmonly_calli): New helper function to make a call to a function descriptor.
    (mono_method_to_ir): Make some indirect calls to MONO_RGCTX_INFO entries using function descriptors.

    * aot-compiler.c (compile_method): Generate gsharedvt wrappers for the signatures used by the method.

    * aot-runtime.c (decode_method_ref_with_target): Decode gsharedvt wrappers.

    * jit-icalls.c (resolve_vcall): Rewrite this so it can handle gsharedvt as well.
    (resolve_iface_call): Ditto.
    (mono_init_delegate): Ditto.
    (mono_init_delegate_virtual): Ditto.

    * mini-trampolines.c (mini_create_llvmonly_ftndesc): New helper function to create a function descriptor.
    (mini_add_method_wrappers_llvmonly): New helper function to add gsharedvt in/out wrappers, similar
    to mini_add_method_trampolines ().

    * mini-generic-sharing.c (mini_get_gsharedvt_wrapper): Return the newly added wrappers in llvmonly mode.
    (class_type_info): Insert gsharedvt wrappers if needed. Some MONO_RGCTX_INFO types will now resolve to
    function descriptors instead of function addresses.
    (instantiate_info): Ditto.
2015-12-16 15:09:55 -05:00
Zoltan Varga 36c7332104 2015-12-16 Zoltan Varga <[email protected]>
Add mono_signature_full_name () helper function.

	* debug-helpers.c (mono_signature_full_name): New helper function to stringify a signature, including
	its return types as well.
2015-12-16 14:11:28 -05:00
Zoltan Varga 95263a9615 2015-12-16 Zoltan Varga <[email protected]>
Add beginnings for support for gsharedvt in llvmonly mode. Gsharedvt methods use a calling convention
	where everything is passed and returned by ref, even normal types. I.e.

	public int foo<T> (T t, int i);

	becomes:

	void foo (int *vret, T* t_addr, int *i_addr);

	Not enabled yet.

	* mini-llvm.c: Implement support for gsharedvt.

	* ssa.c (mono_ssa_remove_gsharedvt): Same as mono_ssa_remove (), but only remove the
	OP_VPHI nodes referencing gsharedvt variables, since they cannot be handled by the
	llvm backend.

	* mini-llvm.c (mono_llvm_create_vars): New backend function, similar to mono_arch_create_vars ().

	* decompose.c (mono_decompose_vtype_opts): Decompose more opcodes in llvm mode so
	opcodes using gsharedvt variables don't reach the llvm backend. Some, like OP_LDADDR and
	vcalls, still do.

	* method-to-ir.c (mono_allocate_gsharedvt_vars): New function to allocate gsharedvt locals,
	extracted from mono_spill_global_vars () so it can be used in llvm mode too.
2015-12-16 14:11:28 -05:00
Jonathan Pryor 4e45904553 [mono-api-info] Add mono-api-info -L, mono-api-info -r
**The Scenario**: `mono-api-info` and `mono-api-html`, together, are a
useful way to track API changes over time, specifically to check for
accidental API breakage:

	# Have a "known good" assembly version;
	# keep reference/assembly.xml in version control
	$ mono-api-info assembly.dll > reference/assembly.xml

	# ...then on every new build, check for breakage:
	$ mono-api-info assembly.dll > new-assembly.xml
	$ mono-api-html reference/assembly.xml new-assembly.xml > assembly-diff.html
	$ if grep '<p>Removed' assembly-diff.html > /dev/null ; then \
		echo "ABI BREAK IN assembly.dll" ; \
		cat assembly-diff.html ; \
	fi

This is a very nice workflow, and has been used in Xamarin.Android to
track accidental API breakage for some time.

**The problem** with the above workflow are *implicit* references:
`mono-api-info` will happily look for dependencies in the same
directory as `assembly`, but it will *also* look for assembly
references in various system-specific directories, which is fine...

...until it *isn't* fine, e.g. if you have your own version of
mscorlib.dll that you need to use, *not* the system one, as your own
version may have API differences from the system mscorlib.dll which
are "percolated" into `mono-api-info` output. For example, on
"desktop" profiles, System.Attribute implements
System.Runtime.InteropServices._Attribute, and thus *all* custom
attribute types will have _Attribute listed as an implemented
interface. The Xamarin.iOS and Xamarin.Android mscorlib.dll,
meanwhile, does *not* have System.Attribute implementing _Attribute.
Consequently, changing the mscorlib.dll which is used while processing
an assembly will change `mono-api-info` output, resulting in "API
breakage" which doens't actually exist, because the wrong mscorlib.dll
was used to generate the original API description in the first place.

We need a way to control which mscorlib.dll/etc. are used. This can be
done by allowing specification of the assembly search directories, so
that we can "override" the default system-specific directory location.

**The solution**: Add a `mono-api-info -L PATH` option which adds PATH
to the list of directories that `mono-api-info` will search when
resolving assembly references. This allows "overriding" the system
directory location, as PATH will be searched for mscorlib.dll before
the system directory location.

Additionally, add a `mono-api-info -r ASSEMBLY` option, which will
pre-process ASSEMBLY (and all dependencies) and add the directory
which contains ASSEMBLY to the assembly search paths.

These two options are conceptually similar to `mcs -L` and `mcs -r`.

Finally, while adding support for these options, add support for
`mono-api-info --help`, so that we don't need to use only the man page
to get option information.
2015-12-16 13:02:19 -05:00
Alexander Köplinger cd62639d9c Merge pull request #2324 from akoeplinger/caching-locking
[System.Runtime.Caching] Add missing locking when accessing cache entries
2015-12-16 18:05:45 +01:00
Rodrigo Kumpera 8e8abf2a8f Merge pull request #2356 from ludovic-henry/fix-thread-suspend-deadlock
[threads] Fix potential deadlock on suspend
2015-12-16 10:57:17 -05:00
Ludovic Henry 0e1e2e0ff1 [threads] Fix potential deadlock on suspend
Because mono_thread_info_safe_suspend_and_run is locking the suspend lock, we cannot enter the blocking state in any of its callee, as that could lead to a deadlock.
2015-12-16 14:00:15 +00:00
monojenkins ac432e4ba2 Merge pull request #2353 from ludovic-henry/fix-servicemodel-15153
Add test and merge #1879

@monojenkins merge
2015-12-16 13:55:04 +00:00
monojenkins 4313344919 Merge pull request #2351 from ludovic-henry/fix-socket-36941
[socket] Add test for SocketOptionName.MulticastTimeToLive
2015-12-16 11:35:02 +00:00
Marek Safar 9dc34141e1 Merge pull request #2345 from akoeplinger/xbuild14
Bump xbuild script to 14.0 and a few other fixes
2015-12-16 12:13:07 +01:00
Mark Mikofski d6ff307ec6 Add test for bug #15153 2015-12-16 10:40:24 +00:00
Ludovic Henry b78f3f6f07 [socket] Add test for SocketOptionName.MulticastTimeToLive 2015-12-16 10:11:42 +00:00
Andi McClure d75e8ea37e Merge pull request #2354 from xmcclure/ugh-no-gdi
Fix Microsoft.Build.Tasks make check on OS X
2015-12-15 22:38:31 -05:00
Andi McClure 2cb0c1ed7b Fix Microsoft.Build.Tasks make check on OS X
The mcs/class/Microsoft.Build.Tasks make check contains a test whose
goal is to verify that Microsoft.Build.Evaluation.Project can run a
MSBuild code fragment which has an assembly reference. The assembly
referenced in the test is System.Drawing. However on many systems
System.Drawing does not work without special setup. The test should
reference a different assembly (I picked System.Runtime.Serialization)
because ensuring System.Drawing is working isn't relevant to the test.
2015-12-15 17:23:31 -05:00
Andi McClure 45f2f4854a Merge pull request #2346 from xmcclure/proxy-load-fail
Let GetTransparentProxy fail clean on load error (bug 36848)
2015-12-15 16:39:09 -05:00
Alexander Köplinger f378e76b0d [signcode] Change default hashing algorithm from MD5 to SHA1
MD5 is considered insecure and switching the default to SHA1 should be better for everyone.

See the discussion on the mailing list: http://lists.ximian.com/pipermail/mono-devel-list/2015-December/043424.html
2015-12-15 20:57:57 +01:00
Alexander Köplinger fb76fe4ed4 [scripts] Bump xbuild script to 14.0
This means we'll use xbuild 14.0 by default, which allows users to build projects with ToolsVersion=14.0
2015-12-15 20:37:46 +01:00
Alexander Köplinger 51b91335be [xbuild] Add new TargetFrameworkVersion entries in Microsoft.Common.targets
Add the new 4.5.2, 4.6 and 4.6.1 versions to Microsoft.Common.targets so xbuild doesn't print "warning : TargetFrameworkVersion 'v4.6.1' not supported by this toolset".

Additionally I found a bug in the target where "and" was used instead of "or" which means the condition was never true, fixed as well.
2015-12-15 20:37:46 +01:00
Andi McClure dde9ee9e2f Let GetTransparentProxy fail clean on load error (bug 36848)
icall for Remoting.RealProxy.GetTransparentProxy can sometimes attempt
to load an invalid class which is not previously loaded. Currently,
this leads to an assert failure in mono_class_proxy_vtable which does
not expect to be getting an invalid proxy class as input. Fix is for
the icall to load the class early and raise on failure.

A test is included.
2015-12-15 13:47:56 -05:00
monojenkins 564fe71fa8 Merge pull request #2338 from BogdanovKirill/httpwritefix3
[HttpConnection] Bug fix: HttpListener's "IgnoreWriteExceptions" property value is ignored when "Expect: 100-Continue" header set in request

That problem was discussed previously here: https://github.com/mono/mono/pull/2300
I want to offer alternative solution now.
2015-12-15 17:43:22 +00:00
monojenkins 42c503ad55 Merge pull request #2344 from ludovic-henry/fix-servicemodel-flakiness
[tests] Fix more System.ServiceModel flakiness

@monojenkins: automerge
2015-12-15 16:00:03 +00:00
Ludovic Henry bc46b50bec [tests] Fix more System.ServiceModel flakiness 2015-12-15 14:27:22 +00:00
monojenkins 03fea967b0 Merge pull request #2343 from ludovic-henry/threads-cleanup
[automerge][threads] Various cleanups

None
2015-12-15 13:29:58 +00:00
Ludovic Henry 1341462d18 [threads] Add mono_thread_info_usleep function 2015-12-15 11:59:27 +00:00
Ludovic Henry 0535ccce42 [threads] Bring mono_thread_info_safe_suspend_and_run code together 2015-12-15 11:58:21 +00:00
Ludovic Henry f7ad314256 [threads] Remove dead code 2015-12-15 11:45:33 +00:00
monojenkins bf92280e7b Merge pull request #2340 from ludovic-henry/fix-servicemodel-flakiness
Merge pull request #2340 from ludovic-henry/fix-servicemodel-flakiness

[tests] Attempt at fixing System.ServiceModel.Dispatcher.Bug32886.Bug32886_Test flakiness
2015-12-15 02:35:02 +00:00
Bernhard Urban c010d577b6 [mkbundle] restore old behavior of -c flag 2015-12-14 17:16:48 -08:00
Ludovic Henry 6776742fde [tests] Attempt at fixing System.ServiceModel.Dispatcher.Bug32886.Bug32886_Test flakiness 2015-12-14 23:59:42 +00:00
Alexis Christoforides f81f8763c1 Merge pull request #2306 from migueldeicaza/master
[mono/driver] On OSX, increase the number of file handles available.
2015-12-14 15:05:28 -05:00
monojenkins aadfc9966e Merge pull request #2341 from ludovic-henry/fix-threadpool-max-worker
Merge pull request #2341 from ludovic-henry/fix-threadpool-max-worker

[automerge][threadpool] Fix various threadpool issues

Tests results:
 - ARM soft float Linux: pending
 - i386 Windows: pending
 - i386 Linux: success
 - ARM hard float Linux: pending
 - AMD64 Linux: success
 - i386 OSX (Proprietary): failure
2015-12-14 19:04:11 +00:00
Ludovic Henry e769c3d881 [threadpool] Saner default for max number of worker threads on android and ios 2015-12-14 17:09:09 +00:00
Ludovic Henry a06e616587 [threadpool] Limit number of threads created per second 2015-12-14 17:09:09 +00:00
Ludovic Henry 3513df7305 [threadpool] Fix overflow of max number of worker threads
In case all threads would wait on a Sleep or a Wait, the monitor thread would simply increase the number of max working thread, up to the point it would overflow the number of max worker threads.
2015-12-14 17:09:08 +00:00
Marek Safar 9900f812e2 Merge pull request #2218 from mono/assignProjectConfigurtionFix
AssignProjectConfigurtion task fix
2015-12-14 15:37:18 +01:00
Marek Safar fca35d0455 Bump reference souces to include fix for #36786 2015-12-14 13:29:53 +01:00
Marek Safar 0944794945 [mcs] test update to work on 64bit mono 2015-12-14 11:58:11 +01:00
Marek Safar 988706c4d0 Merge pull request #2334 from iainx/handle-comma
[mcs] Handle commas inside quotes correctly
2015-12-14 09:50:30 +01:00
iain holmes 42c0a94445 [mcs] Handle commas inside quotes correctly
OpenLiveWriter's build files break due to incorrectly parsing (".",",") as three arguments: a . and two " instead of two: a . and a ,

This is the error:

OpenLiveWriter/writer.build.targets: error : Error executing task WriteLinesToFile: Error converting Property named 'Lines' with value '#define FILE_VERSION $(BuildVersion.Replace(".",","));#define PRODUCT_VERSION $(BuildVersion)' to type Microsoft.Build.Framework.ITaskItem[]: Method 'Replace(., , )' arguments cannot be evaluated'

This patch ignores , as a separator character if it is inside ""
2015-12-13 19:12:57 +00:00
Frederik Carlier 1088aae436 Include EventSource-related classes 2015-12-13 14:55:17 +00:00
Frederik Carlier 4ed3927036 System.Diagnostics.Tracing: Add missing classes 2015-12-13 14:53:30 +00:00
bogdanov 10e5aba155 [HttpConnection] Bug fix: HttpListener's "IgnoreWriteExceptions" property value is ignored when "Expect: 100-Continue" header set in request
The problem is connected with "Listener" property of "context" object. It is null in "GetResponseStream" method, when it's called internally from "FinishInitialization" method of "HttpListenerRequest" class. This problem is possible only in situation when we have "Expect: 100-Continue" header from http client.

This change is released under the MIT license.
2015-12-13 18:29:12 +05:00
Marek Safar d93c3106c0 Merge pull request #2335 from iainx/implement-mir
Microsoft.Build.Engine] Implement ConvertToITaskItemArray
2015-12-13 08:19:33 +01:00
Alexander Köplinger ad8ebf5bad [acceptance-tests] Bump coreclr and ms-test-suite repos
Brings in similar fixes to those repos like in e6cf61f920
2015-12-13 02:55:28 +01:00
Alexander Köplinger e6cf61f920 [corlib] Fix String.PadLeft/Right tests and add a new test for large string
We didn't catch the regression that is fixed in a780c52749
because the tests didn't check the actual string or that an OOM is raised.

Add a new test for creating a large string (which works on 64bit Mono) to test a similar
codepath.
2015-12-13 02:51:17 +01:00
Frederik Carlier 83dc431619 EventSource: Add WriteEvent overloads, properties, constructors, to better match what's available in .NET 4.5 2015-12-13 00:52:31 +00:00
Frederik Carlier cf3469db19 System.Diagnostics.Tracing: Use Reference Source files where possible, add EventSourceSettings enum 2015-12-13 00:50:50 +00:00
iain holmes 7ca3836e05 Microsoft.Build.Engine] Implement ConvertToITaskItemArray
Create a TaskItem containing the result of the invocation
2015-12-12 22:18:53 +00:00
Martin Baulig ec9b161ca8 Revert "[System]: Add _HelperAsyncResults.cs from the referencesource."
This reverts commit c6d239fa79.

(cherry picked from commit cfc81a28ab)
2015-12-12 12:39:43 -05:00
Marek Safar 22794cf3c4 [mcs] Improve a780c52749 to not emit extra conversion for constant values 2015-12-12 11:05:57 +01:00
Ludovic Henry 60e1beca4a Merge pull request #2311 from mlancione/master
[System.Windows.Forms] Locking Window Handle List
2015-12-11 19:10:14 +00:00
Rodrigo Kumpera 6f5ff63651 Merge pull request #1916 from ludovic-henry/iolayer-remove-sharedhandle
[io-layer] Remove shared handles cross process support
2015-12-11 12:25:46 -05:00
Ludovic Henry 2ef7d89bd7 [threadpool] Fix GetAvailableThreads test 2015-12-11 17:22:38 +00:00
Marek Safar a780c52749 [mcs] Extend int to native int when doing pointer arithmetic on it. Fixes #36839 2015-12-11 17:55:56 +01:00
mlancione 2c031ad668 Typo error
Fixing a compiler error.
2015-12-11 09:21:16 -05:00
Ludovic Henry 91ddeb4a83 [io-layer] Remove shared handles cross process support 2015-12-11 14:00:39 +00:00
João Matos ce4c1182c0 Merge pull request #2327 from akoeplinger/fix-msvc
[msvc] Fix casts that result in an error when building with VS
2015-12-10 23:04:27 +00:00
Marek Habersack 262b4ef73f Fix endless recursion in XmlCompiledTransform on mobile
One of the XmlCompiledTransform overloads called itself recursively,
leading to either a stack overflow or segfault

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=36436
2015-12-10 22:01:52 +01:00
Alexander Köplinger 52e4236ccd [msvc] Fix casts that result in an error when building with VS
Those showed up after the recent C++ compliance commit.
2015-12-10 21:46:34 +01:00
Martin Baulig c6d239fa79 [System]: Add _HelperAsyncResults.cs from the referencesource.
(cherry picked from commit 17e92c8775)
2015-12-10 15:29:14 -05:00
Rodrigo Kumpera a9f65e0f28 [jit] Better error message for a gsharing assert. 2015-12-10 14:37:21 -05:00
Rodrigo Kumpera bebc7ee13f [configure] Bump mono version.D 2015-12-10 14:14:07 -05:00
João Matos a7317980f5 Fixed Windows MinGW build and avoid leakage of io-layer types. 2015-12-10 18:15:09 +00:00
Martin Baulig b1a575a3b5 [corlib]: Cleanup X509Certificate and move the implementation-specific bits into a separate class.
(cherry picked from commit b82b0b8402)
2015-12-10 13:03:47 -05:00
Ludovic Henry 2a7060c124 [threadpool] Fix System.Web tests failures 2015-12-10 16:54:22 +00:00
Aleksey Kliger (λgeek) ca39924db5 Merge pull request #2310 from lambdageek/dev/bug-36305
[reflection] Fix MethodInfo.GetBaseDefinition for open constructed types (close #36305)
2015-12-10 11:13:43 -05:00
mlancione b2a7312983 More code-style changes
Fixed a few other code style requirements.
2015-12-10 09:22:58 -05:00
Alexander Köplinger 7a79d9d7e6 [System.Runtime.Caching] Add missing locking when accessing cache entries
The "entries" collection in CacheEntryCollection can be modified while we're enumerating it,
which is not allowed. Add locking in FlushItems() to prevent this.
2015-12-10 14:56:05 +01:00
mlancione 9146d3e90f Code-style changes
Chaged code to match mono coding style.
2015-12-10 08:54:22 -05:00
Ludovic Henry d7cb86ab64 Merge pull request #2305 from ludovic-henry/fix-threadpool-36414
[threadpool] Fix get min and available threads icalls
2015-12-10 11:18:10 +00:00
Martin Baulig 4f9c74a2c4 Merge pull request #2296 from xmcclure/webrequest-regex
Correctly escape proxy domains in WebRequest (bug #36356)
2015-12-09 22:17:21 -05:00
Alexander Köplinger 0a7461e32c Merge pull request #2312 from ArsenShnurkov/bug36724
fix for https://bugzilla.xamarin.com/show_bug.cgi?id=36724
2015-12-10 01:12:19 +01:00
Zoltan Varga 0883d8d549 Fix the x86/ppc build. 2015-12-09 18:57:22 -05:00
Martin Baulig 5da163f6f4 [corlib]: X509Certificate needs to implement IDisposable. 2015-12-09 18:48:10 -05:00
João Matos 487cc2845f Merge pull request #2288 from evincarofautumn/c++-compat
[runtime] Compile cleanly with -Wc++-compat.
2015-12-09 23:29:25 +00:00
Jon Purdy ef48103513 [runtime] Compile cleanly with -Wc++-compat.
* Add explicit casts for void pointers and enums.

 * Rename 'class' to 'klass' and 'this' to 'this_obj'.

 * Avoid other C++ keywords by appending an underscore.

 * Change MonoSeqPointInfo to avoid empty struct size warnings.
2015-12-09 14:05:58 -08:00
Zoltan Varga 4705ea65d5 [sdb] Align the location of the MonoContext structure on the stack in the sdb trampolines on x86, to prevent a possible crash with memcpy. 2015-12-09 16:36:54 -05:00
Ludovic Henry 780fbf4a57 [threadpool] Fix get min and available threads icalls
Fix bug #36414
2015-12-09 19:38:05 +00:00
Aleksey Kliger ced936f46b [reflection] Fix MethodInfo.GetBaseDefinition() for open constructed base types.
When a generic derived class has an open constructed base type, we have
to apply the type arguments in order to find the correct base definition MethodInfo.
2015-12-09 14:36:19 -05:00
Alexis Christoforides 85c7bd08ef Merge pull request #2285 from knocte/filesystemwatcher
[FileSystemWatcher] Kill race condition (fixes BXC#10205)
2015-12-09 14:11:41 -05:00
mlancione 1ccc3e5e03 Fixing Tab Spaces
Replaced spaces in previous commit with tabs, to follow format of
mono/master.
2015-12-09 14:09:05 -05:00
Alexis Christoforides 22cc803651 [mkbundle] Fix execution on OS X and Linux 2015-12-09 13:51:32 -05:00
ArsenShnurkov f0c0c2b246 fix for https://bugzilla.xamarin.com/show_bug.cgi?id=36724 2015-12-09 20:58:00 +03:00
Aleksey Kliger e5644cf2dc [reflection] Test case for 36305.
When the base type of a generic type is an open constructed generic
type, GetBaseDefinition() must take the instantiation into account while
traversing the class hierarchy.
2015-12-09 10:39:28 -05:00
Miguel de Icaza 5dcc44a7ed [mono/driver] On OSX, increase the number of file handles available.
We just reverted a patch that prevented the FileSystemWatcher from
opening too many file descriptors (200).  That was a band-aid at one
of the spots that opened too many file, as we would exhaust the number
of files, and later abort when some other operation needed files.

The problem is that OSX defaults to 256 file descriptors, and .NET
applications are file descriptor hungry, in fact, many applications
increase their file handled limit before starting.

This patch on OSX will attempt to increase the number of handles
available to 1024 if the number of handles avaialble is less than
that.

The commit that removed the limit was:

2af882232c

And it was closed to fix:

#28693
2015-12-08 21:10:13 -05:00
Alexander Köplinger 0434dc0235 Merge pull request #2297 from akoeplinger/msvc-autoupdate-config.h
[msvc] Automatically update (win-)config.h with the correct version number
2015-12-08 23:54:10 +01:00
Zoltan Varga 01aab6b158 Disable partial sharing again, it causes problems on ppc/s390x, and crashes in the roslyn benchmark:
https://performancebot.mono-project.com/builders/debian-armhf_utilite-desktop_auto-sgen/builds/743/steps/roslyn/logs/stdio
2015-12-08 17:21:57 -05:00
Zoltan Varga 4d7c4f1a2b [llvm] Use a separate calling convention for gsharedvt methods in llvmonly mode, pass/return everything by ref. Not yet used. 2015-12-08 17:12:28 -05:00
Rodrigo Kumpera 50ed95a0c7 Merge pull request #2295 from lambdageek/dev/test-conc-hashtable-coop-fix
(test-conc-hashtable.c) Make test work with cooperative suspend
2015-12-08 16:29:33 -05:00
Ludovic Henry 1d00109cd3 Merge pull request #2302 from ludovic-henry/fix-delegate-36640
[delegate] Fix multicast Method property implementation
2015-12-08 20:33:53 +00:00
Bernhard Urban 0417db05ea [runtime] remove debug statements introduced by a0e1dae32c 2015-12-08 11:38:21 -08:00
João Matos 59866a89e7 Merge pull request #2304 from BillSeurer/master
[ppc] Temporary fix for power to get builds working.
2015-12-08 19:31:37 +00:00
Ludovic Henry 5b9b780ba7 Merge pull request #2301 from ludovic-henry/fix-delegate-36646
[delegate] Fix multicast remove behaviour
2015-12-08 18:54:41 +00:00
Bill Seurer 35b511524a [ppc] Temporary fix for power to get builds working. 2015-12-08 12:52:01 -06:00
Zoltan Varga d91246028c [runtime] Initialize a dynamic_images_mutex. 2015-12-08 12:19:11 -05:00
Ludovic Henry 20df1ab1ff [delegate] Fix multicast remove behaviour
The .NET delegate removal semantic is a bit unpredictable. For example, the following (d1 + d2 + d3) - (d1 + d3) is going to return the d123 delegate, and not the d2 delegate as we could have guessed. This is because removal will remove the `list' of delegates as a whole, and not the elements in the list.

The previous implementation would then have a different behavior than the one observed on .NET.

Fixes bug #36646
2015-12-08 16:43:26 +00:00
Ludovic Henry 174c4317b1 [delegate] Fix multicast Method property implementation
.NET returns the method for the last delegate of the multicast delegate.
2015-12-08 16:38:32 +00:00
Zoltan Varga f59f83e577 Merge pull request #2299 from lewurm/finalizer_thread
[runtime] adding additional assert to highlight source of a race
2015-12-08 11:37:49 -05:00
Zoltan Varga 93f14d9b0e Merge pull request #2298 from akoeplinger/gsnprintf
[metadata] Use g_snprintf instead of snprintf to fix MSVC build
2015-12-08 00:58:56 -05:00
Bernhard Urban a0e1dae32c [runtime] adding additional assert to highlight source of a race
We've seen that error for quite some time:

> `* Assertion at ../../mono/utils/mono-os-mutex.h:71, condition `res != EINVAL' not met`

It looks like there's a race between `finalizer_thread()` and `mono_gc_cleanup()` around
`reference_queue_mutex`. The source of the problem is, `finalizer_thread` could end up
being alive, although `mono_gc_cleanup()` made some effort to kill it and then destroys
`reference_queue_mutex`, while the finalizer thread is still using it in
`reference_queue_proccess_all()`.

> $ MONO_GC_DEBUG=bridge=Bridge MONO_GC_PARAMS=minor=split MONO_ENV_OPTIONS=--gc=sgen MONO_PATH=/home/lewurm/monoperf/mono/mcs/class/lib/net_4_x ../../mono/mini/mono sgen-bridge-major-fragmentation.exe --optimize=all --debug
> [...]
> [12/08/2015 01:49:31] done
> Shutting down finalizer thread timed out.
> * Assertion at gc.c:867, condition `finalizer_thread_exited' not met
>
> Stacktrace:
>
>
> Native stacktrace:
>
>
> Debug info from gdb:
>
> [New LWP 7623]
> [New LWP 7622]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
> 0x4043b5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
>   Id   Target Id         Frame
>   3    Thread 0x417ff430 (LWP 7622) "mono" 0x4043b5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
>   2    Thread 0x42573430 (LWP 7623) "Finalizer" 0x0021482a in finalizers_with_predicate (predicate=0x1fd121 <object_in_domain_predicate>, user_data=0x37a348, out_array=0x42572c70, out_size=64, hash_table=0x338f68 <major_finalizable_hash>) at sgen-fin-weak-hash.c:581
> * 1    Thread 0x406c4250 (LWP 7620) "mono" 0x4043b5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
>
> Thread 3 (Thread 0x417ff430 (LWP 7622)):
> #0  0x4043b5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x404371d8 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #2  0x00242266 in mono_os_cond_wait (cond=0x346e98 <work_cond>, mutex=0x346e80 <lock>) at ../../mono/utils/mono-os-mutex.h:105
> #3  0x00242c1a in thread_func (thread_data=0x0) at sgen-thread-pool.c:118
> #4  0x40433fbc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #5  0x405a0b3c in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> Thread 2 (Thread 0x42573430 (LWP 7623)):
> #0  0x0021482a in finalizers_with_predicate (predicate=0x1fd121 <object_in_domain_predicate>, user_data=0x37a348, out_array=0x42572c70, out_size=64, hash_table=0x338f68 <major_finalizable_hash>) at sgen-fin-weak-hash.c:581
> #1  0x00214894 in sgen_gather_finalizers_if (predicate=0x1fd121 <object_in_domain_predicate>, user_data=0x37a348, out_array=0x42572c70, out_size=64) at sgen-fin-weak-hash.c:622
> #2  0x001fd16a in mono_gc_finalizers_for_domain (domain=0x37a348, out_array=0x42572c70, out_size=64) at sgen-mono.c:546
> #3  0x001ca2a4 in finalize_domain_objects (req=0x47ba68) at gc.c:678
> #4  0x001ca3b6 in finalizer_thread (unused=0x0) at gc.c:730
> #5  0x001a1392 in start_wrapper_internal (data=0x3b1100) at threads.c:713
> #6  0x001a1430 in start_wrapper (data=0x3b1100) at threads.c:760
> #7  0x0027097a in inner_start_thread (arg=0xbed58de0) at mono-threads-posix.c:92
> #8  0x40433fbc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #9  0x405a0b3c in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> Thread 1 (Thread 0x406c4250 (LWP 7620)):
> #0  0x4043b5f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #1  0x4043a396 in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
> #2  0x000d1b24 in mono_handle_native_sigsegv (signal=6, ctx=0xbed58a80, info=0xbed58a00) at mini-exceptions.c:2235
> #3  0x00112424 in sigabrt_signal_handler (_dummy=6, _info=0xbed58a00, context=0xbed58a80) at mini-posix.c:218
> #4  <signal handler called>
> #5  0x405248e6 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
> #6  0x405330fe in raise () from /lib/arm-linux-gnueabihf/libc.so.6
> #7  0x40535956 in abort () from /lib/arm-linux-gnueabihf/libc.so.6
> #8  0x00277eaa in monoeg_log_default_handler (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, message=0x47bb28 "* Assertion at gc.c:867, condition `finalizer_thread_exited' not met\n", unused_data=0x0) at goutput.c:233
> #9  0x00277dca in monoeg_g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x3089b8 "* Assertion at %s:%d, condition `%s' not met\n", args=...) at goutput.c:113
> #10 0x00277e32 in monoeg_assertion_message (format=0x3089b8 "* Assertion at %s:%d, condition `%s' not met\n") at goutput.c:133
> #11 0x001ca786 in mono_gc_cleanup () at gc.c:867
> #12 0x001c1d24 in mono_runtime_cleanup (domain=0x37a348) at appdomain.c:356
> #13 0x0001dec0 in mini_cleanup (domain=0x37a348) at mini-runtime.c:3560
> #14 0x000a672c in mono_main (argc=5, argv=0x358098) at driver.c:2065
> #15 0x00017c4e in mono_main_with_options (argc=5, argv=0x358098) at main.c:20
> #16 0x00017c7e in main (argc=4, argv=0xbed591b4) at main.c:53

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
2015-12-08 02:04:25 +00:00
João Matos 68fb0f566d Update Makefile.am with monobt script 2015-12-08 00:29:20 +00:00
Alexander Köplinger 47737e5599 [metadata] Use g_snprintf instead of snprintf to fix MSVC build
The latter only works with Visual Studio 2015 and later. We're still using VS2013 on Jenkins
2015-12-08 01:17:24 +01:00
Andi McClure ab991d242d Document HTTP_PROXY and NO_PROXY environment variables. 2015-12-07 17:20:39 -05:00
Vlad Brezae 44f4429237 Merge pull request #2246 from BrzVlad/feature-concurrent-evacuation
Feature evacuation with concurrent sgen
2015-12-07 17:09:17 -05:00
Vlad Brezae e314e59991 [sgen] Fix binary protocol scan process reference entries
The obj pointer can actually point inside the object for big arrays
2015-12-07 23:43:00 +02:00
Vlad Brezae 52857f832e [sgen] Binary protocol entry for mod union cardtable markings 2015-12-07 23:42:58 +02:00
Vlad Brezae e3e44c0a13 [sgen] Fix mod union cardtable marking race
When the nursery collector is starting and we have a concurrent collection in progress we need to save the global card table entries to the mod union card tables. When doing so we were marking all the mod union cards with either 0 or 1, so we could lose a mark if the concurrent collector tries to mark the same card at the same time, since the concurrent collector now runs concurrent even with nursery collections. We fix this by never marking with 0.
2015-12-07 23:39:53 +02:00
Vlad Brezae e2a6512834 [sgen] Remove pointless prototype 2015-12-07 23:39:53 +02:00
Vlad Brezae 28839a2c7c [sgen] Remove allow synchronous flag for concurrent collection
When concurrent, we always handle evacuating blocks, without the need of a synchronous major collection.
2015-12-07 23:39:50 +02:00
Vlad Brezae dfd1980f1b [sgen] Evacuation for the concurrent collector
The concurrent mark no longer follows references into blocks that are evacuated. The cardtable is marked instead and all the objects will be moved during the finishing pause.
2015-12-07 23:33:45 +02:00
Alexander Köplinger 361691c2a6 [msvc] Automatically update (win-)config.h with the correct version number
A small powershell command grabs the version number from configure.ac and uses it during winsetup.bat,
this way we don't have to manually keep them in sync.
2015-12-07 22:19:19 +01:00
Alexander Köplinger 53ad517b70 [msvc] Add 'include' directory to .gitignore
Copying of header files to this directory was introduced in 8c455550ab,
but we don't want to actually check it in.
2015-12-07 22:17:50 +01:00
Zoltan Varga 54a020da2d [aot] Fix the encoding/decoding of generic parameters after 835cc6eda9. 2015-12-07 16:15:24 -05:00
Andi McClure 6ae64e4022 Correctly escape proxy domains in WebRequest (bug #36356)
Our implementation for System.Net.WebRequest takes proxy exclusions
which are in fileglob (*.example.com) format, and passes them to
System.Net.WebProxy as a "bypass list", which expects Regex format.
This means immediate failure if you have an exclusion with a fileglob,
because WebProxy will throw an exception for bad Regex format.
2015-12-07 16:01:51 -05:00
Vlad Brezae 82ac52c75b [arm] Re-enable fast tls on all targets 2015-12-07 15:26:09 -05:00
Vlad Brezae 522b692bb1 [arm] Respect the ios abi on tls thunks 2015-12-07 15:26:06 -05:00
Marek Safar 669b6059fc [System] Fixes mobile build 2015-12-07 20:09:27 +01:00
Aleksey Kliger 5e3db4ff8d (test-conc-hashtable.c) Make test work with cooperative suspend.
By initializing `mono_therads_runtime_init()`
2015-12-07 13:39:20 -05:00
Joao Matos 4497e9265b Added the monobt LLDB plugin to the repository. 2015-12-07 18:20:43 +00:00
Alexander Köplinger 75c7aac448 Merge pull request #2294 from akoeplinger/fix-cygwin
[utils] Fix cygwin build
2015-12-07 19:11:57 +01:00
Zoltan Varga 835cc6eda9 Merge pull request #2237 from xmcclure/container-owner
Unambiguous ownership of generic param objects
2015-12-07 13:04:20 -05:00
Aleksey Kliger (λgeek) 1076f87892 Merge pull request #2247 from ivmai/match-ext-libgc-api
Match ext libgc api
2015-12-07 12:23:09 -05:00
Marek Safar d2325f1483 [System] Fixes leak in NtlmClient which never released cached WebRequest. Fixes #36596 2015-12-07 17:59:46 +01:00
Vlad Brezae 3943651f47 [arm] Fallback to aeabi_read_tp on linux fast tls
The previous implementation on linux arm used aeabi_read_tp to fetch the thread pointer. Use it to preserve compatibility.
2015-12-07 11:37:40 -05:00
Alexander Köplinger d0313abe8a [utils] Fix cygwin build
mono_os_sem_wait() used mono_os_sem_timedwait() before it was defined in mono-os-semaphore.h.
Moved the function to fix the cygwin build.

Also added a missing return statement in mono-os-mutex.h that was causing a lot of warnings.
2015-12-07 17:27:41 +01:00
Marek Safar f1c147af8f [mcs] Process flow analysis for interpolated string inserts. Fixes #36589 2015-12-07 15:17:26 +01:00
Marek Safar 8acf24a38c Bump reference sources 2015-12-07 09:21:41 +01:00
Rodrigo Kumpera 8088633392 Revert "Merge pull request #2237 from xmcclure/container-owner"
This reverts commit 761a84f867, reversing
changes made to d565a22e16.

Corlib compilation was broken with the PR in so I'm reverting it until it can be worked out.
2015-12-06 22:32:24 -05:00
Rodrigo Kumpera 2e34bdb4cb Revert "[reflection] Fix the build from the last commit."
This reverts commit f11e09ab4b.
2015-12-06 22:29:46 -05:00
Rodrigo Kumpera f11e09ab4b [reflection] Fix the build from the last commit. 2015-12-06 22:19:04 -05:00
Rodrigo Kumpera 761a84f867 Merge pull request #2237 from xmcclure/container-owner
Unambiguous ownership of generic param objects
2015-12-06 20:43:37 -05:00
Zoltan Varga d565a22e16 Merge pull request #2291 from akoeplinger/msvc-fixes
[msvc] Fix Windows build breaks caused by a595d489fa
2015-12-06 20:41:32 -05:00
Alexander Köplinger a51f7d90e5 [msvc] Fix Windows build breaks caused by a595d489fa
The .vcproj's and .def's weren't updated and there was a typo in mono-os-mutex.h that caused a build break.
2015-12-07 02:37:32 +01:00
Zoltan Varga 62c31ed116 Merge pull request #2290 from akoeplinger/msvc-mono-architecture
[msvc] Fix a few missing renames from ARCHITECTURE -> MONO_ARCHITECTURE
2015-12-06 20:11:03 -05:00
Alexander Köplinger 591174f1ae [msvc] Fix a few missing renames from ARCHITECTURE -> MONO_ARCHITECTURE
They were missed in 43403b8221.
2015-12-07 01:08:06 +01:00
Rodrigo Kumpera 574d397fdc Merge pull request #2276 from lambdageek/dev/bug-36283
[reflection] Fix Type.GetProperties() for generic class instances
2015-12-06 01:59:50 -05:00
Miguel de Icaza 2af882232c [System] Remove arbitrary debugging limit from FileSystemWatcher on OSX, fixes #28693 2015-12-05 15:09:06 -05:00
Sebastien Pouliot 4a6dec855f [corlib][tests] Disable tests that requires Windows (dllimport) on mobile profile
This enables building the tests w/bitcode enabled on AppleTV (and they
were already excluded from the results anyway).

Part of the fix for
https://bugzilla.xamarin.com/show_bug.cgi?id=36569
2015-12-05 11:19:36 -05:00
Rodrigo Kumpera 0c1916e584 Merge pull request #2289 from lewurm/arm-sgen-bridge
[tests] add timestamps to logging in bridge tests
2015-12-04 22:51:24 -05:00
Bernhard Urban aa8f4ab865 [tests] add timestamps to logging in bridge tests 2015-12-05 00:09:40 +00:00
Miguel de Icaza cace785a75 Merge pull request #2286 from migueldeicaza/master
[System.Runtime.Serialization] 36100 fix; Static serializer calls directly into internal APIs to fix C6 regression
2015-12-04 19:06:46 -05:00
Zoltan Varga e79740c92a [llvm] Add beginnings of support for gsharedvt. 2015-12-04 18:33:16 -05:00
Zoltan Varga 9ffb26eed7 [jit] Increase the buffer size used by the dyncall data structures to 512, add a test for #36566. 2015-12-04 17:44:56 -05:00
Marek Safar c7a05eb7f3 Bump reference source to .net 4.6.1 2015-12-04 17:26:49 -05:00
Marek Safar 81442f79f4 [System] interopservices from reference source 2015-12-04 17:26:49 -05:00
Marek Safar 4fea5b80b7 [System] System.Net.Cache from reference source 2015-12-04 17:26:49 -05:00
Vlad Brezae 45b649f1aa [arm] Debug print implementation if we don't recognize tls
Allows adding new implementations without the need of a testing device.
2015-12-04 16:20:39 -05:00
Vlad Brezae e2d3e1a2a5 [arm] Fast tls implementation for android marshmallow 2015-12-04 16:20:38 -05:00
Vlad Brezae 62682da5e1 [arm] Rework tls detection on android in order to be more strict
Unify the tls implementation across platform using a TlsImplementation structure which maps a potential pthread_getspecific implementation to the corresponding fastpaths. Some implementations might require an additional check of the kuser_get_tls kernel helper.
2015-12-04 16:20:37 -05:00
Vlad Brezae d42e7490e3 [arm] Fallback to pthread on android if we don't recognize the tls implementation 2015-12-04 16:20:35 -05:00
Alexander Köplinger 21e8b26731 [System.Runtime.Remoting] Disable a test that hangs on Linux for now
I talked with Ludovic about this and we're going to disable the test until we figure out what happens.
2015-12-04 15:43:21 -05:00
Zoltan Varga 6ca09a2af0 Merge pull request #2287 from lewurm/armseqpoints
[arm] add support for single-imm-size debug option
2015-12-04 15:22:15 -05:00
Bernhard Urban 6f393598ee [arm] add support for single-imm-size debug option 2015-12-04 14:24:06 -05:00
Miguel de Icaza ae8d66d6a9 [System.Runtime.Serialization] Static serializer calls directly into internal APIs to fix C6 regression
With C6 we introduced a regression
https://bugzilla.xamarin.com/show_bug.cgi?id=36100, which is caused by
the new static serialization code that we wrote to reuse Microsoft's
serializer.

The code uses Invoke on a series of MethodInfos, and this obscures the
actual code that will be invoked at runtime to serialize certain
objects, causing the following exception:

Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_bool_Nullable`1<Decimal> (object,intptr,intptr,intptr)' while running with --aot-only.

This patch makes the simple code work, but a more thorough review of
the code would allow us to remove many of the slow dynamic codepaths
in the serializer.

We opted for that approach to keep the code as similar as possible to the
original.

But the code basically does this:

* Use the XmlFormatGeneratorStatics property InternalSerializeMethod,
  whose sole purpose is to delay computing the MethodInfo for the
  XmlFormatWriterGenerator's InternalSerialize.

* Use the resulting method in a few places to call the MethodInfo.

The MethodInfo was used because the original code uses Reflection.Emit
to create fast serializers and it needs handles to internal methods,
but our static rewriter does not need it.

We should replace all of those uses, but for now, this patch at least
deals with the 36100 bug.
2015-12-04 13:54:48 -05:00
Zoltan Varga 8bc9896c55 [jit] Use mini_get_underlying_type () in the tracing code to handle more types. 2015-12-04 13:07:29 -05:00
Alexander Köplinger 38aa91b1af [test] Bump test timeout again
Discussed this with @lambdageek, we still see some of the tests timeout on Jenkins on the slow armhf/armel workers.
Let's see if bumping the timeouts helps.
2015-12-03 18:16:13 -05:00
Joao Matos 93307fc291 [System] Fixed mobile build regression after 43b65b6775. 2015-12-03 14:46:39 -05:00
Zoltan Varga a0e881630c [jit] Enable partial sharing by default. 2015-12-03 13:52:02 -05:00
Zoltan Varga 0264a6c566 [jit] Fix a verification error when using partial sharing. 2015-12-03 13:51:42 -05:00
Miguel de Icaza f5849edcda Update code_of_conduct.md 2015-12-03 12:51:07 -05:00
Miguel de Icaza 50acb4dd75 Add code of conduct 2015-12-03 12:48:33 -05:00
Zoltan Varga 16cd8a3832 Revert "[jit] Enable partial sharing for the JIT too."
This reverts commit 8bf2946478.

Revert this as it breaks the test.
2015-12-03 11:30:38 -05:00
Zoltan Varga c91930b08d Revert "[jit] Remove the partial sharing enabling code, its always enabled now."
This reverts commit a8cdc818c8.

Revert this as it breaks tests.
2015-12-03 11:30:15 -05:00
Rodrigo Kumpera c2ac08b8ad Merge pull request #2260 from xmcclure/fix-testwaitany
Cleanup and crash fix around UnixSignal.WaitAny (bug #36214)
2015-12-03 10:36:10 -05:00
Marek Safar 43b65b6775 [System] Uri component values from reference source 2015-12-03 10:33:57 -05:00
Andrés G. Aragoneses cfc5011ced [FileSystemWatcher] Kill race condition (fixes BXC#10205)
As seen in the stacktraces provided in [1],
a thread could modify the Files hashtable
while other thread is enumerating it, so this
can be prevented by using a lock{} in the parts
of the code that access and modify this field.

Patch licensed as MIT/X11.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=10205
2015-12-03 13:35:54 +08:00
Zoltan Varga 99e6331453 Bump referencesource to 0632b0f497253bb43a217247ee99c953b00979fd. 2015-12-02 22:00:45 -05:00
Zoltan Varga 6c105a9610 [aot] Fix the emission of EnumComparer instances, some types use different comparers. 2015-12-02 22:00:30 -05:00
Zoltan Varga 9df6cb7197 [runtime] Mark an AOT tests as GSHAREDVT. 2015-12-02 21:56:14 -05:00
Zoltan Varga 0926c26a03 [ppdb] Fix support for loading debug info for .dll files. 2015-12-02 19:32:10 -05:00
Marek Safar 9ba1f60233 Merge pull request #2284 from akoeplinger/httpclient-fix
[System.Net.Http] Replace google.com with example.org in a test
2015-12-02 19:22:55 -05:00
Alexander Köplinger 744479fb3e [System.Net.Http] Replace google.com with example.org in a test
It sometimes fails on Jenkins and google might be doing unwanted things (like redirecting to https),
so we just use example.org instead which hopefully is more stable in that regard.
2015-12-02 18:20:58 -05:00
Zoltan Varga a8cdc818c8 [jit] Remove the partial sharing enabling code, its always enabled now. 2015-12-02 18:20:00 -05:00
Aleksey Kliger 157c2dec16 reflection: Type.GetProperties() collect more generic properties (Closes #36283)
When collecting candidate properties, look at the generic definition
when throwing away duplicates (hide-by-name-and-signature for properties
should look at generic definition) because inflating method could
conflate distinct signatures to the same one:
  class Foo<T,U> {
    public T this[T t] { get { return t; } }
    public U this[U u] { get { return u; } }
  }

The class Foo<int,int> has 2 indexers, not 1.  They just happen to have
the same signature because T and U both got replaced by int.
2015-12-02 18:14:39 -05:00
Aleksey Kliger 6e676d8a9b Failing test case for 36283 2015-12-02 18:14:38 -05:00
Zoltan Varga 8bf2946478 [jit] Enable partial sharing for the JIT too. 2015-12-02 17:59:45 -05:00
Zoltan Varga 8af156d3bd [runtime] Get rid of the unused MONO_ARCH_HAVE_LLVM_IMT_TRAMPOLINE define. 2015-12-02 17:43:38 -05:00
Zoltan Varga 15b01a0245 [runtime] Get rid of LLVM_IMT_TRAMPOLINE, its no longer used. 2015-12-02 17:41:31 -05:00
Andi McClure 96b523de70 Merge pull request #2279 from xmcclure/mono-posix-version
Fail cleanly when MonoPosixHelper.dll version is wrong (bug #35655)
2015-12-02 17:17:38 -05:00
Miguel de Icaza 4e40137213 Merge pull request #2282 from joelmartinez/docs-multiassembly-fix
[mdoc] Improved error handling for multiassembly.
2015-12-02 17:04:32 -05:00
Marek Safar cc5c9a49ca Merge pull request #2281 from lambdageek/dev/bug-36418
Make Type.GetProperty() work for indexers returning primitive types
2015-12-02 16:47:19 -05:00
Aleksey Kliger 35d4f66d7b Make System.DefaultBinder.CanConvertPrimitive reflexive (Closes #36418) 2015-12-02 16:38:58 -05:00
Aleksey Kliger d3972762a2 Test case for #36418 2015-12-02 16:38:57 -05:00
Joel Martinez 3e6ffdf99f [mdoc] Improved error handling for multiassembly.
While there were tests included for the [multiassembly option](https://github.com/mono/mono/pull/2127), unfortunately
the tests did not consider starting from an existing repository. So this patch
rectifies the issue by improving a small function to consider the possibility
of a null result. Test that reproduced, and subsequently proves the resolution
is included here.
2015-12-02 16:23:14 -05:00
Rodrigo Kumpera a595d489fa Merge pull request #2231 from ludovic-henry/coop-sync-friendliness
[coop] Synchronization primitive friendliness
2015-12-02 15:54:17 -05:00
Andi McClure bca3964c8b Cleanup in signal.c and related tests
Add comments, add assert for edge case around signal registration, and
make consistent *always* using atomic get/set for memory shared
between the signal handler and the threads.
2015-12-02 14:58:55 -05:00
Zoltan Varga a0adf5e4df [jit] Initialize gsharing counters in mono_generic_sharing_init () to prevent initialization races. Fixes #36443. 2015-12-02 13:21:07 -05:00
Alexander Köplinger 2d8abdda49 [System.ServiceModel] Fix Bug32886 test to work on cultures with a different decimal separator 2015-12-02 12:13:46 -05:00
Zoltan Varga 43403b8221 [runtime] Rename the 'ARCHITECTURE' define to 'MONO_ARCHITECTURE' to avoid a symbol clash with an llvm enumeration value. 2015-12-01 23:51:38 -05:00
Zoltan Varga 53c7deb62d [runtime] Add a test for MONO_ENV_OPTIONS. 2015-12-01 23:47:23 -05:00
Alexander Köplinger a7500b8f2d Merge pull request #2278 from akoeplinger/remove-net-45-csproj
[csproj] Remove *net_4_5.csproj files from the class libs
2015-12-01 22:35:16 -05:00
Zoltan Varga 55b1f58716 [jit] Add a testcase for #36280. 2015-12-01 22:15:40 -05:00
Zoltan Varga 906997b481 [jit] Avoid a verification error in gsharedvt code with ldarga + gshared types. Fixes #36292. 2015-12-01 22:12:50 -05:00
Zoltan Varga 9d6a8f62fc [llvm] Zero extend array indexes when targeting llvm, this seems to work around a codegen problem on arm64. Fixes #36263. 2015-12-01 18:51:21 -05:00
Andi McClure 249ee0686b Fail cleanly when MonoPosixHelper.dll version is wrong (bug #35655)
Add version keys to the C and C# versions of Mono.Posix and add static
constructors which fail early if the version keys differ.
2015-12-01 18:03:21 -05:00
João Matos de47498f5a Merge pull request #2223 from lobrien/master
Changed link from GUID to URL
2015-12-01 17:46:44 -05:00
Zoltan Varga 6c5326ab48 [aot] Cache inflated methods loaded from aot images to avoid repeating an expensive search. Fixes #36256. 2015-12-01 16:30:46 -05:00
Alexander Köplinger b4a9c31f19 [csproj] Small fixes to the genproj readme 2015-12-01 22:19:48 +01:00
Alexander Köplinger 173add3aee [csproj] Update order.xml and csproj files 2015-12-01 22:19:36 +01:00
Alexander Köplinger 9d24fb1564 [csproj] Remove *net_4_5.csproj files from the class libs
We only use the net_4_x profile now so those csproj's don't make sense anymore.
2015-12-01 22:19:36 +01:00
Zoltan Varga 720723ea9d Fix a warning. 2015-12-01 16:16:22 -05:00
Zoltan Varga 6fdbc2f308 [aot] Add instances of EnumEqualityCompater<T> for all integer types. Fixes #36370. 2015-12-01 16:05:38 -05:00
Alexander Köplinger 2ad5aaf618 Merge pull request #2277 from lewurm/xmldoc
[docs] fix case in Makefile
2015-12-01 15:56:58 -05:00
Marek Safar 0d019500ce [mcs] Remove parenthesized null operator special case. Fixes #36425 2015-12-01 15:35:23 -05:00
Bernhard Urban 4130fda974 [docs] fix case in Makefile 2015-12-01 15:14:20 -05:00
João Matos 00cb1f9655 Merge pull request #2275 from lewurm/httputilityfix
[System.Net] use WebUtility instead of HttpUtility
2015-12-01 13:35:26 -05:00
Bernhard Urban d5fe53c943 [System.Net] use WebUtility instead of HttpUtility 2015-12-01 13:28:45 -05:00
Zoltan Varga a7a0f54d3a [aot] Add instances of EnumEqualityComparer which is used by EqualityComparer to compare int/uint based enums. Fixes #36370. 2015-12-01 12:41:57 -05:00
Zoltan Varga 3d24eb5a43 [gsharedvt] Fix support for constrained calls on interfaces. Fixes #36383. 2015-12-01 12:12:38 -05:00
Marek Safar 5f2cae6e66 [mcs] Better fix for commit 1bcab9bcd7 2015-12-01 12:11:35 -05:00
Alexander Köplinger dd5fb3546a [System] Add test case for bug #2231
Provided by Tom Hindle in https://bugzilla.xamarin.com/show_bug.cgi?id=2033#c5
2015-12-01 16:43:57 +01:00
Marcos Henrich aeaf37296f [System] Fixes UdpClient.Receive with IPv6 endpoint
Fixes #6057

Partially reverts 838b6c5e41
2015-12-01 10:35:35 -05:00
Marcos Henrich 5ceaed8e43 [System] Tests UdpClient.Receive with IPv6 endpoint
Covers #6057
2015-12-01 10:32:52 -05:00
João Matos cafd968e0c Merge pull request #2256 from joelmartinez/docs-morenetdocs
[docs] Added more libraries to `netdocs`
2015-12-01 10:29:12 -05:00
João Matos 3ec7b46f9f Merge pull request #2258 from protel-opensource/protelmaster
Fix error handling for case of invalid host name
2015-12-01 10:28:40 -05:00
João Matos 40d516ff7b Merge pull request #2269 from dellis1972/xmlpeek
[msbuild] Added XmlPeek
2015-12-01 10:27:11 -05:00
João Matos a26d35379e Merge pull request #2265 from directhex/pthread_tls_on_mips
Force with_tls=pthreads on MIPS, which lacks proper __threads implementation
2015-12-01 10:26:37 -05:00
Marek Safar 09890e2d91 Merge pull request #2272 from alex-skiffin/master
[NetworkInterface] IPv4Mask property implementation for Linux
2015-12-01 08:43:20 -05:00
alex-skiffin 1ebbfe8740 [NetworkInterface] Implement IPv4Mask property on Linux.
This change is released under the MIT license.
2015-12-01 09:37:40 +05:00
Marek Safar 1bcab9bcd7 [mcs] Tidy up better function betterness for methods with default parameters and unused params. Fixes #36384 2015-11-30 17:48:19 -05:00
Sebastien Pouliot f48d6486a1 Bump external/referencesource to get mobile fixes 2015-11-30 16:58:15 -05:00
João Matos f5e7b1dbe7 Merge pull request #2271 from BrzVlad/fix-sizeof-monoarray
[runtime] Fix sizeof MonoArray with non gnu compiler
2015-11-30 14:21:48 -05:00
Zoltan Varga fc7cd69b25 [sdb] Fix ppdb support by adding a variant of mono_debug_symfile_lookup_location () which works with ppdb too. Fixes #36339. 2015-11-30 14:01:02 -05:00
Andi McClure 1251a594c9 Convert MonoGenericContainer/Param accessor macros to inline functions 2015-11-30 13:39:27 -05:00
Zoltan Varga 2a35f71d5e [jit] Disable the gsharedvt version of Array.UnsafeMov. 2015-11-30 12:43:56 -05:00
Zoltan Varga 1c90513ad9 [llvm] Remove unused includes from mini-llvm-cpp.cpp. 2015-11-28 23:03:57 -05:00
Zoltan Varga 5b74196809 [llvm] Move the JIT related code to a separate llvm-jit.cpp file. 2015-11-28 22:40:06 -05:00
Zoltan Varga fcfbfe577b [llvm] Fix the passing of the this argument which got broken by 7336f89c6e. 2015-11-28 22:37:00 -05:00
Zoltan Varga 7e4eb02620 [runtime] Fix support for MONO_ENV_OPTIONS which got broken by 8593c4dddc. 2015-11-28 22:35:45 -05:00
Zoltan Varga 78ae03e7aa [jit] Fix the verbosity of the 'LLVM failed for' messages. 2015-11-28 14:55:33 -05:00
Zoltan Varga 2e7bee9137 [ppdb] Fix reading of locals/scopes for the last method in the scope table. Fixes #36257. 2015-11-28 14:53:04 -05:00
Sebastien Pouliot 333440ddf0 [System.Data] Remove unneeded files that includes win32 specific p/invokes in the mobile profile 2015-11-27 16:25:46 -05:00
Zoltan Varga 8269971fd1 Fix a warning. 2015-11-27 11:08:38 -05:00
Sebastien Pouliot d70efaeedc [System.Xml] Do not build MS RS Win8Helpers.cs file (which includes win32-specific pinvokes) as it is unneeded for building the mobile profile 2015-11-27 08:51:25 -05:00
Marek Safar 7dcdeac71b [mcs] Add new test 2015-11-27 12:15:09 +01:00
Marek Safar 9c1c5c0986 [mcs] Fix codegen for nested binary bitwise operators. 2015-11-27 12:11:54 +01:00
Rolf Bjarne Kvinge a9ca27bcaa [mscorlib][System] Use PlatformNotSupportedException instead of NotSupportedException when it makes sense. 2015-11-27 09:49:23 +01:00
Sebastien Pouliot 1b6f93898e [System][ios] Disable non-working Ping code (and non-existing DllImport)
* capget is not part of libc (libSystem.dylib) on iOS (or OSX); and
* There's no working Process class to invoke `ping` by itself leading to

[FAIL] DllImportTest.LackOfCapget : System.InvalidOperationException : Process has not been started.
 		  at System.Diagnostics.Process.get_HasExited () [0x00039] in /Users/poupou/git/xamarin/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Diagnostics/Process.cs:184

It's technically possible to implement ping on iOS [1] so the code is
not totally removed from the build (API remains identical to existing).

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=964
2015-11-26 14:55:00 -05:00
Marek Safar dea711605e [mcs] Fixes codegen for lifted bitwise operators which are liften only due to null operand 2015-11-26 20:07:03 +01:00
Sebastien Pouliot 1157071aad [Mono.Data.Sqlite] Remove p/invokes to symbols that are not available on iOS version of libsqlite3
/usr/lib/libsqlite3.dylib: 77 symbols
	[NOT FOUND] sqlite3_column_database_name
	[NOT FOUND] sqlite3_column_database_name16
	[NOT FOUND] sqlite3_column_origin_name
	[NOT FOUND] sqlite3_column_origin_name16
	[NOT FOUND] sqlite3_column_table_name
	[NOT FOUND] sqlite3_column_table_name16
	[NOT FOUND] sqlite3_key
	[NOT FOUND] sqlite3_rekey

note: XI has unit tests that will detect if those symbols are added in a
future version of iOS.
2015-11-26 11:45:04 -05:00
Sebastien Pouliot 4be48fef27 [mscorlib] Do not include several win32-p/invoke calls (AccessControl) for the mobile profile 2015-11-26 11:37:03 -05:00
Sebastien Pouliot 5bd701308e [mscorlib] Do not include a win32-p/invoke call (GetFullPathName) for the mobile profile 2015-11-26 11:34:41 -05:00
Vlad Brezae a14a49e8cf [runtime] Fix sizeof MonoArray with non gnu compiler
We would have the problem that array->vector != array + sizeof
(MonoArray), which would waste space and also lead to problems in
accessing the array elements.
2015-11-26 04:19:27 -08:00
Dean Ellis 86522f62f0 [msbuild] Added XmlPeek
XmlPeek was missing from Mono. Adding it based on the
open source msbuild implementation with a few minor
changes because of missing support classes.
2015-11-26 11:29:30 +00:00
Marek Safar f958af36b0 [mcs] Fix null coalescing operator on cast of source expression resolved to implicit user operator conversion. Fixes #36161 2015-11-26 11:38:38 +01:00
Zoltan Varga 8327116c33 Revert "[aot] Cache inflated methods loaded from aot images to avoid repeating an expensive search. Fixes #36256."
This reverts commit d4828b42f0.

Revert this as it causes test failures.
2015-11-25 22:05:02 -05:00
Zoltan Varga f585ab8f46 [jit] Comment out a call to mono_debug_count (), it should only be enabled during debugging. 2015-11-25 22:05:02 -05:00
Martin Baulig c7ee4160d2 [Mono.Security]: Actually rename MonoSslStream.cs into IMonoSslStream.cs.
(cherry picked from commit 6609e27194)
2015-11-25 18:46:50 -05:00
Andi McClure ee43692e03 Minor cleanup inspired by but unrelated to generic param refactor
Comments, variable initialization, formatting. No functional changes.
2015-11-25 17:40:10 -05:00
Andi McClure 4a3498d994 Clarify ownership of generic param objects
This patch fixes rule violations found by the first batch of
mempool-reference audit points. The fix is to remove ambiguities in
what image owns or should own any particular generic parameter object.
Previously, there were four options for specifying a
MonoGenericParam’s image:

 1. klass/method union in MonoGenericContainer.
 2. image field in MonoGenericContainer.
 3. image field in MonoGenericParam.
 4. No field; “image” passed in to methods in at time of usage.

This patch removes 3 and 4; it preserves the image field from (2), but
merges it into the union from (1). It adds a new field,
“is_anonymous”, to indicate when the image member of the union should
be used. The single source of the “owner" union now always points to
the generic param’s image, directly or indirectly.

A further change is made to support this: Previously, containers were
optional, and the presence or absence of container was incidentally
used to determine whether an object was a MonoGenericParam or a
MonoGenericParamFull. Now, containers are mandatory for all
MonoGenericParams, so a new “is_small_size” bit in the container
tracks this information.

This change opens some sources of risk:

 ⁃ Code which creates MonoGenericParams now must make sure to
allocate a container early.
 ⁃ Code that accesses the MonoGenericContainer::owner field
must all be correctly updated to look for is_anonymous or there will
be a crash. (Much of this code would have previously used a NULL
container as the flag for “anonymous”).
 ⁃ Code that casts MonoGenericParams to MonoGenericParamFull
must use the is_small_size field.
 ⁃ Some generic containers will now exist with NULL type_params
and 0 type_argc. Code which reads the type param array must either not
receive objects from these containers, or must handle it.
 ⁃ If code by users of the embedding API exists which somehow
depends on particular behavior related to the now-unused image
argument of mono_class_from_generic_parameter, it will break.

I have audited code around, at least, the first three of these cases
and fixed what problems I found.
2015-11-25 17:38:03 -05:00
Zoltan Varga d4828b42f0 [aot] Cache inflated methods loaded from aot images to avoid repeating an expensive search. Fixes #36256. 2015-11-25 17:33:02 -05:00
Andi McClure 152d6d0561 Add first batch of mempool-reference audit points to class.c 2015-11-25 17:23:15 -05:00
Andi McClure 5a486ac1d7 Improvements to mempool reference auditing feature
- New audit-point macro for atomic writes
- Check imageset list directly (instead of indirectly through image
  list)
- Check dynamic images and have special rules for them (for the time
  being we will allow dynamic images to point to non-dynamic ones
  without auditing, long-term this is a FIXME)
- Print image names out with more detail (image sets get full names)
- Remove some #if CHECKED_BUILDs
- New g_assert_checked asserts for checked builds only
2015-11-25 17:07:59 -05:00
Martin Baulig 2b82ffe426 [Mono.Security]: Rename 'Mono.Security.Interface.MonoSslStream' into 'IMonoSslStream' and make it an interface.
(cherry picked from commit aa2166908a)
2015-11-25 16:34:58 -05:00
Martin Baulig 41545ee28f [Mono.Security]: Add a few more 'Mono.Security.Interface' APIs.
The following general-purpose enums and exception helpers were moved
here from Mono.Security.NewTls.Interface, which is going away.

* Alert, CipherAlgorithmType, CipherSuiteCode, ExchangeAlgorithmType,
  HashAlgorithmType, TlsConnectionInfo, TlsException, TlsProtocolCode,
  TlsProtocols.

* TlsConnectionInfo has been merged into MonoTlsConnectionInfo.

Note that you may not use 'using' statements for both 'Mono.Security.Interface'
and 'System.Security.Authentication' due to conflicting types.  Use a prefix such as
"using MSI = Mono.Security.Interface;" or "using SSA = System.Security.Authentication;"
if you need both namespaces.

(cherry picked from commit af05134433)
2015-11-25 16:34:43 -05:00
Martin Baulig 23f9e7c037 [System]: Make $(the_libdir_base)Mono.Security.dll depend on ../Mono.Security/Makefile.
(cherry picked from commit 77477b0e2b)
2015-11-25 16:31:11 -05:00
Marek Safar 1e1e2592ae [System.Data] Implement CommandBehavior.SequentialAccess support for GetValues method. Fixes #35857 2015-11-25 19:06:13 +01:00
Zoltan Varga e901ed6c27 [aot] Escape some characters in method names to avoid assembler problems with obfuscated assemblies. Fixes #36247. 2015-11-25 12:31:40 -05:00
Jo Shields 2b26da4737 Force with_tls=pthreads on MIPS, which lacks proper __threads implementation 2015-11-25 17:15:58 +00:00
Rolf Bjarne Kvinge 463c9d3392 [System.Data] Try to fix random DataViewTest.DefaultColumnNameAddListChangedTest failure.
It looks like the GC might be involved somehow in these random
failures, so make sure objects aren't freed too early.
2015-11-25 17:59:06 +01:00
Rolf Bjarne Kvinge 3c9209bb42 [System] Fix SmtpClientTest.Deliver_Async to not require main thread processing. 2015-11-25 14:04:34 +01:00
Rolf Bjarne Kvinge 828d7d782b [System] Remove Process.Start and related API from TvOS/WatchOS. 2015-11-25 12:55:58 +01:00
Rolf Bjarne Kvinge 50791d90f4 [corlib] Re-introduce Thread.Abort/Suspend/Resume, but make them throw NotSupportedException instead.
Re-introduce Thread.Abort/Suspend/Resume so that we don't have to
create separate PCL profiles.

Instead make them throw a NotSupportedException, and add an
[Obsolete (error: true)] attribute so that these methods can't
be used from source.
2015-11-25 12:55:13 +01:00
Rolf Bjarne Kvinge bb50c3f3c9 [System] Tweak tests to work with Thread.Interrupt as well. 2015-11-25 12:54:44 +01:00
Rolf Bjarne Kvinge b5d5920a4a [System] Don't throw SocketExceptions when we're stopping. 2015-11-25 12:54:44 +01:00
Zoltan Varga fe199df729 [aot] Handle gsharedvt versions of delegate invoke wrappers correctly, there could be multiple copies of them for the same class. Fixes #36125. 2015-11-24 18:42:57 -05:00
Marek Safar d7f86d6c23 Merge pull request #2263 from akoeplinger/net_4_6.xml
[xbuild] Add net_4.6.xml/net_4.6.1.xml and wire through xbuild
2015-11-24 22:48:09 +01:00
Martin Baulig b48cd9b3c1 [Mono.Security]: Minor 'Mono.Security.Interface' API improvements.
* MonoTlsSettings: Add static 'DefaultSettings' and CopyDefaultSettings().

* MonoTlsProvider: Add 'ID' and 'Name' properties.

(cherry picked from commit 51226c86f9)
2015-11-24 15:15:28 -05:00
Andi McClure d94ba5bb30 Spinlock to prevent SIGPIPE in signal.c (bug #36214)
There is a race condition in signal.c where a signal-waiting thread
can close the pipe and then the signal handler can try to write to it.
Introduce a locking mechanism to prevent this. Separate mph_int_set
and mph_int_test_and_set to support the lock code.
2015-11-24 14:48:36 -05:00
Martin Baulig 093b32e2df [System]: Allow null 'settings' argument in ChainValidationHelper.
(cherry picked from commit 9d6b03a587)
2015-11-24 14:24:23 -05:00
Jonathan Pryor bc3822e7fb Merge pull request #2264 from xmcclure/fix-testwaitany-mini
Minimal fix for sporadic Mono.Unix.UnixSignalTest.TestWaitAny crashes (bug #35936)
2015-11-24 14:03:20 -05:00
Andi McClure 61d6cac99c Don't fsync() on a pipe (causes bug #35936)
fsync() on a file descriptor from a pipe() is invalid, and
occasionally crashes on current OS X.
2015-11-24 13:46:19 -05:00
Ludovic Henry 46667577d0 [coop] Remove MONO_TRY_BLOCKING
Switching to blocking should only be done when actually blocking (ex: mutex
lock, sem wait, cond wait, blocking syscalls), and not around a whole
section. This means that blocking can only be a leaf state, and we
should not switch from blocking to blocking mode again.
2015-11-24 13:24:40 -05:00
Ludovic Henry b92d16e0da [coop] Switch loader_mutex to coop implementation 2015-11-24 13:24:40 -05:00
Ludovic Henry 7d72280d8e [coop] Switch MonoDomain->lock to coop implementation 2015-11-24 13:24:39 -05:00
Ludovic Henry 6c36ef761a [coop] Switch threads_mutex locks to coop implementation 2015-11-24 13:24:39 -05:00
Ludovic Henry 61515ad07e [coop] Make lock tracer os and coop mutex aware 2015-11-24 13:24:38 -05:00
Ludovic Henry eaff8b6d82 [gc] Remove dead lock 2015-11-24 13:24:38 -05:00
Ludovic Henry 4aa9d7f84d [coop] Switch file mmap locks to coop implementation 2015-11-24 13:24:37 -05:00
Ludovic Henry f07b0c9415 [io-layer] Switch cond timed wait to use milliseconds 2015-11-24 13:24:37 -05:00
Ludovic Henry 9ec0fc5f5a [coop] Switch finalizer locks to coop implementation 2015-11-24 13:24:36 -05:00
Ludovic Henry eb34dde267 [coop] Switch global_suspend_semaphore to coop implementation 2015-11-24 13:24:35 -05:00
Ludovic Henry 2881a02e4a [coop] Switch Posix and Win32 threads locks to coop implementation 2015-11-24 13:24:35 -05:00
Ludovic Henry 39b86a7f9c [coop] Switch debugger agent locks to coop implementation 2015-11-24 13:24:34 -05:00
Alexander Köplinger 92d00136b1 [xbuild] Add net_4.6.xml/net_4.6.1.xml and wire through xbuild
Commented the entries in ToolLocationHelper, they could be misunderstood since the 4.0/4.5/4.6 entries are all the same.
2015-11-24 17:58:58 +01:00
Alexander Köplinger 2b1d785ca4 [System.ComponentModel.DataAnnotations] Update tests to match the new strings from 21a3421f4c 2015-11-24 17:54:47 +01:00
Sebastien Pouliot b14d33150a [system][monodroid] Remove reference to Win32NetworkInterfaceAPI (as the type was removed from the profile earlier) 2015-11-24 09:38:07 -05:00
Sebastien Pouliot 2f717098f2 [system.net.http] Make HttpClient a partial class and skip default .ctor when building for iOS 2015-11-24 09:38:07 -05:00
Alexander Köplinger 21a3421f4c Merge pull request #2208 from martinbooth/dataannotation_strings_from_corefx_without_resx
[System.ComponentModel.DataAnnotations] Replaced data annotation error messages with values extracted from corefx resource file
2015-11-24 15:26:39 +01:00
Alexander Köplinger 3fceb6d87d Merge pull request #2248 from barsgroup/bugfix/35980
CSharpCodeCompiler should treat multi-line warning messages as warnings
2015-11-24 15:16:03 +01:00
Dmitry Kalyanov 0a5ff97371 CSharpCodeCompiler should not treat multi-line warnings from mcs as internal compiler errors.
Most errors and warnings from c# compiler are reported in one line in format "FILE(LINE, COL): warning CS1234: Text".
But some warning span multiple lines:

  /tmp/3fb23cc0/634d2022.0.cs(22,29): warning CS0114: `NS.B.F()' hides inherited member `NS.A.F()' ..
  /tmp/3fb23cc0/634d2022.0.cs(16,29): (Location of the symbol related to previous warning)

Previously the second line was considered to be an internal compiler error since it doesn't match the error regex.

This seems to be only type of messages that span multiple lines.

This fixes #35980
2015-11-24 13:02:44 +03:00
Zoltan Varga ad12e8716d [llvm] Fix the mapping of byref types. 2015-11-23 21:18:44 -05:00
Jonathan Pryor 4861bca897 Merge pull request #2259 from xmcclure/modet-pointer
Fix unsafe pointer conversion in sys-stat.c
2015-11-23 15:31:02 -05:00
Andi McClure f4744df2fd Fix sys-stat.c where a pointer to a mode_t (potentially an int16) was being unsafely converted to an int32 pointer 2015-11-23 14:33:44 -05:00
Andi McClure 71679ae8e4 Improve nunit error reporting in case of a test returning a null results object in the absence of an exception. 2015-11-23 14:27:18 -05:00
Jan Thonemann 49158fec2d Fix error handling for case of invalid host name
If a attacker injects invalid content into the "host" header field like
"><script>alert(123)</script>
this content is now html encoded.
This prevents XSS attacks.
2015-11-23 13:01:57 +01:00
Zoltan Varga a425ee9491 [runtime] Fix non-byref LPArray marshalling. Fixes #36128. 2015-11-22 09:04:21 -05:00
Alexander Köplinger f82f4e84b1 Merge pull request #2255 from directhex/override-mono-wrapper
Allow mono-wrapper executable to be overridden by environment
2015-11-22 15:01:04 +01:00
Zoltan Varga d3d896f474 [ji] Add a mini-llvm.h header file for the functions implemented by the LLVM backend. 2015-11-21 10:13:52 -05:00
Zoltan Varga 84f6564eef [runtime] Implement FIXMEs in the portable ppdb code. 2015-11-21 09:30:45 -05:00
Zoltan Varga ccacd58248 [runtime] Fix the loading of ppdb files. 2015-11-21 08:32:24 -05:00
Zoltan Varga 29b72e8329 [aot] Fix support for runtime invokes to array accessors of reference arrays. Fixes #35855. 2015-11-21 06:53:57 -05:00
Marek Safar f722da253f [system] Bump uri limit to match .net. Fixes #36095 2015-11-21 10:48:46 +01:00
Alexis Christoforides fb0e534319 [mkbundle] Improved support for Windows 2015-11-20 21:42:10 -05:00
Sebastien Pouliot 444efa3329 [System.Data] Remove some win32-specific p/invokes for the mobile profile
This reduce the size of System.dll and also removes some Win32 specific
p/invokes.

They cause native linking issues for tvOS as Xcode 7.1 does not allow
`-u` in bitcode-enabled builds so we have to call directly the symbols
and it must exists at (native) link time.

**Incomplete** (some remains) but enough so we can run LinkSDK and
System.Data unit tests apps (the managed linker can remove the rest)
2015-11-20 21:33:49 -05:00
Miguel de Icaza 4cdc90bc56 [mdoc] Add some diagnostics 2015-11-20 20:32:02 -05:00
Marek Safar 48d0231d5f [corlib] Bump reference source for .net 4.6 hotfix. Fixes #36003 2015-11-21 00:20:02 +01:00
Zoltan Varga e194fe208c [runtime] Use the standard __MOBILE__ define instead of MOBILE for the mini tests. 2015-11-20 17:49:02 -05:00
Joel Martinez f2e79e5d17 [docs] Added more libraries to netdocs.
In response to various customer queries, wondering why various libraries could not be found in our documentation. The libraries being added to the  doc set are:

- System.Json
- System.Net.Http
- System.Runtime.Serialization
- System.ServiceModel
- System.XML.Linq
2015-11-20 13:36:24 -05:00
Sebastien Pouliot 9ea2f50a2a [System] Remove internal Win32* classes from mobile builds
This reduce the size of System.dll and also removes some Win32 specific
p/invokes.

They cause native linking issues for tvOS as Xcode 7.1 does not allow
`-u` in bitcode-enabled builds so we have to call directly the symbols
and it must exists at (native) link time.
2015-11-20 11:57:48 -05:00
Sebastien Pouliot 9879831588 [System.ServiceModel.Internals] Do not include win32 p/invokes in mobile builds
This cause native linking issues for tvOS as Xcode 7.1 does not allow
`-u` in bitcode-enabled builds so we have to call directly the symbols
and it must exists at (native) link time.
2015-11-20 10:07:37 -05:00
Rolf Bjarne Kvinge 384332ad5a [runtime] Revert breaking changes in MonoGHashGCType.
Xamarin.iOS and Xamarin.Mac uses this enum, and changing the values
causes us to break.

For Xamarin.Mac apps that do not bundle their mono, this would break
when the user updated their system mono.
2015-11-20 15:16:38 +01:00
Rolf Bjarne Kvinge 2ade2231b4 [System.Drawing] Add ifdefs to source code used by Xamarin.iOS/Mac to make it compile there. 2015-11-20 12:58:10 +01:00
Zoltan Varga d9172de543 [aot] Add instances of LongEnumEqualityComparer which is used by EqualityComparer to compare long/ulong based enums. 2015-11-20 06:16:00 -05:00
Jo Shields d133efa6c5 Allow mono-wrapper executable to be overridden by environment
This makes it easier to force Cygwin-brokered test suite runs to use MSVC builds of Mono, i.e. by overriding MONO_EXECUTABLE to .../msvc/bin/Win32/mono-sgen.exe
2015-11-20 11:04:10 +00:00
Marek Safar e84f23e484 Merge pull request #2254 from Sebmaster/fix-datasourceview
Fix NullReferenceException when reader fails in SqlDataSourceView
2015-11-20 10:42:16 +01:00
Zoltan Varga 8cff5151cb [corlib] Disable an attribute test which fails on mobile because of linking. 2015-11-20 02:29:45 -05:00
Alexander Köplinger a8ef200b11 [msvc] Remove outdated projects and configs to fix x64 build
Some of the profiler projects are no longer needed since the corresponding pieces were removed.

Update sln to only build required projects by default and update configurations in projects.

Fixes the Win64 build on Jenkins.
2015-11-20 02:20:28 +01:00
Sebastian Mayr 9780d577e9 Fix NullReferenceException when reader fails
If the reader execution in the try block fails, reader will stay null, but we later try to access reader.RecordsAffected. This raises a null reference exception which hides the original exception, making this particularly hard to detect.
2015-11-20 01:53:02 +01:00
Martin Baulig f79731662f [System]: Implement X509Certificate2.Export(X509ContentType.Pfx).
(cherry picked from commit e51b4ec685)
2015-11-19 15:44:02 -05:00
Zoltan Varga 27432be3ec [x86] Fix OP_IMUL_OVF_UN clobbering edx in some cases. Fixes #36052. 2015-11-19 14:19:14 -05:00
Ludovic Henry b580f5f4e1 [coop] Switch SGen sgen_interruption_mutex to coop implementation 2015-11-19 18:30:20 +00:00
Ludovic Henry 9f522ef368 [coop] Switch SGen gc_mutex to coop implementation 2015-11-19 18:30:19 +00:00
Ludovic Henry 5f4a870218 [coop] Switch ThreadPool locks to coop implementation 2015-11-19 18:30:19 +00:00
Ludovic Henry 06ae5e2e92 [coop] Switch ThreadPoolIO locks to coop implementation 2015-11-19 18:30:18 +00:00
Ludovic Henry 0fe6879969 [socket] Fix blocking section around close 2015-11-19 18:30:18 +00:00
Ludovic Henry 6fde25fe99 [coop] Switch type_initialization_section and TypeInitializationLock->initialization_section to coop implementation 2015-11-19 18:30:17 +00:00
Ludovic Henry 95acc1e441 [io-layer] Fix uninitialized mutex 2015-11-19 18:30:17 +00:00
Ludovic Henry 49eb91e6f8 [coop] Switch appdomains_mutex to coop implementation 2015-11-19 18:30:16 +00:00
Ludovic Henry 3546e55aaf [coop] Switch sleep_(mutex|cond) to coop implementation 2015-11-19 18:30:16 +00:00
Ludovic Henry 5db3e92b51 [coop] Switch MonoInternalThread->synch_cs to coop mutex 2015-11-19 18:30:15 +00:00
Ludovic Henry 3895f81572 [coop] Switch finalizer_sem to coop mutex 2015-11-19 18:30:15 +00:00
Ludovic Henry 77f9f40869 [gc] Remove dead code 2015-11-19 18:30:14 +00:00
Ludovic Henry 33e1332df8 [utils] Add mutex and semaphore API to support coop suspend
Instead of having to use MONO_PREPARE_BLOCKING/MONO_TRY_BLOCKING in the
user code, we do it directly in this new mutex and semaphore coop API.

Using the mono_os_* locking functions should not be the default case, as
that could lead to longer than necessary time to suspend, and even in
certain cases to deadlocks.
2015-11-19 18:30:14 +00:00
Ludovic Henry 7ac23bc974 [utils] Move mutex and semaphore to mono_os_*
This is to separate from the mono_coop_* mutex and semaphores
2015-11-19 18:30:13 +00:00
Ludovic Henry 4899b4627a [attach] Remove dead code 2015-11-19 18:30:12 +00:00
Ludovic Henry 34a361a6df [semaphore] Cleanup
Move all the code to mono-semaphore.c, so it will be easier to make it
coop suspend friendly.
2015-11-19 18:30:06 +00:00
Ludovic Henry b54ab7a4ba [mutex] Cleanup
Move all the code to mono-mutex.c, so it will be easier to make it coop
suspend friendly.
2015-11-19 18:29:24 +00:00
Rolf Bjarne Kvinge 9a80281b02 Fix mcs build to use Thread.Abort. 2015-11-19 19:24:24 +01:00
Rolf Bjarne Kvinge 4f0cb955e9 Remove Thread API from the watch/tv runtime profiles as well. 2015-11-19 19:24:23 +01:00
Jonathan Pryor fde24d3d17 Merge pull request #2183 from joelmartinez/monodoc-ecmacref-fix
[monodoc] Fixed several issues with `.ToEcmaCref` method.
2015-11-19 10:39:54 -05:00
Jo Shields e3fa11a369 [msvc] Fix path to ml64.exe in masm.fixed.props 2015-11-19 14:20:21 +00:00
Miguel de Icaza c86c8cdf10 Bring the Asin/Acos fix from CoreFX 2015-11-19 09:14:13 -05:00
Marek Safar d287861cfa [corlib] Update long/short timepatterns. Reference source DateTimeInfo uses different logic for single pattern extraction. Fixes part of #36003 2015-11-19 14:56:11 +01:00
Rolf Bjarne Kvinge f1b7be2f57 Remove Thread.[Abort|Suspend|Resume] from TvOS/WatchOS.
In tests replace usages of Thread.Abort with Thread.Interrupt when it looks
like it can work, otherwise just disable the complete test.
2015-11-19 12:54:36 +01:00
Zoltan Varga f2b6974b9b [aot] Fix support for synchronized wrappers of gsharedvt methods. 2015-11-19 06:09:48 -05:00
Rolf Bjarne Kvinge d4b64f5ba9 [mono-api-info] Take return type into account when comparing methods. 2015-11-19 10:28:38 +01:00
Rolf Bjarne Kvinge 30c02efa29 [mono-api-info] Take into account parameters when sorting properties. 2015-11-19 10:28:38 +01:00
Rolf Bjarne Kvinge 16b9ec5be5 [mono-api-info] Sort attributes.
So that info files can be compared textually to test for api equality.
2015-11-19 10:28:37 +01:00
Zoltan Varga 37f2657ac7 [jit] Fix memory leaks in the generic sharing code by making sure that values stored into an rgctx slot are never NULL, since otherwise the runtime would recompute them on every access. Fixes #36000. 2015-11-19 02:00:28 -05:00
Zoltan Varga ce6e1950b2 [jit] Fix the gsharedvtcheck make target. 2015-11-19 02:00:28 -05:00
Alexander Köplinger 2e1d4228e3 [metadata] Remove unused empty struct from marshal.h
It breaks MSVC.
2015-11-18 23:41:42 +01:00
Alexander Köplinger 96b24f637c [mini] Add MONO_API to mono_parse_env_options
We need this exported for our multi lib setup in MSVC.
2015-11-18 23:41:41 +01:00
Alexander Köplinger 5aa84a313e [msvc] Remove obsolete jay project files
We're requiring VS2013 now.
2015-11-18 23:41:35 +01:00
Alexander Köplinger 790700d0bf [msvc] Fix msbuild warnings
OutDir/IntDir should end with trailing slash.

Don't override Linker OutputFile, instead copy jay via a PostBuildEvent to the correct dir.
2015-11-18 23:41:26 +01:00
Alexander Köplinger 7ba10805f3 [msvc] Add missing files to libmonoutils.vcxproj 2015-11-18 22:01:24 +01:00
Alexander Köplinger 2c99109044 [msvc] Update .def files 2015-11-18 22:01:23 +01:00
Sebastien Pouliot a0da4f621d [tests] Skip Local name (incorrect) assumption for iOS/tvOS/watchOS/OSX in TimeZoneInfo tests 2015-11-18 12:31:40 -05:00
Zoltan Varga 05b1231601 [runtime] Fix multiple inclusion of object-offsets.h 2015-11-18 11:48:42 -05:00
Ludovic Henry 3a8c9eaffb Merge pull request #2243 from konrad-kruczynski/process_exited_should_wait_in_background
Process.cs: adding a handler to Exited will make the program wait for the process to exit
2015-11-18 13:57:25 +00:00
Konrad M. Kruczynski e348cf2a80 Caller of Exited event should wait for process to exit in background.
Otherwise simply adding an event will make our program to live at least as long
as the created process lives.
2015-11-18 13:44:49 +01:00
Rolf Bjarne Kvinge 7f4c6459e3 [System] Exclude code that tries to load System.Windows.Forms.dll dynamically on mobile.
It won't succeed anyway.
2015-11-18 13:37:30 +01:00
Zoltan Varga dc00526d13 [aot] Fix another memory leak. 2015-11-18 07:26:28 -05:00
Zoltan Varga 314167f18c Bump ikdasm to 323eeecdf13c39527c53efa5f6c8487765ee42c0. 2015-11-18 06:24:30 -05:00
Vlad Brezae 950d7d2151 [sgen] Register counter for evacuated objects 2015-11-18 12:39:53 +02:00
Vlad Brezae 48c61581b2 [sgen] Remove unused stat 2015-11-18 12:39:53 +02:00
Zoltan Varga 91eb302670 [external/ikdasm] Bump to d6db90d6780d5cdb37ef97ec36d0cb452ac70e9e. 2015-11-18 04:23:53 -05:00
Zoltan Varga 6bf2ccd968 [runtime] Add a DECL_SIZE2 macro usable from offsets files. 2015-11-18 00:34:03 -05:00
Zoltan Varga a2c475bcbe [runtime] Fix the lookup of nested types in type forwarders. Fixes #35447. 2015-11-18 00:06:49 -05:00
Zoltan Varga 34f604bd21 Fix a warning. 2015-11-17 22:54:02 -05:00
Zoltan Varga 52f87fc52b [aot] Fix a memory leak in init_amodule_got (). 2015-11-17 22:36:28 -05:00
Ludovic Henry 6a02a31ff4 Revert "[sgen] Remove sgen specific suspend code"
This reverts commit 64af68dd8d.
2015-11-18 00:25:43 +00:00
Ivan Maidanski 5e3eac6b4d [boehm] Put *_freelists into thread_local_freelists (as in BDWGC v7)
Mono create_allocator accesses libgc private *_freelists directly.
These fields have been grouped together into struct
thread_local_freelists in BDWGC v7.
This commit does code refactoring to match the structure of external
GC regarding *_freelists.

 * Move GRANULARITY, NFREELISTS (used by *_freelists) out of
   GC_Thread_Rep.

 * Move ptrfree_freelists, normal_freelists, gcj_freelists from
   GC_Thread_Rep to struct thread_local_freelists.

 * Add tlfs field (of type struct thread_local_freelists) to
   GC_Thread_Rep.

 * Update pthread_support.c and boehm-gc.c code accordingly.
2015-11-18 01:05:36 +03:00
Ivan Maidanski b0e91acb61 [boehm] Match BDWGC v7 API
Mono-specific libgc functionality has been recently added to BDWGC.
This commit changes API of included Boehm GC to match that of the
external GC.

 * Renaming:
   - GCEventType -> GC_EventType
   - GC_get_restart_signal -> GC_get_thr_restart_signal
   - GC_toggleref_register_callback -> GC_set_toggleref_func
   - GC_set_finalizer_notify_proc -> GC_set_await_finalize_proc

 * Replace global variable with a setter:
   - GC_notify_event -> GC_set_on_collection_event() (acquires GC lock)

 * Foreign threads registration:
   - add GC_allow_register_threads() (no-op for GC v6, called by
     mono_gc_base_init)
   - add GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY, GC_UNIMPLEMENTED macros
   - add struct GC_stack_base
   - replace GC_thread_register_foreign(void*) with
     GC_register_my_thread(struct GC_stack_base)
   - define GC_register_my_thread also for Solaris and Win32
   - GC_register_my_thread returns GC_DUPLICATE if already registered

 * Toggle-ref callback declaration change:
   - add GC_ToggleRefStatus (enum type)
   - callback returns GC_ToggleRefStatus instead of int

 * Toggle-ref addition status checked:
   - GC_toggleref_add return type changed from void to int
   - GC_toggleref_add returns GC_SUCCESS or GC_NO_MEMORY
   - static ensure_toggleref_capacity() returns FALSE if GC MALLOC failed
   - call g_error() if GC_toggleref_add failed

 * Conditional public function declaration:
   - wrap GC_DllMain declaration into ifdef GC_INSIDE_DLL
   - define GC_INSIDE_DLL prior to include gc.h
2015-11-18 01:05:26 +03:00
Martin Baulig 7e3c27c4a8 Actually, really fix my last build - sorry for the breakage.
(cherry picked from commit e95a4a2e35)
2015-11-17 16:45:59 -05:00
Martin Baulig 3b2f130adc Fix my last commit.
(cherry picked from commit 4a5da6f763)
2015-11-17 16:05:29 -05:00
Alexander Köplinger 61374d794c Merge pull request #2236 from akoeplinger/add-dataflow
[System.Threading.Tasks.Dataflow] Replace implementation with CoreFx version
2015-11-17 22:03:53 +01:00
Martin Baulig 9dea40613f [Mono.Security]: Add 'X509Chain' to ICertificateValidator.InvokeSystemValidator and MonoTlsProvider.InvokeSystemCertificateValidator.
On OS X and Mobile, the X509Chain will be initialized with all the
certificates from the X509CertificateCollection, but not actually
built.

ServicePointManager.ServerCertificateValidationCallback can use the 'chain' argument
to get all the certificates from the server.

(cherry picked from commit 73e37f0ecf)
2015-11-17 15:54:44 -05:00
Martin Baulig e1e95f6e29 [Mono.Security]: The default value of 'MonoTlsSettings.UseServicePointManagerCallback' is supposed to be true.
This fixes a regression where ServicePointManager.ServerCertificateValidationCallback
was not called when using WebClient.

(cherry picked from commit 5022db1956)
2015-11-17 15:54:31 -05:00
Ludovic Henry 3125d0f46d [threads] Fix build 2015-11-17 15:48:52 +00:00
Marek Safar ec9933d2f1 [mcs] Set null operator barrier between invocation instance and its arguments. Fixes #33341 2015-11-17 16:14:47 +01:00
Zoltan Varga cca098bffc [arm] Avoid an assertion check in aot mode. 2015-11-17 10:02:23 -05:00
Zoltan Varga ccee596d1a [runtime] Add MONO_ABI_SIZEOF macros similar to the existing MONO_ABI_ALIGNOF macros, use these to compute sizes of types. 2015-11-17 10:01:38 -05:00
Alexis Christoforides 3c43a0e1c7 Merge pull request #2240 from UCIS/patch-6
Fixed hang in SslStreamBase when stream is closed during I/O
2015-11-17 09:57:39 -05:00
Ludovic Henry 64af68dd8d [sgen] Remove sgen specific suspend code 2015-11-17 14:45:07 +00:00
Alex Rønne Petersen d9ca0dd929 Merge pull request #2241 from f00f/patch-1
Fixed typo
2015-11-17 15:29:05 +01:00
f00f 23673d636e Fixed typo 2015-11-17 15:28:19 +01:00
Ivo Smits 843f1253dd Fixed hang in SslStreamBase when stream is closed during I/O
If the SslStreamBase is disposed while a read or write operation is in progress, the asynchronous I/O state is never marked as completed, resulting in synchronous Read/Write calls never returning. To fix this, the internal I/O callbacks should mark the asynchronous operations as completed, possibly with an error, even if the SslStreamBase is disposed.
2015-11-17 14:54:02 +01:00
Rolf Bjarne Kvinge 3033a4b5b5 Merge pull request #2201 from rolfbjarne/linker-better-xml-processing-errors
[linker] Provide better error message when an error occurs while processing xml descriptions
2015-11-17 08:47:18 -05:00
Alexander Köplinger 889d23575a Remove link to Wrench from README.md
We're retiring public Wrench and replacing it with Jenkins, see http://lists.ximian.com/pipermail/mono-devel-list/2015-November/043399.html
2015-11-17 14:14:55 +01:00
Rolf Bjarne Kvinge 932bfeda56 Add monotouch_*_runtime profiles for watchOS and tvOS. 2015-11-17 12:51:39 +01:00
Rolf Bjarne Kvinge 3fd03bf763 Ignore extensions-config.h 2015-11-17 12:51:37 +01:00
Zoltan Varga 57b52680cf Fix the build. 2015-11-17 03:30:49 -05:00
Zoltan Varga 74527e03dd Remove obsolete interpreter embedding sample. 2015-11-17 02:16:25 -05:00
Zoltan Varga 45d468d66e [jit] Remove unused mono_aot_register_globals () function. 2015-11-17 02:12:29 -05:00
Zoltan Varga ab5b9179ab [jit] Remove the nursery_bits from the wrapper info for the gc write barrier methods, its no longer needed after 85581ff1bb. 2015-11-17 01:54:17 -05:00
Zoltan Varga a649be26c7 [jit] Add a header file for aot-compiler.c. 2015-11-17 01:51:13 -05:00
Zoltan Varga 80b2c7c49b [jit] Fix the check for emulation of div instructions in 9f253965d0. 2015-11-16 22:28:38 -05:00
Alexander Köplinger 932f85fbec Merge pull request #2239 from xmcclure/interbals2
Minor: Style cleanup on internal headers (continued)
2015-11-17 00:25:26 +01:00
Andi McClure 732bc07bd8 Minor: Style cleanup on internal headers (continued)
Previous patch missed some build files.
2015-11-16 18:17:21 -05:00
Andi McClure 59c279b9e6 Merge pull request #2238 from xmcclure/interbals
Minor: Style cleanup on internal headers
2015-11-16 17:26:17 -05:00
Andi McClure aa6dc985b7 Minor: Style cleanup on internal headers
For consistency, rename any -internal.h files to -internals.h. Also remove INTERBALS
2015-11-16 15:45:01 -05:00
Marcos Henrich 5c2596af27 Updated Assert.Equals to Assert.AreEqual 2015-11-16 17:58:03 +00:00
Alexander Köplinger d17c5407a4 [System.Threading.Tasks.Dataflow] Replace implementation with CoreFx version
We were seeing some random test failures on Jenkins with our Dataflow implementation.
Replacing it with Microsoft's CoreFx version fixed those and makes us more compatible.

While we'd ideally not ship this assembly at all with Mono (it doesn't ship with .NET),
we shipped it in the past and as such people might rely on it so we can't remove it.

The CoreFx commit this version was taken is 905a1940bcda0afdca2f14ceb2b0161ebc4d1d02.
2015-11-16 17:17:02 +01:00
Alex Rønne Petersen 99b3b2cced [arm] HACK: Disable fast TLS on ARM for now.
https://bugzilla.xamarin.com/show_bug.cgi?id=35178
2015-11-16 17:03:26 +01:00
Alex Rønne Petersen ea970d8953 [linker] Always preserve Interlocked.Exchange<T> ().
The runtime expects to be able to find the generic variant of this method in
the metadata even when code is calling the `object` overload.
2015-11-16 16:07:18 +01:00
Alexander Köplinger 464aa0336d Merge pull request #2228 from lambdageek/dev/sgen-timeouts
[test] sgen tests should behave nicer on slower machines.
2015-11-16 15:10:24 +01:00
Zoltan Varga 28a147ae7c [arm] Simplify the seq point code used for soft breakpoints. 2015-11-16 03:55:00 +00:00
Miguel de Icaza b67f4e0d2f [Windows.Forms] add a warning to the Carbon driver when running on 64 bits 2015-11-15 10:12:03 -05:00
Zoltan Varga ea09193eb8 [runtime] Fix Thread.CurrentThread in non-root appdomains by setting the tls slot in start_wrapper, otherwise Thread.CurrentThread would create a new Thread object so there would be two. Fixes #35828. 2015-11-15 08:32:36 -05:00
Zoltan Varga a75a39e4df Fix a warning. 2015-11-15 03:00:30 -05:00
Zoltan Varga efeb26e32e [amd64] Make amd64_patch non-inline, it seems to be miscompiled by older clang versions (5.1). 2015-11-14 19:04:40 -05:00
Zoltan Varga 1c2cf65921 [amd64] Enable div checks when running on tvos. 2015-11-13 22:42:23 -05:00
Zoltan Varga 07d8d41a3b [jit] Emit div checks if MONO_ARCH_NEED_DIV_CHECK is enabled even when div instructions are not emulated. 2015-11-13 19:48:59 -05:00
João Matos 2ccf016f5b Merge pull request #2233 from madewokherd/ucontextgregs
Do not define UCONTEXT_GREGS on win64.
2015-11-13 15:02:14 -08:00
Zoltan Varga a706d531a9 Revert "[jit] Emit div checks if MONO_ARCH_NEED_DIV_CHECK is enabled even when div instructions are not emulated. Enable div checks for tvos."
This reverts commit 276824dd28.

Revert this as it breaks on some android devices:
https://bugzilla.xamarin.com/show_bug.cgi?id=35844
2015-11-13 16:27:35 -05:00
Aleksey Kliger 5693ac2840 [test] Give the sgen tests more time. 2015-11-13 15:32:10 -05:00
Aleksey Kliger bfb46573ac [test] Make sgen tests behave nicer on slower machines.
* TestDriver.cs Add `TestTimeout` utility to check how much time CI
       allocated for the test.
  * sgen-domain-unload-2.cs print warning if running low on time.
  * sgen-new-threads-dont-join-stw.cs print progress dots and a warning
       when running low on time.
2015-11-13 15:32:10 -05:00
Martin Baulig ba97606b1d [Mono.Security]: Cleanup the internal `Mono.Security.Interface.ICertificateValidator'.
* ICertificateValidator.SelectClientCertificate(): return bool, indicating whether
  a certificate has been selected or the caller should use its default
  implementation (if it has any).

* ICertificateValidator.ValidateCertificate(): new common function for both client
  and server certificates; replaces ValidateChain() and ValidateClientCertificate().

* MonoTlsProvider.InvokeSystemCertificateValidator(): return bool, indicating whether
  the certificate has been validator or the default system validator should be used.

(cherry picked from commit 42421eec1e)
2015-11-13 14:32:27 -05:00
Vincent Povirk fa3dba9be8 Do not define UCONTEXT_GREGS on win64. 2015-11-13 12:58:36 -06:00
Rodrigo Kumpera 3bc22b1961 Merge pull request #2227 from esdrubal/tzparse
[corlib] Fixes TimeZoneInfo.ParseTZBuffer abbrevs.
2015-11-13 13:12:15 -05:00
Marcos Henrich 54d3309f3a [corlib] Fixes TimeZoneInfo.ParseTZBuffer abbrevs.
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=31432

In a few android devices TimeZoneInfo.ParseTZBuffer was failing ito
parse Europe/Moscow with:
at System.ThrowHelper.ThrowKeyNotFoundException ()
at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key)mscorlib/system/collections/generic/dictionary.cs:176
at System.TimeZoneInfo.ParseTimesTypes (System.Byte[] buffer, Int32 index, Int32 count, System.Collections.Generic.Dictionary`2 abbreviations) [0x0002f] in mcs/class/corlib/System/TimeZoneInfo.cs:1293
at System.TimeZoneInfo.ParseTZBuffer (System.String id, System.Byte[] buffer, Int32 length)

It was failing while getting the third index [3] from] from abbrevs.

abbrevs added values were the following:
[0, MMT]
[1, MT]
[2, T]
[4, MST]
[5, ST]
[6, T]
[8, MDST]
[9, DST]
[10, ST]
[11, T]
[13, S]
[15, M]
[17, MSK]
[18, SK]
[19, K]
[21, EET]
[22, ET]
[23, T]
[25, MSD]
[26, SD]
[27, D]
[29, EEST]
[30, EST]
[31, ST]
[32, T]

Index 3 was not added because its values is an empty string, as indexes
with empty values are used in this case we are now adding them to the
abbrevs dictionary.

Fixes #31432
2015-11-13 15:51:12 +00:00
Marcos Henrich 1ca88f9547 [corlib] Tests TimeZoneInfo.ParseTZBuffer
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=31432

Tests TimeZoneInfo.ParseTZBuffer with Europe/Moscow data that thrown
at System.ThrowHelper.ThrowKeyNotFoundException ()
at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key)mscorlib/system/collections/generic/dictionary.cs:176
at System.TimeZoneInfo.ParseTimesTypes (System.Byte[] buffer, Int32 index, Int32 count, System.Collections.Generic.Dictionary`2 abbreviations) [0x0002f] in mcs/class/corlib/System/TimeZoneInfo.cs:1293
at System.TimeZoneInfo.ParseTZBuffer (System.String id, System.Byte[] buffer, Int32 length)
2015-11-13 15:51:11 +00:00
Ludovic Henry e389dac610 [IO] Dump handle when we run out of them
When running out of handle, it's hard to know exactly why. Dumping them
will help troubleshoot handle leaks.
2015-11-13 11:59:54 +00:00
Marek Safar 526c802c3b Bump referencesource 2015-11-13 09:26:52 +01:00
Zoltan Varga 276824dd28 [jit] Emit div checks if MONO_ARCH_NEED_DIV_CHECK is enabled even when div instructions are not emulated. Enable div checks for tvos. 2015-11-12 22:59:34 -05:00
Zoltan Varga 75ad142bb2 [arm] Fix register assignments during hfa parameter passing. Fixes pinvoke_ppdcd.exe. 2015-11-12 18:48:59 -05:00
Zoltan Varga cb7c762c3e [runtime] Rename iltests.il.in back to iltests.il, architecture specific tests should be handled using Category attributes. 2015-11-12 18:07:15 -05:00
Radek Doulik 072a7aa91a [linker] do not try to iterate thru null array
- fixes the case when custom attribute instance constructor contains
   null value for System.Type[] array
2015-11-12 21:07:19 +01:00
Martin Baulig 475d00292a Rewrite the test case from commit b503b87a to not use Assert.IsInstanceOfType(). 2015-11-12 14:15:39 -05:00
Alexander Köplinger 140660e246 [Facades] Fix tarball (for real this time)
Turns out EXTRA_DISTFILES only works with library.make or executable.make,
so we need to just use DISTFILES here...
2015-11-12 17:06:03 +01:00
Alexander Köplinger 49051897c5 [Facades] Fix tarball by adding a new file to EXTRA_DISTFILES
It was added in 29a02f2b12.
2015-11-12 15:04:58 +01:00
Alexander Köplinger 67a6622180 Merge pull request #2224 from Gankov/patch-1
Fixed a typo in Mono.Cairo
2015-11-12 14:21:39 +01:00
Gankov Andrey d01d4a61ee Fixed a typo 2015-11-12 12:55:26 +03:00
Zoltan Varga 7df720cf51 [runtime] Remove a bogus assertion. 2015-11-11 21:30:07 -05:00
Zoltan Varga 94f19327d6 [jit] Use emit_runtime_constant () in a few more places to reduce code duplication between the JIT and mono_resolve_patch_target (). 2015-11-11 20:57:15 -05:00
Rodrigo Kumpera 6ee42d0c51 Merge pull request #2213 from kumpera/widen-unsafe-mov
[jit] Add support for widening of Array.UnsafeMov intrisic. Fixes #35310
2015-11-11 19:15:39 -05:00
Rodrigo Kumpera 6794876036 [jit] Allow reference types with Array.UnsafeMov. Document restrictrions in Array.cs. 2015-11-11 18:30:00 -05:00
Larry O'Brien 88547f4efd Changed link from GUID to URL
Closes https://github.com/xamarin/documentation/issues/944
2015-11-11 13:12:55 -10:00
Zoltan Varga 7642f734b5 [runtime] Use 'this_obj' instead of 'this' in a few more places. 2015-11-11 17:59:19 -05:00
Rodrigo Kumpera d5b32bdca3 [jit] Add support for widening of Array.UnsafeMov intrisic. Fixes #35310
This enables usage of JitHelper.UnsafeEnumCast<> with enums smaller than int.

This changes enables the intrinsic for int conversions of same reg class.
2015-11-11 17:38:56 -05:00
Alexander Köplinger 654cab1b99 [acceptance-tests] Split compiling/cleaning test sources and bump coreclr
The coreclr-compile-tests would throw a shell error "Argument list too long" on OSX due
to the huge amount of tests passed to make in one go. The same happened for make clean.

We now compile and clean the three sets of coreclr test sources separately to avoid this.

Additionally, bump the coreclr reference and include a new test that was added upstream.
2015-11-11 23:21:01 +01:00
Rodrigo Kumpera 1d378cd515 Merge pull request #2222 from akoeplinger/dataflow-test-reliability
[Dataflow] Fix flaky tests by bumping timeouts
2015-11-11 16:48:35 -05:00
Alexander Köplinger 0f6b85f08b [Dataflow] Fix flaky tests by bumping timeouts
We were seeing random Dataflow tests fail on Jenkins from time to time.
I managed to reproduce the BroadcastBlockTest.CloningTest and WriteOnceBlockTest.CloningTest
fail on my machine by generating CPU load and running those test in a while(true).

Bumping the timeouts from 100ms -> 1s fixed the flakiness for me, so I went ahead and
opportunistically bumped all such small timeouts throughout the testsuite.
2015-11-11 22:40:28 +01:00
Rodrigo Kumpera 5b1b364871 Merge pull request #2207 from lambdageek/dev/bug-35375
[reflection] Fix for  35375 - explicit interface implementation using a generic type instance
2015-11-11 14:42:40 -05:00
Mark Probst 8b10aac753 Merge pull request #2198 from BrzVlad/feature-concurrent-work
[sgen] Fix memory use of the concurrent collector
2015-11-11 11:26:25 -08:00
Rodrigo Kumpera 229e4d8823 Merge pull request #2217 from rcruzs00/master
El Capitan fix : system integrity protection compatibility
2015-11-11 12:05:07 -05:00
Aleksey Kliger 9450821dae [runtime] mono_class_init() - don't look for metadata if the dynamic image doesn't have it. 2015-11-11 11:12:03 -05:00
Aleksey Kliger b503b87a03 Crashing test in mono_class_init() from a MonoGenericClass.
[#35375](https://bugzilla.xamarin.com/show_bug.cgi?id=35375)
2015-11-11 11:09:41 -05:00
David Karlaš 5acd39ef32 [XBuild] If CurrentSolutionConfigurationContents is not set AssignProjectConfiguration can't do much so just pass references
Fixes Bug 35579 - Recent xbuild changes result in breakages to F# compiler tools(This is actual fix on master and not revert as it was on cycle 6)
2015-11-11 13:45:16 +01:00
David Karlaš 5977060b42 [XBuild] If Project Guid is missing on <ProjectReference> don't throw Error(same as MSBuild)
Fixes Bug 35548 - 9 new MSBuild test failures on cycle6(This is actual fix on master and not revert as it was on cycle 6)
2015-11-11 13:43:07 +01:00
Rafael Cruz 2db3c7d767 El Capitan fix : system integrity protection compatibility 2015-11-10 23:31:49 -02:00
Alexander Köplinger 59f8e6a2bf Merge pull request #2216 from akoeplinger/fix-array-sort
[corlib] Fix Array.Sort throwing when fewer keys than items are provided
2015-11-11 00:24:18 +01:00
Rodrigo Kumpera 95f8dedd25 Merge pull request #2215 from kumpera/crash_in_mono_class_get_method_from_name_flags
[runtime] Fix bad assert in mono_class_get_method_from_name_flags.
2015-11-10 18:12:46 -05:00
Zoltan Varga f94637071b [runtime] Fix a few more class->klass cases. 2015-11-10 16:42:34 -05:00
Zoltan Varga aac8eaf948 [runtime] Use 'klass' instead of 'class' to make the code more c++ friendly. 2015-11-10 16:20:36 -05:00
Alexander Köplinger f736f9cda2 [corlib] Fix Array.Sort throwing when fewer keys than items are provided
The `Sort<TKey, TValue> (TKey [] keys, TValue [] items, IComparer<TKey> comparer)` overload in Array throwed when keys.Length != items.Length.
However, on .NET you can pass in a keys array with fewer elements than in items and it'd sort the elements in items up to that point.

Fixed our implementation by only throwing when keys.Length > items.Length.

This was revealed by the coreclr/tests/src/CoreMangLib/cti/system/array/arraysort12.exe test.
I decided to port the test into our testsuite so we catch regressions earlier.
2015-11-10 22:14:47 +01:00
Martin Baulig 02436a1aa1 [Mono.Security]: Add destructor to MonoSslStream.
(cherry picked from commit f158270d86)
2015-11-10 15:48:32 -05:00
mhutch eedf3e9a0d Merge pull request #2124 from mhutch/mono-api-info-forwarders
[mono-api-info] Allow following type forwarders
2015-11-10 12:47:19 -08:00
João Matos b2811ef633 [runtime] Fixed typo. 2015-11-10 12:36:46 -08:00
Martin Baulig e7d9c132c7 [Mono.Security]: 'Mono.Security.Interface.MonoSslStream' needs to implement IDisposable.
(cherry picked from commit 4c1760785a)
2015-11-10 15:31:36 -05:00
Martin Baulig 0d585d53ee [Mono.Security]: Make MonoTlsProviderFactory.CreateHttpListener() take 'X509Certificate' instead of 'X509Certificate2'.
(cherry picked from commit 3d81daf796)
2015-11-10 15:31:21 -05:00
Rodrigo Kumpera babed3bd48 [runtime] Fix bad assert in mono_class_get_method_from_name_flags. 2015-11-10 13:55:30 -05:00
Marcos Henrich 29a02f2b12 Merge pull request #2209 from esdrubal/facades_subdirs
[Facades] Moved subdirs list to subdirs.make
2015-11-10 17:35:58 +00:00
Alex Rønne Petersen b4e8153857 [corlib] Disable FullNameGetTypeParseEscapeRoundtrip test on Android.
This requires the symbol writer which is not available on Android.
2015-11-10 18:34:00 +01:00
Alexander Köplinger 681a5582dc [acceptance-tests] Output Roslyn and ms-test-suite NUNit xml result to current dir
Roslyn used xunit-style xml by default, we hack the cibuild.sh script to output nunit-style
for now until we get an option upstream.

This allows us to catch those test results in Jenkins.
2015-11-10 17:01:07 +01:00
Marek Safar 51e396f5b1 [mcs] Handle using aliases in evaluator. Fixes #32894 2015-11-10 16:55:50 +01:00
Marek Safar 5fdd95ef9d [mcs] Don't store invalid using static expression in evaluator queue. Fixes #35604 2015-11-10 16:38:55 +01:00
Marek Safar 30a63ede22 [System.Web] WebColorConverter from reference source 2015-11-10 16:38:55 +01:00
Rodrigo Kumpera 87571809d6 Merge pull request #2214 from kumpera/fix_enum_get_get_hashcode
[runtime] Fix Enum.GetHashCode when basetype is short or sbyte.
2015-11-10 09:41:09 -05:00
Marek Safar 418707d177 [Mono.Posix] Update incorrect test 2015-11-10 15:07:50 +01:00
Marek Safar 89c3d7c242 [mcs] inherited interface constraints checks on defined interfaces only. Fixes #35535 2015-11-10 14:05:49 +01:00
Marek Safar 8adbe0083f [mcs] Restore local variables state after probing run. Fixes #35674 2015-11-10 11:59:34 +01:00
Marek Safar ef38127aca Merge pull request #2210 from ystr/FromHtml-xxx
ColorTranslator.FromHtml 3-digit codes support (#35664)
2015-11-10 11:38:33 +01:00
Zoltan Varga 0127252e64 [bcl] Add versioning to the TestTasks.dll file name used by the Microsoft.Build.Engine tests since it needs to be compiled against the same xbuild version as the rest of the tests. 2015-11-10 00:14:06 -05:00
Rodrigo Kumpera 6c56f052fa [runtime] Fix Enum.GetHashCode when basetype is short or sbyte.
In addition to fixing the runtime, fix the test suite to correctly detect this problem.

This popped up because, for some reason, those two types have hashcodes that
don't return identity on reference sources.
2015-11-09 22:42:51 -05:00
Vlad Brezae c5e2887354 [sgen] We only use workers when starting the concurrent collection 2015-11-10 03:29:32 +02:00
Vlad Brezae 54081d9fe3 [sgen] Optimize the finishing of the concurrent collection
If we force the finish of the concurrent collection, instead of waiting for the concurrent mark to finish followed by the finishing mark&sweep, we immediately stop the worker thread, change its object operations and drain the remaining gray stack, also following references to the nursery. This way we avoid the cardtable overhead in cases where there are a lot of references from heap to the nursery.
2015-11-10 03:28:54 +02:00
Vlad Brezae 6020c1ff72 [jit] Refactor loading of runtime constants from IL 2015-11-10 01:17:40 +02:00
Vlad Brezae 85581ff1bb [aot] Don't hardcode the nursery size in aot write barriers
It can be passed at runtime in the nursery-size option of MONO_GC_PARAMS environment variable.

Fixes #35414
2015-11-10 01:16:48 +02:00
Alexander Köplinger c765316529 [acceptance-tests] Ensure Roslyn is bootstrapping with Mono
It tried to use CoreCLR but that doesn't work on Jenkins since some of the dependencies are missing there.
We actually want to ensure it's always using Mono so we can catch errors on our side, so we need this
hack until we have an option in the script upstream.
2015-11-09 18:59:07 +01:00
Andi McClure 0217438747 Merge pull request #2200 from xmcclure/image-audit-oops
Fix --with-checked-build build on GCC/Linux
2015-11-09 12:04:57 -05:00
Andi McClure 8124b32431 Fix to checked-build reference auditing
Remove an array idiom which both broke the GCC build (apparently Clang allows some things with variable-length arrays in "gnu99" mode which GCC does not) and wasn't right anyway (there was a typo which caused a read past end of buffer).
2015-11-09 11:08:58 -05:00
ES 1e30bae19c ColorTranslator.FromHtml 3-digit codes support (#35664) 2015-11-09 18:53:00 +03:00
Marcos Henrich 631d194f74 [Facades] Moved subdirs list to subdirs.make
The list of subdirs is useful for maccore build, it was moved to its own file so it can be included in other builds makefiles.
2015-11-09 13:43:52 +00:00
Martin Booth 1844e7343c [mcs] Replaced data annotation error messages with values extracted from corefx resource file 2015-11-09 09:25:20 +11:00
Zoltan Varga 33b8baa99d Revert "[bcl] Mark some System tests which depend on a working dns with InetAccess."
This reverts commit d644cb2ab3.

Revert this, localhost needs to be resolvable.
2015-11-06 21:50:04 -05:00
Zoltan Varga d644cb2ab3 [bcl] Mark some System tests which depend on a working dns with InetAccess. 2015-11-06 21:44:24 -05:00
Alexander Köplinger 2c608c32e7 [acceptance-tests] Fixes for Roslyn integration
We now use our own archive with the few additional pieces that MS added to their copy of
Mono used by Roslyn CI instead of downloading their archive.

Also bump coreclr to get a fix for the GC test that would fail on Jenkins in.
2015-11-07 03:36:07 +01:00
Zoltan Varga 0a12707cd7 [runtime] Add a MonoAotMode entry for llvmonly. 2015-11-06 19:47:48 -05:00
Zoltan Varga 1d6f412b8a [runtime] Add a dummy definition for mono_debug_personality (), aot compiled managed-to-native wrappers refer to it even if its not used. 2015-11-06 19:47:48 -05:00
Martin Baulig 65ccd579eb Merge pull request #2102 from AdamBurgess/master
[System] Fix bug #31209 - HttpConnection infinite loop
2015-11-06 15:49:10 -05:00
Zoltan Varga 2a224bef66 Avoid setting mono_llvm_only when mono_aot_only is set. 2015-11-06 14:47:49 -05:00
Alexander Köplinger da1bc0b8bd [acceptance-tests] Bump coreclr to pick up a8cbbdddfe9923a7f99edf8870842ad373e66b5b
I also fixed the coreclr-gcstress target to check for the expected exit code of the testsuite.
2015-11-06 18:23:48 +01:00
Zoltan Varga e3510080d1 [llvm] Use LLVMArgNormal for scalars passed by value instead of LLVMArgInIReg/LLVMArgInFPReg which is misleading since arguments can be passed on the stack too. 2015-11-05 22:47:07 -05:00
Zoltan Varga 199ce3e9a7 [llvm] Add a 'type' field to LLVMArgInfo, use it to simplify the code a bit. 2015-11-05 22:39:08 -05:00
Zoltan Varga c8ef64bb98 [aot] Reduce the code duplication in the wrapper encoding/decoding code a bit. 2015-11-05 19:53:42 -05:00
Zoltan Varga 3c405f21cb [runtime] Make mono_marshal_get_wrapper_info ()/set_wrapper_info () use a WrapperInfo pointer instead of a generic one. 2015-11-05 19:29:30 -05:00
Zoltan Varga ddecee5dd0 [runtime] Add WrapperInfos for a few wrappers which were missing it. 2015-11-05 18:28:35 -05:00
Zoltan Varga 68ef8dea40 [runtime] Merge the 'AllocatorWrapperInfo' structure into the common WrapperInfo structure. 2015-11-05 17:52:54 -05:00
Martin Baulig db81fa06ec [Mono.Security]: Add API to let MonoTlsProvider provider a custom system certificate validator.
(cherry picked from commit 4364a6b752)
2015-11-05 17:38:56 -05:00
Martin Baulig b96248ec0e [Mono.Security]: Add ICertificateValidator.InvokeSystemValidator().
(cherry picked from commit 35f9501967)
2015-11-05 17:38:48 -05:00
Martin Baulig bf6c6c3b44 [System]: Cleanup SystemCertificateValidator.Evaluate() by passing it the settings instance.
(cherry picked from commit 6837c35527)
2015-11-05 17:38:41 -05:00
Martin Baulig dbec416030 [Mono.Security]: Add CertificateValidationHelper(MonoTlsProvider,MonoTlsSettings).
This is intended to be used by MonoTlsProvider implementations; the ChainValidationHelper
now knows about the provider (unless it's invoked directly from user code).

(cherry picked from commit 2dbf0a0ed1)
2015-11-05 17:38:19 -05:00
Martin Baulig 9a73889ed5 [System/TLS]: Make 'SystemCertificateValidator' a static class with a single Evaluate() method.
(cherry picked from commit fbdb69cfff)
2015-11-05 17:38:12 -05:00
Martin Baulig 5674bdd47b [System/TLS]: Use the official API in SslStream rather than hard-coding MonoDefaultTlsProvider.
(cherry picked from commit 0bcc31e326)
2015-11-05 17:38:05 -05:00
Zoltan Varga 5baeb28248 [runtime] Save the nursery bits used to create wbarrier methods into the aot image, and check it at runtime. 2015-11-05 17:26:43 -05:00
Mark Probst c278ead4d0 Merge pull request #2197 from mono/feature-disable-specific-finalizers
[sgen] Allow disabling finalization of specific classes.
2015-11-05 08:59:52 -08:00
Rolf Bjarne Kvinge acc96bf344 [linker] Provide better error message when an error occurs while processing xml descriptions.
With this mtouch will show:

> error MT2001: Could not link assemblies. Reason: Failed to process XML description: /work/maccore/master/maccore/tests/link sdk/extra-linker-defs.xml
>	Failed to process XML description: /work/maccore/master/maccore/tests/link sdk/extra-linker-defs.xml
>	Failed to resolve assembly: 'MonoTouch, Culture=neutral, PublicKeyToken=null'

instead of:

> error MT2002: Failed to resolve assembly: 'MonoTouch, Culture=neutral, PublicKeyToken=null'

which is a lot less helpful.
2015-11-05 12:35:34 +01:00
Marek Safar 4822ed5b92 Merge pull request #2199 from mhutch/pcl46
[xbuild] Add PCL 4.6 targets
2015-11-05 09:38:00 +01:00
Alexander Köplinger 1836d8b52e [acceptance-tests] Bump coreclr to pick up 65b122151adb6b5ef7c27d8e0c268ef479fbe8b4
+11 more passing tests. At this point I think there are no more false positives left and the rest are real bugs.
2015-11-05 01:40:43 +01:00
Zoltan Varga d8d944c72c [runtime] Implement native-to-managed marshalling of byref delegate arguments. Fixes #35545. 2015-11-04 16:27:35 -05:00
Zoltan Varga 78248f8ee7 [aot] Fix a crash introduced by 51c4e47f2 when the mscorlib aot image is missing. 2015-11-04 16:27:35 -05:00
Martin Baulig 3d172a4b34 Cosmetic; remove unused variable.
(cherry picked from commit a9afeddd80)
2015-11-04 15:11:31 -05:00
Martin Baulig eac6301e92 Cleanup unused usings.
Mono.Net.Security/LegacySslStream.cs is the only file which should
reference the 'Mono.Security.Protocol.Tls' namespace.

(cherry picked from commit 43307ff086)
2015-11-04 15:11:24 -05:00
Michael Hutchinson 4f06dbafa4 [xbuild] Add PCL 4.6 targets 2015-11-04 14:11:02 -05:00
Mark Probst 84f967d05b [sgen] Allow disabling finalization of specific classes. 2015-11-04 10:58:11 -08:00
Alexander Köplinger 94cc4ab942 [acceptance-tests] Sort source files and add a new MONO define when compiling the tests
This allows us to customize test behavior that is different on Mono on purpose.

Sorting the files provides a much nicer output in the test runner.

Bump CoreCLR to include changes from 20789373370fe8f72dde01ad7ffc0816f618197c
2015-11-04 18:48:09 +01:00
Martin Baulig 7d6abe53de [Facades]: Remove 'System.IO.Compression'.
We do not need a 'System.IO.Compression' facade assembly because we
already have a regular assembly with the same name, which contains all
the classes from here - either as actual implementation or as type-forwarders.

(cherry picked from commit fff7805794)
2015-11-04 12:33:58 -05:00
Ludovic Henry 17786e1260 Merge pull request #2196 from alexischr/coop-gc_stackdata-problem
[coop] Make sure 'gc_stackdata' is aligned and properly sized.
2015-11-04 16:03:22 +00:00
Zoltan Varga a0634bb78b [sdb] Add another fastpath to the invoke code to skip more of the single stepping code during invokes. 2015-11-04 03:09:54 -05:00
Zoltan Varga 7336f89c6e [llvm] Get rid of the 'pindexes' array in LLVMCallInfo, store the parameter index in LLVMArgInfo. 2015-11-04 01:50:49 -05:00
Zoltan Varga 3e4c0ddb3e [llvm] Add new llvm argument passing conventions for passing/returning scalar arguments by ref. Not yet used. 2015-11-04 00:08:47 -05:00
Rodrigo Kumpera 7a6fbd1ec5 Merge pull request #2193 from kumpera/loader-error-cleanup2
Get do_mono_metadata_parse_type to use MonoError
2015-11-03 23:51:09 -05:00
Joel Martinez 85bde33bf2 [monodoc] Fixed several issues with .ToEcmaCRef method.
In particular:

- Issues with cref formatting for subtypes.
- Added support for Explicitly implemented members.
- Added support for generic member parameters.

A number of unit tests were added to verify this functionality.
2015-11-03 15:13:51 -05:00
Zoltan Varga f3cc45dec2 Merge pull request #2194 from alexrp/ppdb-status-crash
[ppdb] Fix a crash caused by mono_ppdb_load_file ().
2015-11-03 12:53:07 -06:00
Alexis Christoforides 7ebb60c061 [coop] Make sure 'gc_stackdata' is aligned and properly sized.
The size of the gc_stackdata buffer was not a multiple of 8 bytes on 64-bits, so sgen_conservatively_pin_objects_from () would address invalid memory on its last iteration, as it progresses down the buffer by pointer size. The function also expects memory references to be aligned.

This is still not a guarantee that we are aligning memory references properly as two misaligns will still give the right size, but we can catch some of them here. Proper sizing is a smaller issue because we could always pad.
2015-11-03 10:30:04 -05:00
Alexander Köplinger f2c46dbf7a [acceptance-tests] Bump coreclr to pick up c1f0812bd0f94f085eb29199ef3b5bd69eab24bb: 2015-11-03 16:00:42 +01:00
Ludovic Henry 1a1711625d Merge pull request #2195 from alexrp/tp-ms-io-trace-crash
[threadpool-ms-io] Fix some crashy mono_trace () calls.
2015-11-03 13:54:16 +00:00
Ludovic Henry 334a08dd39 [mini] Add safepoint support for all platforms 2015-11-03 13:50:00 +00:00
Alex Rønne Petersen 9e4a6b484a [threadpool-ms-io] Fix some crashy mono_trace () calls.
The format strings declared a string argument that wasn't being passed so the
underlying format function crashed when trying to retrieve it.
2015-11-03 14:35:16 +01:00
Alex Rønne Petersen 9cde395cfa [ppdb] Fix a crash caused by mono_ppdb_load_file ().
As the `status` variable wasn't being passed along, the image loading code
would crash trying to set it.
2015-11-03 13:26:51 +01:00
Marek Safar b73f81c331 Merge pull request #2190 from Numpsy/AddADNotFoundException
Add stub implementation of ActiveDirectoryObjectNotFoundException
2015-11-03 10:24:10 +01:00
Ludovic Henry dd80d00810 Merge pull request #2192 from kumpera/suspend-crossfire
[suspend] Fix suspend race between mono-threads and sgen suspend when using the posix backend.
2015-11-03 09:11:46 +00:00
Rodrigo Kumpera 7748ab962a [mono-error] Add MonoError to do_mono_metadata_parse_type and remove some of the type parsing scaffolds. 2015-11-03 01:13:03 -05:00
Rodrigo Kumpera 8b43ae37a1 [mono-error] Add MonoError to do_mono_metadata_parse_generic_class. 2015-11-03 01:02:43 -05:00
Rodrigo Kumpera 1534ecf948 [mono-error] Change mono_metadata_parse_generic_inst to use MonoError. 2015-11-03 00:37:09 -05:00
Rodrigo Kumpera b7d5b8fa7a [mono-error] Introduce MonoError into mono_metadata_parse_generic_param. 2015-11-02 23:11:14 -05:00
Alexander Köplinger 0a21d32286 [acceptance-tests] Make sure the latest version of coreclr-testlibrary.dll is in test directory
Also switch to creating symlinks instead of copying the file.
2015-11-03 02:00:37 +01:00
Rodrigo Kumpera 468a6629b3 [suspend] Fix suspend race between mono-threads and sgen suspend when using the posix backend.
The problem happens when a thread is left suspended by mono-threads and sgen tries to suspend it.

The signal mask of sigsuspend call in mono-threads didn't include sgen's suspend signal, making
it impossible for sgen to suspend it.

The fix is to include sgen's suspend signal into mono-threads sigsuspend mask. This way sgen
suspend can nest over mono-thread's.

The opposite is not needed as sgen never leaves threads suspended when it finishes and it holds
the suspend lock the whole time, making it impossible for mono-threads to initiate any suspend operation.
2015-11-02 19:19:56 -05:00
Vlad Brezae 7b05a82b56 [sgen] Finish concurrent collection if the heap grows too much
In order to achieve this, when asked to do a major collection, we finish the concurrent collection immediately, regardless if we are explicitely requested or not to wait_to_finish.
2015-11-03 02:07:28 +02:00
Vlad Brezae d579f812fb [sgen] Create constant for heap growth allowance 2015-11-03 01:33:30 +02:00
Vlad Brezae 624b8764d7 Merge pull request #2081 from BrzVlad/feature-concurrent-work
Concurrent sgen improvements
2015-11-03 01:05:50 +02:00
Alexander Köplinger e9e2ffd765 [acceptance-tests] Output test list to file in chunks
On Jenkins we get a "make: execvp: /bin/sh: Argument list too long" error while executing the coreclr-runtest-basic target.
Since the shell doesn't like echoing our (very) big list of CoreCLR tests in one go, we need to split it up into chunks of
100 entries to hopefully avoid that.
2015-11-02 22:44:56 +01:00
João Matos 3adcd34f78 Merge pull request #2191 from LogosBible/mono_amd64_have_tls_get
Add support for version of pthread_getspecific when launching from Xc…
2015-11-02 21:10:41 +00:00
Martin Potter 061f993b68 Add support for version of pthread_getspecific when launching from Xcode with LLDB attached. 2015-11-02 12:02:01 -08:00
Ludovic Henry e161b61b3d [trace] Synchronize output 2015-11-02 18:47:12 +00:00
Alexander Köplinger 7f5aca14d2 [mono] Rename NUnit xml result files to TestResult-{0}.xml convention
This is the convention used in other parts of the repo like mcs/, so we should try to be consistent here.
2015-11-02 19:21:01 +01:00
Alexander Köplinger 922d4e2150 [acceptance-tests] Remove some tests that were removed upstream
Also bump coreclr to pick up latest commit.
2015-11-02 19:21:01 +01:00
Ludovic Henry dbe9e55cac [threads] Remove assertion on info for socket syscall abort
This would trigger a crash with XS on clean process exit, due to the
assertion at socket-io.c:2757.

This fixes bug 35429
2015-11-02 18:17:48 +00:00
Alexander Köplinger 6329627590 [System.Core] Make sure DateTime.AddDays() is preserved by the linker in a test
We use the method in the code instead of just via reflection.
This allows the test to work on iOS device builds.
2015-11-02 18:11:45 +01:00
Richard Webb c5216a035f Add stub implementation of ActiveDirectoryObjectNotFoundException
largely copied from ActiveDirectoryOperationException
2015-11-02 16:32:44 +00:00
Marek Safar e1a33279d4 [mcs] Add codegen for try-finally block with unreachable closing brace. Fixes #35401 2015-11-02 14:45:28 +01:00
Marek Safar 3acfdddfa6 Merge pull request #2186 from ruediger-stevens/master
Exception serializes the InnerException as System.Exception
2015-11-02 14:22:00 +01:00
Alexander Köplinger 382b6f0622 [acceptance-tests] Reenable some tests now that #35410 is fixed 2015-11-02 12:30:54 +01:00
Marek Safar 12b806a08a [mcs] add new test 2015-11-02 11:07:27 +01:00
Marek Safar 31a147d5ad [mcs] Add sbyte type to the list of valid cast tokens. Fixes #35410 2015-11-02 11:07:26 +01:00
[email protected] cf7f5272e2 Exception serializes the InnerException as System.Exception not as it's run-time type.
This makes serialization consistent with deserialization (where the InnerException is already retrieved as System.Exception explicitly).
Additionally it may allow serializers more options in serializing inner exceptions (i.e. fall back to System.Exception if the specific exception is not serializable itself).
2015-11-02 11:04:25 +01:00
Marek Safar 8cea0931f9 Merge pull request #2185 from akoeplinger/json-move
[System.ServiceModel.Web] Remove old copy of S.R.Serialization.Json
2015-11-02 08:40:04 +01:00
Zoltan Varga 67d2defa3d Fix an obsolete comment. 2015-10-31 23:06:19 -04:00
Alexander Köplinger 308d25f67f [System.ServiceModel.Web] Move System.Runtime.Serialization.Json tests into System.Runtime.Serialization assembly
That's where they belong on .NET 4.5+

Additionally, add a test case from https://bugzilla.xamarin.com/show_bug.cgi?id=4230
2015-10-31 01:10:35 +01:00
Alexander Köplinger 8c634bacbf [System.ServiceModel.Web] Remove old copy of System.Runtime.Serialization.Json
We don't need this here anymore since it moved to System.Runtime.Serialization.dll in
.NET 4.5 and 54f7c82d2b.

This copy is just confusing and not even built anymore, so delete it.
2015-10-31 01:01:15 +01:00
Martin Baulig d1b4e3adb9 [Mono.Security]: Add 'MonoTlsSettings.TrustAnchors' and 'CertificateValidationHelper.SupportsTrustAnchors'.
This is currently only supported on iOS and Mac (check 'CertificateValidationHelper.SupportsTrustAnchors')
and will pass a set of trusted root certificates to the OS validation function.  Use for self-signed
certificates instead of providing a custom callback.
2015-10-30 16:42:44 -04:00
Alexander Köplinger 18b9eb403f [acceptance-tests] Pull in new CoreCLR tests added upstream
A bunch of tests were added in the upstream repo, add those to the source listings.

There's a suite of tests in the CoreMangLib folder which are mostly testing corelib,
added a separate target "coreclr-runtest-coremanglib" for it and renamed the existing
target to "coreclr-runtest-basic".

Build and link all cs testcases with the coreclr-testlibrary.dll which enables a
few more tests to run.
2015-10-30 21:21:59 +01:00
Alexander Köplinger 68ea7c01b8 [acceptance-tests] Bump coreclr to pick up 3b2969dffe191b03f1ac85a9c1e62417c9b7833b: 2015-10-30 21:21:59 +01:00
Alexander Köplinger d206710c6f [acceptance-tests] Add prefix in commit message for the bump commit helper
Additionally remove 'git pull', it doesn't work when no tracking branch is set and I can easily pull myself if I want to.
2015-10-30 21:21:58 +01:00
Martin Baulig a4b77da187 Put back "[Mono.Security.Providers.OldTls]: Include all the sources from the old TLS implementation here."
The build problem should now be fixed.

This reverts commit 5a7c0a0d4c.
2015-10-30 14:33:28 -04:00
Martin Baulig 1ea0a0e2bb [System/TLS]: In ChainValidationHelper, remove the overloads taking 'Mono.X509' certificates. 2015-10-30 14:33:27 -04:00
Martin Baulig 71a74c068b [Mono.Security]: On mobile, 'Mono.Security.Interface.CertificateValidationHelper' becomes public in System.dll. 2015-10-30 14:19:52 -04:00
Martin Baulig 5a7c0a0d4c Revert "[Mono.Security.Providers.OldTls]: Include all the sources from the old TLS implementation here."
This does not build on Mobile yet.

This reverts commit 9147778ee8.
2015-10-30 14:05:34 -04:00
Martin Baulig 9147778ee8 [Mono.Security.Providers.OldTls]: Include all the sources from the old TLS implementation here. 2015-10-30 13:16:23 -04:00
Martin Baulig 10c67fe6bd [System]: Cleanup 'ChainValidationHelper', moving the actual validation code into a new class.
The actual validation code now lives in 'SystemCertificateValidator', whereas
'ChainValidationHelper' contains all the glue code which deals with 'ServicePointManager',
user-supplied callbacks, etc.
2015-10-30 12:41:09 -04:00
Rodrigo Kumpera bb4339cc16 [mono-error] Introduce MonoError into mono_metadata_parse_array_internal. 2015-10-30 11:29:34 -04:00
Jonathan Pryor 0eb394dab5 Merge pull request #2152 from joelmartinez/mdoc-preserver
[mdoc] Marking `MDocPreserve` Obsolete.
2015-10-30 10:13:56 -04:00
Zoltan Varga 3be72d90bf [sdb] Add a fastpath to process_single_step_inner () for single stepping during invokes. 2015-10-30 00:16:41 -04:00
Zoltan Varga c8b29395b5 [llvm] Add names for some temporary variables representing got slots. 2015-10-30 00:16:41 -04:00
Martin Baulig 8c1d0d4efe [System/TLS]: On desktop, allow dynamic loading of the TLS Provider at runtime.
To do this, set the MONO_TLS_PROVIDER environment variable to either "default",
"newtls", "oldtls" or the full assembly-qualified type name of the MonoTlsProvider
(in this case, the class needs to derive from MonoTlsProvider and have a public
parameterless constructor and it needs to be installed in the GAC).
2015-10-29 17:41:35 -04:00
Ludovic Henry fe3063c464 [coop] Fix typo for gc unsafe region enter/exit
The idea is to get the address of the top of the stack, so passing a
value is meaninless. This was a typo. It also fixes libtest.c which
used an outdated signature.
2015-10-29 20:38:29 +00:00
Martin Baulig 3fda636ef7 [Mono.Security]: Add new MonoTlsProviderFactory.CreateHttpListener() API to create a HttpListener.
This new method lets you create a 'HttpListener' and specify the X509Certificate2 to use
(so you don't have to put it into ~/.config/.mono/httplistener) as well as an optional
'MonoTlsProvider' and optional 'MonoTlsSettings'.
2015-10-29 15:55:36 -04:00
Rodrigo Kumpera 2db8d363f3 Merge pull request #2180 from kumpera/loader-error-cleanup
This is a small batch of MonoError cleanups.
2015-10-29 15:53:01 -04:00
Martin Baulig 0e956c0902 [System]: Use the new 'MonoTlsProvider' framework in 'HttpListener'.
This makes 'HttpListener' use 'SslStream', which can now switch the
TLS implementation at runtime.
2015-10-29 15:52:31 -04:00
Martin Baulig 790a6380be [System/TLS]: In LegacySslStream, call SslServerStream's .ctor and request, but not require a client certificate.
In SslStream.AuthenticateAsServer(), setting 'clientCertificateRequired' to true will ask for a client
certificate and - if the client does not provide one - invoke the 'RemoteCertificateValidationCallback'
with null and 'SslPolicyErrors.RemoteCertificateNotAvailable' - but resume the handshake if this callback
returns true.
2015-10-29 15:52:31 -04:00
Rodrigo Kumpera 49e58bad2a Fix windows build. 2015-10-29 15:51:58 -04:00
Zoltan Varga 9d9a3ed290 [llvm] Cleanup the code in process_call () a bit. 2015-10-29 15:47:37 -04:00
Martin Baulig 3fe564b459 Oops, also need to set it when cloning. 2015-10-29 15:35:15 -04:00
Martin Baulig ad982a5ceb [Mono.Security]: Add 'MonoTlsSettings.EnabledProtocols' property.
This is currently only used by the new TLS code, but allows to override
the protocol.
2015-10-29 15:17:15 -04:00
Martin Baulig f2aedc29ed [NewSystemSource]: Pass down the 'IMonoTlsProvider' to SSPIWrapper.
This should fix the issue where you pass 'NewTlsProvider' as custom provider
without installing it as the default.
2015-10-29 15:05:21 -04:00
João Matos 161aa4387b Merge pull request #2182 from lewurm/fix-arm-build
mini-llvm: fix wrong usage
2015-10-29 18:36:36 +00:00
Bernhard Urban 3c51ad2e21 mini-llvm: fix wrong usage 2015-10-29 11:31:19 -07:00
Ludovic Henry 5fb2e37f0c [tests] Adjust MathTest double epsilon value
The double.Epsilon value represent the smallest value that double is
able to represent. And that is diferent from the machine epsilon, which
is the smallest difference between two double values.

The second is equal to 2 ^ (-52), because there are 52bits to
represent the mantissa in a IEEE 754 double.
2015-10-29 18:17:54 +00:00
Zoltan Varga 98222ba10c [llvm] Split sig_to_llvm_sig () into two versions, one which takes an LLVMCallInfo argument, and one which doesn't. 2015-10-29 13:40:25 -04:00
Martin Baulig 7a38dad045 Comment-out [HostProtection] attribute in SslStream.cs, it seems to be causing problems. 2015-10-29 13:08:18 -04:00
Zoltan Varga 13b5202890 [runtime] Disable the -Wreturn-stack-address clang warning. 2015-10-29 13:07:02 -04:00
Ludovic Henry 45fffb5201 [threads] Fix warning on Linux 2015-10-29 16:37:49 +00:00
Neale Ferguson 7471d303d3 s390x-codegen.h - Initial SIMD support
cpu-s390x.md - Add gc-safe-point instruction
mini-ops.h - Add TARGET_S390X for gc-safe-point
mini-s390x.c - Initial SIMD support; Fix floating point conversion
mini-s390x.h - Initial SIMD support
2015-10-29 10:31:24 -04:00
Rodrigo Kumpera df4951fc2d [mono-error] Introduce mono_metadata_parse_type_checked variant that uses MonoError. 2015-10-29 02:25:06 -04:00
Rodrigo Kumpera 8ee9b71381 [mono-error] Introduce MonoError in compare_type_literals. 2015-10-29 02:25:06 -04:00
Rodrigo Kumpera edaf5b692a [metadata] Remove dead MonoParseTypeMode argument from non public functions. 2015-10-29 02:25:05 -04:00
Rodrigo Kumpera 2780a0ca70 [loader-error] mono_metadata_parse_method_signature is no longer used by the runtime, so remove loader error handling from it. 2015-10-29 02:25:05 -04:00
Zoltan Varga 385722223b [llvm] Clean up the naming convention in the backend. 'module' refers to a MonoLLVMModule while 'lmodule' refers to a LLVMModuleRef. Some other small cleanups. 2015-10-28 20:56:12 -04:00
Zoltan Varga 13bdaa17f7 [llvm] Merge LLVMCallInfo and LLVMSigInfo. 2015-10-28 20:38:56 -04:00
Martin Baulig 980ecc2c79 [System]: Replace the 'SslStream' implementation with a proxy that's using the 'MonoTlsProvider' layer.
This allows consumers of the 'SslStream' class to take full advantage of
the new TLS switcher code.
2015-10-28 20:28:09 -04:00
Martin Baulig 0d848ee397 [Mono.Security]: It is legal for a TlsClientCertificate message to contain no certificates. 2015-10-28 19:12:48 -04:00
Zoltan Varga c4ee855204 Fix the build, the stub for mono_llvm_cpp_throw_exception () was inside a DISABLE_JIT ifdef block. 2015-10-28 18:45:25 -04:00
Martin Baulig 82b0741f35 Fix my last commit. 2015-10-28 18:38:43 -04:00
Martin Baulig a76f2dcb0c [Mono.Security]: Rename 'MonoTlsSettings.ServerCertificateValidationCallback' into 'RemoteCertificateValidationCallback'.
This callback is also used to validate client-certificates when using SslStream in server-mode.
2015-10-28 18:26:55 -04:00
Martin Baulig 161997beb4 Don't pass a 'null' hostname to the system validator as it would crash. 2015-10-28 18:20:28 -04:00
Martin Baulig 799361d19f Kill dead code. 2015-10-28 18:20:28 -04:00
Zoltan Varga c222e037c0 [runtime] Handle the conditional compilation of llvm-runtime.cpp at the automake level since including a c++ file into a c project seems to cause linking problems on some platforms. 2015-10-28 17:31:19 -04:00
Zoltan Varga a02b62eba8 [runtime] Add a configure check for unwind.h 2015-10-28 17:22:11 -04:00
Zoltan Varga 97d6e5bb33 [profiler] Avoid a crash at shutdown by installing the assembly unload hook for the 'start_unload' event instead of the 'end_unload' event, the latter receives a mostly freed assembly. 2015-10-28 15:05:02 -04:00
Ludovic Henry a4ac636499 [threads] Use runtime flag to enable cooperative suspend
To enable cooperative suspend, simply set the MONO_ENABLE_COOP
environment variable.
2015-10-28 18:46:29 +00:00
Ludovic Henry b6ae9f231a Merge pull request #2179 from BogdanovKirill/enummodulesfix
[Processes] Memory leak fix in EnumProcessModules function
2015-10-28 18:27:52 +00:00
Zoltan Varga f538588ed1 Fix the build. 2015-10-28 14:27:23 -04:00
Martin Baulig 29531a29a5 Use 'using SD = System.Diagnostics' to avoid ambiguous references. 2015-10-28 14:14:48 -04:00
Ludovic Henry 39508e2285 [test-runner] Improve output 2015-10-28 17:11:21 +00:00
Ludovic Henry 76a1b2fbff [Process] Catch the closing of handle 2015-10-28 17:11:21 +00:00
Ludovic Henry 0d7364c4e4 [Process] Do not count the output/error wait in the timeout of WaitForExit 2015-10-28 17:11:20 +00:00
João Matos 0a59fc580e [runtime] Fixed the non-LLVM build. 2015-10-28 16:30:54 +00:00
Zoltan Varga 2829922474 Fix the windows build. 2015-10-28 11:07:42 -04:00
Ludovic Henry 5e52db585e [threads] Fix race between async suspend and compensation
The race only happens on Posix with unified suspend.

The chain of event is the following:
- T1 suspend the world (calls `sgen_unified_suspend_stop_world`)
- T2 is async suspended
- T2 execute suspend_signal_handler:
 - T2 finish async suspend
 - T2->suspend_can_continue is set to FALSE as the thread is detaching
 - T2 notify T1 via `mono_threads_notify_initiator_of_suspend`
 - T2 is yielded (via the OS scheduler, or forced via a `sleep`)
- T1 returns from `mono_threads_wait_pending_operations`
- T1 does its stuff
- T1 restart the world
- T1 (or any another thread, except for T2) suspend the world (it does not
  necessarily uses `sgen_unified_suspend_stop_world`)
- T2 is async suspended: incrementation of T2->suspend_count to 2, but it is
    not signalled because it is already in ASYNC_SUSPENDED state
- T2 wakes up (for any reason) and execute compensation <- ERROR: suspend_count != 1

This race can happen because when async suspending, we notify the
suspendor before executing the compensation, in this case for a thread
which is detaching. By simply post-ponning the notification, just after
the compensation, we eliminate this race.
2015-10-28 14:34:56 +00:00
Alex Rønne Petersen 6d15e070af [runtime] Actually clean up context-static data segments. 2015-10-28 15:31:28 +01:00
Alexander Köplinger 2684e2fc3c [acceptance-tests] Write list of CoreCLR tests into file and pass it to test-runner
This shaved about 30 seconds off the time until the test-runner started on my machine compared to
passing the tests in the command line directly (we have *lots* of CoreCLR tests).
2015-10-28 14:37:14 +01:00
Alexander Köplinger f081757742 [test-runner] Add a new --input-file option for reading the test list from a file 2015-10-28 14:37:14 +01:00
Alexander Köplinger ae671ad548 [test-runner] Fix bug in commandline option parsing
i+i doesn't make sense, it should be i+1 (the next argument after the current one).
2015-10-28 14:37:13 +01:00
Ludovic Henry 45ba0107ea [tests] Add coreclr GC stress tests 2015-10-28 13:18:10 +00:00
Ludovic Henry b58fc1009b [tests] Try to fix finalizer-wait 2015-10-28 13:13:48 +00:00
Ludovic Henry c2743ba703 [tests] Fix Math.Pow precision bug on Android 2015-10-28 11:17:39 +00:00
BogdanovKirill fbf4295a9b [Processes] Memory leak fix in EnumProcessModules function
The main point is that get_process_name_from_proc's result string is never released.

This change is released under the MIT license.
2015-10-28 16:15:08 +05:00
Alex Rønne Petersen 096a78ef24 [profiler] Disable 'time went backwards' debug message.
While this would have indicated a bug in the past, it's perfectly normal now
due to how we synthesize TYPE_JIT events to ensure sane event ordering.
2015-10-28 11:25:28 +01:00
Zoltan Varga e7536f6e29 [runtime] Use Unwind_Backtrace only on platforms which support it. 2015-10-27 21:04:01 -04:00
Zoltan Varga af8a03e25c [llvmonly] Add support for direct calls to icalls. 2015-10-27 20:57:16 -04:00
Martin Baulig 6d7a1e4a09 [System/TLS]: Don't crash when we're called without user-supplied certificate validator. 2015-10-27 17:39:10 -04:00
Alexander Köplinger c9dff536ad [acceptance-tests] Move CoreCLR submodule reference to Mono fork 2015-10-27 22:22:45 +01:00
Martin Baulig c3f236a79d Oops, there is no README.md 2015-10-27 15:47:40 -04:00
Martin Baulig 54d4cfaf60 Oops, forgot to add to the top-level Makefile for mobile. 2015-10-27 15:45:27 -04:00
Alexander Köplinger 36a89209fe [test-runner] Filter out invalid XML chars before writing to XML
The test-runner crashed sometimes when running the CoreCLR testsuite with the following exception:
"System.ArgumentException: '', hexadecimal value 0x0F, is an invalid character." when trying to
emit the NUnit xml.

The stacktrace of one of the failing tests contained the character 0x0F which is invalid in XML,
we now filter out those invalid chars.
2015-10-27 20:37:34 +01:00
Martin Baulig 1c248829d4 [Mono.Security.Providers.OldTls]: New assembly.
This provides a 'MonoTlsProvider' for Mono's existing TLS implementation.

It's simply a public frontend for the internal 'LegacySslStream' class.
2015-10-27 14:29:07 -04:00
Martin Baulig 1367b2e744 [System]: Make internals visible to Mono.Security.Providers.OldTls. 2015-10-27 14:29:07 -04:00
Vlad Brezae a53462999d [sgen] Fix marking of cards on 64bit 2015-10-27 20:25:05 +02:00
Mark Probst 7f84c3c9e7 [sgen] Fix call to InterlockedCompareExchange().
This fixes random crashes on `sgen-weakref-stress.exe`.
2015-10-27 10:56:03 -07:00
Radek Doulik 0bebfa7eba [linker] match type pattern with nested types
- this way the following xml will match all the types in the assembly
   MyAssembly

    <linker>
        <assembly fullname="MyAssembly">
            <namespace type="*" />
        </assembly>
    </linker>

   before this change it will only match the types defined in main
   module and none of the nested types
2015-10-27 18:32:28 +01:00
Alexander Köplinger 825033f5b0 [acceptance-tests] Append a suffix to the CoreCLR IL tests
Some of the tests have both a test.il and test.cs in the same folder, which means we would
generate an .exe with the same name and overwriting one of them.

This is avoided by appending a _il suffix to the IL tests.
2015-10-27 18:19:58 +01:00
Andi McClure 7de63f4d2e Merge pull request #2163 from xmcclure/image-audit
Mempool reference-auditing feature in checked builds
2015-10-27 11:49:36 -04:00
"Andi McClure ext:(%22) 4c0b47d580 This introduces three macros, to be used in place of a simple pointer assignment when working with images or imagesets:
CHECKED_METADATA_WRITE_PTR - Use this to assign a pointer when it points from memory hosted by an image or imageset to another.
CHECKED_METADATA_WRITE_PTR_LOCAL - Use this to assign a pointer when it points from memory noted by an image or imageset to itself.
CHECKED_METADATA_WRITE_PTR_EXEMPT - Use this to assign a pointer in memory hosted by an image or imageset, but which the audit feature cannot correctly check at this time (this is the case when an image must contain a pointer to something that is not located in a mempool, such as a constant string). This is so that at least we know where these exceptions to the audits are.

In non-checked mode, each of these is a simple assignment. In checked mode, they walk the graph of references between images to make sure invariants related to ref_count are not violated.
2015-10-27 11:41:41 -04:00
João Matos 173b4bce54 [runtime] Normalize include style. 2015-10-27 14:38:44 +00:00
Andi McClure b5ec396a79 Merge pull request #2175 from xmcclure/pre-image-audit
Mempool reference-auditing feature in checked builds (prep work only)
2015-10-27 10:20:33 -04:00
"Andi McClure ext:(%22) b2f532b354 Simplify function interface for rework of image.c hashes, based on PR comments 2015-10-27 09:35:57 -04:00
João Matos 13262d3bad [runtime] Fixed cross-compile LLVM build. 2015-10-27 11:48:41 +00:00
Ludovic Henry 29e84f47af [test-runner] Make sure to close resources hold by Process 2015-10-27 11:48:14 +00:00
Ludovic Henry 85299820fd [Process] Use output/error stream instead of naked handle
This is to make sure the handle is closed, whenever we close the streams
2015-10-27 11:48:13 +00:00
Alexander Köplinger b1bddffb50 [test-runner] Make the --testsuite-name option required
Defaulting to a value doesn't make sense since the NUnit xml would be overwritten if multiple tests used the same default.
2015-10-27 12:46:31 +01:00
João Matos 46f353a289 [runtime] Added --with-cross-offsets configure option for including an explicit AOT cross offsets file.
This option will define MONO_OFFSETS_FILE which will be used by the rest of the code to include the right file when looking for cross offsets.
2015-10-27 11:40:56 +00:00
Marek Safar 6262c487d3 [mcs] Declared fields cannot have unmanaged check done before all types are defined. Fixes #35269 2015-10-27 10:19:58 +01:00
Zoltan Varga 639f1f6527 [llvmonly] Fix EH when llvm is disabled. 2015-10-27 00:31:34 -04:00
Vlad Brezae 5d6f1d6d82 [sgen] Add optimized drain stack functions for the concurrent collector 2015-10-27 00:32:35 +02:00
Vlad Brezae 194e86b53f [sgen] Simply the usage of the optimized drain stack function
If we support an optimized drain stack function we provide it in the object operations structure.
2015-10-27 00:32:35 +02:00
Vlad Brezae 2bddf1cf6a [sgen] Remove dead defines 2015-10-27 00:32:35 +02:00
Vlad Brezae 3137468f10 [sgen] Simplify prototype of drain gray stack function
The function only needs the gray queue since it is tied to the object operations.
2015-10-27 00:32:35 +02:00
Vlad Brezae 5f40205bdb [sgen] Finish the concurrent collection only on the gc thread
For now, there is no benefit in using worker threads, just added complexity
2015-10-27 00:32:35 +02:00
Vlad Brezae d3b947125b [sgen] Explicitly indicate if we run jobs on the worker thread 2015-10-27 00:32:34 +02:00
Vlad Brezae f4a472d780 [sgen] Remove unused object operations 2015-10-27 00:32:34 +02:00
Zoltan Varga 9c4371dbc3 [llvmonly] Fix an assertion for methods with many arguments. 2015-10-26 18:32:13 -04:00
Zoltan Varga a6b766f061 [llvmonly] Fix the computation of the generic context used to initialize shared methods, previously we would be using the context of the class of the receiver, but that wouldn't work when its a non-generic class inheriting from a generic class. Use the context of the method which was used to lookup the shared method in the first place instead. 2015-10-26 18:28:50 -04:00
Mark Probst eee225412a [sgen] Fix binary protocol limit default.
`size_t` is unsigned, so using `-1` by default will always impose a
limit, and make binary protocol file names numbered, which is not
usually what you want or expect.
2015-10-26 15:04:59 -07:00
Ludovic Henry 839d6fcf79 [Process] Close process in/out/err handle on Process dispose
This would lead to leaked handle, and that would be visible when running
the test suite on Jenkins, with a "Too many open files" exception.

That also reverts the behavior to before 789808b507
2015-10-26 22:02:36 +00:00
"Andi McClure ext:(%22) 596558054c Rework “image hashes” in image.c to segregate by-path and by-name lookups into two hashes
This is part of the continued cleanup work for the mempool reference auditing feature. Separating the hashes prevents redundant work when iterating over hashes, something the reference auditor does a lot. External interface to image.c still behaves the same.
2015-10-26 16:04:28 -04:00
"Andi McClure ext:(%22) e2ebba38eb Continued cleanup in preparation for mempool reference auditing feature
- Fixes to comments and the mempool rework, based on pull request comments
- Additional comments overall
2015-10-27 09:37:44 -04:00
Zoltan Varga d9555d36e2 [llvm] Fix aot support in non-llvmonly mode. 2015-10-26 15:17:50 -04:00
Zoltan Varga 6400b43ff8 [llvmonly] Avoid disabling llvm for methods with pinvoke signatures in llvmonly mode. 2015-10-26 14:58:11 -04:00
Zoltan Varga ba3f04a3a0 [llvm] Register the llvmonly icalls even if llvm is not enabled. 2015-10-26 14:57:45 -04:00
Zoltan Varga 6fbbad9506 Fix the non-llvm build. 2015-10-26 13:52:29 -04:00
Ludovic Henry a92a2ea392 [tests] Add timeout before failing 2015-10-26 16:35:14 +00:00
Ludovic Henry f8ea020356 [tests] Increase timeout before failing 2015-10-26 15:50:25 +00:00
Marek Safar ef164ac483 [mcs] Support auto-property with private setter with member definition from external assembly. Fixes #35236 2015-10-26 16:45:36 +01:00
Ludovic Henry 23a11611ec [tests] Increase timeout before failing 2015-10-26 14:13:03 +00:00
Ludovic Henry ba5f03e4ab [tests] Add --testsuite-name to avoid overwritting test result XML files 2015-10-26 12:30:34 +00:00
Ludovic Henry 9928ba3070 [tests] Use test-runner to run unhandled-exception tests 2015-10-26 10:58:51 +00:00
stukselbax fccd4b01a7 Make "https" scheme only when Transport security mode is ON
The behavior of the WebHttpBinding in case of SecurityMode ==
WebHttpSecurityMode.TransportCredentialOnly must use the http scheme, in
order to allow authentication of the client based on the standard HTTP
headers, like WWW-Authenticate: Scheme realm="" and so on. This behavior
is the default in .net;
2015-10-26 13:29:35 +03:00
stukselbax 9f333557cc Merge remote-tracking branch 'refs/remotes/mono/master' 2015-10-26 13:22:55 +03:00
Zoltan Varga 53a79d1b6b Add another missing file. 2015-10-25 22:17:01 -04:00
Zoltan Varga 78ddbe562a Add a missing file. 2015-10-25 22:16:38 -04:00
Zoltan Varga 3b42c2d45d [llvm] Move the EH support code into mini-exceptions.c, and the c++ functions used by it into a new llvm-runtime.cpp file so llvmonly code works in a runtime which doesn't have llvm enabled. 2015-10-25 22:15:39 -04:00
Zoltan Varga 992e9b0349 [llvm] Fix support for asmonly+llvmonly by emitting the bitcode into the file given by the llvm-outfile aot option. 2015-10-25 22:15:38 -04:00
Zoltan Varga 8ba60facb7 Merge pull request #2166 from ermshiperete/FontHeight
[WinForms] Check for null font Height
2015-10-24 01:09:51 -04:00
Zoltan Varga 51f42669b2 [profiler] Create a static version of libmono-profiler-log which doesn't link against eglib, to prevent duplicate symbols errors when its linked with the runtime. Fixes part of #29745. 2015-10-23 23:20:31 -04:00
Zoltan Varga b6ca4765ef [arm] Add a comment for a hack. 2015-10-23 20:53:50 -04:00
Zoltan Varga 348c46afce [arm64] Implement mono_threads_core_begin_async_resume () for arm64. 2015-10-23 19:22:54 -04:00
Aleksey Kliger (λgeek) 74020f8e44 Merge pull request #2171 from lambdageek/dev/fix-marshal
[coop] One more pair of coop gc marshal fixes.
2015-10-23 18:38:41 -04:00
Mark Probst d53d83c40f [sgen] Documentation about future-proofing the binary protocol.
We want to use the binary protocol to measure GC pause times in the
benchmarking suite.  To make that easier and be able to go back and
(re-)benchmark older versions, we'd like the binary protocol format to
be backwards compatible.
2015-10-23 15:17:41 -07:00
Zoltan Varga e2f28334c9 Add a new Moono_GetStackTraces method to Thread which can be used to obtain stack traces for all running threads. 2015-10-23 17:07:06 -04:00
Aleksey Kliger 49fc72f0a8 [coop] One more pair of coop gc marshal fixes.
Missed a pair of
`mono_threads_reset_blocking_start`/`mono_threads_reset_blocking_end`
calls in 991e3ef3e4
2015-10-23 16:15:57 -04:00
Martin Baulig 35411c095d Remove a few more 'using System.Reflection's. 2015-10-23 16:05:19 -04:00
Martin Baulig 96b35a3b8c [Mono.Security]: Use the new 'NoReflectionHelper' instead of reflection in 'MonoTlsProviderFactory'. 2015-10-23 16:03:05 -04:00
Mark Probst 480a083eef [sgen] Add some bridge documentation. 2015-10-23 12:54:23 -07:00
Zoltan Varga 97c49c90aa Merge pull request #2170 from alexanderkyte/mini_llvm_archfix
[runtime] Fix support for amd64 in mini-llvm-cpp.cpp
2015-10-23 15:10:43 -04:00
Alexander Kyte b7476c8a53 [runtime] Fix support for amd64 in mini-llvm-cpp.cpp 2015-10-23 15:01:43 -04:00
Martin Baulig 9da940dd64 [System]: Add internal 'Mono.Net.Security.NoReflectionHelper' class to avoid reflection use. 2015-10-23 14:20:46 -04:00
Martin Baulig f1315fad37 Remove 'using System.Reflection'. 2015-10-23 13:58:31 -04:00
Martin Baulig 55dfc6be38 [Mono.Security]: Access System.dll's internals directly instead of using reflection. 2015-10-23 13:57:15 -04:00
Martin Baulig e236462f1b [System]: Make internals visible to Mono.Security. 2015-10-23 13:57:15 -04:00
Alexander Köplinger ad7c70850e [test-runner] Fix a few more hardcoded test suite names
Missed those in 04bdf3b933
2015-10-23 19:34:35 +02:00
Ludovic Henry 49f6d88894 [test-runner] Wait synchronously for process exit
There was still a race for the last processes, where we could not
correctly wait for them to exit, before closing the StreamWriter for
stdout and stderr.
2015-10-23 18:04:45 +01:00
João Matos c050b0aecc Merge pull request #2168 from BillSeurer/llvm
[ppc] Activate llvm for power
2015-10-23 16:59:12 +01:00
Bill Seurer cdfa7d69fa [ppc] Activate llvm for power 2015-10-23 10:53:07 -05:00
Rodrigo Kumpera e4546727d3 Merge pull request #2165 from lambdageek/dev/marshal-fix
[coop] update native call marshalling to pass thread state transition functions a stack ptr arg.
2015-10-23 10:51:12 -04:00
Ludovic Henry c52b5f88d3 [socket] Use syscall abort mechanism properly
The crash only occurs on Posix platforms.

The assertion error in `mono_threads_begin_global_suspend`
"pending_suspends != 0" arised because of a unproper use of the syscall
abort mechanism.

The signal would have to be send out of a global suspend context, but
in case the call to `mono_threads_pthread_kill` would fail in
`mono_threads_core_abort_syscall`, then we would add a pending
operation, thus increasing the `pending_suspends` counter. But as we
wouldn't call for `mono_threads_wait_pending_operations`, we would never
have a chance to decrement this counter. So next time we would try to
call `mono_threads_begin_global_suspend` we would hit this assertion
error.

The fix is simply to call the abort from inside a global suspend
context, and making sure to wait on pending operations afterwards.
2015-10-23 13:44:16 +01:00
Ludovic Henry 18f06f331e [socket] Enable Shutdown on socket disposal only on specific platforms
This breaks Linux, because a shutdown will cause a recv/recvfrom on the
remote host to return without an error.

This would trigger in System.Net.Sockets.SocketTest.ConnectedProperty.
2015-10-23 13:09:59 +01:00
Jo Shields 49745ffe58 [msvc] Manually update .defs, don't use update-defs Make target 2015-10-23 12:25:28 +01:00
Jo Shields c8f925e898 Revert "[msvc] Update the DLL export definition files."
This reverts commit 90cb172eb8.
2015-10-23 12:24:29 +01:00
Jo Shields 90cb172eb8 [msvc] Update the DLL export definition files. 2015-10-23 12:06:13 +01:00
Brent McCarthy 8528a5d273 [WinForms] Check for null font Height
DrawButtonText was throwing ArgumentException when
button.Font.Height was invalid.
2015-10-23 09:12:57 +02:00
Aleksey Kliger 991e3ef3e4 [coop] update native call marshalling to pass thread state transition functions a stack ptr arg.
mono_threads_prepare_blocking, mono_threads_finish_blocking,
mono_threads_reset_blocking_start, mono_threads_reset_blocking_end all
take a stack pointer argument.  Update the native and managed wrappers
to pass it to them.
2015-10-22 19:11:27 -04:00
Zoltan Varga b76847e195 [runtime] Add a check for PE images to mono_method_body_get_object(). 2015-10-22 18:35:05 -04:00
Zoltan Varga 0da9e0d4a2 Fix the build. 2015-10-22 18:32:53 -04:00
Zoltan Varga 8593c4dddc [runtime] Move the MONO_ENV_OPTIONS parsing code to driver.c 2015-10-22 17:38:18 -04:00
Zoltan Varga 4c6e0df59e Export mono_image_load_cli_header/load_metadata from image.c 2015-10-22 16:48:31 -04:00
Alex Rønne Petersen 0c5b73495c Merge pull request #2162 from alexrp/master
[profiler] Disable the hack to attempt to get code start/size info.
2015-10-22 22:17:38 +02:00
mlancione bd0334c68c Locking Window Handle List
A lock to the EventQueue Window Handle List is required to prevent
multiple threads from modifying the list;
2015-10-22 16:17:32 -04:00
Marek Safar 53980ae648 [corlib] Add non-overlapping buffer MemoryCopy implementation 2015-10-22 21:08:38 +02:00
"Andi McClure ext:(%22) 5fca9da6c7 Cleanup in preparation for mempool reference auditing feature in checked builds
- Rework in mempool.c: Have USE_MALLOC_FOR_MEMPOOLS work by tweaking existing rather than using an entire different path. Remove unused mempool field “rest”, stop assigning fields “pos” and “end” where unused. Removed unused function mono_mempool_empty. Fix off-by-one bug (>= vs >) in mono_mempool_contains_addr.
- Fix misc bug spotted by Rodrigo in aot-runtime.c: image of MonoGenericParam was always being set to corlib instead of proper image
- Add comments and replace inline constants with named constants in various places
2015-10-22 14:15:33 -04:00
Alex Rønne Petersen 355b2979ef [profiler] Disable the hack to attempt to get code start/size info.
This is causing crashes by poking into runtime internals, and since we no
longer need this for anything critical, disable it.

https://bugzilla.xamarin.com/show_bug.cgi?id=35171
2015-10-22 19:49:12 +02:00
João Matos 6e6242b6f7 Merge pull request #2158 from akoeplinger/fix-winforms-tests
[WinForms] Update tests to match recent changes to Control Foreground+Background
2015-10-22 12:37:52 +01:00
João Matos be1d9a7fe2 Merge pull request #2154 from BrennanConroy/bug_30018
More robust get_address_info
2015-10-22 12:37:29 +01:00
Ludovic Henry cbb0f8a26d [threads] Print more information in case of error in global suspend 2015-10-22 11:40:43 +01:00
Jo Shields 7b27732409 Merge pull request #2149 from directhex/absolute-path-for-xcopy
[msvc] Use fully qualified path for xcopy
2015-10-22 08:57:39 +01:00
Alexander Köplinger 19a0488f3a [WinForms] Update tests to match recent changes to Control Foreground+Background
The colors were updated in https://github.com/mono/mono/commit/f412b5529e560bca594e0c29a47f32dcfb252820,
but the tests weren't. This fixes them.
2015-10-22 02:12:39 +02:00
Martin Baulig 587ae60d01 [Mono.Security]: Mark 'HttpsClientStream' as obsolete. 2015-10-21 16:15:57 -04:00
Martin Baulig 5356284e49 [System]: Remove some dead internal code. 2015-10-21 16:13:29 -04:00
Rodrigo Kumpera 5fe98cbad4 Merge pull request #2122 from lambdageek/dev/bug-26384
In Type.FullName, escape ,+&@*[]\ with blackslash. Closes #26384
2015-10-21 16:09:25 -04:00
Marek Safar 2fc03eb1a2 Merge pull request #2155 from akoeplinger/bug-34334-pr
[interpreter] Relax check for forcing compilation for built-in structs
2015-10-21 21:47:38 +02:00
Martin Baulig 87ecbc9ce1 [System]: Use MonoTlsProvider API in WebConnection. 2015-10-21 14:45:26 -04:00
Martin Baulig dd3e9ab28c [System]: Use MonoTlsProvider API in FtpWebRequest and SmtpClient. 2015-10-21 14:36:06 -04:00
Alexander Köplinger 8421ea6a46 [interpreter] Relax check for forcing compilation for built-in structs
Method calls on structs like DateTime wouldn't work before,
even though we know we don't have self mutating structs in mscorlib.

Fixes part 2 of https://bugzilla.xamarin.com/show_bug.cgi?id=34334
2015-10-21 19:38:27 +02:00
Aleksey Kliger 0998ee7128 [reflection] Test for ModuleBuilder.GetType(String) with escaped names 2015-10-21 13:11:35 -04:00
Aleksey Kliger f127f7ea07 [reflection] ModuleBuilder, TypeBuilder escaped type identifiers patch
1. Use the System.TypeSpec parser to parse components of the type name,
then call out to native code to apply the modifiers, as before.

2. TypeName and TypeIdentifier abstractions to hide display name / internal name strings

Update ModuleBuilder and TypeBuilder to use TypeIdentifier and TypeName
internally in all places that don't need to talk to native code.

3. Change ModuleBuilder.name_cache from Hashtable to Dictionary<TypeName, TypeBuilder>
2015-10-21 13:11:34 -04:00
Aleksey Kliger 4bcf555959 [corlib] Test Type.FullName and Type.GetType() with special characters.
Make sure that type names that include +,&*[]\ are properly escaped and
unescaped when displaying and parsing.
2015-10-21 13:11:34 -04:00
Aleksey Kliger 43454a57bb [corlib] ves_icall_Type_GetNestedTypes unescape special chars in wanted nested type name. 2015-10-21 13:11:34 -04:00
Aleksey Kliger d60b224c33 [corlib] System.TypeSpec.Parse unclosed square brackets wrong exn.
Throw ArgumentException on "Foo[," instead of ArrayIndexOutOfBoundsException.
2015-10-21 13:11:34 -04:00
Aleksey Kliger 0e6d11ea6b [corlib] System.TypeSpec.Parse escaped characters 2015-10-21 13:11:33 -04:00
Aleksey Kliger 4a2016452c [corlib] handle special characters in Type.FullName and Type.GetType(string)
Type.FullName escapes ,+&*[]\ with a leading backslash.
Type.GetType(typeName) strips escaping backslashes from typeName during parsing.
2015-10-21 13:11:33 -04:00
Joel Martinez 9f701df9be [mdoc] Marking MDocPreserve Obsolete.
This was functionality that changed mid-way through an implementation, and
was never removed. The underlying functionality changed direction and is now
a part of the `mdoc update`, and doesn't work in any way as originally planned ...
so I'm marking it as obsolete, and will completely remove it in a future release.
2015-10-21 07:05:48 -04:00
Jonathan Pryor 14c3c74b1e [tuner] Properly preserve AesCryptoServiceProvider.
[merged by rodo from monodroid - the mentioned test is not included here]

Fixes: https://xamarin.desk.com/agent/case/35534

Commit 5ca3cb4b wasn't propertly tested (doh!).

The problem with Aes and AesCryptoServiceProvider is that there's a
cross-assembly dependency: Aes is in mscorlib, while
AesCryptoServiceProvider is in System.Core. The
PreserveCrypto.ProcessSystemCore() method didn't properly handle this
setup.

Fix the linker, and add a test to Hello.

WARNING: The test sucks. In particular, to "test" this fix you need to
run the app and then grep the `adb logcat` output for:

	# DownloadDataTaskAsync complete; status=RanToCompletion; exception=

If the status is anything else, or the exception is non-null, it's
busted.

FURTHERMORE, it's only useful in Release apps, not Debug apps.
(No linker in Debug apps.)

The reason for the need to grep is that there's no sane mechanism to
wait until the Task has completed before checking the status of the
Task, and throwing an exception from within the continuation wouldn't
do anything.

FIXME: The real problem is that Task.Wait() blocks forever and never
returns. This needs further investigation.

	https://bugzilla.xamarin.com/show_bug.cgi?id=12681
2015-10-21 10:27:38 +02:00
Radek Doulik 8eae19473d [tuner] handle the case with multiple "preserve" attributes
- when more than one "preserve" attribute is set (see IsPreservedAttribute),
   make sure we handle all of them and not just last one
 - fixes https://bugzilla.xamarin.com/show_bug.cgi?id=19391
 - example code which suffered from this issue:

    [Preserve(AllMembers=true)]
    [DataContract]
    public class TestClass
    {
      ...
    }

  later when a method from this class was queried using the reflection,
  it wasn't available as it was linked out
2015-10-21 10:27:30 +02:00
Zoltan Varga e64bc66010 [runtime] Factor out the PE image loading code into a separate MonoImageLoader object. 2015-10-20 19:19:37 -04:00
Marek Safar 3009b72cfe [mcs] Fix inference of dynamic type used as a constructed type. Fixes #34898 2015-10-21 00:03:31 +02:00
Zoltan Varga 042ddd504c [runtime] Fix a possible buffer overflow in get_process_module (). 2015-10-20 14:30:43 -04:00
Zoltan Varga ee4f16e11d [amd64] Remove some dead code. 2015-10-20 14:25:42 -04:00
Zoltan Varga 313e422513 Revert "[amd64] Allow returning of structs in register pairs."
This reverts commit c41b5a47ad.

Revert this as it breaks IronJS tests:

https://bugzilla.xamarin.com/show_bug.cgi?id=35102
2015-10-20 14:12:46 -04:00
Marek Safar 844fc33437 [mcs] Add additional doc reset after property initializers. Fixes #35087 2015-10-20 18:39:25 +02:00
Alexander Köplinger ed2224dd51 [acceptance-tests] Fix tarball build and rename "check" target to "check-full"
The acceptance-tests folder wasn't getting included in the tarball, adding the folder
to the SUBDIRS in the top-level Makefile.am fixes this. Additionally, EXTRA_DISTFILES
doesn't work outside of mcs/ so rename it to EXTRA_DIST.

Since we don't want a top-level "make check" to recurse into acceptance-tests just yet,
rename the check target to check-full so nothing gets run by default.
2015-10-20 15:14:54 +02:00
Marek Safar 35a0f8b5c3 Fixes mobile build 2015-10-20 14:53:44 +02:00
Marek Safar c34f1c2192 [mdoc] Update expected test results after private members change in mscorlib 2015-10-20 12:01:25 +02:00
Marek Safar 5b0e77be18 [System.Runtime.Caching] Update test due to .net fixes 2015-10-20 11:47:06 +02:00
Marek Safar 5dad4266e3 [system.componentmodel.dataannotations] Fix incorrect IsValid_Object_ValidationContext_CrossCallsWithNIEX test 2015-10-20 11:36:52 +02:00
Jo Shields 05ddf5869a [msvc] Use fully qualified path for xcopy
There are still nasty issues with $PATH vs %PATH% for builds spawned by a system service, this should hopefully fix the last one
2015-10-20 10:06:10 +01:00
Marek Safar 1907fcd730 [system.data] Remove empty ending character from resource constants 2015-10-20 10:03:40 +02:00
Zoltan Varga 99d732d4d5 [gsharedvt] Inflate methods properly in one case. Fixes #34926. 2015-10-19 22:58:52 -04:00
Alexander Köplinger 150e8a86b7 Merge pull request #2148 from akoeplinger/remove-old-runtime-versions
[runtime] Remove explicit support for v4.0.30128 and v4.0.20506
2015-10-19 22:26:18 +02:00
Alexander Köplinger 7191313eb3 [runtime] Remove explicit support for v4.0.30128 and v4.0.20506
These versions were still binding to the 4.0 mscorlib, which is a reference-only assembly now
and isn't intended for being used at runtime.

This issue manifested itself when someone used e.g. <supportedRuntime version="v4.0.20506"/> in
the app.config, causing the runtime to try loading that version and then bailing out with
"Corlib not in sync with this runtime: expected corlib version 117, found 111." (with 111 being
the corlib version at the time the reference assemblies were generated).

The fix is to remove the specific versions from the supported_runtimes array, causing programs
to automatically use the newest version instead.

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

Other reports:

https://youtrack.jetbrains.com/issue/TW-42700
https://youtrack.jetbrains.com/issue/TW-41337
http://stackoverflow.com/questions/29988698/teamcity-nunitlauncher-running-on-linux-mono-gives-corlib-not-in-sync-with-th
2015-10-19 21:52:39 +02:00
Zoltan Varga 2b64a7d0c4 [llvm] Fix the handling of r4 arguments during calls. Fixes #35044. 2015-10-19 15:47:17 -04:00
Martin Baulig 083a62ad51 Bump reference source. 2015-10-19 13:59:08 -04:00
João Matos 4d78296980 [runtime] Remove unused MONO_IS_CROSS_COMPILE define. 2015-10-19 17:44:29 +01:00
Alexander Köplinger 51f95c3b91 [acceptance-tests] Convert Ruby script to Python
Most of the other scripts in the repo use Python and we decided to converge on that one.
2015-10-19 17:14:47 +02:00
Alexander Köplinger 0ec96b1241 [acceptance-tests] Integrate Roslyn, CoreCLR and ms-test-suite into acceptance-tests
This commit integrates the CoreCLR, Roslyn and ms-test-suite (which is Xamarin-internal, but should just print a warning for someone without access).
Running the tests suites can be done with 'make check-coreclr', 'make check-roslyn' and 'make check-ms-test-suite', or all of them with make check in the acceptance-tests folder.
They won't run on a top-level make check though, which is intended until every test suite is fixed.

This uses a custom submodule system that doesn't rely on git submodules (which are annoying when the repo is large and we only need them for tests). Instead we can fetch repositories on demand.

History (before squashing into smaller chunks):

- Rename check-{testsuite} make target to validate-{testsuite}. The former can be easily confused with the "check" target that runs the tests.
- Move acceptance-tests Makefile to automake, so we can avoid hardcoding paths
- Copy System.Console facade to CoreCLR IL test directories. Otherwise most of the IL tests fail as they rely on the System.Console assembly reference.
- Update README.md to mention the tests
- Use $(MAKE) instead of plain make and pass -C instead of cd'ing to directory
- Exit when the repository can't be cloned and print a note about the ms-test-suite repo. The ms-test-suite repo is Xamarin-internal so it'll error out in public.
- Integrate MS CoreCLR runtime tests into Mono's test infrastructure
- Get rid of intermediate msg file and pipe straight to git
- Rename README to CONFIG since we don't store metadata in readme.md anymore
- Fix comparison in versions.mk to be sh compliant. It relied on bashism before.
2015-10-19 17:14:45 +02:00
Zoltan Varga 9f626c29bc [acceptance-tests] Add code from xamarin/mono extensions branch
This provides a "git submodule"-like tool which can be used to
checkout optional repositories.
2015-10-19 16:37:17 +02:00
Alexander Köplinger 04bdf3b933 [tests] Add a new --testsuite-name parameter to managed test runner
Use it for the gshared tests, they were all (over-)writing the same TestResults_runtime.xml before.
2015-10-19 16:37:16 +02:00
Alexander Köplinger 623a3f1c04 [tests] Add a new --expected-exit-code option to the managed test-runner 2015-10-19 16:34:05 +02:00
Marcos Henrich a1d39d9b02 Merge pull request #2136 from esdrubal/uridotsegment
[System] Fixed dots trimmed from segments.
2015-10-19 14:01:30 +01:00
Zoltan Varga 919d67147d jit] Replace a few more #ifdefs with flags. 2015-10-18 23:48:45 -04:00
Zoltan Varga 09de76dbf3 Fix the build. 2015-10-18 19:59:19 -04:00
Zoltan Varga 667df0df1e [jit] Add a new MonoBackend structure which will contain backend constants/functions. Move the arch specific flags from MonoCompile to this structure. 2015-10-18 19:03:07 -04:00
Zoltan Varga b7e26580e7 jit] Replace a few more #ifdefs with MonoCompile flags. 2015-10-17 23:24:07 -04:00
Zoltan Varga 2fef405571 [jit] Replace a few more #ifdefs with MonoCompile flags. 2015-10-17 21:13:26 -04:00
Zoltan Varga a701751274 [jit] Replace a few arch-specific #ifdef blocks with MonoCompile flags. 2015-10-17 20:55:24 -04:00
Zoltan Varga 53991bf367 [jit] Add flags to MonoCompile to allow the removal of arch-specific ifdefs from the jit code. Add a mini_init_cfg () function to initialize them using the arch defines. 2015-10-17 20:46:02 -04:00
Alexander Köplinger 977083f29a [threads] Fix another sleep compilation error on win32
One case was missed in 2ad1993b51
2015-10-17 21:54:54 +02:00
Zoltan Varga e37a4cc883 Make the thread dump code safe by doing only async safe operations when a thread is suspended. 2015-10-17 14:13:37 -04:00
Ludovic Henry 2ad1993b51 [threads] Fix sleep compilation error on win32 2015-10-17 18:56:27 +01:00
Marcos Henrich e3665223b7 Merge pull request #2139 from akoeplinger/symbolicate-test-fix
[mono-symbolicate] Skip tests if AOT isn't supported by the current arch
2015-10-17 16:57:10 +01:00
Marek Safar 264c541150 Fixes build 2015-10-17 09:17:01 +02:00
Zoltan Varga ef57a5a30d Merge pull request #2144 from dlech/patch-1
Fix filename in header
2015-10-17 00:29:03 -04:00
David Lechner ba1c1bd8f2 Fix filename in header 2015-10-16 21:09:36 -05:00
Zoltan Varga c41b5a47ad [amd64] Allow returning of structs in register pairs. 2015-10-16 20:05:21 -04:00
Zoltan Varga ddca9a9bd5 [llvm] Fix returning of values in a register pair. 2015-10-16 20:05:21 -04:00
Zoltan Varga 2f72b70ab7 [llvm] Fix JIT support. 2015-10-16 20:05:21 -04:00
Zoltan Varga b9283e79b4 [runtime] Disable the emission of stubs debug info on apple, its no longer supported by clang. 2015-10-16 20:05:21 -04:00
Alexander Köplinger 63403ca0c7 Merge pull request #2143 from akoeplinger/refactor-mono-security-providers
[Mono.Security.Providers] Refactor providers into distinct folders
2015-10-17 00:14:47 +02:00
Marek Safar c6e81903c9 Bump reference source 2015-10-17 00:10:23 +02:00
Marek Safar 748e4b9ae4 [corlib] Implement UnsafeEnumCastLong 2015-10-17 00:08:30 +02:00
Marek Safar 27f07c8095 [bcl] Update to 4.6 referencesource 2015-10-16 23:33:32 +02:00
Alexander Köplinger 31321be9ea [Mono.Security.Providers] Refactor providers into distinct folders
Build the two libraries Mono.Security.Providers.DotNet and Mono.Security.Providers.NewSystemSource just like
every other class library instead of duplicating the logic into the subfolders.

This also fixes "make dist".
2015-10-16 22:31:15 +02:00
Marek Habersack f412b5529e [WinForms] ComboBox, ListBox and TextBox should use Control Foreground+Background
They have been using Window Foreground+Background so far which make them unreadable
on systms with dark themes. This change makes them behave.
2015-10-16 21:41:26 +02:00
Martin Baulig 973f63f32a [TLS]: Make ValidationResult.MonoSslPolicyErrors nullable.
(cherry picked from commit abfac54c47312c00f22fffef821f8889cbc67098)
(cherry picked from commit ccb7bfc930f4265b685eada8e73ee81acaae5963)
2015-10-16 15:14:34 -04:00
Martin Baulig f5b668e345 [System]: Remove the TrustEvaluateSsl(MX.X509CertificateCollection...) overloads.
We now use SSCX.X509Certificate2Collection in ChainValidationHelper.
2015-10-16 14:31:37 -04:00
João Matos 9084455c0b Merge pull request #2141 from akoeplinger/fix-wrong-disableaot-define
[runtime] Rename DISABLE_AOT_COMPILER back to DISABLE_AOT
2015-10-16 19:25:57 +01:00
Ludovic Henry 7c5c5f4940 [Process] Do not use Exited as it's racy with Start and BeginOutputReadLine/BeginErrorReadLine
The issue can arise if the Process is going to run faster than the call
between Start and BeginOutputReadLine/BeginErrorReadLine. To increase
the chance of the race happening, insert a Thread.Sleep (1000) between
Start and BeginOutputReadLine/BeginErrorReadLine.

This race exists because the WaitForExit in the background thread in the
Process, will first wait the process to finish, then try to wait for the
output to finish, but it will be null as BeginOutputReadLine has not been
called yet, then try to wait on error (same issue as output), and finally
call the Exited event, which will close the stdout and stderr TextWriter.
The call to BeginOutputReadLine and BeginErrorReadLine will finally happen
(which is still correct as the output and error of the Process has not
been closed yet), then calling the OutputDataReceived and ErrorDataReceived
callbacks which will try to write to the closed stdout and stderr
TextWriter.

Simply enqueuing a ThreadPool work item, which will wait for the process
to exit manually, simply resolve this issue, as we guarantee that the
call to WaitForExit happens after BeginOutputReadLine/BeginErrorReadLine,
and is not racing with it.
2015-10-16 18:41:45 +01:00
Marek Safar 372658a28e [corlib] Add few reference source dependencies 2015-10-16 18:43:05 +02:00
Martin Baulig ec554d0410 All MARTIN_FIXME's have been taken care of. 2015-10-16 12:33:02 -04:00
Martin Baulig abc19e228d [Mono.Security]: Check 'CertificateValidationHelper.SupportsX509Chain' before attempting to compute the chain.
Computing the X509Chain is not supported on OS X and iOS because the OS does
not give us access to the root certificates - this would throw an Exception
at runtime.

(cherry picked from commit 44d34a17c1bf305e39bcfc277cc7add48560d899)
(cherry picked from commit 504328ec43d9d917c1f140ecf89f253ab2be39ec)
2015-10-16 12:17:17 -04:00
Martin Baulig 6a904e6315 Forgot to remove one MARTIN_FIXME. 2015-10-16 12:12:19 -04:00
Alexander Köplinger a353efb8bb [msvc] Remove left over project guid from mono.sln
The project was removed from the solution in 735fc51cc0, but one instance was missed.
This should fix the Windows build on Jenkins.
2015-10-16 16:14:14 +02:00
Alexander Köplinger 982bbc0e05 [mono-symbolicate] Skip AOT tests if AOT isn't supported by the current arch
This fixes Jenkins errors on architectures like s390x which don't support AOT.
2015-10-16 15:46:34 +02:00
Alexander Köplinger db1a898440 [runtime] Rename DISABLE_AOT_COMPILER back to DISABLE_AOT
The original rename in c4aa103e48 was done by accident,
the rest of the codebase still used the old name so disabling AOT didn't actually work.

Renaming this back to the original name and fix a few instances where methods weren't added
in the DISABLE_AOT case.

This allows a `--enable-minmal=aot` build to succeed and actually work.
2015-10-16 15:38:45 +02:00
Ludovic Henry 1720c3bacd Revert "[process] Use same behavior as .NET"
It broke the android build

This reverts commit c688b8c84c.
2015-10-16 11:01:22 +01:00
Zoltan Varga 464ec0063e [runtime] Simplify the caching of gshared generic params now that they point to their parent gparam. 2015-10-16 04:07:01 -04:00
Zoltan Varga 18e7445b41 [runtime] Add a new MonoGSharedGenericParam structure as an extension of the MonoGenericParamFull structure, put the 'parent' field there. 2015-10-16 03:58:31 -04:00
Zoltan Varga 01c6d2e3fa [amd64] Split the valuetype argument passing code into win64 and non-win64 versions to simplify both. 2015-10-15 23:11:20 -04:00
Zoltan Varga 6948689cf6 [aot] Create constrained gparams using the same mini_get_shared_gparam () function used by the rest of the code, so its properly unique-ed. 2015-10-15 20:14:11 -04:00
Ludovic Henry 3572dc9101 [io-layer] Remove Sleep and SleepEx 2015-10-15 16:45:31 -04:00
Ludovic Henry 8cfef6d190 [io-layer] Remove GetCurrentThreadId 2015-10-15 16:45:25 -04:00
Ludovic Henry dc04f3f0ae [runtime] Remove dead code 2015-10-15 16:43:25 -04:00
Rodrigo Kumpera 86a15b2059 [sdb] Fix state initialization of suspended threads to work when the debugger thread is not attached. Fixes #34750
The problem happens because thread_interrupt runs in the debugger thread (suspend initiator).

thread_interrupt then calls mono_thread_state_init_from_monoctx which collects the state of the current thread
which is definitely not what we wanted.

There used to be some compensation code after calling mono_thread_state_init_from_monoctx to actually init the state properly.
This is why it worked, at all.

Thew problem is that the debugger thread now might not attach at all under some circumstances, which would trigger
mono_thread_state_init_from_monoctx to return FALSE and trip into the assert.

The fix is to simply not use mono_thread_state_init_from_monoctx at all, just copy the state from data. This fix has the
bonus of getting the domain correctly.
2015-10-15 16:42:53 -04:00
Rodrigo Kumpera 714ace0119 Merge pull request #2113 from ludovic-henry/coop-socket-abort
[socket] Make blocking syscall abortable on signal-less platforms
2015-10-15 14:56:40 -04:00
Rodrigo Kumpera f1a8fb7179 Merge pull request #2123 from kumpera/verifier-fix
[verifier] Fix the verifiers to handle Roslyn style fixed blocks.
2015-10-15 14:53:28 -04:00
Alexis Christoforides 735fc51cc0 Fix MSVC build after 1657026514 2015-10-15 14:38:26 -04:00
Miguel de Icaza bbeb09a442 Merge pull request #2127 from joelmartinez/mdoc-multiassembly-squashed
[mdoc] `multiassembly` option for duplicated types
2015-10-15 14:00:16 -04:00
Ludovic Henry c688b8c84c [process] Use same behavior as .NET 2015-10-15 17:49:20 +01:00
João Matos a1a252e69e Merge pull request #2137 from fplucas/patch-1
Fixing the broken icon of centos-s390x
2015-10-15 15:36:00 +01:00
Lucas becc336d4a Fixing the broken icon of centos-s390x 2015-10-15 11:32:17 -03:00
Marcos Henrich cc9bf6f825 [System] Fixed dots trimmed from segments.
Before .NET 4.5 dots were trimmed from the end of uri path segments.

In .NET 4.5 IRI parsing is enabled by default and dot are no longer
trimmed from the end of path segments.

This commit disables dot trimming when Uri.IriParsing is true.

Fixes #29864.
2015-10-15 15:01:27 +01:00
Alexander Köplinger ae20123261 Merge pull request #2134 from akoeplinger/bug-34334
[interpreter] Implement comparing string values in (Not)EqualInstruction
2015-10-15 15:44:04 +02:00
João Matos 02d9415929 [runtime] Switch ARM backend use to use g_print instead of printf.
Sorry about the churn, the previous commit contained an unintended chunk.
2015-10-15 14:34:53 +01:00
João Matos 0af9f2b715 Revert "[runtime] Switch ARM backend use to use g_print instead of printf."
This reverts commit 8e9f93be24.
2015-10-15 14:26:19 +01:00
João Matos 8e9f93be24 [runtime] Switch ARM backend use to use g_print instead of printf. 2015-10-15 14:24:10 +01:00
João Matos 3219392b92 [runtime] Simplify ARM mono_arch_flush_icache.
We do not support compiling with older versions of GCC anymore so most of this should be just dead code.
2015-10-15 14:12:50 +01:00
Zoltan Varga d2acc1d780 [amd64] Remove the special casing of TYPEDBYREF in the amd64 backend, its not needed. 2015-10-15 00:28:56 -04:00
Zoltan Varga 698131bece [llvmonly] Call methods in the same assembly directly. 2015-10-14 22:11:21 -04:00
Zoltan Varga 9b4a40cc7c [llvmonly] Update comments. 2015-10-14 20:42:32 -04:00
Zoltan Varga 46bc8e954b [llvmonly] Use the PreserveAll calling convention for the init functions. 2015-10-14 20:42:06 -04:00
Zoltan Varga 212e56e6f0 [llvmonly] Factor out the initialization code into separate helper functions to save space. 2015-10-14 20:22:11 -04:00
Zoltan Varga 9e6e56b5e6 [ppdb] Check that PE file timestamp as well when matching assemblies and pdb files. 2015-10-14 20:22:11 -04:00
Martin Baulig 9af4b08290 Revert "[System]: WebConnection: improve chunked reads and async callbacks."
This reverts commit 9027f0ad28bf733ebb8ac9964c78c22853ca93c7.
2015-10-14 19:26:06 -04:00
Martin Baulig 25a206c6da [System/TLS]: Switch to the new ChainValidationHelper.
* Removed Mono.Security.Protocol.Tls.ValidationResult, use
  Mono.Security.Interface instead.  This is an API breaking
  change, but you can fix your application by simply adding
  the new using directive.

  The rationale behind this is to avoid a dependency on the
  Mono.Security.Protocol.Tls namespace when building and
  related classes when building the new TLS stack.

* Enable ChainValidationHelper in WebConnection, LegacySslStream
  and SslStream.

  The custom conditionals that were previously required for the
  mobile profiles are now gone as ChainValidationHelper already
  handles that internally.

* This is an internal API, the public front-end is
  Mono.Security.Interface.CertificateValidationHelper.

  CertificateValidationHelper can be used to access the system
  certificate validator on OS X and iOS; we do not compute the
  X509Chain on these platforms as it's not supported by the OS.

(cherry picked from commit 9713f35878dd90fe87423b5052b4f82ddc0b87f0)
2015-10-14 19:26:06 -04:00
Zoltan Varga 4ef71c7663 [llvmonly] Add more preinitialized got slots, refactor the code which emits them a little. 2015-10-14 17:54:34 -04:00
Zoltan Varga 8b619c6b73 [ppdb] Update to spec version v1.0. Fix decoding of line number info. 2015-10-14 16:25:29 -04:00
Zoltan Varga 7833c3ef6c [ppdb] Update the code which checks whenever the assembly and the pdb files match to spec v1.0. 2015-10-14 15:55:45 -04:00
Martin Baulig 815ea22b88 [System/TLS]: Add obsolete ChainValidationHelper.ctor(HttpWebRequest).
This will be removed again laster, but allows us to do a two-step switch
by first switching to the new ChainValidationHelper, then switching to
MonoTlsProvider and friends.

(cherry picked from commit f2e98e82f04dbaa72e48c37d72407000c197fbcb)
2015-10-14 15:29:13 -04:00
Martin Baulig 92adfe413f [System]: API cleanup; make MonoTlsStream.SelectClientCertificate() private static.
(cherry picked from commit 8a79bdc2add36cb3da2834dc371499fd94d1737f)
(cherry picked from commit 13168150a77f722afee51df86ba029c91f21ee0c)
2015-10-14 15:29:06 -04:00
Alexander Köplinger b72ee9135d [interpreter] Implement comparing string values in (Not)EqualInstruction
When comparing a string with null the other checks in the interpreter for type equality didn't catch this case
and this ultimately resulted in a NotImplementedException in EqualInstruction and NotEqualInstruction.

The fix is to handle the TypeCode.String case in those instructions.
We don't need to do it for CreateLifted() as that method only applies for Nullable<T> types which doesn't make sense for string.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34334
2015-10-14 21:23:11 +02:00
Martin Baulig 77e1889d20 [System]: WebConnection: improve chunked reads and async callbacks.
Make sure we always complete the async operations on error and
also send callbacks outside the lock.

(cherry picked from commit 9027f0ad28bf733ebb8ac9964c78c22853ca93c7)
2015-10-14 15:18:27 -04:00
Zoltan Varga 2de86c3cee Fix the build. 2015-10-14 15:17:44 -04:00
Zoltan Varga 551cdbeb2e [runtime] Fix the configure check for stdc++/c++. 2015-10-14 14:46:50 -04:00
Zoltan Varga 679c904e41 [aot] Fix the build when llvm is not enabled. 2015-10-14 13:08:21 -04:00
João Matos 610ac817e2 [runtime] Reworked coop GC stack handling in platforms with restricted access to register contexts. 2015-10-14 17:26:58 +01:00
João Matos 97ad88dadc Merge pull request #2106 from lambdageek/dev/bug-29108-part1
GetCallingAssembly() skip past reflection. Fix #29108 - part 1
2015-10-14 16:34:31 +01:00
Aleksey Kliger 92a5499b8f Test that Assembly.GetCallingAssembly() skips MethodBase.Invoke() 2015-10-14 11:02:21 -04:00
Aleksey Kliger 14b270cb09 GetCallingAssembly() skip past reflection. Fix #29108 - part 1 2015-10-14 10:54:37 -04:00
João Matos b81f6a99ea [runtime] Workaround signal() configure check in Android.
So, I broke this on Android back in https://github.com/mono/mono/commit/d3726dcde9ef373157cd533ce8091cdde89dfa8e.

Turns out signal() is defined inline in Android:

static __inline__ __sighandler_t signal(int s, __sighandler_t f)
{
    return bsd_signal(s,f);
}

So we need to hardcode the define in case we're on an Android platform.

Fixes BclTests on Android:

I/mono-stdout( 1200): UnixSignalTest
F/        ( 1200): signal() is not supported by this platform
F/libc    ( 1200): Fatal signal 6 (SIGABRT) at 0x000004b0 (code=-6), thread 1215 (Instrumentation)
2015-10-14 15:24:45 +01:00
Zoltan Varga 1a81eb723f [llvmonly] Fix the build. 2015-10-14 01:54:01 -04:00
Zoltan Varga 51c4e47f22 [aot] Rework the handling of preinitialized got slots, instead of hardcoding their offsets into the code, initialize them the same way the other got slots are initialized, by decoding a MonoJumpInfo structure for them, and resolving them using mono_resolve_patch_target (). 2015-10-14 01:45:23 -04:00
Miguel de Icaza 948d79daba [mscorlib] DateTime, DateTimeOffset, bring Unix time APIs from CoreCLR 2015-10-13 23:05:32 -04:00
Zoltan Varga 9846d759fe [llvmonly] Skip initalization of methods if they only reference shared got entries. 2015-10-13 22:07:11 -04:00
Zoltan Varga da0ccf07f0 [llvmonly] Emit initialization code for a method only if it uses got slots or its type has a cctor. 2015-10-13 21:14:55 -04:00
Ludovic Henry e5fbaa4190 [process] Wait for process completion before waiting for stdout/stderr
This fixes a race condition between the calls to Start and
BeginOutputReadLine/BeginErrorReadLine. This was triggered by the fact
that the call to WaitForExit (in StartBackgroundWaitForExit called by
Start_noshell) could be faster that the call to
BeginOutputReadLine/BeginErrorReadLine, leading to a null async_output,
which would make the WaitForExit call not wait for the output to finish.
This could make the call to Exited happen before a call to
OutputDataReceived/ErrorDataReceived.

To trigger this issue more reliably, you can simply add a sleep at the
beginning of AddInput in ProcessAsyncReader.
2015-10-13 20:35:59 -04:00
Zoltan Varga f7d03df3bf [runtime] Link against the same c++ standard library as used by llvm. 2015-10-13 20:32:39 -04:00
Martin Baulig 07012a1246 Remove another MARTIN_FIXME.
(cherry picked from commit 9737322c86939f1b5e0da085697bddb7827cc06d)
2015-10-13 18:52:45 -04:00
Martin Baulig bf0cff0dc1 [System]: Remove two MARTIN_FIXME's.
This adds ChainValidationHelper to the build, but it's not
actually used yet.

(cherry picked from commit 214bf577d36808fc8ffc050027376c37b8920346)
2015-10-13 18:52:45 -04:00
Martin Baulig 453cbf3119 [System]: Add AndroidPlatform.TrustEvaluateSsl(X509Certificate2Collection...) overload.
(cherry picked from commit 34eefeb172055f10d8d6ca7b91cb719cfe812b64)
2015-10-13 18:52:44 -04:00
Martin Baulig a88f797cc3 [System]: Add OSX509Certificates.TrustEvaluateSsl(X509Certificate2Collection,string) overload.
When switching to Mono.Net.Security.ChainValidationHelper, we will use
X509Certificate2Collection instead of MSX.X509CertificateCollection; keep
both version for the moment.

(cherry picked from commit 1f004d8e7a8391785d4ae8fcb0270f9be9d522c8)
2015-10-13 17:04:31 -04:00
Martin Baulig 47efc2461e [System]: Use 'ServerCertValidationCallback' in ServicePointManager.
This is a new internal wrapper class defined in
external/referencesource/System/net/System/Net/ServicePointManager.cs

It wraps the RemoteCertificateValidationCallback, capturing the
current ExecutionContext.

(cherry picked from commit c1695a55dc9a55f6b344bfc4c91991bd1f04c046)
2015-10-13 16:25:41 -04:00
Martin Baulig 001cea64a2 Put back "[Mono.Security.Providers]: Add to the top-level build."
This reverts commit f05603553e.
2015-10-13 16:25:31 -04:00
Martin Baulig d87fafd44c [Mono.Security/build]: Add custom monodroid_Mono.Security.dll.sources.
Includes everything from Mono.Security.dll.sources except for the
new Mono.Security.Interface APIs, which are built inside System.dll
on mobile.

(cherry picked from commit df1adee67802417381280c097f3f8f17bbd48f66)
2015-10-13 16:25:30 -04:00
Miguel de Icaza cd99d93ffe Add tests for #34598 2015-10-13 14:48:55 -04:00
Sandy Armstrong 21ad685934 Merge pull request #2130 from sandyarmstrong/mt-runtime-updates
[corlib] Use same Console and Environment logic in monotouch_runtime
2015-10-13 10:45:34 -07:00
Sandy Armstrong 4504107d42 [corlib] Use same Console and Environment logic in monotouch_runtime
The `monotouch_runtime` profile is exclusively used for the monotouch
REPL assemblies used by Xamarin Sketches and Inspector. In those cases,
Console and Environment should behave just the same as in the
`monotouch` profile.

The only real difference between the two profiles should be the presence
of SRE in `monotouch_runtime`.
2015-10-13 10:30:51 -07:00
Michael Hutchinson d9aeae470d [mono-api-info] Allow following type forwarders
[mono-api-info] Fix Makefile from win32, round 2
2015-10-13 13:27:35 -04:00
Joel Martinez 3a78c7b093 [mdoc] multiassembly option for duplicated types
The new `multiassembly` option lets you run `mdoc update` on assemblies that
contain the same types. This can come into play when you have a set of assemblies
that run on different platforms, with a slightly differing API surface area on
each platform (for example: tvOS, watchOS, iOS); in this case you can maintain
all of the documentation in a single set of XML documents.

With this option enabled, an `AssemblyInfo` node will be added for every assembly
that a type is found in, in addition to every member. While this may seem verbose,
it's really the only way to capture the information about what assemblies a given
type or member can be found in.
2015-10-13 11:25:15 -04:00
Marcos Henrich 4f714afa7c Merge pull request #2121 from esdrubal/socketreuse
[System] Added icall SupportsPortReuse.
2015-10-13 11:11:20 +01:00
Martin Baulig f05603553e Revert "[Mono.Security.Providers]: Add to the top-level build."
This currently does not build for monodroid, so let's fix that first.

This reverts commit 8a47d504cc.
2015-10-12 17:54:14 -04:00
Martin Baulig bc63406128 [System]: Add HttpWebRequest.ServerCertificateValidationCallback.
Add a new HttpWebRequest.ServerCertificateValidationCallback property
(new .NET 4.5 / 4.6 API, not enabled yet) and read-only internal
ServerCertValidationCallback accessor (defined in the referencesource's
ServicePointManager.cs).

(cherry picked from commit ea9ed03863c730831c6fac393ed4dad3a94fb149)
2015-10-12 17:28:47 -04:00
Martin Baulig ec58a4ab09 [System]: Add new internal HttpWebRequest APIs for MonoTlsProvider / MonoTlsSettings.
The new internal constructor allows a per-request MonoTlsProvider and
related MonoTlsSettings; also expose these as new internal properties.

(cherry picked from commit 31988df75077c11ed87c77ab34e5b77b5913a32b)
2015-10-12 17:28:37 -04:00
Martin Baulig c8677afffb [System]: Add internal ServicePoint.SetClientCertificate() and SetServerCertificate().
The old SetCertificates() will be removed when merging the rest of
the work-newtls changes.

(cherry picked from commit 815731f2b7fd2f7384b8e16fcaf33f54d5ab6cb1)
2015-10-12 17:19:30 -04:00
Martin Baulig 8a47d504cc [Mono.Security.Providers]: Add to the top-level build.
(cherry picked from commit 76db142479)
2015-10-12 17:19:15 -04:00
Martin Baulig f01a88837f [System] Add internal 'ServicePointManager.DisableStrongCrypto'.
It's an internal API that's used by the referencesource.

(cherry picked from commit 7fbd50ab52fc4cdf2fa9282ecd9d286ac48d9ba8)
(cherry picked from commit eb2f282d6f)
2015-10-12 17:19:15 -04:00
Martin Baulig 95e6556b21 [corlib] Add new .NET 4.5 System.Diagnostics.EventSource and EventAttribute APIs.
(cherry picked from commit 7f098fb7424b78f0e1bbde592a9de71209dcc798)
(cherry picked from commit 6c80418313)
2015-10-12 17:19:15 -04:00
Martin Baulig 578f49fb03 [System]: Make internals visible to Mono.Security.Providers.NewSystemSource.
(cherry picked from commit 6414856bf2)
2015-10-12 17:19:14 -04:00
Zoltan Varga 4f88b98dfd [sdb] Print more debug info when a seq point is not found. 2015-10-12 17:10:19 -04:00
Zoltan Varga 9de34d2cf3 [llvmonly] Simplify the handling of init_bb a bit. 2015-10-12 17:10:18 -04:00
Martin Baulig 32779a5c8e [System/TLS]: Add the new Mono.Security.Interface and Mono.Net.Security APIs to the build.
These should be considered internal APIs for the moment, even where the
classes are public (to avoid making internals visible).

(cherry picked from commit bec0257c97)
2015-10-12 16:54:50 -04:00
Martin Baulig 805617f837 Add MARTIN_FIXME conditionals to some of the newly added files in preparation to get them build.
(cherry picked from commit 73a79ac235)
(cherry picked from commit 0d90e727e5)
(cherry picked from commit d60284a02a553fbf0af18d40a3e1018f7d0aa0c9)
2015-10-12 16:53:29 -04:00
Martin Baulig b9b7c9e2c1 [System]: Add the referencesource's ServicePointManager.cs.
This picks up the internal 'ServerCertValidationCallback' class,
not the actual ServicePointManager implementation (we can't switch
to that yet).

(cherry picked from commit f5eeb5597a)
2015-10-12 16:52:00 -04:00
Martin Baulig f338a141ce [System]: Add internal RemoteCertValidationCallback and LocalCertSelectionCallback.
These two internal delegates are defined and used by the referencesource's SslStream
implementation; add them to our SslStream.cs version for compatibility.

(cherry picked from commit 0fbda4c3bd)
2015-10-12 16:52:00 -04:00
Martin Baulig b8e6b1cbac [Mono.Security.Providers]: New internal libraries for the new TLS code.
(cherry picked from commit 90a8836c8d)
2015-10-12 16:52:00 -04:00
Martin Baulig 40f2813ed7 [System/TLS]: Internal additions to some referencesource files.
These won't be build in System.dll until we can switch to the new
TLS implementation.

(cherry picked from commit 39cd3ee44f)
2015-10-12 16:51:59 -04:00
Martin Baulig 49006f0482 [System/TLS]: Add the new Mono.Security.Interface and Mono.Net.Security code.
This is not enabled in the build yet; doing so still requires a few more tweaks.

(cherry picked from commit 8fbc5ba484)
2015-10-12 16:51:59 -04:00
Martin Baulig ec2b344d00 [System/build]: Wrap ReferenceSources/Logging.cs with '!MONO_FEATURE_NEW_TLS'.
(cherry picked from commit 0eb51843e2)
2015-10-12 16:51:59 -04:00
Martin Baulig 2dc99a0e43 [System]: Add missing System.Net.SecurityProtocolType enum values.
(cherry picked from commit 0377d61060)
2015-10-12 16:51:59 -04:00
Martin Baulig 57e39c1d2c [System/build]: Add two MONO_SECURITY_ALIAS and MONO_X509_ALIAS conditionals.
These should be used instead of MOBILE / MONOTOUCH / MONODROID to select
extern alias directives to make them work independently from the mobile profile.

* MONO_SECURITY_ALIAS: whether or not to use 'extern alias MonoSecurity'.

* MONO_X509_ALIAS: whether or not to use

    extern alias PrebuiltSystem;
    using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;

* MONO_FEATURE_NEW_TLS: ignore, this is not enabled in the default build.

(cherry picked from commit 48b95ec304)
2015-10-12 16:51:59 -04:00
Martin Baulig 1437d3a910 [System/build] Use the MOBILE_PROFILE conditional to define INSIDE_SYSTEM.
(cherry picked from commit a3500da8707f64ef5e49cca87f4d732abb0e07ae)
(cherry picked from commit 5348243102)
2015-10-12 16:51:58 -04:00
João Matos ec3df94589 [runtime] Fixed build error related to undeclared object offsets.
In file included from /Users/joao/Dev/droid/mono/mono/metadata/marshal.c:26:0:
/Users/joao/Dev/droid/mono/mono/metadata/marshal.c: In function 'mono_marshal_get_delegate_invoke_internal':
/Users/joao/Dev/droid/mono/mono/metadata/abi-details.h:29:43: error: 'MONO_OFFSET_MonoDelegate_rgctx' undeclared (first use in this function)
 #define MONO_STRUCT_OFFSET(struct,field) (MONO_OFFSET_ ## struct ## _ ## field == -1, G_STRUCT_OFFSET (struct,field))
2015-10-12 21:42:19 +01:00
Rodrigo Kumpera 72a7e8de97 [verifier] Fix the verifiers to handle Roslyn style fixed blocks.
Roslyn used byref vars whenever possible to store fixed statements. This leads to confusion in
both the full verifier and the JIT built-in one.

Now we skip it in the JIT one and allow it when not in strict mode for the full verifier.
2015-10-12 16:39:39 -04:00
Martin Baulig 5e7a29ed66 [System]: Add ReferenceSources/Socket.cs to the mobile build.
This fixes commit c74c64718d64ecc05ddec21d12313d840842a9c2; these
new internal APIs are required by the referencesource's version of
NetworkStream.

(cherry picked from commit 2905ed96d1)
2015-10-12 15:09:28 -04:00
Martin Baulig 1ae6653077 [System]: Use NetworkStream from the referencesource. 2015-10-12 15:08:32 -04:00
Zoltan Varga 390a758396 Revert "[runtime] Don't allocate domain-level static slots for special static fields."
This reverts commit d2efa789ac.

Revert this as it breaks on monodroid.
2015-10-12 14:34:35 -04:00
Zoltan Varga 11a0a03e6a Revert "[runtime] Optimize mono_class_field_is_special_static () a bit."
This reverts commit 0686c21358.

Revert this as it breaks on monodroid.
2015-10-12 14:34:17 -04:00
Zoltan Varga a5f5d0f7b5 [ppdb] Update the image checking code, the guid in the ppdb file needs to be checked against the guid in the debug directory in the pe file. Not finished yet. 2015-10-12 14:23:38 -04:00
Marek Safar db6d1b96a9 [mcs] New test 2015-10-12 19:05:44 +02:00
Marek Safar 5528eb0194 Merge pull request #2119 from lambdageek/dev/bug-17571
parser improvements for Type.GetType() and Assembly.GetType()
2015-10-12 19:02:50 +02:00
Marek Safar cea55b8eb9 [mcs] Special case null inside parenthesized expression. Fixes #34753 2015-10-12 19:00:07 +02:00
Zoltan Varga d037168755 Fix the cross compiler build by not including c headers into mini-llvm-cpp.h. 2015-10-12 12:15:20 -04:00
João Matos 9624aa3bb7 [mini/llvm] Fixed cross compilation build. 2015-10-12 17:01:10 +01:00
João Matos 79ca7e2c18 [mini/llvm] Normalize includes. 2015-10-12 17:01:09 +01:00
Marcos Henrich d4e6109e82 [System] Added icall SupportsPortReuse.
Linux kernels before 3.9 did not support port reuse.
Added private method System.Net.Sockets.Socket.SupportsPortReuse,
which returns true when the runtime is able to bind to the same address
and port multiple times.
2015-10-12 16:45:37 +01:00
Marek Safar 51dc184ccc [system] Fix WebHeaderCollection values extraction for multi-header keys 2015-10-12 16:51:19 +02:00
Aleksey Kliger 936f77df46 [System.TypeSpec] make ModifierSpec an interface. 2015-10-12 10:47:00 -04:00
Marek Safar 78534d91c8 [mcs] Improve error reporting from 51137702c6 2015-10-12 16:17:22 +02:00
João Matos b35b474a9b Merge pull request #2120 from mono/revert-2101-stack-coop-gc
Revert "Reworked coop GC stack handling in platforms with restricted …
2015-10-12 14:39:02 +01:00
João Matos 5a834ff4af Revert "Reworked coop GC stack handling in platforms with restricted access to register contexts." 2015-10-12 14:38:48 +01:00
Rodrigo Kumpera 030f9dd26d Merge pull request #2101 from tritao/stack-coop-gc
Reworked coop GC stack handling in platforms with restricted access to register contexts.
2015-10-12 09:25:01 -04:00
Marek Safar 35e42072a8 [mcs] Rename error test 2015-10-10 20:19:34 +02:00
Marek Safar 51137702c6 [mcs] Report global attributes without target. Fixes #34724 2015-10-10 16:13:22 +02:00
Marek Safar 479fe65064 [mcs] Fixes typo 2015-10-10 16:13:22 +02:00
Rodrigo Kumpera 5e10b3057d [Apple] Disable environment access on Apple platforms that are not OSX.
The two known ways to access the environment variables are no longer allowed Apple.

Until something blessed by them is found, we'll provide no way to list all the envvars
of the current process.
2015-10-09 15:55:03 -04:00
Zoltan Varga 0421c0cff3 Fix the loaded llvm build. 2015-10-09 14:23:03 -04:00
João Matos d0843960aa [runtime] Fixed accidental whitespace change. 2015-10-09 17:11:45 +01:00
João Matos 4687c4bb25 [runtime] Build fixes for builds with disabled LLVM. 2015-10-09 17:09:05 +01:00
Zoltan Varga e19f9c25ed [llvmonly] Fix the build. 2015-10-08 23:07:20 -04:00
Zoltan Varga a39d73751b Merge remote-tracking branch 'origin/bitcode-premerge' 2015-10-08 22:57:00 -04:00
Zoltan Varga 7eabd11bb0 Fix regressions caused by the llvmonly changes so normal aot/full-aot works again. 2015-10-08 22:43:27 -04:00
Zoltan Varga 46c4f4e658 Avoid passing the ex_tag around when throwing exceptions, simply throw a NULL value of the same type caught by the landing pads in the generated code. 2015-10-08 22:43:26 -04:00
Zoltan Varga 631e2f1a00 Avoid installing an unhandled exception handler in every method. 2015-10-08 22:43:26 -04:00
Zoltan Varga 7af3ca709a Disable SIMD when using llvm only. 2015-10-08 22:43:26 -04:00
Zoltan Varga 25cd4c6d28 Emulate ckfinite in llvmonly mode. Implement support for tail calls and wrapped exceptions. 2015-10-08 22:43:26 -04:00
Zoltan Varga b4fbc75c87 Make parts of the jit c++ clean. 2015-10-08 22:43:25 -04:00
Zoltan Varga 6bd9698f90 More nesting issues with EH clauses. Fix stack traces. 2015-10-08 22:43:25 -04:00
Zoltan Varga d0852b5ec9 Fix a crash if an assembly contains no EH. 2015-10-08 22:43:25 -04:00
Zoltan Varga 16da48a5d1 Implement mono_raise_exception () for LLVM. 2015-10-08 22:43:24 -04:00
Zoltan Varga 692cf48e88 Avoid sorting the clauses, they are already sorted in the proper order. 2015-10-08 22:43:24 -04:00
Zoltan Varga 0a9b468aa9 Fix the matching of exceptions in llvmonly mode. Add a new AOT_JIT_INFO patch type which resolves to the MonoJitInfo of the current method, pass that instead of aot_module+method_index to mono_llvm_match_exception (). Save the il clause offsets into the AOT image so they can be accessed from a MonoJitInfo. 2015-10-08 22:43:24 -04:00
Zoltan Varga 07b4db9017 Add a fixme for virtual generic calls. 2015-10-08 22:43:23 -04:00
Zoltan Varga 1a20b681d8 Properly initialize the grouped_clauses array. 2015-10-08 22:43:23 -04:00
Alexander Kyte 6b650a9f1d [runtime] Make sure that the group index is available to the runtime
This commit also partitions the handler groups in a new manner,
in order to allow a fix for nesting and finally clause interaction
2015-10-08 22:43:23 -04:00
Zoltan Varga 378e0abb3b Avoid creating jump trampolines in llvmonly mode. 2015-10-08 22:43:23 -04:00
Zoltan Varga d355acfacb Fix llvmonly support in mono_arch_create_specific_trampoline. 2015-10-08 22:43:22 -04:00
Zoltan Varga c346db8d73 Check for missing methods in llvmonly mode in mini.c, not in aot-runtime.c. 2015-10-08 22:43:22 -04:00
Zoltan Varga b4c97faeb2 Remove empty phi nodes, this can happen if all their inputs are dead. 2015-10-08 22:43:22 -04:00
Zoltan Varga 8fc2188b4f Avoid generating OP_ATOMIC_LOAD/OP_ATOMIC_STORE opcodes in llvm mode. 2015-10-08 22:43:21 -04:00
Zoltan Varga 5622e075d4 Fix the LLVM_FAILURE message on OP_ATOMIC_STORE opcodes. 2015-10-08 22:43:21 -04:00
Zoltan Varga 4f6c751686 Fix the --aot=full support. 2015-10-08 22:43:21 -04:00
Zoltan Varga 8f0ff5cf92 Remove optimization flags from LLVM_CXXFLAGS. 2015-10-08 22:43:21 -04:00
Zoltan Varga 7e36ece329 Avoid an assert when looking up some trampolines. 2015-10-08 22:43:20 -04:00
Alexander Kyte 6c4958bdab [runtime] Don't load exception trampolines if compiling with llvmonly 2015-10-08 22:43:20 -04:00
Alexander Kyte f4fa4d972c [runtime-llvmonly] Added support for SSE instructions 2015-10-08 22:43:20 -04:00
Alexander Kyte 8c00e55a5e [runtime][llvmonlyexceptions] Used correct preprocessor symbol for llvmonly try tracking. 2015-10-08 22:43:20 -04:00
Alexander Kyte a82cb56cee [runtime][llvmonlyexceptions] Fixed whitespace mentioned in code review 2015-10-08 22:43:19 -04:00
Alexander Kyte 401c71a14c [runtime][llvmonlyexceptions] Fixed visibility of unhandled exception handler 2015-10-08 22:43:19 -04:00
Zoltan Varga c447b2d2e2 Implement the throwing of corlib exceptions. 2015-10-08 22:43:19 -04:00
Zoltan Varga d17d480e6e Implement Assembly.GetExecutingAssembly () as an intrinsics so it works even if stack walks are not available. 2015-10-08 22:43:18 -04:00
Zoltan Varga 64a2c9c63e Avoid emitting calls to the llvm.mono.load/store intrinsics in llvmonly mode. 2015-10-08 22:43:18 -04:00
Zoltan Varga 68a5c78530 Avoid disabling llvm for methods with an lmf. 2015-10-08 22:43:18 -04:00
Zoltan Varga 121b785822 Avoid falling back to the jit in llvmonly mode. 2015-10-08 22:43:18 -04:00
Zoltan Varga bc6adcd1e2 [llvm] Emit an unreachable instruction after llvm throws. 2015-10-08 22:43:17 -04:00
Zoltan Varga 51043e862c [runtime] Merge origin/kyte/llvmonly-exceptions-pr. 2015-10-08 22:43:17 -04:00
Zoltan Varga b2a5a4898b Remove the REALLY_LLVONLY flag, enable it by default. Use stock clang for compiling and linking llvm code. 2015-10-08 22:43:17 -04:00
Zoltan Varga 3dd36f41ee Fix a merge problem. 2015-10-08 22:41:37 -04:00
Zoltan Varga 970d5b59be Fix the REALLY_LLVMONY mode. 2015-10-08 22:41:37 -04:00
Zoltan Varga 5d3f7ac859 Fix merge and other problems. 2015-10-08 22:41:37 -04:00
Zoltan Varga 47dab6ad7a Disable REALLY_LLVM_ONLY by default. 2015-10-08 22:41:36 -04:00
Zoltan Varga 725d4085b1 Various hacks to make hello world run with only llvm code. Define REALLY_LLVMONLY_MODE at the top of mini.h to enable it. 2015-10-08 22:41:36 -04:00
Zoltan Varga 10dc97620f Fix support for generic virtual calls. 2015-10-08 22:41:36 -04:00
Zoltan Varga b3e71e7157 Parallelize the generation of aot images for make llvmonlycheck. 2015-10-08 22:41:35 -04:00
Zoltan Varga 77e6d06233 Pass the rgctx argument last, instead of first, because determining its ordering wrt to the 'this' and 'vret' arguments is very complicated. 2015-10-08 22:41:35 -04:00
Zoltan Varga bfbad592d6 Fix interface calls on a null receiver and virtual generic calls. 2015-10-08 22:41:35 -04:00
Zoltan Varga cad4712a63 Enable explicit-null-checks in llvm-only mode by default. 2015-10-08 22:41:35 -04:00
Zoltan Varga 07c5da1a35 Avoid an llvm assertion. 2015-10-08 22:41:34 -04:00
Zoltan Varga 84bd525240 Fix the build. 2015-10-08 22:41:34 -04:00
Zoltan Varga 93ce988348 Fix the build. 2015-10-08 22:41:34 -04:00
Zoltan Varga 6a25edc864 Enable support for more ldvirtftn+delegate creation cases. 2015-10-08 22:41:33 -04:00
Zoltan Varga 75f2c706a3 Fix the case when mono_method_needs_static_rgctx_invoke () returns TRUE, but we're using an instance which doesn't have an rgctx argument. 2015-10-08 22:41:33 -04:00
Zoltan Varga 896d81c44f Fix support for ldvirtftn+delegate creation. 2015-10-08 22:41:33 -04:00
Zoltan Varga 975fae6651 Add support for delegates which call methods which require an rgctx argument. 2015-10-08 22:41:33 -04:00
Zoltan Varga e24df1e3eb Avoid using the mono calling conv in llvm-only mode. Avoid emitting a dummy personality function. 2015-10-08 22:41:32 -04:00
Zoltan Varga 59796ef00a Ad support for iface calls which might go to methods which need an rgctx. 2015-10-08 22:41:32 -04:00
Zoltan Varga 3d163ada67 A bunch of hacks to compile llvm code using clang instead of opt/llc. 2015-10-08 22:41:32 -04:00
Zoltan Varga e989c82094 Pass the rgctx argument to gshared methods explicitly instead of in a non-abi register. Delegates don't yet work. 2015-10-08 22:41:31 -04:00
Zoltan Varga 83ee193357 Add a llvm_only flag to MonoCompile and use that instead of cfg->flags which means something else. 2015-10-08 22:41:31 -04:00
Zoltan Varga 410347c18a Avoid creating jump trampolines and delegate trampolines in llvm-only mode. 2015-10-08 22:41:31 -04:00
Zoltan Varga a857491fc0 Disable stack overflow trampolines in llvm-only mode. 2015-10-08 22:41:30 -04:00
Zoltan Varga 9efa0b678a Avoid creating plt entries for empty plt sections. 2015-10-08 22:41:30 -04:00
Zoltan Varga 32cbaf3638 Disable the dyn call runtime invoke code in llvm-only mode. 2015-10-08 22:41:30 -04:00
Zoltan Varga bab77afcb0 Disable the usage of delegate trampolines in llvm-only mode. 2015-10-08 22:41:30 -04:00
Zoltan Varga 00e784b663 Properly inflate methods called from llvm code without trampolines. 2015-10-08 22:41:29 -04:00
Zoltan Varga 37e4dd280e Avoid emitting symbols for jitted code if all methods were compiled by llvm. 2015-10-08 22:41:29 -04:00
Zoltan Varga 9b4561238f Don't put references to LLVM compiled methods into the method_addresses table, its not needed. 2015-10-08 22:41:29 -04:00
Zoltan Varga 7341e647ac Implement virtual/interface calls by calling a jit icall to resolve the method to be called. 2015-10-08 22:41:29 -04:00
Zoltan Varga 39e1ede78d Implement unbox trampolines for llvm compiled methods in llvm as functions which do a tail call to the real method. 2015-10-08 22:41:28 -04:00
Zoltan Varga 37712cfb74 Move the lookup of llvm compiled methods into a generated llvm function. 2015-10-08 22:41:28 -04:00
Zoltan Varga 09c0f42506 Implement rgctx fetches by calling a JIT icall. 2015-10-08 22:41:28 -04:00
Zoltan Varga 86fc39f790 Implement support for self-initialization in methods, i.e. methods which initialize themselves instead of depending on plt entries to do it. 2015-10-08 22:41:27 -04:00
Zoltan Varga 2a20f3f538 Add a GOT entry pointing to the AOT module. 2015-10-08 22:41:27 -04:00
Zoltan Varga 015afbcc2a Temporarily disable running opt. 2015-10-08 22:41:27 -04:00
Zoltan Varga fd8c505003 Add an 'llvmonlycheck' makefile target to run the jit tests in llvm-only mode. 2015-10-08 22:41:27 -04:00
Zoltan Varga 54c9545765 Add 'llvmonly' aot option and a corresponding --llvmonly runtime option, these are extensions of full-aot. 2015-10-08 22:41:26 -04:00
Ludovic Henry 6f8078df33 [process] Fix race between Exited and OutputDataReceived/ErrorDataReceived
Because the previous implementation of the Exited would not wait on
async_output and async_error to complete before calling the Exited event
that would lead to race condition (observable in the test-runner).

The previous implementation was using the
ThreadPool.RegisterWaitForSingleObject method which, in the case of
Mono, would simply enqueue a work item that would wait on this handle.
So instead of monopolizing a ThreadPool thread for that, we create a
dedicated one that simply call WaitForExit.
2015-10-08 23:23:13 +01:00
Zoltan Varga cbde7a8991 Merge pull request #2116 from cmp-/fix-sdb-trampoline-windows-x64
Fix sdb trampoline on Windows x64
2015-10-08 16:40:53 -04:00
Mark Probst 6de8d43e54 Merge pull request #2114 from cmp-/fix-sgen-gchandle-truncation-windows-x64
Fix sgen gchandle truncating pointers on Windows x64
2015-10-08 12:53:16 -07:00
Alexis Christoforides bc9d5d113a Merge pull request #1949 from lewurm/fixtype
[mono-config] use right type for result of strlen
2015-10-08 15:27:12 -04:00
Marek Safar 820b140a19 Merge pull request #2117 from Numpsy/ObjectSecurity
Add stub implementation of System.DirectoryServices.DirectoryEntry.Ob…
2015-10-08 20:06:49 +02:00
cmp 98ff7adfc7 Fix sdb trampoline on Windows x64
On Windows x64 (and possibly other x64 systems) the offset between code
and the called function can be larger than 32 bits, but amd64_call_code
is just a wrapper around x86_call_code.
2015-10-08 18:49:30 +01:00
Richard Webb d573d5034b Add stub implementation of System.DirectoryServices.DirectoryEntry.ObjectSecurity property
Add stub implementation of
System.DirectoryServices.DirectoryEntry.ObjectSecurity property (throws
on access)
2015-10-08 17:34:47 +01:00
João Matos 66b81e5154 [runtime] Reworked coop GC stack handling in platforms with restricted access to register contexts. 2015-10-08 14:10:14 +01:00
Marek Safar a4c91bbedf [mcs] Resolve target before resolving collection/dictionary initializers. Fixes #34604 2015-10-08 15:04:45 +02:00
Ludovic Henry e45764dbe3 [threadpool-ms] Refactor thread parking
Use a global condition variable as opposed to one per parked thread.
This remove any memory passed to the interrupt token, as this could be
an issue.

The problem comes from the fact that a destroy on a cond variable could
make a wait on this cond variable fail with EINVAL, and this would
trigger an assertion in the mono-mutex code.
2015-10-08 09:57:19 +01:00
Sebastien Pouliot 778adf0769 [linker] Both the TypeSpecification (T) along with the GenericArguments (G) must be preserved from custom attributes, e.g. T<G> 2015-10-07 20:55:27 -04:00
Aleksey Kliger 54ab1256c6 Additional tests for Type.GetType() with delegates.
Test that exotic compositions of modifiers are parsed correctly.
2015-10-07 18:58:17 -04:00
Aleksey Kliger dc9f2bceb9 [corlib] System.TypeSpec: parse mixture of pointer and array type modifiers. 2015-10-07 18:18:14 -04:00
cmp 77f40f0709 Fix sgen gchandle truncating pointers on Windows x64
On Windows x64 sizeof(unsigned long) == 4, so & ~3UL ends up truncating
the upper 32 bits of the pointer.
2015-10-07 20:41:31 +01:00
Ludovic Henry 0205c40d9b [test] The process output/error is finished only when null is passed 2015-10-07 19:40:17 +01:00
Ludovic Henry 1103abf383 [socket] Fix some tests 2015-10-07 17:44:31 +01:00
Ludovic Henry 12a58743fc [socket] Shutdown socket before trying to abort syscall
This is useful on WatchOS and TvOS as it's the only two platforms that
do not support signal based syscall abort. By calling shutdown, the
blocking syscalls on other threads will be interrupted. All the other
platforms currently support signals, so this will not change anything.

We cannot call Close, as this would let the OS reuse the FD for
something else, and the call to Receive (for example) on another thread
could fail with ENOTSOCK.

Unfortunatly it does not work for UDP based connection, as they are not
stream based, so Shutdown does not have much sense.
2015-10-07 17:44:30 +01:00
Aleksey Kliger 826880d362 [corlib] Tests for System.Reflection.Assembly.GetType(string, bool) 2015-10-07 11:57:42 -04:00
Ludovic Henry fd90b1e132 [socket] Make SocketAsyncResult use Socket.Handle
This is to avoid accessing a handle that has been disposed from the
SocketAsyncResult code.
2015-10-07 16:31:33 +01:00
Ludovic Henry c82b5e8d58 [socket] Take thread coop suspend status into account for syscall abort mechanism 2015-10-07 14:08:37 +01:00
Ludovic Henry e3062c86b8 [corlib] Rework some test to avoid unhandled and swallowed exception
These tests could fail randomly (timing issues) and this would lead to
unhandled exceptions. By using Task, instead of the ThreadPool directly,
we avoid these cases. We also ensure to wait for these tasks so we get
the test failing at the right moment and place.
2015-10-07 12:33:05 +01:00
Ludovic Henry 4f38a23473 [threadpool-ms] Remove recursivity of active_threads_lock
There was a recursive lock because of the interaction between
worker_kill and work_wait_interrupt, but as a matter of fact it is not
needed. This is because we cannot have an interrupt token with
worker_wait_interrupt, and the current thread in active_threads at
the same time.
2015-10-07 11:45:00 +01:00
Aleksey Kliger c58983457a [corlib] Type.GetType(string, bool) should throw ArgumentException
when it is unable to parse the type name.
2015-10-06 19:00:22 -04:00
Aleksey Kliger 70ec3c683f mono_reflection_parse_type(): pointer and ref parse errors.
pointer to ref (A&*), array of ref (A&[]), generic instantiation of
ref (A&[int]), generic instantiation of pointer (A*[int]) are all parse errors.
2015-10-06 18:31:53 -04:00
Rodrigo Kumpera a9d0971711 [Facades] Add reflection Facades back to xammac. XM 2.4.0 shipped them so we can't just drop them now. 2015-10-06 18:13:15 -04:00
João Matos 29f78080d7 Merge pull request #2112 from madewokherd/lowercaseinclude
Standardize on lower-case names for Windows include files.
2015-10-06 22:44:16 +01:00
Vincent Povirk b1f39fac1d Standardize on lower-case names for Windows include files.
This is needed for mingw builds on Linux.
2015-10-06 16:41:00 -05:00
Zoltan Varga 60cab7008b [runtime] Fix the handling of large allocation sizes in Marshal.AllocHGlobal/ReAllocHGlobal. Fixes #34382. 2015-10-06 13:41:32 -04:00
triton 020a7c6844 [runtime] Fixed the MSVC build. 2015-10-06 15:59:36 +01:00
Rodrigo Kumpera 4fd923b04b Merge pull request #1978 from ludovic-henry/coop-interrupt
[socket] Enable Thread.Abort on blocking syscall
2015-10-06 10:41:50 -04:00
Rodrigo Kumpera 7aae649458 Merge pull request #2060 from ludovic-henry/socket-rework-async
[socket] Complete refactor of Begin/End and Async
2015-10-06 10:40:47 -04:00
Rodrigo Kumpera e6ad2dc73b Merge pull request #2110 from ludovic-henry/threadpool-exit-worker
[threadpool-ms] Exit worker thread after 5 to 60 seconds
2015-10-06 10:19:19 -04:00
Ludovic Henry 11096e3733 [socket] Enable Thread.Abort on blocking syscall
By installing interrupt token around the blocking syscalls, we make it possible to abort them with signals.

Previously, the only way to interrupt a blocking syscall, would have been to dispose of the SafeSocketHandle associated to the socket. But that make it impossible to abort the following case:
 - thread T1 accept a socket S and launch T2 (as a background thread) to receive on S
 - T2 block on receive
 - T1 (the main thread) quit, and the shutdown code try to abort T2

T2 would never be aborted, because S would never return from its blocking syscall, and that's because T2:
 - would still have a reference to S, making it impossible to call the finalizer on S
 - will not call Dispose on S before returning from the blocking syscall

This fixes the hang observed on System.Net.HttpWebRequestTest.GetRequestStream with the cooperative GC.
2015-10-06 14:48:22 +01:00
Ludovic Henry 388b958c34 [runtime] Cleanup of mono_unhandled_exception 2015-10-06 14:31:42 +01:00
Ludovic Henry 22f0f1596b [threadpool-ms] Exit worker thread after 5 to 60 seconds
The timeout before exiting a worker thread is random to limit the worst case scenario where, if the timeout is set to N seconds, the user would launch a lot of work item simultaneously, at an interval of N + 1 seconds. In this case, we would have to kill all the threads at once, and starts them all over again 1 second later. The randomization makes the creation and destruction more linear in time, and avoid burst.
2015-10-06 14:29:06 +01:00
Ludovic Henry 0056f1ff01 [System] Make process pipe creation exception more verbose 2015-10-06 14:21:43 +01:00
Marek Safar 043651021b [mdoc] Update expected results due to 3156d1b05d 2015-10-06 13:43:36 +02:00
Marek Safar 4164d9fbe1 [xbuild] Make ToolsVersion 14.0 targeting 4.5.* frameworks work 2015-10-06 13:17:50 +02:00
João Matos 7cb8061fa3 Fixed HttpWebRequestTest to compile with mobile NUnit.
Fixes an error in the mono-master-monodroid lane.

[9:24:52] Errors:
[9:24:52] 
[9:24:52] /Users/builder/data/lanes/1845/aa3aab5f/source/monodroid/tests/bcl-test/BclTests.sln (default targets) ->
[9:24:52] (Build target) ->
[9:24:52] /Users/builder/data/lanes/1845/aa3aab5f/source/monodroid/tests/bcl-test/BclTests.csproj (default targets) ->
[9:24:52] /Library/Frameworks/Mono.framework/Versions/4.2.0/lib/mono/4.5/Microsoft.CSharp.Targets (CoreCompile target) ->
[9:24:52] 
[9:24:52] 	src/System/Test/System.Net/HttpWebRequestTest.cs(2336,13): error CS0117: `NUnit.Framework.Assert' does not contain a definition for `Greater'
[9:24:52] 
[9:24:52] 	 13 Warning(s)
[9:24:52] 	 1 Error(s)
2015-10-06 12:05:34 +01:00
Rodrigo Kumpera aa3aab5f1e [tests] Add test for apploading related crashes due to repetitive load/unload of the same assembly.
Right there's a test for the gsharing/image set bad interaction. It doesn't crash, but produces bad pointers when under MONO_DEBUG_ASSEMBLY_UNLOAD=1
2015-10-05 18:56:14 -04:00
Rodrigo Kumpera 65c4ee6243 [runtime/appdomain] Fix a bad interaction between appdomains and generic sharing.
mini-generic-sharing.c (get_shared_gparam): This function is used to produce placeholder types
to be used in the sharing instances that are actually JIT'd.

The problem comes from creating a MonoGenericParam whose image is corlib but it's allocated on
a different image.

This becomes an issue in metadata.c:mono_metadata_get_generic_inst when computing the image set
the generic instance should live in. By setting the generic param image to corlib we effectively
lie to the ImageSet code about what are the images.

So, say we have assembly A and we call get_shared_gparam on a type on this assembly. The returned type
will be allocated on A mempool but say it belongs to corlib.

The image set for such a generic instance will be [corlib].

Now we unload A.

Now we have a MonoGenericInstance in the [corlib] mempool that points to memory in the freed
mempool of A.

The fix is to set owner to the right image whenever possible. This would have changed the image
set to [A] (or more likely, [A, corlib]). Either mempool would be freed when A is unloaded.

Testing this behavior turned out to be incredibly more complicated than expected and even though
I managed to produce a test case which has the bad pointers, I could not trigger a crash even with
MONO_DEBUG_ASSEMBLY_UNLOAD=1.
2015-10-05 18:36:44 -04:00
Ludovic Henry e5e97eafef [socket] Refactor SocketAsyncEventArgs creation 2015-10-05 18:49:19 +01:00
Ludovic Henry 801b3ffcd3 [socket] Move callbacks out of SocketAsyncEventArgs 2015-10-05 18:49:19 +01:00
Ludovic Henry cfc564182d [socket] Remove SocketAsyncCallback dead code 2015-10-05 18:49:19 +01:00
Ludovic Henry 19f7162390 [socket] Remove SocketAsyncWorker
By having the callbacks directly in Socket, we can remove the SocketAsyncWorker class. This also greatly simplify this part of the code, as the callbacks are at the same place as the Begin/End invokes.
2015-10-05 18:49:19 +01:00
Ludovic Henry d088bf0593 [socket] Remove SocketAsyncEventArgs.Dispatcher 2015-10-05 18:49:19 +01:00
Ludovic Henry cdca8cde59 [socket] Remove SocketAsyncEventArgs.Init 2015-10-05 18:49:18 +01:00
Ludovic Henry 92a980a9af [socket] Factor SocketAsyncResult and ProcessAsyncResult common parts into IOAsyncResult + Abstract IO Threadpool jobs with IOSelectorJob
This simplifies greatly the native code, as we do not need to worry anymore about all IAsyncResult related work (call the callback, set completed, etc.), and we only need to care about the handle we are watching, and the callback to call when something happens on this handle.

This is quite a big commit, but unfortunatly, it's very hard to break it down in smaller commits as everything is very interwind.
2015-10-05 18:49:18 +01:00
Marek Safar b2d198fe11 Bump reference sources 2015-10-05 16:08:54 +02:00
Marek Safar 3156d1b05d [mcs] Keep documentation formatting as was written in source code. Fixes #34409 2015-10-05 16:05:51 +02:00
Marek Safar 351eea6b9e [system.web] Expand reference source strings 2015-10-05 10:50:20 +02:00
Marek Safar 05a0da7bb3 Merge pull request #2107 from kasthack/system.web.sr
[System.Web] Generated SR class
2015-10-05 10:22:13 +02:00
Marek Safar fffd5b2221 Merge pull request #2108 from kasthack/patch-1
[System.ComponentModel.DataAnnotations] More resource strings
2015-10-05 09:48:34 +02:00
kasthack 1ce44e625d [System.ComponentModel.DataAnnotations] More resource strings 2015-10-05 00:06:28 +03:00
Rodrigo Kumpera 2a30426356 [docs] Update the man page. Remove dead env var, document a couple of GC options. 2015-10-02 17:04:45 -04:00
João Matos 4bd39a4014 Merge pull request #2103 from xen2/calli_generic
Inflate calli generic method signature even if not a wrapper
2015-10-02 15:55:23 +01:00
Virgile Bello 2a48c1550b Inflate calli generic method signature even if not a wrapper 2015-10-02 23:31:18 +09:00
Adam Burgess 101bd2a868 [System] Fix bug #31209 - HttpConnection infinite loop
A continue statement in a do...while loop was skipping code to read the next line in a connection, causing an infinite loop.
Fixed by refactoring the loop, removing duplicated code.
2015-10-02 14:11:11 +00:00
Miguel de Icaza b26f789020 Merge pull request #1921 from mattzink/master
Allow disabling the mono-find-provides/requires RPM processing scripts
2015-10-01 17:44:17 -04:00
Miguel de Icaza 68d4be032a Merge pull request #2025 from sawachika-kenji/patch-1
Update FormsAuthentication.cs
2015-10-01 17:43:20 -04:00
Miguel de Icaza 7a3dff8be5 Merge pull request #2087 from joelmartinez/mdoc-membername-fixup
[mdoc] Now rewriting incorrect `MemberName`.
2015-10-01 17:40:35 -04:00
Miguel de Icaza a04b9a5d94 Merge pull request #2098 from evincarofautumn/fix-gchandle-assert
Fix assertion in mono_gchandle_get_target.
2015-10-01 17:39:43 -04:00
Miguel de Icaza fe6efaf319 [System/build] Xamarin.Mac's bare/System.dll does not compile with SECURITY_DEP, like the desktop assemblies 2015-10-01 17:31:10 -04:00
João Matos 77beb6adf4 [runtime] Fixed fast TLS detection on WatchOS. 2015-10-01 17:36:43 +01:00
Jo Shields e4cd7c692d Merge pull request #2099 from AdamBurgess/master
[Tools] Add user option to cert-sync, fix a few string formatting errors
2015-10-01 09:00:58 +01:00
Adam Burgess 0d52bb4fa6 [Tools] Add 'user' option to cert-sync
Syncs certificates with the current user's certificate store instead of the local machine's.
To be used when root is not available.
2015-10-01 01:53:08 +10:00
Adam Burgess 599483203c [Tools] Fix formatting in cert-sync 2015-10-01 01:49:18 +10:00
Miguel de Icaza da86534ee4 Move System.IO.Compression and System.IO.Compression.FileSystem from the _parallels directory to the non-parallel ones, hoping that this will fix the issue where Facades that depend on the latter are built only after those are built, currently, we break (see https://wrench.internalx.com/Wrench/WebServices/Download.aspx?workfile_id=9795720) 2015-09-30 11:07:19 -04:00
Radek Doulik d79d932a68 [linker] allow to specify filename for linker dependencies file
- also do not use the timestamp in default filename as it
   can be now done by specifying the filename if needed
2015-09-30 16:51:56 +02:00
Marcos Henrich f5eef79cd8 Merge pull request #2045 from BillSeurer/timezone
[ppc] Fix exception when reading from timezone file.
2015-09-30 15:00:15 +01:00
Marcos Henrich 96e40c5793 [System] Fixes SmtpClientTest.Deliver_Async 2015-09-30 10:44:31 +01:00
Atsushi Eno 1593ba0dce [CJK] fix bug #34059 - reviewed dead code and added some comments. 2015-09-30 10:59:09 +08:00
Alexis Christoforides 1dafd3944f [runtime] Make '--arch' more robust and OS X specific.
Also add missing man page entry.
2015-09-29 19:20:28 -04:00
Zoltan Varga 9eb534dfe9 [amd64] Fix cross compiling to amd64. 2015-09-29 18:07:36 -04:00
João Matos bd67e39f64 [arm] Clean up unused ARMv7s / ARMv7k hwcap checks. 2015-09-29 18:00:05 +01:00
Zoltan Varga 942daca38e [arm] Fix the build. 2015-09-29 12:25:32 -04:00
Alex Rønne Petersen 6ed9e24d22 Merge pull request #2086 from BillSeurer/testcases
[ppc] Updated ELF ABI v2 test cases to include returning structures f…
2015-09-29 18:21:26 +02:00
Ludovic Henry b13ad263cd [corlib] Fix dispose race condition in CancellationTokenSource
The race condition would manifest in the following code:

```
for (int i = 0, total = 100000; i < total; ++i) {
    if (i % 50 == 0)
            Console.WriteLine ("{0}/{1}", i, total);

    var c1 = new CancellationTokenSource ();
    var wh = c1.Token.WaitHandle;
    c1.CancelAfter (1);
    Thread.Sleep (1);
    c1.Dispose ();
}
```

And we would observe the following exception:
```
Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ManualResetEvent'.
 at System.Threading.WaitHandle.CheckDisposed () [0x00016] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:426
 at System.Threading.EventWaitHandle.Set () [0x0000c] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/EventWaitHandle.cs:205
 at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
 at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) [0x00051] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:723
 at System.Threading.CancellationTokenSource.Cancel (Boolean throwOnFirstException) [0x00006] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:409
 at System.Threading.CancellationTokenSource.Cancel () <0x7d75ada8 + 0x00017> in <filename unknown>:0
 at System.Threading.CancellationTokenSource.TimerCallbackLogic (System.Object obj) [0x00012] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:538
```

This would be a race condition between the TimerCallbackLogic call to Cancel and the call to Dispose on another thread. You could trigger it more reliably by putting a Thread.Sleep at CancellationTokenSource.cs:599.

Also fixes ConcurrentCancelLinkedTokenSourceWhileDisposing race condition between Cancel and Dispose, by applying the same pattern as CancellationTokenSource.TimerCallbackLogic.
2015-09-29 16:53:20 +01:00
João Matos d1a87bcac2 [runtime] Fixed opcode emulation logic for ARMv7k. 2015-09-29 15:43:37 +01:00
João Matos a838a0ed57 [runtime] Fixed ARMv7k detection logic. 2015-09-29 15:43:21 +01:00
Marek Safar 24be79b2db Merge pull request #2096 from kasthack/system-web-more-replacements
[System.Web] Reference source import
2015-09-29 08:47:27 +02:00
Zoltan Varga bebeb2346e [arm] Use 16 byte frame alignment on watchos. 2015-09-28 21:57:12 -04:00
kasthack fc0f8a1874 [System.Web] Generated SR class 2015-09-29 04:39:11 +03:00
Zoltan Varga def8ec43d4 [amd64] Fix the msvc build. Fixes #34371. 2015-09-28 19:16:55 -04:00
Zoltan Varga 2c41b2c61a [amd64] Fix the sigctx<->monoctx conversion code to work even if MONO_SIGNAL_USE_SIGACTION is not defined. 2015-09-28 19:12:34 -04:00
kasthack 18b1d72354 [System.Web] 20 attributes from reference source 2015-09-29 02:09:35 +03:00
Zoltan Varga b6dfce621f [amd64] Transition to using trampolines to implement single stepping/breakpoints in JIT mode too. 2015-09-28 18:16:11 -04:00
João Matos ef69e582af Merge pull request #2093 from directhex/fully-qualified-masm-path
Bundle modified masm.props with fully qualified ml.exe call.
2015-09-28 22:57:47 +01:00
Alexis Christoforides a29f5292e6 [runtime] Attempt to resolve DllImport using the installation lib dir. 2015-09-28 16:24:45 -04:00
Jon Purdy c518a3e39a Fix assertion in mono_gchandle_get_target. 2015-09-28 13:18:01 -07:00
Zoltan Varga e839acd2d8 [arm] Fix another bunch of frame alignment problems. 2015-09-28 13:36:47 -04:00
Marek Habersack 95147791a5 [tests] Enable tests for xambug #28777 on Android
The issue was fixed in XA, we can enable the tests now
2015-09-28 16:37:09 +02:00
Zoltan Varga 5885624e89 [arm] Fix the unaligned stack check. 2015-09-28 10:21:40 -04:00
Zoltan Varga 627bc54a55 Revert "[jit] Add a new mono_arch_init_compile () backend function which is used to set various flags in MonoCompile. Use this instead to get rid of some of the #ifdef MONO_ARCH_.. blocks. Add a default implementation which sets the flags based on the MONO_ARCH_.. defines."
This reverts commit bc50c66303.

Revert this as it seems to break the build.
2015-09-27 14:42:56 -04:00
João Matos b7a308f660 Merge pull request #2057 from directhex/monolite-on-jenkins
Move monolite URL to Jenkins, not Boston NAS
2015-09-27 14:11:51 +01:00
Zoltan Varga bc50c66303 [jit] Add a new mono_arch_init_compile () backend function which is used to set various flags in MonoCompile. Use this instead to get rid of some of the #ifdef MONO_ARCH_.. blocks. Add a default implementation which sets the flags based on the MONO_ARCH_.. defines. 2015-09-27 01:51:26 -04:00
Zoltan Varga 90cc18a833 [jit] Remove an unused define. 2015-09-26 22:12:09 -04:00
Zoltan Varga 50d39c613d [jit] Add an arch-stubs.c file to collect the stubs for the arch specific functions not implemented by all backends. Use this to avoid #ifdefs at call sites. 2015-09-26 21:17:15 -04:00
Marek Habersack b4d5016b5e [support] Limit possible values
Value returned from the reader function can be negative and ZStream's
avail_in should not be less than 0 as that value makes no sense and
other parts of code assume it to be equal or higher than 0.
2015-09-25 21:18:22 +02:00
Zoltan Varga 7628e59f49 [jit] Fix opcode emulation registration when DISABLE_JIT is defined. 2015-09-25 13:23:02 -04:00
Zoltan Varga ee0b7ce66e [arm] Fix compilation on arm. 2015-09-25 13:22:45 -04:00
Zoltan Varga 20e909ba88 [arm] Allocate a stack frame in the generic trampoline code before making calls. Also avoid assuming that the frame alignment is 8. 2015-09-25 12:45:10 -04:00
Jo Shields 900552b7d3 Bundle modified masm.props with fully qualified ml.exe call.
In some more esoteric environments (say bash.exe spawned by
jenkins-slave.exe), the _MASM target's attempts to call ml.exe fail
due to ml.exe missing from $PATH (even when it appears to be fine).

The ClCompile target doesn't suffer this issue, since it uses the
full path to CL.exe rather than assuming CL.exe is in $PATH.
Bundle a lightly patched masm.props to duplicate the ClCompile
target behaviour.

This should have no impact on you unless for some reason you're
using a different MASM to the one provided with MSVC.
2015-09-25 09:58:34 +01:00
Marek Safar 2cc07eaa9d Merge pull request #2092 from kasthack/system-web-stuff-import
[System.Web] Reference source import
2015-09-25 08:18:19 +02:00
Zoltan Varga e14c4c70b4 [arm64] Fix MONO_CONTEXT_GET_CURRENT support on arm64. 2015-09-24 21:41:33 -04:00
Zoltan Varga 47a53dff1b Merge pull request #2091 from kumpera/tvos_context_get_current
[tvos] Implement MONO_CONTEXT_GET_CURRENT for tvos
2015-09-24 19:20:07 -04:00
Rodrigo Kumpera fd00eb1cff [coop] Make coop suspend crashes have names that can be correlated to an Apple crash dump.
Use pthread_setname_np on attach to ensure every thread has a name that Apple's crash dump recognize.

The use pthread_getname_np when doing a thread dump to ensure we get the current thread name.

This cosmetic change will allow us to use Apple crash dumps when troubleshooting suspend issues.
2015-09-24 17:59:13 -04:00
Jonathan Pryor 3f3df26945 [Mono.Posix] Fix signal tests to run on OS X, Android.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=33558

Several of the Signal-related tests were disabled when running on OS X
because OS X doesn't provide reliable delivery: it will try to deliver
a signal, but if it's already been delivered it won't continue
delivering them. This results in failures such as:

	1) MonoTests.Mono.Unix.UnixSignalTest.TestWaitAny :   Expected: 23061
	  But was:  100000

(Note that "Expected" and "actual" are reversed. Oops.)

Thus, signals are delivered, just "not enough."

As It Happens™, Android is similar: running these tests on
Xamarin.Android results in test failures because not enough signals
are received. (It's not as bad as OS X -- only ~10% off -- but it's
not *all* of the signals either.)

Fix the tests so that they *don't* require that we receive as many
signals as we raise. Instead, assert that all of the UnixSignal
instances actually have a UnixSignal.Count value greater than 0, i.e.
that they've been signaled AT ALL.

Loosening up the tests in this manner allows the tests to pass on
OS X, and should allow things to work as expected on Android.
2015-09-24 17:15:36 -04:00
Rodrigo Kumpera 118c25ad67 [tvos] Implement MONO_CONTEXT_GET_CURRENT in terms of thread_get_state. 2015-09-24 15:12:02 -04:00
Rodrigo Kumpera aeeb3e87bb [mach] Implement mono_mach_arch_thread_state_to_mono_context. 2015-09-24 15:12:02 -04:00
Rodrigo Kumpera 1f625a0769 [utils] Split the arm64 code from the arm code for the mach support code.
Now those to conform to the convention used for everything else.
2015-09-24 15:12:02 -04:00
Radek Doulik b5c06e6bab [linker] add timestamp to the linker deps filename
- and make sure we create a new stack on each dump
2015-09-24 20:32:56 +02:00
Alexis Christoforides 39fe438f07 [runtime] Add '--arch' argument 2015-09-24 14:28:04 -04:00
Zoltan Varga 359b868038 [arm] Fix the stack alignment in the prolog to work with MONO_ARCH_FRAME_ALIGNMENT values other than 8. 2015-09-24 14:09:59 -04:00
Jonathan Pryor ab2094334d Merge pull request #2084 from joelmartinez/mdoc-deletetestfix
[mdoc] Removed extraneous directory creation.
2015-09-24 13:15:14 -04:00
Jo Shields 3f2355445d Move monolite URL to mono-project.com CDN, not Boston NAS 2015-09-24 14:38:55 +01:00
João Matos 77a900a8ed Fixed Mach abort syscall code to work with Mach targets that do not support it. 2015-09-24 14:15:54 +01:00
Marek Safar 7f306ec7be [mcs] Further improvements to fixed statement changes from 4ea0fbbd44 2015-09-24 14:42:18 +02:00
Ludovic Henry 2c29b8ae21 [coop] Move syscall abort mechanism to dedicated files 2015-09-24 11:17:12 +01:00
Marek Safar 4ea0fbbd44 [mcs] Emit fixed temp variables as managed references 2015-09-24 11:59:59 +02:00
Marek Safar 417cd9eef4 [mcs] Add link to closest parent async storey only if it hold captured this. Fixes #34168 2015-09-24 09:54:57 +02:00
Marek Safar bfe00f83a1 Merge pull request #2088 from kasthack/system-web-ea-import
[System.Web] Reference source import
2015-09-24 08:31:37 +02:00
kasthack d442b89730 System.Web.Routing: RequestContext, RouteTable, RouteValueDictionary and VirtualPathData from reference source 2015-09-24 06:36:41 +03:00
kasthack 5b8a2d206c [System.Web] Public interfaces from reference source 2015-09-24 05:29:04 +03:00
Mark Probst 737ca8b888 [sgen] Fix promoted trace output. Fixes #30479. 2015-09-23 14:55:09 -07:00
Mark Probst 813a668097 Merge pull request #2073 from BrzVlad/fix-sgen
Fix sgen
2015-09-23 14:23:26 -07:00
Joel Martinez 02ddbe8b75 [mdoc] Now rewriting incorrect MemberName.
An error condition in an existing ecma xml doc set was brought to my attention
in which an exception was being raised during an `mdoc update`. The cause of this
error was due to the fact that the `GetTypeParameters` method was getting the
list of type parameters from the `MemberName` string.

This patch fixes the error condition by rewriting `MemberName` if it doesn't
match the value from the reflected member.
2015-09-23 17:15:59 -04:00
Bill Seurer 5013b989ed [ppc] Updated ELF ABI v2 test cases to include returning structures from functions 2015-09-23 15:44:24 -05:00
Rodrigo Kumpera f4255e7a9c [profiler] Add mlpd stats dumping, use --reports=stats.
This add statistical collection of mlpd files. Right now it reports basic statics on number of events
and their overhead, plus general buffer overhead.

This should enable us better understand what a file is made of when figuring out ways to optimize it.

Here's a sample output:

```
Mlpd statistics
    Buffer count 13499  overhead 647952 (48 bytes per header)

Event details:
             TYPE_GC                 TYPE_GC_EVENT  count   6313    min   4 max      8  bytes 35802
             TYPE_GC                  TYPE_GC_MOVE  count  17737    min  12 max    262  bytes 4138055
             TYPE_GC        TYPE_GC_HANDLE_CREATED  count  29833    min   6 max     14  bytes 296379
             TYPE_GC      TYPE_GC_HANDLE_DESTROYED  count   6620    min   5 max     10  bytes 42515
       TYPE_METADATA                 TYPE_END_LOAD  count  15926    min  12 max    271  bytes 1112068
         TYPE_METHOD                      TYPE_JIT  count  10246    min  26 max   1015  bytes 1043018
      TYPE_EXCEPTION                   TYPE_CLAUSE  count      2    min   6 max      6  bytes 12
      TYPE_EXCEPTION             TYPE_EXCEPTION_BT  count      2    min  50 max     50  bytes 100
           TYPE_HEAP               TYPE_HEAP_START  count      1    min   3 max      3  bytes 3
           TYPE_HEAP                 TYPE_HEAP_END  count      1    min   4 max      4  bytes 4
           TYPE_HEAP              TYPE_HEAP_OBJECT  count 284536    min   5 max    654  bytes 4823852
           TYPE_HEAP                TYPE_HEAP_ROOT  count 2508919   min  11 max    355  bytes 750970914
         TYPE_SAMPLE     TYPE_SAMPLE_COUNTERS_DESC  count      3    min 256 max   2835  bytes 3712
         TYPE_SAMPLE          TYPE_SAMPLE_COUNTERS  count   1089    min   3 max    402  bytes 66219
        TYPE_RUNTIME                TYPE_JITHELPER  count  21191    min   6 max     29  bytes 252473
```
2015-09-23 16:43:53 -04:00
Rodrigo Kumpera e2bd97b939 [profiler] Add missing constants for event subtypes. 2015-09-23 16:43:52 -04:00
triton ee28d47ab4 Workaround lack of libunwind in WatchOS.
This is a temporary workaround until get correct fix is properly tested on device.

This makes us be able to compile the runtime with the latest Xcode SDK.
2015-09-23 21:20:12 +01:00
Miguel de Icaza 12461baf50 Merge pull request #1843 from info-lvsys/patch-1
Added sha512 and sha256 ; and defaults to SHA512
2015-09-23 16:09:29 -04:00
Miguel de Icaza b16bcb6332 Merge pull request #1325 from madrang/CryptoToolsCtorCheck
Added null check in constructor of BlockProcessor in CryptoTools.
2015-09-23 16:06:59 -04:00
Miguel de Icaza 468225a247 Merge pull request #757 from mlintner/master
These changes fix 14335. When in getcontractinternal various things can ...

This patch further does not affect mobile.
2015-09-23 16:05:09 -04:00
Miguel de Icaza b34a01e4be Merge pull request #2085 from guerrysemones/master
This is a patch to fix bug 34123. System.Drawing.Printing.PrintingSer…
2015-09-23 15:55:08 -04:00
Miguel de Icaza 226af94a23 Merge pull request #1218 from AndreyAkinshin/master
Suppression of negative Elapsed in Stopwatch, this is the comment from the Reference Source:

                    // When measuring small time periods the StopWatch.Elapsed*
                    // properties can return negative values.  This is due to
                    // bugs in the basic input/output system (BIOS) or the hardware
                    // abstraction layer (HAL) on machines with variable-speed CPUs
                    // (e.g. Intel SpeedStep).
2015-09-23 15:36:55 -04:00
Miguel de Icaza 28f473c41d Merge pull request #1225 from strawd/bug22307
Fix for bug 22307 - Intermittent IndexOutOfRangeException on closing connection
2015-09-23 15:34:55 -04:00
Miguel de Icaza d07e9a199a [mono.data.sqlite] Using sqlite_close_v2 when available
From Matthew Leibowitz (mattleibo)

This is the recommended function for garbage collected languages.
http://sqlite.org/c3ref/close.html

The sqlite3_close_v2() interface is intended for use with host
languages that are garbage collected, and where the order in which
destructors are called is arbitrary.

Falls back to old sqlite3_close if we are on an old system

Useful for ADO.NET where the connection os often closed, but the
commands are re-usable

Mostly visible on Windows operating systems

This snippet should fail with a System.IO.IOException using the
current build of Mono on Windows:

    string filename = "test_" + Guid.NewGuid ().ToString ("N") + ".db";
    SqliteConnection conn = new SqliteConnection ("Data Source=" + filename);
    conn.Open ();
    SqliteCommand cmd = conn.CreateCommand ();
    cmd.CommandText = "PRAGMA legacy_file_format;";
    cmd.ExecuteScalar ();
    // close connection before the command
    conn.Dispose ();
    // then close the command
    cmd.Dispose ();
    // the locks should be released, and we should be able to delete the database
    File.Delete (filename);
2015-09-23 15:34:00 -04:00
Miguel de Icaza bbd8a21934 [API] Add a couple of .NET 4.5 methods, from pull request 641, had to apply manually 2015-09-23 15:31:00 -04:00
Zoltan Varga 0af35dd55e [bcl] Stop distributing Mono.C5, there is an updated nuget package for it, keep it for regression testing purposes. 2015-09-23 15:02:15 -04:00
Miguel de Icaza aea57f09d4 Merge pull request #853 from echampet/onclick
[FIX] correctly handle custom onclick attribute when autopostback = true...
2015-09-23 15:00:41 -04:00
Miguel de Icaza 90c68ad56a Add new test for Bug 15028, it is fixed by our migration to reference source 2015-09-23 14:56:20 -04:00
Miguel de Icaza 22448831bb Merge pull request #704 from jgagnon/master
Fix for #4938.
2015-09-23 14:42:05 -04:00
Miguel de Icaza 559ad5b34b Merge pull request #463 from strawd/concurrent-requests
Handle multiple concurrent calls to BeginTryReceiveRequest
2015-09-23 14:37:01 -04:00
guerrysemones eefcd3b42e This is a patch to fix bug 34123. System.Drawing.Printing.PrintingServicesUnix is failing to print on Mac OSX Yosemite because the CUPS function cupsTempFile now always returns an empty string. This function was deprecated. Now replacing cupsTempFile call with call to cupsTempFd to fix printing. I do not see a clear way to unit test this, and there appear to be no prior unit tests covering this. Essentially we are swapping a function call for another that returns the same type of result. This was tested on my copy of net_4_x master. The same fix could be applied to mono version 3 also. This change is released under the MIT license. 2015-09-23 13:32:46 -05:00
Miguel de Icaza d40a434c60 Merge pull request #1971 from angeloc/master
eglib: checking locale_charset function availability
2015-09-23 14:25:57 -04:00
Miguel de Icaza e2a31b6128 Merge pull request #2023 from juergenhoetzel/master
[runtime] Fix casting error in InternalCodePage.
2015-09-23 14:24:06 -04:00
Zoltan Varga b352aa9751 [arm] Fix aot support for the alignment check code. 2015-09-23 14:23:35 -04:00
Miguel de Icaza fa081c5ecd Obsolete SmtpClient 2015-09-23 14:21:51 -04:00
Joel Martinez 40b89c524d [mdoc] Removed extraneous directory creation.
This was in response to a test failure noticed after this pull request was accepted: https://github.com/mono/mono/pull/2012#commitcomment-13325966

The solution was two-fold, the code removed was unecessary as this directory is created elsewhere right before the file is written (and with the correct name in the case of a unified type). Also a small change was made to the makefile to clean up some files which was causing some targets to be skipped, along with moving some targets to the `check-doc-tools` target.
2015-09-23 14:21:13 -04:00
Miguel de Icaza b711f7731b Merge pull request #2020 from tomjepp/master
Fix bug #33551 - Use a full FQDN for EHLO and HELO in SmtpClient.
2015-09-23 14:18:36 -04:00
Zoltan Varga ae23361079 [arm] Add a stack alignment check to the prolog code, disabled by default. 2015-09-23 12:59:44 -04:00
Miguel de Icaza e976779117 Merge pull request #2059 from ermshiperete/Xamarin-33968
[MWF] Fix problem pasting text (Xamarin-33968)
2015-09-23 11:04:27 -04:00
Miguel de Icaza 6a4ba0dd1e Merge pull request #2072 from AdamBurgess/master
[System] Fix SmtpClient.SendMailAsync never completing
2015-09-23 10:59:51 -04:00
Miguel de Icaza bc06803625 Merge pull request #2080 from upsilon/fix-point-constructor
[System.Drawing] Fix Point constructor with single int parameter to correctly handle negative locations.
2015-09-23 10:59:22 -04:00
kasthack 7df2288d91 [System.Web] Public *EventArgs from reference source 2015-09-23 17:58:53 +03:00
Marek Habersack ced24f4004 [test] Fix dependency on compiler behavior for a couple of tests
A couple of tests for System.Reflection.MethodBody assumed the code generated
by the compiler will be the same as the one generated by Mono's MCS. However,
when the code is built by CSC in release mode (version that comes with VS2015
was tested) the optimizations remove locals required by the old version of the
tests. Also, CSC orders the locals differently to MCS and that breaks one of
the tests which relied on the declaration order.
Another difference is that CSC and MCS type a certain local variable differently.
The variable being a byte* in source code is output in IL as such by MCS, but CSC
outputs an int8& - a by-ref type.
The tests are built by VS but they are executed by Mono on Android and so the
differences come up as errors.
This commit fixes both issues by working around the differences.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=33370 when it is included in XA
2015-09-23 16:24:53 +02:00
João Matos 67ca203ea1 Merge pull request #2082 from akoeplinger/fix-automake
[unit-tests] Fix "parallel-tests" AUTOMAKE_OPTIONS not recognized by old automake
2015-09-23 14:47:50 +01:00
Marek Safar ce70c27a7a Merge pull request #2079 from kasthack/system-web-eh-import
[System.Web] Reference source import
2015-09-23 10:45:28 +02:00
Zoltan Varga 171cba1cee Revert "[llvm] Allow phi instructions where some incoming nodes are not defined because they are defined by dead code."
This reverts commit 1a4e073baf.

Revert this, it can lead to phi instructions with no nodes.
2015-09-22 17:29:54 -04:00
Vlad Brezae 7135e9e03c [sgen] Fix warning 2015-09-22 14:08:52 -07:00
Vlad Brezae e6b5e7d727 [sgen] Make sure we scan aligned memory regions
When we suspend a thread, the stack pointer might not be aligned.
2015-09-22 14:08:50 -07:00
Zoltan Varga 1a4e073baf [llvm] Allow phi instructions where some incoming nodes are not defined because they are defined by dead code. 2015-09-22 17:08:20 -04:00
kasthack 272033f2e2 [System.Web] Public event handlers from reference source 2015-09-22 22:56:26 +03:00
Kimura Youichi a89c01f98e [System.Drawing] Fix Point constructor with single int parameter to correctly handle negative locations. 2015-09-23 04:50:25 +09:00
Rodrigo Kumpera 23e34d77f2 [utils] Fix amd64 version of MONO_CONTEXT_GET_CURRENT.
Registers must be saved in MonoContext in the same order as mono_sigctx_to_monoctx.

This caused crashes on linux when unified suspend was enabled.
2015-09-22 15:38:43 -04:00
Ludovic Henry 4a2599720d [coop-gc] Make Thread.Sleep interruptable signalless 2015-09-22 20:22:36 +01:00
kasthack da7046ee30 [System.Web] HttpApplicationStateWrapper, HttpBrowserCapabilitiesWrapper, HttpCachePolicyWrapper and HttpSessionStateWrapper from reference source 2015-09-22 22:16:36 +03:00
Zoltan Varga fe3d2b7085 [aot] Fix a regression introduced by cc946ea5b9. 2015-09-22 14:08:09 -04:00
Zoltan Varga 6fb7ac2cb2 [jit] Fix the linking of bblocks for switch statements, previously we were linking the bblock containing the range check with the target bblocks as well, causing problems when using llvm. Fixes #34147. 2015-09-22 14:08:09 -04:00
Marek Safar 4e8470cbc0 Merge pull request #2076 from akoeplinger/fix-bootstrap
[System] Remove C#6 expression bodied property to fix bootstrapping with older mcs
2015-09-22 19:32:05 +02:00
Marek Safar 69bd371b03 Merge pull request #2075 from kasthack/system-web-import-enums
[System.Web] Public enums from reference source
2015-09-22 19:31:15 +02:00
Alexander Köplinger 35b648849d [System] Remove C#6 expression bodied property to fix bootstrapping with older mcs 2015-09-22 19:26:57 +02:00
kasthack 31682e6b04 [System.Web] Public enums from reference source 2015-09-22 18:46:35 +03:00
Ludovic Henry 9e59d35315 [socket-io] Cleanup of the code to ease switching to signalless interrupts
Also fixes a bunch of missing MONO_(PREPARE|FINISH)_BLOCKING, or remove returns between MONO_(PREPARE|FINISH)_BLOCKING
2015-09-22 15:53:53 +01:00
Ludovic Henry a710cc7293 [runtime] Fix color formatting on sublime text 2015-09-22 15:53:53 +01:00
Ludovic Henry 2c94aa738a [thread] Remove parameter as we always pass the current one 2015-09-22 15:53:53 +01:00
Ludovic Henry 17f16e120a [thread] Remove duplicate and unused function declaration 2015-09-22 15:53:53 +01:00
Alexander Köplinger 7f74e25826 [unit-tests] Fix "parallel-tests" AUTOMAKE_OPTIONS not recognized by old automake
automake 1.13 introduced the flag as default, in 5ad2890c I explicitly set it via AUTOMAKE_OPTIONS
to ensure Jenkins (which is on automake 1.11 on some builders) has the same behavior.

Turns out that the flag isn't recognized by automake versions below 1.11 and so the build fails there.

To fix the problem, remove AUTOMAKE_OPTIONS from the Makefile.am in unit-tests and introduce some clever
code in configure.ac instead to set the flag only on the automake versions that need it.
2015-09-22 14:03:28 +02:00
David Karlaš ecb87b03f1 Merge pull request #2071 from DavidKarlas/bug25480
Bug 25480 - OutputPath property is not set for this project
2015-09-22 11:20:39 +02:00
Eberhard Beilharz 7381d913a9 [MWF] Fix problem pasting text (Xamarin-33968)
Fix a problem where pasting certain unicode characters from the
clipboard (e.g. "aʼaa") resulted in "a벪".
2015-09-22 10:22:35 +02:00
Vlad Brezae e55e4350bb [sgen] Fix race between block allocation and concurrent sweep.
Adding a new block to the allocated_blocks array is racy with the removal of nulls when sweeping. We wait for sweep to finish to avoid that.

This also handles the problem of allocating degraded objects while sweeping.
2015-09-22 00:38:29 -07:00
Adam Burgess d89373d85e [System] Fix SmtpClient.SendMailAsync never completing 2015-09-22 04:43:12 +10:00
David Karlaš 6c066a6580 [XBuild] Ignoring paths of .csproj, .targets and .sln file paths so in case of missmatch between values in <ProjectReference> or .sln and actual file system continue matching project file path and project 2015-09-21 20:30:22 +02:00
David Karlaš 76c6a08e73 [XBuild] Bug 25480 - OutputPath property is not set for this project
This error was generated when iOS(or any other kind of project, that is referencing other project in solution via <ProjectReference>) wanted to get OutputPath of PCL(or any other referenced project) but it failed in case of IDE because wrong conditions(see .targets files changes). Reason this bug was never discovered before is because PCL project was already loaded before with correct configuration/platform so not having AssignProjectConfiguration target executed had no effect. Reason it appeared in this case(Bug 25480) was that .sln and .csproj<ProjectReference> had folder path defined as XamlSamples but actual file system had xamlsamples(notice different chars casing). So projects.TryGet(filePath, out project) failed, hence project had to be reloaded, and then bug from .targets files showed up...

A bit more details about fix: The AssignProjectConfiguration target assigns configurations to the various @(ProjectReference), and is used from targets like ResolveProjectReferences, which are enabled only while building solution files ( $(BuildingSolutionFile) ) or when invoked from the IDE ( $(BuildingInsideVisualStudio) ). But the AssignProjectConfiguration target ignores the IDE case, which breaks usage of ResolveProjectReferences from the same. Fix up to run for both the cases.
2015-09-21 20:28:43 +02:00
Alexander Köplinger 8719a2a6d2 Revert "System.Web.UI.WebControls.SendMailErrorEvent(Args|Handler) from referencesource"
This reverts commit 7f5413a819.

It caused a test failure in MonoTests.System.Web.UI.WebControls.PasswordRecoveryTest.GetPasswordTest
2015-09-21 14:19:05 +02:00
Marek Safar e9d0f23b45 Bump referencesource 2015-09-21 11:07:20 +02:00
Marek Safar e0f9637ee9 [corlib] Match es-es NumberGroupSeparator with es. Fixes #34047 2015-09-21 09:58:47 +02:00
Marek Safar 5ec3345b79 Merge branch 'pr/2065' 2015-09-21 09:07:46 +02:00
Marek Safar fb088e5502 [System.Net.Http] Set host header directly only 2015-09-21 09:04:34 +02:00
Marek Safar 79bbc68c4f Merge pull request #2068 from kasthack/System.Web-import
System.Web reference source imports
2015-09-21 08:28:44 +02:00
Zoltan Varga 8e37c4b888 Merge pull request #2067 from akoeplinger/unit-tests-nunit
[unit-tests] Emit NUnit xml report of test result
2015-09-21 00:51:23 -04:00
Zoltan Varga 840554bb40 [aot] Remove unused 'autoreg' option. 2015-09-21 00:41:53 -04:00
Zoltan Varga cc946ea5b9 [aot] Remove support for direct object file emission in aot mode, the implementation is not complete. 2015-09-21 00:38:58 -04:00
Zoltan Varga ababe03626 Add an 'rgctx' field to MonoDelegate, not yet used. 2015-09-20 14:56:45 -04:00
kasthack d408da6df2 System.Web.Configuration.(AdapterDictionary,AuthenticationMode,MachineKeyValidation,ProcessModelComAuthenticationLevel,ProcessModelComImpersonationLevel,SystemWebCachingSectionGroup,WebApplicationLevel,XhtmlConformanceMode) from reference source
Added AsyncPreloadModeFlags + some internal classes used by MS's implementation
2015-09-20 09:53:17 +03:00
kasthack e02c9701d7 System.Web.UI.WebControls.WebParts.IWebPartTable+TableCallback from referencesource 2015-09-20 08:36:48 +03:00
kasthack 2028e87d51 System.Web.UI.WebControls.WebParts.IWebActionable from referencesource 2015-09-20 08:34:21 +03:00
kasthack 8663666b4a System.Web.Configuration.CustomErrorsRedirectMode from referencesource 2015-09-20 08:32:56 +03:00
kasthack 57469ce82a System.Web.UI.WebParts.WebPartEvent(Args|Handler) from referencesource 2015-09-20 08:31:45 +03:00
kasthack 6e363f21bf System.Web.Configuration.PagesEnableSessionState referencesource 2015-09-20 08:30:05 +03:00
kasthack 560c1765eb System.Web.UI.WebParts.PartChromeState from referencesource 2015-09-20 08:28:34 +03:00
kasthack 6452c7267c System.Web.UI.WebControls.CreateUserErrorEvent(Args|Handler) from referencesource 2015-09-20 08:26:12 +03:00
kasthack 8942f4add3 +System.Web.Configuration.TicketCompatibilityMode 2015-09-20 08:24:31 +03:00
kasthack 7f5413a819 System.Web.UI.WebControls.SendMailErrorEvent(Args|Handler) from referencesource 2015-09-20 08:23:27 +03:00
kasthack 814331510c System.Web.Configuration.ProcessModelLogLevel from referencesource 2015-09-20 08:21:32 +03:00
kasthack b0cd92127c +System.Web.Configuration.ProfileGuidedOptimizationsFlags.cs 2015-09-20 08:19:40 +03:00
kasthack a27080e9ca System.Web.UI.WebControls.AuthenticateEvent(Args|Handler) from referencesource 2015-09-20 08:18:08 +03:00
kasthack 65b8984a75 +System.Web.UI.ValidateRequestMode 2015-09-20 08:16:12 +03:00
kasthack eaefcc235e System.Web.Configuration.CustomErrorsMode from referencesource 2015-09-20 08:14:52 +03:00
kasthack 8e93f5f7b9 System.Web.UI.WebControls.IPersistedSelector from referencesource 2015-09-20 08:13:31 +03:00
kasthack a1ff605a1e System.Web.Configuration.TraceDisplayMode from referencesource 2015-09-20 08:11:52 +03:00
kasthack d972f553a9 System.Web.Configuration.AuthorizationRuleAction from referencesource 2015-09-20 08:10:32 +03:00
kasthack 84edeade67 System.Web.UI.WebControls.LoginCancelEvent(Handler|Args) from referencesource 2015-09-20 08:08:50 +03:00
kasthack d35f36ae48 +UnobtrusiveValidationMode.cs 2015-09-20 08:06:34 +03:00
kasthack 0caa09ba29 System.Web.UI.WebControls.WebParts.(IWebPartField|IWebPartFieldCallback) from referencesource 2015-09-20 08:05:09 +03:00
kasthack 6c0216dcfa System.Web.UI.WebControls.WebParts.(IWebPartRow|IWebPartRowCallback) from referencesource 2015-09-20 08:00:14 +03:00
kasthack 110bf02eb6 System.Web.TraceContextEvent(Args|Handler) from referencesource 2015-09-20 07:55:49 +03:00
kasthack 86a6207108 System.Web.Routing.IRouteConstraint from referencesource 2015-09-20 07:51:59 +03:00
kasthack 2fc2764373 +System.Web.ModelBinding.(ModelError,ModelErrorCollection) 2015-09-20 07:45:49 +03:00
kasthack 22ca5de1b0 System.Web.UI.IThemeResolutionService from referencesource 2015-09-20 07:40:54 +03:00
kasthack d5a8b20f22 System.Web.UI.WebControls.CallingDataMethodsEvent(Handler|Args) from referencesource 2015-09-20 07:37:08 +03:00
kasthack 1f8deb5a32 System.Web.Routing.IRouteHandler from reference source 2015-09-20 07:33:12 +03:00
kasthack 8559310456 System.Web.UI.WebControls.IDataBoundItemControl from reference source 2015-09-20 07:31:44 +03:00
kasthack 8317ad809e System.Web.Routing.RouteDirection from reference source 2015-09-20 07:29:43 +03:00
kasthack deeea8bdf8 System.Web.UI.WebControls.IFieldControl from reference source 2015-09-20 07:26:39 +03:00
kasthack fb33e443bd System.Web.Caching.ResponseElement from reference source 2015-09-20 07:22:14 +03:00
kasthack 7ed288f715 System.Web.SessionState.SessionStateBehavior from reference source 2015-09-20 07:12:30 +03:00
kasthack be246f4924 System.Web.Compilation.(ImplicitResourceKey,IImplicitResourceProvider) from reference source 2015-09-20 06:50:25 +03:00
kasthack 62cca27e2f System.Web.Compilation.IAssemblyPostProcess from reference source 2015-09-20 06:38:52 +03:00
Alexander Köplinger bec4e96e18 [System] Fix SocketTest.SendAsyncFile test to use dynamic port
The previous hardcoded port 8001 caused "address already in use" errors on Jenkins.
2015-09-20 02:59:19 +02:00
Alexander Köplinger 5ad2890c11 [unit-tests] Emit NUnit xml report of test result
Overrides check-local to output an NUnit report of the test results.

It currently creates a single pass/fail test case as this is the easiest solution,
but the test log is included in the report which should be enough to diagnose errors.

Parallelism is disabled here since we need to ensure check-local happens after check
so we can parse test-suite.log. The tests are quite fast so it doesn't hurt much.

We need AUTOMAKE_OPTIONS=parallel-tests so the test-suite.log gets created on automake 1.11.
2015-09-20 02:44:14 +02:00
Zoltan Varga ba875cb62c Merge pull request #2029 from madewokherd/winformstests
Fix MonoTests.System.Windows.Forms.TrackBarBaseTest on Windows.
2015-09-19 12:48:57 -04:00
Alexander Köplinger ccd2d8b29c Merge pull request #2064 from akoeplinger/profiler-nunit
[profiler] Emit NUnit xml report of test result in ptestrunner.pl
2015-09-19 03:44:51 +02:00
Rodrigo Kumpera 2437b1ea77 [threading] Apparentlty zero is a valid tls key on some systems. 2015-09-18 16:51:12 -04:00
Marek Habersack 6335b96646 [threadpool] Prevent high CPU usage in certain conditions
Threadpool uses poll(2) to watch the file descriptors for activity but
it can sometimes miss that an fd went into error. When that happens the
poll call is interrupted with EAGAIN since the erroneous fd's events have
already been read and there's nothing left in the queue for it. That, in turn,
causes mono to run the loop so quickly that it uses 100% of the CPU. It happens,
for instance, with Xamarin Studio which can utilize two CPU cores to the full while
idling on the opening screen.

This commit makes sure to remove the descriptors with errors from the poll set and
thus preventing the syscall from being interrupted and returning EAGAIN.
2015-09-18 18:26:34 +01:00
Zoltan Varga 66a191c865 [jit] Remove some obsolete code from mini_type_is_hfa (). 2015-09-18 12:56:33 -04:00
Radek Doulik 3a2af04f17 [linker-analyzer] enable build of linker-analyzer tool 2015-09-18 13:09:26 +02:00
Radek Doulik 05b0506669 [linker] add linker dependencies dumping 2015-09-18 12:45:54 +02:00
Radek Doulik 12bdd8ef47 [linker-analyzer] intitial commit of the tool 2015-09-18 12:45:41 +02:00
Adam Burgess b1362f3387 [System.Net.Http] Fix custom Host header not being set on requests. Fixes #34044 2015-09-18 05:48:52 +00:00
Atsushi Eno 2901e91c9d Merge pull request #1899 from saper/resgencond
[resgen] Implement conditional resources (#if/#ifdef)
2015-09-18 10:12:32 +08:00
Zoltan Varga 687eeff24f Revert "[jit] Emit the results of the jit regressions tests in nunit format only when running under jenkins."
This reverts commit 1ef694ae52.

Revert this, JENKINS_URL is not an automake variable.
2015-09-17 17:50:58 -04:00
Alexander Köplinger 0804adab66 [profiler] Emit NUnit xml report of test result in ptestrunner.pl
Currently only emits a single pass/fail testcase as capturing the individual errors
and test counts would be much more invasive.

The bulk of the logic is copied from mono/mini/emitnunit.pl.
2015-09-17 23:46:28 +02:00
Ludovic Henry b3fa096e5e [bcl] Fix System.Net.HttpWebRequestTest.GetRequestStream hang
This hang would manifest when running the System test suite, with a thread waiting on a `recv'. This syscall would never be interrupted because the socket it would listen on would never close, as there would still be references to its SafeSocketHandle, so that it would never release the native handle.

The issue came from the fact that, when closing the SocketResponder (via the Dispose and the using), the listening thread would never be aborted/stopped, and it would consequently never be collected, thus never releasing the current socket on which _requestHandler is called, thus never aborting the above `recv' syscall.

The issue would arise with the cooperative GC as well as the premptive one.
2015-09-17 16:09:25 +01:00
Marcos Henrich 07bae963ae Merge pull request #2047 from esdrubal/socketreuse
[System] Fix TCP socket reuse.
2015-09-17 15:47:31 +01:00
Ludovic Henry ff17686542 [delegate] Fix NRE on GetHashCode 2015-09-17 13:54:03 +01:00
Marcos Henrich 59c72654f2 [System] Updated SocketTest.TcpDoubleBind.
Multiple threads listening to the same address and port are not possible
before linux 3.9 kernel, where the socket option SO_REUSEPORT was
introduced.

This commit makes TcpDoubleBind sensible to this OS capability.
2015-09-17 12:22:24 +01:00
Ludovic Henry cb6cc5e158 [math] Fix corlib/System.MathTest.TestPow test #48 on Linux 32bits 2015-09-17 10:35:45 +01:00
Zoltan Varga 99fddab0a3 [amd64] More gsharedvt/cleanup work. 2015-09-16 13:26:09 -04:00
Zoltan Varga fe43f42bfc Revert "[amd64] More gsharedvt/cleanup work."
This reverts commit c09ca0fd7e.

Revert this as it breaks the build.
2015-09-16 12:50:53 -04:00
Ludovic Henry 8b957a5332 [math] Fix corlib/System.MathTest.TestPow #47 on Linux 32bits 2015-09-16 17:21:27 +01:00
Ludovic Henry 720fc7f7f7 [SafeHandle] Cleanup of the code
This is to avoid code duplication and multiline conditions assignement
2015-09-16 12:32:25 +01:00
Marcos Henrich 6caca3256b Merge pull request #2056 from esdrubal/urilocal
[System] Fixes TimeZoneInfo.ConvertTimeFromUtc.
2015-09-16 07:05:08 +01:00
Zoltan Varga c09ca0fd7e [amd64] More gsharedvt/cleanup work. 2015-09-15 21:27:06 -04:00
Zoltan Varga b96001c435 [sdb] Fix the aborting of multiple invocations. 2015-09-15 19:27:21 -04:00
Zoltan Varga bfbb4b8d88 [sdb] Add a test for aborting invokes. 2015-09-15 16:48:48 -04:00
Juergen Hoetzel c820dda1ce [runtime] Fix casting error in InternalCodePage.
Use gsize instead of gssize when checking the encodings array for
codepage numbers. When a char* is pointing to the upper half of the
address space, it will be otherwise converted to a negative number.
2015-09-15 22:30:25 +02:00
Zoltan Varga 6362bb09e6 [runtime] Fix a potential buffer overflow in mono_network_get_data (). Fixes #33851. 2015-09-15 15:38:11 -04:00
Zoltan Varga 15bee580fd [sdb] Avoid aborting the runtime with a breakpoint signal if Debugger.Break () is called, add a MONO_DEBUG=native-debugger-break option to enable it. Fixes #33952. 2015-09-15 15:04:48 -04:00
Marcos Henrich 65c3a8e821 [corlib] Added fixture ConvertTimeTests_LocalUtc.
ConvertTimeTests_LocalUtc runs ConvertTimeTests fixture with
TimeZoneInfo.Local set to TimeZoneInfo.Utc.

Removed redundant test ConvertFromToUtc_LocalAsUtc.
2015-09-15 17:24:53 +01:00
Marcos Henrich 6cccbbdbd7 [System] Fixes TimeZoneInfo.ConvertTimeFromUtc.
Fixes TimeZoneInfo.ConvertTimeFromUtc and related tests when
TimeZoneInfo.Local is equal to TimeZoneInfo.Utc.

In .NET if we set TimeZoneInfo.Local to TimeZoneInfo.Utc by using
reflection.

```
var cachedDataField = typeof (TimeZoneInfo).GetField ("s_cachedData",
BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);

var localField = cachedDataField.FieldType.GetField ("m_localTimeZone",
BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic);

var localFieldObj = cachedDataField.GetValue (null);

localField.SetValue (localFieldObj, DateTimeKind.Utc);
```

We can observe that `TimeZoneInfo.ConvertTimeFromUtc (DateTime.UtcNow,
TimeZoneInfo.Local).Kind` is DateTimeKind.Utc.

By looking at reference source [code](http://referencesource.microsoft.com/#mscorlib/system/timezoneinfo.cs,211)
we can also confirm that while getting a time zone corresponding kind,
Utc is prioritized over Local.

This commit reverts changes introduced by
60d5b39e46 that were prioritizing Local
over Utc and changes tests to expect Utc kinds instead of Local when
TimeZoneInfo.Local is equal to TimeZoneInfo.Utc.
2015-09-15 17:24:53 +01:00
Marcos Henrich 99915fc6c3 Merge pull request #2052 from esdrubal/urilocal
[corlib] Fixes TimeZoneInfo.ConvertTimeFromUtc.
2015-09-15 11:39:34 +01:00
Marcos Henrich 60d5b39e46 [corlib] Fixes TimeZoneInfo.ConvertTimeFromUtc.
TimeZoneInfo.ConvertTimeFromUtc(utcDate, TimeZoneInfo.Local) now returns a date of kind
DateTimeKind.Local when TimeZoneInfo.Local is equal to TimeZoneInfo.Utc.

Fixes #33471.
2015-09-15 09:43:38 +01:00
Marcos Henrich e32e14e9f0 [corlib] Tests TimeZoneInfo.ConvertTimeFromUtc.
Tests that TimeZoneInfo.ConvertTimeFromUtc with TimeZoneInfo.Local set to
TimeZoneInfo.Utc returns a date of kind Local.

Covers #334711.
2015-09-15 09:43:37 +01:00
Zoltan Varga 9ec7d6e007 [amd64] Fix llvm support broken by 751440d321. 2015-09-14 15:37:22 -04:00
Zoltan Varga 7898f36714 [runtime] Change MonoDroid->Xamarin.Android in configure output. 2015-09-14 15:19:39 -04:00
Zoltan Varga cb3def2f71 [llvm] Fix the caching of the callee for mono_threads_state_poll. 2015-09-14 15:18:45 -04:00
Marek Safar 4ff3b279a2 [mcs] Lift result of null operator over dotted expressions only ending with not null operator on value type. Fixes #33797 2015-09-14 17:16:33 +02:00
Ludovic Henry 8245977794 [threadpool-io-poll] Use mono_poll instead of platform specific poll/WSAPoll 2015-09-14 12:01:09 +01:00
Marcos Henrich 79d28a7ba2 [System] Fix TCP socket reuse.
TCP sockets with option SocketOptionName.ReuseAddress were not working on Linux.

Fixes #31557.
2015-09-14 10:45:47 +01:00
Marcos Henrich 66cc0c2949 [System] Test Socket TCP double bind.
Test checks that when setting TCP socket option ReuseAddress, it is
possible to bind other sockets to the same endpoint.

Covers #31557.
2015-09-14 10:45:47 +01:00
Ludovic Henry 53a6492209 [delegate] Fix Equals on Delegate to virtual method
The comparison was failing because we were still using the method field (instead of the Method property), which would then return, in the case of a delegate to a virtual function, the method on the base class, instead of the method on the derived class. Updated the test cases to check that too.
2015-09-14 10:28:18 +01:00
Rolf Bjarne Kvinge d583cc703b Add a monotouch_tv profile. 2015-09-14 10:37:09 +02:00
Rolf Bjarne Kvinge a427d86c1b Merge pull request #2046 from rolfbjarne/profile-simplification
Profile simplification
2015-09-14 10:36:46 +02:00
Zoltan Varga b189c386b5 Fix the build. 2015-09-13 23:06:46 -04:00
Zoltan Varga 751440d321 [amd64] Clean up the handling of returning vtypes by a hidden argument, add beginnings of gsharedvt support. 2015-09-13 21:31:10 -04:00
João Matos 88a166b75c [genproj] Added missing git ignored Mono.Cecil.Mdb MSBuild project. 2015-09-14 00:37:24 +01:00
João Matos a373c3d989 [build] Generated up-to-date net_4_x MSBuild projects. 2015-09-14 00:16:41 +01:00
João Matos a8d6b4abff [genproj] Skip Facades, mcs and Microsoft.Web.Infrastructure. 2015-09-14 00:14:41 +01:00
João Matos 2687866e99 [genproj] Do not overwrite class library inputs with Facades.
Unfortunately the projects in the Facades share the same names as our main class library assembly names which causes us to overwrite their inputs here.
2015-09-14 00:01:41 +01:00
João Matos 44db1f2e8f [genproj] Update the generator to handle the net_4_x profile. 2015-09-14 00:00:15 +01:00
João Matos 26fa5fd9e8 [genproj] Do not define DEBUG in debug mode since it breaks reference sources. 2015-09-13 23:58:39 +01:00
João Matos aab9e03e70 [mcs] Reference System, System.Core and System.Xml when building.
This fixes compile errors in the generated csproj for mcs.
2015-09-13 23:57:24 +01:00
João Matos a982f9f568 [mcs] Write mcs library references when generating csproj order data. 2015-09-13 23:56:34 +01:00
Zoltan Varga 0a97271ff5 Merge pull request #2014 from BillSeurer/master
[ppc] Changes for power for ELF ABI v2 structure parameters
2015-09-11 20:38:53 -04:00
Alexander Köplinger 8ac54a7c68 [System] Bump timeout in ServicePointTest.DnsRefreshTimeout test again
The refresh timeout starts running before the actual DNS request is sent, which means on systems with a
slow DNS server the cached value has already timed out when the response is received, making the test fail.

Bumping the timeout to 2s should fix the test on Jenkins.
2015-09-11 22:48:13 +02:00
Zoltan Varga c91cdcbe68 Revert "[aot] Update the llvm frame decoding code for llvm b757db3a001fcdcab038411708c0f77c6211cba6."
This reverts commit c5e03971ae.

Revert this as the corresponding llvm commit was reverted.
2015-09-11 16:06:46 -04:00
Zoltan Varga c5e03971ae [aot] Update the llvm frame decoding code for llvm b757db3a001fcdcab038411708c0f77c6211cba6. 2015-09-11 15:46:08 -04:00
Rolf Bjarne Kvinge 05ef9eddfe Remove profile-specific logic from makefiles.
Instead use variables defined in each profile's profile-specific makefile.
2015-09-11 18:06:15 +02:00
Rolf Bjarne Kvinge d3e4c19f3f [System.Xaml] Make build logic more logical.
FRAMEWORK_VERSION_MAJOR is 2 for the mobile profiles, so filtering
on the profile name will do nothing at all.

This means listing the mobile profiles here is completely redundant,
so simplify to just building when FRAMEWORK_VERSION_MAJOR=4.
2015-09-11 17:55:56 +02:00
Rolf Bjarne Kvinge bba0486792 Add a dummy implementation for MONO_CONTEXT_GET_CURRENT for the Apple TV. 2015-09-11 17:08:21 +02:00
Alex Rønne Petersen 0c56887d08 Merge pull request #2040 from esdrubal/monoman
Added missing MONO_DEBUG options.
2015-09-11 16:49:24 +02:00
Alex Rønne Petersen 1e752b1d95 Merge pull request #2042 from evincarofautumn/remove-dead-code
Remove dead weak link API.
2015-09-11 16:48:51 +02:00
Rolf Bjarne Kvinge 8356eb2af9 There's no IOKit on the Apple TV. 2015-09-11 15:25:47 +02:00
Rodrigo Kumpera 63ad46198b [threading] Allow mono_thread_info_current_unchecked to be called before the tls key it uses is initialized. 2015-09-10 17:36:50 -04:00
Rodrigo Kumpera d1cff8d601 Fix the build. 2015-09-10 15:08:09 -04:00
Bill Seurer 45c3685e3b [ppc] Fix exception when reading from timezone file.
See https://bugzilla.xamarin.com/show_bug.cgi?id=30360
2015-09-10 14:04:44 -05:00
Rodrigo Kumpera da47e00abd [suspend] Wrap mmap and unmmap around critical sections to better handle library interposing. Fixes #19379
Instruments uses library interposing to record calls to mmap and munmap. It does take lock within the interposers
which means the async suspend could suspend a thread holding such lock while sgen tries to mmap more memory in,
causing a deadlock.

The workaround is to protect our uses of mmap and munmap in the hopes that they are enough to reduce the likelihood
of those hangs happening.
2015-09-10 14:55:37 -04:00
Zoltan Varga d7906b3e5a [aot] Remove some arm special cases which are no longer needed. 2015-09-10 13:52:04 -04:00
Bill Seurer 0d464be2b3 [ppc] Fix passing of structure parameters as per the ELF ABI v2. Add 5 new test cases to test the new ABI changes. 2015-09-10 11:57:02 -05:00
Ludovic Henry f6f48eb672 [threadpool-io-poll] Assert we have sockets to callback on 2015-09-10 17:44:20 +01:00
Ludovic Henry 6f045fee8a [threadpool-io] Log if an error occured on a socket 2015-09-10 17:43:23 +01:00
Ludovic Henry 1f4d44800e [Socket] Duplicate logic of AsyncResult.ExecuteWorkItem to SocketAsyncResult
This consists in executing the callback synchronously and swallowing any exception in this callback.
2015-09-10 16:59:01 +01:00
triton d1f9373441 [eglib] Fixed vasprintf function detection.
Fixes the Cygwin build, see https://github.com/mono/mono/pull/1966.
2015-09-09 22:31:02 +01:00
Ludovic Henry 4bbb9b3421 [delegate] Bump BCL version for field added on Delegate 2015-09-09 18:00:05 +01:00
Ludovic Henry 57be241716 [delegate] Fix bug #33218 "Action ReflectedType differs from Delegate ReflectedType" 2015-09-09 16:11:28 +01:00
Ludovic Henry 18674021a5 [io-layer] Fix segfault on handle dump 2015-09-09 16:11:28 +01:00
Marcos Henrich c7b0e92984 Merge pull request #2041 from esdrubal/uritestfix
Fixes DotNetRelativeOrAbsoluteTest.
2015-09-09 13:50:07 +01:00
Rolf Bjarne Kvinge d935996d88 [mono-api-html] Adding members to an interface is a breaking change, so show it in red. 2015-09-09 11:42:22 +02:00
Rolf Bjarne Kvinge b17301f43f [mono-api-info] Sort constructors using full signature.
So that info files can be compared textually to test for api equality.
2015-09-09 10:44:22 +02:00
Alexander Köplinger 5b16d22774 [System] Make ServicePointTest.DnsRefreshTimeout test more reliable
The previous 2ms timeout was way too short and the test failed frequently.

Also switch to Assert.AreSame/AreNotSame instead of AreEqual/AreNotEqual since
we want to ensure the same object is returned and not just an equal one.
2015-09-09 03:30:11 +02:00
Jon Purdy 2897d7d827 Remove dead weak link API. 2015-09-08 15:51:27 -07:00
Alex Rønne Petersen cf5f99d83a Merge pull request #2028 from alexrp/master
[runtime] Don't allocate domain-level static slots for special static fields.
2015-09-08 23:26:43 +02:00
Mark Probst 277ecfde7b Merge pull request #1457 from evincarofautumn/weak-refs
Refactor weak-reference handling code in SGen
2015-09-08 13:24:14 -07:00
Mark Probst 4d5ffcb9ad Merge pull request #2013 from BrzVlad/feature-concurrent-work
[sgen] Run the concurrent mark concurrent with nursery collections
2015-09-08 13:03:01 -07:00
Marcos Henrich 4d3b8b856b Fixes DotNetRelativeOrAbsoluteTest.
Test was not changing Uri.useDotNetRelativeOrAbsolute back to its
previous value.
2015-09-08 17:43:00 +01:00
Miguel de Icaza 12fcfa3816 [corlib] MulticastDelegate, bring back the HasSingleTarget internal method for public use 2015-09-08 10:34:47 -04:00
Miguel de Icaza e3f6e7a774 Disable warnings about globally disabled warnings, show by ReferenceSource code 2015-09-08 10:34:47 -04:00
Rolf Bjarne Kvinge 739298bd2d [mono-api-html] Fix printing of Obsolete attributes. 2015-09-08 13:55:28 +02:00
Rolf Bjarne Kvinge 09f5f071fb [mono-api-info] Sort nested types.
So that info files can be compared textually to test for api equality.
2015-09-08 13:55:10 +02:00
Rolf Bjarne Kvinge 4d3e34229c [mono-api-info] Minor perf improvements. 2015-09-08 12:06:39 +02:00
Rolf Bjarne Kvinge 26a5164a4d [mono-api-info] Sort methods using full signature.
So that info files can be compared textually to test for api equality.
2015-09-08 12:06:38 +02:00
Marcos Henrich f2bd0dd1cf Added missing MONO_DEBUG options.
The new options were added by the following commits:
align-small-structs f7b9bb3bf0
arm-use-fallback-tls 421fa312a5
debug-domain-unload 3c0c5f8624
gen-compact-seq-points ab392debf4
partial-sharing 1cab7b0535
single-imm-size 9e0d841872
soft-breakpoints a2c629efe2
suspend-on-exception fcbf89d2ad
suspend-on-unhandled eb8be6f651
2015-09-08 11:00:44 +01:00
Marcos Henrich a3ccf9b47e Sorted MONO_DEBUG options alphabetically. 2015-09-08 10:59:55 +01:00
Marek Safar 2817e026df Merge pull request #2039 from simonhartmann/dns_refresh_timeout
[class libs] Implemented DnsRefreshTimeout for ServicePointManager
2015-09-08 11:48:01 +02:00
Simon Hartmann 932359f3d6 implemented DnsRefreshTimeout to ServicePointManager and adjusted behavior of ServicePoint.HostEntry property.
simplified some calls as requested
2015-09-08 11:08:50 +02:00
Marek Safar 6294c96bab [mcs] Null operator on value type extension argument. Fixes #33754 2015-09-08 10:59:52 +02:00
Marek Safar 86c5ca89ac Merge pull request #2032 from directhex/parallel_automake_is_hard
Parallel automake is hard
2015-09-08 10:36:58 +02:00
Marek Safar 8add506fcd [mcs] Improve test from e97227a53d 2015-09-08 08:07:46 +02:00
Marek Safar e97227a53d [mcs] Lift result of binary operation on enum types in more cases. Fixes #33723 2015-09-07 20:29:39 +02:00
Marek Safar aae572095c [mcs] Fixes a typo 2015-09-07 20:29:39 +02:00
João Matos 0083175d5c [runtime] Another fix for fast TLS target checking to work with cross-compilation. 2015-09-07 16:04:13 +01:00
Marek Safar 5e81ed1e03 [mcs] Consider whole hierarchy of inherited type arguments inflated via base type. Fixes #33669 2015-09-07 16:11:59 +02:00
Rolf Bjarne Kvinge 9dd35ce4a5 [mono-api-info] Order interfaces.
So that info files can be compared textually to test for api equality.
2015-09-07 13:06:01 +02:00
Jo Shields c6a312859c [Facades] Fix default profile parallelization
PROFILE_SUBDIRS is built serially, then PROFILE_PARALLEL_SUBDIRS in parallel. Since we want the latter for everything, only define the latter.
2015-09-07 09:37:39 +01:00
Jo Shields 9a8e7c6571 [Facades] Fix profile name error causing non-building
The parallel build infrastructure we're trying to leverage for Facades depends on the profile name when populating the parallel lists - the default profile is now named "net_4_x", so variables with "net_4_5" in them are not considered - causing the whole Facades/ directory to be skipped
2015-09-07 09:37:39 +01:00
Marek Safar a7d0ec44c5 [corlib] Make test reproducible 2015-09-07 09:41:15 +02:00
Marcos Henrich d0b002f000 Merge pull request #2031 from esdrubal/uriworkaround
[System] UriKind.RelativeOrAbsolute workaround.
2015-09-05 11:35:35 +01:00
Angelo Compagnucci 026a8c44d3 eglib: checking for locale_charset function
This patch checks if locale_charset function is availabe in
libiconv or libcharset and changes the linking options accordingly.
2015-09-05 08:57:21 +02:00
Zoltan Varga 8a4b2f74d5 Fix a warning. 2015-09-04 22:04:41 -04:00
Zoltan Varga f4ddc5e113 Merge pull request #2033 from tritao/zip-empty
[System.IO.Compression] Fixed handling of empty Zip archives in Update mode
2015-09-04 21:57:39 -04:00
Miguel de Icaza 2791af63d3 Merge pull request #2035 from joelmartinez/mdoc-memberremoval-fix2
[mdoc] Follow up fix for member and type removal.
2015-09-04 21:41:48 -04:00
Joel Martinez b94920854f [mdoc] Follow up fix for member and type removal.
In supplement of the changes submitted in 09b97cba2e, there were
some additional edge cases that were not originally considered, and so this patch resolves these
additional issues. In particular, there was a bug in the `RemoveApiStyle` method that wasn't
checking the value of the `apistyle` attribute before removing it. This caused members to be
stripped of apistyle inadvertently.

There was an issue in the type removal code that caused
too many files to be removed. This patch adds additional checks to make sure that a file isn't
going to be removed if it contains members in the other style that shoulnd't be removed

Finally, there was an issue that arose after the aforementioned changes in the `OrderTypeAttributes`
method. It was somewhat counterintuitive, but it wasn't allowing the reordering of attributes
with the `.Remove` method (throwing an exception). Not entirely sure why this was happening,
but using the `.RemoveNamedItem` method worked around the issue.
2015-09-04 20:10:24 -04:00
Zoltan Varga 635cc64cf0 [aot] Avoid an assert in mono_aot_jit_info_table_find () when the address is right after the end of the method. Fixes #32955. 2015-09-04 19:22:07 -04:00
Zoltan Varga 81e4e3c447 [jit] Fix crashes in the dwarf writer if the backing field of an enum is not named 'value__'. Fixes #33591. 2015-09-04 17:46:24 -04:00
Rodrigo Kumpera 0e6617b664 [threading] Fix race condition in the suspend account code. 2015-09-04 16:39:16 -04:00
Rodrigo Kumpera f0a2b9c98c Fix another broken test due to OSX oddities. 2015-09-04 15:35:31 -04:00
triton fcd3f2ca21 [runtime] Fixed fast TLS target checking to work with cross-compilation. 2015-09-04 18:01:02 +01:00
Rodrigo Kumpera ffc15afbf5 Fix the DefaultThreadCurrentCulture for real.
This test is very fragile as it depends on appdomain global state.
In this case the current thread culture.

The problem with CurrentCulture is it's behavior that once set, it can't
be unset, IOW, revert to follow DefaultThreadCurrentCulture.

This meant that test ordering played a huge deal here and it took a few
tries to learn what was going on.

The way to fix this is to run the test itself from a thread that we
can ensure that won't have CurrentCulture set. This includes TP threads
or new threads.

I opted to use a TP thread as there probably is one available already
when the test runs.
2015-09-04 12:42:22 -04:00
Rodrigo Kumpera 2a93fc1926 [Mono.Posix] Add ToString to struct Linger to help troubleshoot CI failure. 2015-09-04 11:37:16 -04:00
triton 5a422039ec [System.IO.Compression] Fixed handling of empty Zip archives in Update mode. Fixes bug #32725.
https://bugzilla.xamarin.com/show_bug.cgi?id=32725
2015-09-04 15:17:17 +01:00
Marcos Henrich 3a895d485b [System] UriKind.RelativeOrAbsolute workaround.
In .NET an URI constructor from "/foo" and UriKind.RelativeOrAbsolute is
relative whereas in mono it is assumed as an absolute file path.

This adds another workaround that changes all Uri constructor calls to
behave like .NET when receiving UriKind.RelativeOrAbsolute.

The environment variable workaround consists in setting
MONO_URI_DOTNETRELATIVEORABSOLUTE=true before starting the application:

Reflection workaround:
```
if (Type.GetType ("Mono.Runtime") != null)
    typeof (Uri).GetField ("useDotNetRelativeOrAbsolute",
        BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic).
        SetValue (null, true);
```

WARNING: The workarounds change the behavior of all Uri constructor calls.
Unexpected problems can occur if an used library relies on
UriKind.RelativeOrAbsolute to parse absolute file paths.
2015-09-04 07:23:59 +01:00
Marek Safar a8f85e720e Merge pull request #2030 from esdrubal/urispaces
Fixes Uri.UserInfo with spaces.
2015-09-04 08:11:01 +02:00
Marcos Henrich a1b2783373 Fixes Uri.UserInfo with spaces.
Fixes #31172.
2015-09-04 05:36:27 +01:00
Marcos Henrich 85f33ffe2a Tests Uri.UserInfo with spaces.
Covers #31172.
2015-09-04 05:35:12 +01:00
Marcos Henrich e21d456d0b Merge pull request #2022 from esdrubal/fixes-GetDaylightChanges
Fixes TimeZoneInfo.GetDaylightChanges #32722.
2015-09-04 04:31:50 +01:00
Zoltan Varga ce176fb285 [runtime] Fix the thunks.exe tests when not running with the coop gc. 2015-09-03 20:41:26 -04:00
Jon Purdy 5853defbf4 [sgen] Register GC handle counters & avoid 64-bit CAS.
The GC handle counters were not being registered; probably got lost when
rebasing this code atop the independent SGen. This also avoids 64-bit
CAS on these counters, so that platforms without it still have stats.
2015-09-03 16:25:23 -07:00
Jon Purdy ce9b7f4a58 [sgen] Avoid designated initializer.
Designated-initializer expressions are not considered constant
expressions, so they can't be used to initialize static variables.
2015-09-03 16:25:14 -07:00
Jon Purdy 9f25693314 [sgen] Typedef handle iteration callback. 2015-09-03 16:24:55 -07:00
Jon Purdy 68cf603941 [sgen] Remove outdated comment. 2015-09-03 16:24:46 -07:00
Jon Purdy 08f78da4c6 [sgen] Document assertion. 2015-09-03 16:24:13 -07:00
Jon Purdy 95a5802c1a [sgen] Move & document write barrier. 2015-09-03 16:24:10 -07:00
Jon Purdy c35aa05be5 [sgen] Fix macro parentheses.
This happened not to cause any problems because:

    ((1 | 2) & 3) == (1 | (2 & 3))
2015-09-03 16:22:01 -07:00
Jon Purdy 45ee3241cc [sgen] Avoid redundant handle iteration. 2015-09-03 16:21:48 -07:00
Mark Probst 83fa220c1a [sgen] Fix heavy binary protocol. 2015-09-03 16:21:06 -07:00
Mark Probst 4e27df721c [sgen] Fix binary protocol for weak links. 2015-09-03 16:20:46 -07:00
Mark Probst 6c8c6b0c61 [sgen] Move dummy use function to sgen-gc.h. 2015-09-03 16:18:21 -07:00
Mark Probst 61204cc5a3 [sgen] Move GC handles to their own file. 2015-09-03 16:18:18 -07:00
Mark Probst 7299a70ba8 [sgen] Make the client interface work again. 2015-09-03 16:16:19 -07:00
Mark Probst 648719c5ef [sgen] Move GC handle domain stuff to client code. 2015-09-03 16:14:24 -07:00
Mark Probst cf428ef07f [sgen] Remove superfluous defines. 2015-09-03 16:14:00 -07:00
Mark Probst 197b625b12 [sgen] Do GC handle clearing for domain unloading when world is stopped.
Previously we had two places where GC handles were cleared:

`mono_gchandle_free_domain()`, which was called with the world running.

`mono_gc_clear_domain()`, which ran with the world stopped.

The first one doesn't do anything anymore now.  The reason the callback is
still there is because that's where Boehm clears the GC handles.
2015-09-03 16:13:17 -07:00
Mark Probst 1c6d1f6d17 [sgen] Pass hidden entry to GC handle iteration callback. 2015-09-03 16:13:14 -07:00
Jon Purdy 26a37c1704 [sgen] Add counters for GC handles. 2015-09-03 16:10:43 -07:00
Jon Purdy 21655bfff4 [sgen] Use old GC handle implementation with Boehm. 2015-09-03 16:10:40 -07:00
Jon Purdy 140ec68ddc [sgen] Make GC handles table lock-free.
The previous code was hard to make lock-free because it was trying to
coordinate three separate buffers: one of GC handles, one of a
free-bitmap, and one used to get the domain ID for an expired weak
reference. Now all of this information is stored in a single tagged
pointer per entry.

 * Make the GC lock non-recursive again.

 * Correctly null links for domain unloading.

 * Ensure that non-weak handles are registered as roots using the
   correct descriptors.
2015-09-03 16:07:05 -07:00
Jon Purdy 87fb34d18a [sgen] Remove weak ref hashes.
These hashes were inefficiently duplicating the information in the
common GC handle data tables.

 * Make GC lock recursive. This must be reverted when the GC handles
   table is made lock-free.

 * Refactor handle allocation and handle data manipulation to avoid
   duplication and magic numbers.

 * Use GC handles in refqueue and monitors, because the dislink
   machinery no longer exists.
2015-09-03 16:01:09 -07:00
Alex Rønne Petersen 0686c21358 [runtime] Optimize mono_class_field_is_special_static () a bit.
We can avoid loading custom attributes by checking field->offset == -1. This
won't always be the case for a special static field at all stages during class
loading but it'll speed up the most frequent cases.
2015-09-04 00:34:38 +02:00
Alex Rønne Petersen d2efa789ac [runtime] Don't allocate domain-level static slots for special static fields.
This didn't cause any harm, but resulted in a bit of unnecessary GC work and
memory usage.
2015-09-04 00:34:22 +02:00
Vincent Povirk 958d6c0092 Fix MonoTests.System.Windows.Forms.TrackBarBaseTest on Windows.
This is based on Windows 10 + .NET 4. I'm assuming until told otherwise that
the test was written based on an earlier .NET and the behavior has changed.
2015-09-03 16:22:32 -05:00
Marek Habersack 4fbe8c8836 Fix NREX in Linux network change notification code
Linux code uses a netlink socket to be notified about network interface
changes. The code is a bit racy and for that reson it can happen that
the LinuxNetworkChange.OnDataAvailable handler is called after the
socket is destroyed (from a timer event) and socket stored in an
instance variable is already null. This is a race most probably
introduced by the new threadpool or TPL code as it started to happen in
several places (mostly BCL tests on Android, but it's *not* specific to
Android).
The workaround here serves as a quick band-aid to be able to move on,
but a more thorough review of the socket code will be required.
2015-09-03 23:19:22 +02:00
Rodrigo Kumpera 73e47d3329 [Mono.Posix] Fix a test to accomodate for OSX's getsockopt implementation. 2015-09-03 16:50:09 -04:00
Rodrigo Kumpera 8b33f3a71c [corlib] Fix a test. It was broken in so many ways, but hidden behind a check that disabled it everywhere. :( 2015-09-03 16:03:49 -04:00
Rodrigo Kumpera 1840c4affd [coop] Add coop support to libtest. 2015-09-03 16:03:49 -04:00
Marek Safar 8692db1abd [mcs] Use auto-property backing field for setting only when setter is not available. Fixes #33600 2015-09-03 17:37:20 +02:00
triton 6df3a3d4c0 [windows] Check for WINVER define before re-defining. 2015-09-03 15:59:08 +01:00
triton 3c86642f5d [windows] Fixed some warnings when calling mono_cond_init.
Conflicts:
	mono/metadata/threadpool-ms-io.c
2015-09-03 15:58:59 +01:00
triton 75d43b2de9 [windows] Include missing build headers when defining WIN32_LEAN_AND_MEAN. 2015-09-03 15:58:14 +01:00
Jo Shields e2629c0292 DIST_SUBDIRS is a thing, fixes parallelism broken by previous change
See http://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html
2015-09-03 15:12:06 +01:00
Marcos Henrich 097409cdab Merge pull request #2024 from BogdanovKirill/webrequesttest
[HttpWebRequestTest] New test to check that after reading 2 GB of data from web server HttpWebRequest still works
2015-09-03 14:02:57 +01:00
João Matos 30d65675fb Merge pull request #2026 from directhex/fix-missing-tarball-facades
[Facades] fix exclusion from "make dist"
2015-09-03 13:33:59 +01:00
Jo Shields d3f00f08af [Facades] fix exclusion from "make dist"
If SUBDIRS is not set, then no files which aren't explicit Makefile targets will get included - which in this case means the only file in Facades/ in tarballs is the Makefile itself.
2015-09-03 12:47:09 +01:00
Marek Safar ebba1494a2 [mcs] Cache fixed array type expression. Fixes #33573 2015-09-03 13:05:06 +02:00
BogdanovKirill 3445e2cf4e [HttpWebRequestTest] New test to check that after reading 2 GB of data from web server HttpWebRequest still works
When HttpWebRequest is used to download infinite (ContentLength is not set) response from web server, we must be sure that after reading 2 GB (Int32.MaxValue) of data our internal classes are still working correctly

This change is released under the MIT license.
2015-09-03 15:42:41 +05:00
Marcos Henrich 0a67b54a85 [corlib] Fixes TimeZoneInfo.GetDaylightChanges.
Fixes #32722.
2015-09-03 10:05:26 +01:00
Marcos Henrich 9eb969b3a5 [corlib] Test GetSystemTimeZones in all timezones.
Covers #32722.
2015-09-03 09:58:38 +01:00
Marek Safar 74ef8f7504 [mcs] Implements null operator used from both outer and inner expression of the statement. Fixes #33341 2015-09-03 10:58:03 +02:00
Marcos Henrich 7885210529 Merge pull request #2017 from ludovic-henry/master
[math] Fix Math.Pow (1, Double.MaxValue) != 1 on Linux 32bits
2015-09-03 09:47:54 +01:00
sawachika-kenji 7bb5e6f381 Update FormsAuthentication.cs 2015-09-03 16:12:46 +08:00
Zoltan Varga 180c0ed27d [runtime] Remove some dead code. 2015-09-02 17:47:40 -04:00
Zoltan Varga 7efe163dcd [sdb] Fix locals info when two c# level locals are allocated to the same IL local. 2015-09-02 16:40:16 -04:00
Alex Rønne Petersen c838305c8e Merge pull request #2018 from alexrp/profiler-jit-info-removal
[profiler] Emit dummy code start/size info in cases where we can't retrieve it.
2015-09-02 22:39:26 +02:00
Zoltan Varga e4e48793a8 [wcf] Fix a regression introduced by 577d50e2e1. 2015-09-02 15:12:08 -04:00
Zoltan Varga 4fe276883b [runtime] Fix a regression introduced by f5222fe4f8, arguments were not properly passed to threads started from runtime code. 2015-09-02 12:58:01 -04:00
Miguel de Icaza d007a2a4db [Facades] Fix accidental removal of a line 2015-09-02 12:42:49 -04:00
Zoltan Varga ef95a5b018 [runtime] Make mono_type_is_hfa () return TRUE for structs with more than 4 fields. 2015-09-02 11:27:17 -04:00
Ludovic Henry 0fe67275c3 [math] Fix Linux 32bits tests
corlib/System.MathTest.Pow would fail at test #45 because the native pow implementation would return NaN (instead of 1) for pow (-1, Double.MaxValue).

The previous implementation treated this case for exponents bigger than 9007199254740991.0 and smaller than -9007199254740991.0
2015-09-02 15:42:26 +01:00
Marek Safar 39cbd2e2ea Bump reference sources 2015-09-02 11:26:39 +02:00
Marek Safar 19db0ee6f0 [corlib] Construct specific culture using most specific culture name region. Fixes #33400 2015-09-02 10:57:02 +02:00
Zoltan Varga fc420daefb Merge pull request #2010 from buraktamturk/master
Implement SqlDataReader.GetFieldValue<T> in order to fix EF's UpdateException
2015-09-02 01:55:30 -04:00
Zoltan Varga ed3c8ff390 Merge pull request #2021 from delme-imgtec/patch-1
Update SynchronizedCollection.cs
2015-09-02 01:40:33 -04:00
Zoltan Varga 46ff100e00 Remove an obsolete comment. 2015-09-01 23:01:06 -04:00
delme-imgtec 577d50e2e1 Update SynchronizedCollection.cs
Change is to fix following exception. Which suspect is cause by two threads both call remove at same time.

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[System.ServiceModel.Channels.IDuplexSessionChannel].RemoveAt (Int32 index) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.SynchronizedCollection`1[System.ServiceModel.Channels.IDuplexSessionChannel].RemoveItem (Int32 index) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.SynchronizedCollection`1[System.ServiceModel.Channels.IDuplexSessionChannel].RemoveAt (Int32 index) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.SynchronizedCollection`1[System.ServiceModel.Channels.IDuplexSessionChannel].Remove (IDuplexSessionChannel item) [0x00000] in <filename unknown>:0
2015-09-02 13:55:51 +12:00
Zoltan Varga b4a5bc8246 Revert "[sdb] Disallow nested invokes."
This reverts commit c4db814a44.

Revert this, its supported functionality.
2015-09-01 21:21:02 -04:00
Zoltan Varga 09e2510f34 [runtime] Remove MONO_HASH_CONSERVATIVE_GC, its not used anymore. 2015-09-01 20:41:16 -04:00
Zoltan Varga d24b24da23 Fix a warning. 2015-09-01 20:33:16 -04:00
Zoltan Varga f5222fe4f8 [runtime] Obtain the thread argument directly from MonoThread, avoid storing it in a hash table. 2015-09-01 20:33:15 -04:00
Rodrigo Kumpera 76f6d43931 [coop] Fix the state transition for a pending suspend in reset blocking.
The problematic scenario is the following: [1]

thread A) [DO_BLOCKING] runnable -> blocking (0)                      -- i.e, do a pinvoke
thread B) [ASYNC_SUSPEND_REQUESTED] blocking -> blocking (+1)         -- thread B tries to suspend thread A
thread A) [ABORT_BLOCKING] blocking -> async_suspend_requested (0)    -- i.e, that pinvoke called into a reverse delegate and needs to go back to runnable state
thread A) [STATE_POLL] async_suspend_requested -> self_suspended (0)  -- thread A self suspend due to the request from B

If polling witness async suspend, it must notify the initiator of a successful suspend.
If the initiator witness a thread in blocking, it bumps the suspend count, assumes it suspended and don't wait for a notification.

This means that thread A would post to the suspend semaphore but thread B (the suspend initiator) will not wait on it.

Given the initiator won't wait in this case, it makes no sense for abort blocking to put the thread in async_suspend_requested.
The solution is to put it on self_suspend_requested, which won't trigger state_poll to notify.

[1] Read it as: thread) [TRANSITION NAME] old state -> new state (suspend count delta) -- explanation
2015-09-01 19:35:02 -04:00
Rodrigo Kumpera ef860c3258 [coop] Improve logging and add a pair of suspend related due asserts.
Add asserts to both mono_threads_begin_global_suspend and mono_threads_end_global_suspend to ensure
balanced usage of the suspend semaphore.

The suspend semaphore must end a suspend operation at zero, meaning there must an equal number of
post and wait calls.

This ensure the initiator can't jump the gun when waiting for pending suspends by consuming a
post from a previous suspend/resume op.
2015-09-01 19:35:02 -04:00
Rodrigo Kumpera a17e440193 [coop] Fix debug logging. 2015-09-01 19:35:02 -04:00
Alex Rønne Petersen ee2e7de42e [profiler] Emit dummy code start/size info in cases where we can't retrieve it. 2015-09-02 01:34:38 +02:00
Zoltan Varga ac6131483d [runtime] Remove the usage of the GC aware hash table from the tasklets code. 2015-09-01 18:37:43 -04:00
Mark Probst 54ede58d34 [sgen] Properly synchronize allocated_blocks.
We were missing a memory barrier here.  This might fix the current
intermittent crashes on wrench.
2015-09-01 15:04:30 -07:00
Neale Ferguson 2800e7c0f1 Fix IL_SEQPOINT processing; Add names to trampolines 2015-09-01 17:35:06 -04:00
Alex Rønne Petersen e1849e0707 Merge pull request #2015 from alexrp/profiler-roots-v2
[runtime] Add root type and human-readable description for all GC roots.
2015-09-01 23:06:22 +02:00
Zoltan Varga 92a8ca5c14 [runtime] Throw an exception instead of asserting when trying to call remoting methods linked away. 2015-09-01 16:16:54 -04:00
Zoltan Varga 7781cfb144 [bcl] Disable some tests which rely on fp behavior on mobile. (#33510). 2015-09-01 15:09:04 -04:00
Miguel de Icaza b7a06c6582 [Facades] Fix parallel builds for non-general profiles
Joao reported that the facades build broke with 9022df4421
as it tried to compile monodroid assemblies and this attempt to compile System.IO.Pipes
which in turn needs a type not presented on Android: SafePipeHandle

This should fix that
2015-09-01 15:05:42 -04:00
Zoltan Varga f0e244a33e [ppdb] Fix support for Assembly.LoadFrom(). Fixes #33550. 2015-09-01 15:03:47 -04:00
Jonathan Pryor 91f5a2f30b Merge pull request #2012 from joelmartinez/mdoc-memberremoval-fix
[mdoc] Fixes an issue with member deletion.
2015-09-01 14:57:20 -04:00
Joel Martinez 09b97cba2e [mdoc] Fixes an issue with member and type deletion.
Specifically, when updating classic and unified assemblies, members
that were completely removed from one or both assemblies were not
being removed from the XML. This patch updates mdoc's `DeleteMember`
method to properly handle deletion in all scenarios (normal, classic, unified).

Of course, deletion will still not happen if one of two things is true:

- `--delete` is *not* passed into the `mdoc update` call and the member node
  contains existing documentation.
- `--preserve` *is* passed into the `mdoc update` invocation.

In both of those cases, the member will not be deleted, and a message stating
as such will be written as a warning to the output.
2015-09-01 14:52:54 -04:00
Thomas Jepp 2165b4616a Fix bug #33551 - Use a full FQDN for EHLO and HELO in SmtpClient. 2015-09-01 18:46:15 +01:00
Alex Rønne Petersen 253fbf893b Merge pull request #2019 from directhex/powerpc-fixes
Add move_f_to_i4 and move_i4_to_f to PowerPC
2015-09-01 18:51:20 +02:00
Miguel de Icaza 9022df4421 [Facades] Use Zoltan's parallel build infrastructure 2015-09-01 12:37:41 -04:00
Alex Rønne Petersen 21131f7289 [runtime] Add root type and human-readable description for all GC roots. 2015-09-01 14:55:57 +02:00
Marcos Henrich 7bf4333ed3 Reverted too long to run test.
1abf5baf16 added a tests that was making
jenkins to timeout.
2015-09-01 11:42:12 +01:00
Ludovic Henry 0ca93dfcb4 [threadpool-io] Reduce the value of poll_fds_size on socket removal 2015-09-01 12:30:41 +02:00
Lennart Sorensen e59383fe91 Add move_f_to_i4 and move_i4_to_f to PowerPC 2015-09-01 11:20:15 +01:00
Marek Safar 1b91adbd89 [mcs] Remove not implemented from ambiguous static type lookup. Fixes #33527 2015-09-01 11:16:08 +02:00
Marek Safar 38dd20b4b8 Merge pull request #2016 from tpokorra/patch-1
fixing typo appropiate in WebHeaderCollection.cs
2015-09-01 09:59:53 +02:00
Timotheus Pokorra ab67d07a7d fixing typo appropiate in WebHeaderCollection.cs
as mentioned by FastCode in IRC
2015-09-01 09:56:28 +02:00
Zoltan Varga 092fc2a30f Revert "[llvm] Disable support for nested clauses again, it still causes test failures like #32583."
This reverts commit d48d8e93e0.

Revert this as it breaks the build.
2015-08-31 18:48:00 -04:00
Zoltan Varga d48d8e93e0 [llvm] Disable support for nested clauses again, it still causes test failures like #32583. 2015-08-31 18:35:53 -04:00
Mark Probst aa6bc1a8a5 [sgen] When the idle function runs we know it's supposed to run. 2015-08-31 14:25:04 -07:00
Mark Probst aa7a1915bd [sgen] Remove dead workers code. 2015-08-31 14:24:56 -07:00
Mark Probst ac89c19f0f [sgen] Don't stop concurrent mark during nursery collections. 2015-08-31 14:24:46 -07:00
Ludovic Henry 385c7692be [threadpool-io] Remove sparse-array for poll backend
The sparse-array approach led to better insert/remove performance, by allowing a O(1) access, but led to memory consumption issue. The kernel would, for example, have to parse the whole array, even if it's mostly empty, and that can be an issue for large arrays.
2015-08-31 17:39:06 +02:00
Marek Safar abbac3e73b Remove incorrect warnings 2015-08-31 15:22:30 +02:00
Marek Safar fb11d2b71d [mcs] Don't report error for warnings which are not intended to be compiler warnings. Fixes #33487 2015-08-31 14:14:51 +02:00
Marek Safar 8fbf7f3617 [system] WebUtility from reference sources 2015-08-31 13:31:48 +02:00
Marcos Henrich ba1c3758ff [runtime] Removed duplicated code 2015-08-31 10:23:43 +01:00
Alex Rønne Petersen 802a95c8bf [mcs] 'future' option is now 'experimental' - clarify in man page and help text. 2015-08-30 21:19:10 +02:00
Burak Tamtürk 31a14f7d79 Implement SqlDataReader.GetFieldValue<T> in order to fix EF's UpdateException 2015-08-30 15:53:43 +03:00
Marek Safar dc52c56c5f Revert "Merge pull request #2008 from dlech/CustomAttributeData"
This reverts commit 2775839f66, reversing
changes made to 9cf3500204.
2015-08-29 16:24:06 +02:00
Marcos Henrich bd52e33266 Merge pull request #1936 from esdrubal/DotNetRelativeOrAbsolute
[System] UriKind.RelativeOrAbsolute workaround.
2015-08-29 12:24:02 +01:00
Marcos Henrich 2775839f66 Merge pull request #2008 from dlech/CustomAttributeData
Make CustomAttributeData.AttributeType virtual
2015-08-29 10:55:43 +01:00
Marcos Henrich 9cf3500204 Updated list of available MONO_DEBUG options. 2015-08-29 10:44:48 +01:00
David Lechner 489736eded Make CustomAttributeData.AttributeType virtual
According to https://msdn.microsoft.com/en-us/library/system.reflection.customattributedata.attributetype%28v=vs.110%29.aspx, System.Reflection.CustomAttributeData.AttributeType is a virtual property.
2015-08-28 22:07:53 -05:00
Vlad Brezae a394f6b1eb Merge pull request #2005 from BrzVlad/feature-concurrent-work
Concurrent sgen improvements
2015-08-28 18:04:48 -07:00
Vlad Brezae 759ae7ad82 [sgen] Add missing write barriers for the concurrent collector 2015-08-28 18:00:18 -07:00
Vlad Brezae fcd1e6df02 [sgen] Major allocation should not happen while we sweep 2015-08-28 18:00:17 -07:00
Vlad Brezae 2a3afe6b53 [sgen] Enable cementing for concurrent collector 2015-08-28 18:00:17 -07:00
Vlad Brezae 6f990c368f [sgen] Remove the finishing nursery collection within the concurrent collector 2015-08-28 18:00:16 -07:00
Vlad Brezae 80579cc5b8 [sgen] Clear nursery at gc if we are doing concurrent checks 2015-08-28 18:00:16 -07:00
Vlad Brezae 1c5c532f13 [sgen] Fix scanning of invalid entries within arrays 2015-08-28 18:00:14 -07:00
Zoltan Varga 4f994bc55f Merge pull request #2007 from madewokherd/imagelock
Fix an unlock without a corresponding lock.
2015-08-28 15:55:08 -04:00
Vincent Povirk 6cb67df77d Fix an unlock without a corresponding lock.
8eeb2cef moved the lock into an if statement.

This commit is licensed as MIT/X11.
2015-08-28 14:42:00 -05:00
Zoltan Varga 7f7a7f4d8e [runtime] Remove some dead code. 2015-08-28 15:39:25 -04:00
Vlad Brezae 48f2eaedb1 [sgen] Flush after writing the protocol entry 2015-08-28 11:41:42 -07:00
Marcos Henrich a3e273b98b Merge pull request #2004 from esdrubal/singlestacktrace
[corlib] Changes StackTrace.ToString to use Exception format.
2015-08-28 16:26:28 +01:00
Marcos Henrich 4666301cbf [corlib] Changes StackTrace.ToString to use Exception format.
StackTrace.ToString format was different from Exception.ToString.
StackTrace.ToString had an identation of 3 spaces instead of 2, outputed
"line " before the line number which Exception.ToString does not, and it
did not print offsets.

This change allows StackTrace.ToString output to be used by the mono-symbolicate tool.
2015-08-28 15:29:39 +01:00
Marcos Henrich 5bbc0d3507 Test mono-symbolicate with StackTrace.ToString.
We were testing mono-symbolicate tool with Exception.Tostring stack
traces but now we also test that the tool works with StackTrace.ToString.
2015-08-28 15:29:29 +01:00
Martin Baulig 29caa028e1 Merge pull request #2000 from BogdanovKirill/master
Bug fix: reading of infinite web response can lead to connection loss
2015-08-28 16:06:22 +02:00
Marek Habersack 05cbf82010 Remove stray ifdef 2015-08-28 15:19:12 +02:00
Marcos Henrich 0db4b09607 Merge pull request #2003 from esdrubal/seq_test_fix2
[runtime] Fix test_op_il_seq_point in amd64.
2015-08-28 13:21:00 +01:00
Marcos Henrich d6866aa8dd Target test-local in mono-symbolicate Makefile.
mono-symbolicate tests were not called by recursive test due to not having the
target test-local in its Makefile.
2015-08-28 12:48:17 +01:00
Marcos Henrich 5b2e320c1f [runtime] Fix test_op_il_seq_point in amd64.
In amd64 when possible 32bit instructions and registers are usedi
instead of 64bit ones.

Using MONO_DEBUG=single-imm-size avoids 32bit optimizations thus
maintaining the native code size between compilations.
2015-08-28 11:48:51 +01:00
Marcos Henrich 9e0d841872 [runtime] Added MONO_DEBUG=single-imm-size.
In amd64 when i8const are use with values within the first 32 bits
instructions and registers used can be optimized to their 32 bit
versions.

Setting MONO_DEBUG=single-imm-size variable disables such optimizations
and guarantee that the the generated native code size is independent
of the i8const values.
2015-08-28 11:48:51 +01:00
Marek Safar 252908a7d5 [mcs] Bump ikvm to support up to 4GB output files 2015-08-28 09:30:01 +02:00
Zoltan Varga d60aec02dc [gsharedvt] Disable the box+brtrue optimization for gsharedvt types. Fixes #33324. 2015-08-27 16:15:07 -04:00
Jonathan Pryor 535964dc5f [MonoPosixHelper] Fix compilation for Android.
The Android NDK decalres the `struct timeval` struct in <sys/time.h>.
Update sys-socket.c to #include <sys/time.h> to fix compilation
with the Android NDK.
2015-08-27 16:07:43 -04:00
Zoltan Varga d5f6ee9ee3 Fix the build. 2015-08-27 15:52:10 -04:00
Zoltan Varga 6d394c7b4b [x86] Fix fullaot support. 2015-08-27 15:46:39 -04:00
Rodrigo Kumpera 81c3de0381 [coop] Fix the public coop api. 2015-08-27 15:21:48 -04:00
Rodrigo Kumpera 11367d77ab [coop] Blacklist two more wrappers when generating safepoints.
A GC Safepoint require the thread to be in GC unsafe mode to run properly.

Both mono_threads_finish_blocking and mono_threads_reset_blocking_start are called
in GC Safe mode, which would cause them to assert in checked-build.

mono_threads_finish_blocking is called after a pinvoke finished, which means the thread will
still be in blocking mode.

mono_threads_reset_blocking_start is called by reverse pinvoke wrappers before calling managed
code, so it will be in blocking mode too.

This looks like something checked-build should catch by setting the polling variable more frequently.
2015-08-27 15:21:48 -04:00
Rodrigo Kumpera a6001390bf [JIT] Prefer gdb over lldb on OSX as the later still produces useless output on my system. 2015-08-27 15:21:48 -04:00
Jonathan Pryor d715b3d29e Merge pull request #1993 from steffen-kiess/posix-sockets-1
Add socket-related functions and data structures to Mono.Posix
2015-08-27 14:08:47 -04:00
Marcos Henrich 71b57e58c5 Merge pull request #2002 from mono/revert-1991-seq_test_fix
Revert "[runtime] Fix test_op_il_seq_point in amd64."
2015-08-27 17:20:12 +01:00
Marcos Henrich 48c53152bd Revert "[runtime] Fix test_op_il_seq_point in amd64." 2015-08-27 17:03:27 +01:00
Marcos Henrich b273a6b2b5 Merge pull request #2001 from esdrubal/get_module_filename
Fixes get_module_filename.
2015-08-27 17:03:07 +01:00
Marcos Henrich e6b3de99e9 Fixes get_module_filename. 2015-08-27 15:42:35 +01:00
Marcos Henrich 8ae7b6d6b9 Merge pull request #1991 from esdrubal/seq_test_fix
[runtime] Fix test_op_il_seq_point in amd64.
2015-08-27 14:21:54 +01:00
Rodrigo Kumpera ef227267ec [coop] Initial drop of the supporting public API. 2015-08-26 18:29:40 -04:00
Rodrigo Kumpera 192f5f110b [corlib] Fix the mobile test suite. 2015-08-26 18:29:40 -04:00
triton ffa76054a9 [threadpool-io] Fixed the Windows backend to call the correct polling function. 2015-08-26 23:27:44 +01:00
Mark Probst 6efe1eabbc [sgen] Don't access LOS object size directly because it has to be masked.
We use the lowest bit in the LOS object size to denote whether the object is
marked/pinned, so we can't directly use the size.  Use the getter function
instead.
2015-08-26 13:12:50 -07:00
Zoltan Varga c4db814a44 [sdb] Disallow nested invokes. 2015-08-26 15:56:58 -04:00
Alex Rønne Petersen e45a244845 Merge pull request #1999 from rodrmoya/master
Fix format description for TYPE_CONTEXT
2015-08-26 21:54:04 +02:00
Rodrigo Moya 73897714af Fix format description for TYPE_CONTEXT 2015-08-26 21:05:59 +02:00
Zoltan Varga 3b0b4317a2 [llvm] Implement support for GC_SAFE_POINT. 2015-08-26 14:47:28 -04:00
Marcos Henrich 12ba27e62e [corlib] Fixes test not compiling with older NUnit. 2015-08-26 11:03:28 +01:00
BogdanovKirill 1abf5baf16 [WebConnectionStream] Fix connection loss for >2GB reads
When HttpWebRequest is used to download infinite (ContentLength not set) response from web server, we can see that after reading about 2 GB (Int32.MaxValue) of data, totalRead variable can be equal to contentLength (which is int32.MaxValue). Then WebConnectionStream thinks that all data is received (see soft condition totalRead >= contentLength), but this is not correct.

This change is released under the MIT license.
2015-08-26 11:09:15 +05:00
Rodrigo Kumpera ecba1779a0 Merge pull request #1998 from BillSeurer/master
Fix coding error with ! operator in two places in libtest.c
2015-08-25 17:07:08 -04:00
Bill Seurer 5834ac2260 Fix coding error with ! operator in two places. 2015-08-25 16:00:04 -05:00
Martin Baulig 36e40b06f0 Merge pull request #1992 from BogdanovKirill/ChunkedReading
[ChunkStream] CPU and memory leak fix when writing and reading infinitely
2015-08-25 14:52:31 +02:00
Zoltan Varga 3fbd62c767 Merge pull request #1996 from BillSeurer/master
[ppc] Add MonoContext and asynch callback support
2015-08-24 18:22:10 -04:00
Bill Seurer f05362d9a1 [ppc] Add MonoContext and asynch callback support 2015-08-24 17:10:36 -05:00
Zoltan Varga 1da119b61b [runtime] Remove the is_mb_open field from MonoMethod, it doesn't seem to be needed, inflated MethodBuilders are represented by MethodOnTypeBuilderInst objects. 2015-08-24 16:25:44 -04:00
Zoltan Varga 07003038cc [sdb] Remove the code which stopped single stepping when exiting a runtime invoke, it was only enabled on ios/android, and it doesn't seem to be needed anymore. 2015-08-24 16:20:09 -04:00
Ludovic Henry 91c9997fe2 [threadpool-io] Remove unecessary operation change
These 2 operations are going to be treated the same in managed, so the change is useless
2015-08-24 16:03:53 -04:00
Ludovic Henry a3537be364 [threadpool-io] Add log tracing 2015-08-24 16:03:53 -04:00
Ludovic Henry 716ba68c1b [threadpool-io] Rework backend API
The main change is the fd will not be removed from the backend when there is no event to poll, but only when we close the socket. This also reduce the number of functions of the backend.
2015-08-24 16:03:52 -04:00
Ludovic Henry 2e26dfa8bf [threadpool-io] Move the states table to the selector thread exclusively
This greatly simplify the model of the states as we do not need to worry about modifications in different threads.
2015-08-24 16:03:52 -04:00
Ludovic Henry 2fed08cf0d [threadpool-io] Disable AIO by default 2015-08-24 16:03:52 -04:00
Rodrigo Kumpera 040ec4cba9 [coop] Add some TODOs to the stress test suite. 2015-08-24 16:03:52 -04:00
Steffen Kieß d14254989b Add socket-related functions and data structures to Mono.Posix
This commit adds those socket-related functions which do not require the
sockaddr_* structures or the msghdr structure.
2015-08-24 19:42:54 +02:00
Rodrigo Kumpera 83985b4ab6 Merge pull request #1989 from esdrubal/local_tz_from_link
Local tz id from symbolic link
2015-08-24 12:03:44 -04:00
Marcos Henrich e3a2538f4e [runtime] Fix test_op_il_seq_point in amd64.
In amd64 when possible 32bit instructions and registers are usedi
instead of 64bit ones.

Using MONO_DEBUG=single-imm-size avoids 32bit optimizations thus
maintaining the native code size between compilations.
2015-08-24 16:28:37 +01:00
Marcos Henrich 60799f34d7 [runtime] Added MONO_DEBUG=single-imm-size.
In amd64 when i8const are use with values within the first 32 bits
instructions and registers used can be optimized to their 32 bit
versions.

Setting MONO_DEBUG=single-imm-size variable disables such optimizations
and guarantee that the the generated native code size is independent
of the i8const values.
2015-08-24 16:25:31 +01:00
Zoltan Varga 1309cb1059 [runtime] Fix native backtraces with lldb by closing stdin. 2015-08-21 22:00:49 -04:00
Zoltan Varga 92b7b86342 Fix the build. 2015-08-21 18:04:10 -04:00
Zoltan Varga 362df4cc7b [runtime] Implement support for dynamic methods in stack traces in a different way: instead of constructing the stack trace eagerly when it contains a dynamic method, save the list of dynamic methods into the Exception object so they are kept alive. 2015-08-21 17:48:14 -04:00
Marek Safar c6f6383b5f [runtime] Remove eager exception stack construction when it contains dynamic method. Fixes #33064
We used to construct exception stack traces as string at throw site (for dynamic methods) but
that does not work correctly because exception stack trace can be decomposed via
new StackTrace (exception) or merged via ExceptionDispatchInfo both of them need the exception
stack in raw form and not as a string.

Further the format used by local stack builder was not same as format used by
System.Diagnostics.StackTrace.

The orignal reason for the specialization was that dynamic method can be collected
before stack is rendered which leads to stack frame to be reported as

at <unknown method> instead of
at (wrapper dynamic-method)

That should be addressed by gc-link between dynamic method and exception or
stack-frame.
2015-08-21 21:49:20 +02:00
Zoltan Varga 9aa5b08265 [arm64] Add gc_safe_point to cpu-arm64.md. 2015-08-21 14:15:24 -04:00
Rodrigo Kumpera 8bface12c1 [jit] Enable OP_GC_SAFE_POINT on ARM64 2015-08-21 13:48:47 -04:00
Rodrigo Kumpera 3e5826dcdc [Facades] xammac_net_4_5 needs the reflection facades. 2015-08-21 13:19:17 -04:00
Rodrigo Kumpera 971be95987 [BCL] Fix xammac_4_5 build of the Facades. 2015-08-20 20:07:46 -04:00
Rodrigo Kumpera c86f4125dc [BCL] Partial compilation fix for xammac_4_5. Facades still busted. 2015-08-20 19:48:15 -04:00
Rodrigo Kumpera 192ad58a64 [arm64] Fix MONO_CONTEXT_GET_CURRENT so it can be used multiple times in the same compilation unit. 2015-08-20 17:31:07 -04:00
Marek Safar 8f60a2cc74 Fixes build of xammac new facades 2015-08-20 23:27:11 +02:00
Zoltan Varga 769f08b6e4 [coop] Avoid polling in the mono_thread_interruption_checkpoint () icall wrapper, it could lead to infinite recursion if the polling flag is not cleared fast enough. 2015-08-20 16:46:43 -04:00
Zoltan Varga c2e2a49479 [coop] Avoid taking the gc lock when rehashing mono_g_hash tables, its not needed with the coop gc since the gc cannot preempnt that code. 2015-08-20 14:04:25 -04:00
Zoltan Varga 1efb5b5f3c [coop] Enter blocking mode before waiting on a condvar in the threadpool code. 2015-08-20 13:37:16 -04:00
Marek Safar 0806ff5baf Fixes mobile build 2015-08-20 15:40:26 +02:00
BogdanovKirill bf38b37529 [ChunkStream] CPU and memory leak fix when writing and reading infinitely
The problem is connected with "chunks" field in ChunkStream class. As you can see in "ReadFromChunks" method, the number of elements of this array continuously grows, because array's elements are not removed but just set to null. So, every subsequent call of this method will be slower than previous and will use additional memory more and more infinitely. Yes, we have "ResetBuffer" method than could clear "chunks" array, but nobody call it when the connection is infinite.

This change is released under the MIT license.
2015-08-20 16:16:48 +05:00
Marek Safar 8721a9ccc3 Merge pull request #1990 from akoeplinger/fix-getsystemtimezone-reflection
[corlib] Rename private method in TimeZoneInfo to avoid conflict with public one via reflection
2015-08-20 10:10:05 +02:00
Alexander Köplinger 66372b91ac [corlib] Rename private method in TimeZoneInfo to avoid conflict with public one via reflection
A private overload of the public GetSystemTimeZones() method was added in 4dc9a90d7f.
This broke code that tried to access that method via reflection and expected that there be only one.

Fixing this by renaming the private method to GetSystemTimeZonesCore (which is also more aligned with FindSystemTimeZoneByIdCore).
2015-08-20 04:41:41 +02:00
Rodrigo Kumpera 0de923cb67 [coop] We call into the GC holding the appdomain mutex. Suspend around locking. 2015-08-19 19:22:43 -04:00
João Matos 8332a48ce4 [System] Remove MonoSyncFileStream.cs from mobile sources. 2015-08-20 00:09:34 +01:00
Zoltan Varga a87a08062d Revert "[coop] Disable exception checks in mono_threads_state_poll (), it could lead to infinite recursion."
This reverts commit 2790501f69.

Revert this as it causes corlib tests to hang.
2015-08-19 18:32:40 -04:00
Rodrigo Kumpera d4082dffbd [coop] mono_gc_register_for_finalization does block, so guard against it. 2015-08-19 17:14:45 -04:00
Zoltan Varga 964518e1a1 [coop] Avoid doing polling in native-to-managed wrappers, the poll can trigger before reset_blocking is executed. 2015-08-19 17:03:42 -04:00
Rodrigo Kumpera 85c134c427 [coop] Add stress test. It still beats me. 2015-08-19 15:32:22 -04:00
Rodrigo Kumpera 90883a6c15 [coop] The sgen_interruption mutex can be taken in unsafe mode, so we need to suspend around it. 2015-08-19 15:31:39 -04:00
Marek Safar ce89d264dc [corlib] Add underlying Console stream specialization to FileStream 2015-08-19 17:18:54 +02:00
João Matos 8b51c80715 [runtime] Fixed AArch64 Android cross-compilation build.
This was introduced by https://github.com/mono/mono/commit/5604e0b5940a1df7059d11158b36fbde9a3c056d.

For some reason we were getting duplicate assembly labels, this fixes it.

```[8:45:15] /var/folders/hv/lh9y7pps1vbfsc737h_nl4mh0000gp/T//cczYhnuB.s: Assembler messages:
[8:45:15] /var/folders/hv/lh9y7pps1vbfsc737h_nl4mh0000gp/T//cczYhnuB.s:9012: Error: symbol `L0' is already defined
[8:45:15] make[7]: *** [libmini_la-mini-exceptions.lo] Error 1
[8:45:15] make[7]: *** Waiting for unfinished jobs....```
2015-08-19 14:56:23 +01:00
Marek Safar 2309cc50a9 [corlib] Remove unused icall 2015-08-19 14:13:04 +02:00
Marek Safar 0abfec747e [corlib] Remove unused file 2015-08-19 14:13:03 +02:00
Marek Safar 70a295d1fe [system] Add a workaround for redirected StandardInput writes. Fixes #32905 2015-08-19 14:13:03 +02:00
Marek Safar 0d724812ab [System] Refactor Process start to better control pipes flow 2015-08-19 14:13:03 +02:00
Marek Safar 789808b507 [system] Simplify process redirection initialization 2015-08-19 14:13:03 +02:00
Marek Safar fa51f28613 [corlib] Add FileStream safe handle argument check 2015-08-19 14:13:02 +02:00
Martin Baulig dd40925cbb [WFC]: Fix yesterday's commit.
We actually don't need the length check here.  The only place where
the 'ref parameters' could possibly be replaced is at the end of the
private Request() method - to remove the 'IAsyncResult' argument from
and End*() method.

This fixes commit 0b1360c8e3 and bug #32886.

(cherry picked from commit 1d2c58215f)
2015-08-19 13:20:29 +02:00
Zoltan Varga 957e4e4d22 Fix a crash introduced by e2037b583b. 2015-08-18 20:00:53 -04:00
Rodrigo Kumpera c1e41fa46d [coop] On OSX, set native_handle to the mac port. 2015-08-18 19:08:21 -04:00
Rodrigo Kumpera 2c67cb8996 [jit] Print thread information when doing a gdb crash dump 2015-08-18 19:08:21 -04:00
Rodrigo Kumpera 97bcec124b [build] Add execv to configure.ac, the runtime now needs it. 2015-08-18 19:08:21 -04:00
Zoltan Varga 30a3b9201d [sdb] Fix the handling of strings with embedded null values. Fixes #33066. 2015-08-18 17:18:25 -04:00
Zoltan Varga 1ef694ae52 [jit] Emit the results of the jit regressions tests in nunit format only when running under jenkins. 2015-08-18 14:44:50 -04:00
Zoltan Varga 00562364af Merge pull request #1983 from saper/noeglibstatic
Do not build libeglib-static.a
2015-08-18 14:38:45 -04:00
Zoltan Varga 97f13ae334 [runtime] Use the thread_get_tid () in more places. 2015-08-18 14:38:29 -04:00
Zoltan Varga 6c4e266e75 Revert "[coop] Avoid taking the gc lock when rehashing mono_g_hash tables, its not needed with the coop gc since the gc cannot preempnt that code."
This reverts commit ab7929448c.

Revert this to see if it fixes wrench failures.
2015-08-18 14:30:46 -04:00
Martin Baulig 57ef8f9614 [WCF]: Fix non-byref parameters; bug #32886.
(cherry picked from commit 0b1360c8e3)
2015-08-18 20:02:25 +02:00
Marcos Henrich 06bdf2998e Improved TimeZoneInfo.Local.Id
TimeZoneInfo.Local.Id now returns a Olson id when "/etc/localtime" is a
symbolicate link instead of "Local".

Fixes #24958.
2015-08-18 17:44:00 +01:00
Marcos Henrich 645c77f9b6 Test TimeZoneInfo.Local.Id
Ideally TimeZoneInfo.Local.Id should not be equal to "Local" when
/etc/localtime is a symbolic link. Covers #24958.
2015-08-18 17:39:48 +01:00
Zoltan Varga ab33e42673 Merge pull request #1988 from BillSeurer/master
[ppc] Basic changes to allow mono to build and run on power BE
2015-08-18 11:20:53 -04:00
Bill Seurer 8332185abf [ppc] Basic changes to allow mono to build and run on power BE 2015-08-18 09:36:23 -05:00
Marek Habersack d92ab815ca [tests] Disable a Unix signal test on Android
The test causes the runtime to silently crash in fashion similar to what
real-time signals do to the runtime (a segfault without a single trace
of a crash, causing the process to just hang)
2015-08-18 14:56:55 +02:00
ash-lshift 71f7cda39a [WindowsBase] Fix PackagePart.GetRelationships for readonly files
Do not throw an exception when we are creating the PackageRelationship.
We should only do that if the user tries to add a new one.

Fixes https://bugzilla.novell.com/show_bug.cgi?id=675379
2015-08-18 09:30:42 -03:00
Rodrigo Kumpera 79b2dea837 [test-suite] Enable sgen test that forgot to be added. 2015-08-18 02:49:55 -04:00
Rodrigo Kumpera 03d9b259d1 [coop] Wrap thread initialization start wait code in a GC safe block.
This is needed since the starting thread might block in the threads_lock
waiting for a GC to finish before posting to the completed semaphore.

This will cause the thread creating it to block indefinitely.
2015-08-18 02:49:54 -04:00
Rodrigo Kumpera 835b6b9e51 [coop] Code calls into the GC while holding the handles lock. Wrap it around a MONO_TRY_BLOCKING. 2015-08-18 02:49:02 -04:00
Rodrigo Kumpera 37450eef31 [checked-build] Adjust the assertof mono_runtime_class_init. 2015-08-18 01:24:46 -04:00
Rodrigo Kumpera f15af85b5f [coop] mono_thread_info_suspend_lock is a non-leaf lock so we need to checkpoint around it so it works with coop.
mono_thread_info_suspend_lock is, on first sight, a leaf lock. But since it can suspend a thread that is holding other locks,
it has the same global effect of one.
2015-08-18 01:23:45 -04:00
Rodrigo Kumpera 788b21e581 [checked-build] Add a check in mono-hash for the right GC mode. 2015-08-18 01:19:43 -04:00
Rodrigo Kumpera bcf9ca18bf add some assets to reflection.c 2015-08-18 00:48:41 -04:00
Zoltan Varga 6c10d83b8f [coop] Mark the locking in mono_thread_info_safe_suspend_and_run () as blocking, it can block during an stw. 2015-08-17 19:32:34 -04:00
Zoltan Varga 6945bdb3a9 [coop] Shorten the blocking section in threadpool cleanup. 2015-08-17 18:35:53 -04:00
Zoltan Varga 2790501f69 [coop] Disable exception checks in mono_threads_state_poll (), it could lead to infinite recursion. 2015-08-17 16:45:27 -04:00
Alexis Christoforides e18c1fda5d [lock tracer] Initialize all of frame array 2015-08-17 16:37:29 -04:00
Zoltan Varga ab7929448c [coop] Avoid taking the gc lock when rehashing mono_g_hash tables, its not needed with the coop gc since the gc cannot preempnt that code. 2015-08-17 15:21:45 -04:00
triton 5499df27a1 [msvc] Remove 64-bit/SGen build specific DLL export definition file. 2015-08-17 19:32:33 +01:00
triton 5c74fea481 [msvc] Update the DLL export definition files. 2015-08-17 19:31:04 +01:00
triton 1747c03a06 [runtime] Fixed Valgrind support to compile against Win64. 2015-08-17 19:30:20 +01:00
triton 7c07d1d240 [runtime] Fixed sgen_suspend_thread to work with Win64 MonoContext. 2015-08-17 19:28:44 +01:00
João Matos 714feff880 Merge pull request #1967 from D-POWER/master
Fixed MSVC solution to compile straight out of the box
2015-08-17 18:05:35 +01:00
Marek Safar ac2c41ea09 [system] Keep excluded socket mobile tests in sync 2015-08-17 18:46:45 +02:00
Marek Safar b25feccd11 [corlib] Update incorrect test 2015-08-17 16:30:03 +02:00
Marek Safar b7621d2bb2 [corlib] Propagate captured ExceptionDispatchInfo to user's StackTrace copies. Fixes #32918 2015-08-17 16:27:26 +02:00
Rodrigo Kumpera 3ff51a5d1f Merge pull request #1870 from saper/langinfo_h
[eglib] Prefer <langinfo.h> to <localcharset.h>
2015-08-17 09:39:49 -04:00
Marek Safar 6acc7828e7 [mcs] Reduced statement expressions can still be used as statements. Fixes #33142 2015-08-17 11:43:47 +02:00
Zoltan Varga 5f2004ee16 [jit] Avoid taking the domain lock in mono_icall_get_wrapper_full (), do most work outside the loader lock. 2015-08-16 19:41:04 -04:00
Zoltan Varga 52e117771d [runtime] Remove unused mono_delegate_section variable. 2015-08-16 19:32:07 -04:00
Zoltan Varga 7af939b0cf [runtime] Change a few g_assert (foo != NULL) to g_assert (foo). 2015-08-16 19:22:55 -04:00
Zoltan Varga 3d1a25283d [coop] Make type_initialization_lock () a blocking lock, since some critical sections protected by it can block. Reorganize mono_runtime_class_init_full (), avoid putting the majority of the function inside an if. 2015-08-16 19:22:55 -04:00
Zoltan Varga 8166ed6b71 [coop] Make threadpool->active_threads_lock a blocking lock, since some critical sections protected by it can block. 2015-08-16 19:22:55 -04:00
Zoltan Varga f574556444 Merge pull request #1981 from akoeplinger/ilasm
[ilasm] Add stubs for the "legacy library" and "auto" keywords in .assembly
2015-08-16 16:42:28 -04:00
Marcin Cieslak 27b7c308b3 Do not build libeglib-static.a
1) libeglib.a is already a static library
2) It is not used anywhere, unlike other lib*-static.a
   libraries in the Mono runtime
2015-08-16 20:14:01 +00:00
Alexander Köplinger c7ff3b0829 [ilasm] Add stubs for the "auto" keyword in .assembly
Example IL: ".assembly extern mscorlib {auto}"
2015-08-16 17:59:37 +02:00
Alexander Köplinger c8d474bef3 [ilasm] Add stubs for the "legacy library" keyword in .assembly
Example IL:

".assembly extern legacy library mscorlib {}"
".assembly legacy library test {}"
2015-08-16 17:59:36 +02:00
Zoltan Varga e71bf630bc [bcl] Fix test failures in the System.ServiceModel tests after 9ffb681d06. 2015-08-15 22:26:59 -04:00
Zoltan Varga 537c551991 Merge pull request #1979 from kumpera/conc_fix
[utils] Change mono_conc_hashtable write operations to rely on external locking.
2015-08-15 21:54:56 -04:00
Zoltan Varga da8fbf7e60 Merge pull request #1980 from akoeplinger/fix-monoevent
[corlib] Implement MonoEvent Module property
2015-08-15 14:21:51 -04:00
Alexander Köplinger a7b43b9a35 [corlib] Implement MonoEvent Module property
Add tests for Event-, Method- and ConstructorInfo to verify accessing .Module works (the latter two already worked before this change).
2015-08-15 20:05:11 +02:00
Rodrigo Kumpera d164e49e07 [utils] Change mono_conc_hashtable write operations to rely on external locking.
The original design was to pass a lock to the mono_conc_hashtable constructor and
then the write operations would do locking themselves.

That turned out to be a problem for two reasons:

First, it hidden the fact that locking was happening. Every other data structure in
the runtime rely on the caller to perform locking - thus that design ended up been
a lie.

Second, under coop, taking the lock became a problem as leak locks should be taken
in GC Safe mode and other locks should be taken under GC Unsafe mode. Taking a lock
in the wrong GC mode makes the suspend watchdog bark really loudly.

The runtime, funny enough has 2 usages of the conc hashtable, one with the image lock
and one with the domain lock - and each must be taken in a different GC mode. That
meant that either overcomplicating the design, or just removing locking from it.

This commit does that. It removes the mutex from mono_conc_hashtable and hoist locking
around the calls that used to do it.
2015-08-15 00:46:37 -04:00
Zoltan Varga 321e08e5ee [jit] Reorganize the code in mini.c to reduce the number of DISABLE_JIT blocks. 2015-08-15 00:37:12 -04:00
Zoltan Varga 420925cb1b [jit] Remove some dead code. 2015-08-14 23:12:03 -04:00
Zoltan Varga 0916de42bd [sdb] Document the locks protecting various data structures. 2015-08-14 23:02:53 -04:00
Zoltan Varga f56dbd8bdd [sdb] Simplify the locking in set_breakpoint() a bit. 2015-08-14 22:55:58 -04:00
Zoltan Varga 4ea0323445 [sdb] Revert 6f41607cc3, simplify the code inside the domain lock instead. 2015-08-14 22:50:57 -04:00
Zoltan Varga 6f41607cc3 [sdb] Protect MonoJitDomainInfo->seq_points by the loader lock instead of the domain dock, since accesses to it from sdb are not simple code paths. 2015-08-14 22:24:58 -04:00
Zoltan Varga e2037b583b [sdb] Make the locking simpler and finer grained. 2015-08-14 22:10:21 -04:00
Zoltan Varga 8eeb2cef8f [runtime] Initialize the class name cache using double checked locking. 2015-08-14 19:02:24 -04:00
Zoltan Varga ec96b3ac55 [gsharedvt] Don't pass non-variable size gsharedvt types by ref. Fixes #32931. 2015-08-14 18:50:05 -04:00
Zoltan Varga 8ece42b8e8 [jit] Fix a crash by using mono_field_get_type () instead of accessing field->type directly. Fixes #32907. 2015-08-14 18:36:54 -04:00
Rodrigo Kumpera 4304488359 [coop] Fix ves_icall_System_IO_MonoIO_GetFileSystemEntries.
We were calling mono_string_to_utf8 while in GC safe mode.

It's technically ok'ish to do it as it will probably be pinned by the called, but
we're better off by reducing the surface as much as we can.
2015-08-14 17:17:34 -04:00
Rodrigo Kumpera f820615c29 [coop] Fix crasher during shutdown initialization.
Make it possible to suspend the main thread when starting the shutdown of the thread pool.

The problem is that cleanup can take an unbound amount of time.
2015-08-14 17:17:34 -04:00
Rodrigo Kumpera b684bd32e0 [coop] Add a workaround in mono_marshal_get_thunk_invoke_wrapper.
This is a workaround until we figure out what to do with the embedding API.

We ensure we transition the executed managed code into unsafe mode.

Maybe the right call would be to assert if the caller is not already on it, but that's too soon of a decision to make.
2015-08-14 17:17:33 -04:00
Rodrigo Kumpera ecb3d6a650 [coop] Fix coop support for mono_method_get_unmanaged_thunk.
Ensure we create the wrapper in GC Unsafe mode, which is the default one for runtime code.
2015-08-14 17:17:32 -04:00
Rodrigo Kumpera aaf0c8bced [checked-build] Annotate object.c with GC state asserts. 2015-08-14 17:17:32 -04:00
Rodrigo Kumpera 8f118cb416 [coop] Add performance counters for frequent transitions. 2015-08-14 17:17:31 -04:00
Rodrigo Kumpera fd19481460 [checked-build] Initial implementation of checked build asserts.
To enable checked builds pass --with-checked-build=yes to autogen/configure.

The current set of checked build macros verify the GC state on function entry.
2015-08-14 17:17:24 -04:00
Rodrigo Kumpera 1786498006 [threads] Add function to stringify thread state names. 2015-08-14 16:28:21 -04:00
Rodrigo Kumpera bbfaf5cdbd [coop] Make state-machine asserts print the tid as it's the same used by other parts of the runtime. 2015-08-14 16:28:20 -04:00
Zoltan Varga b76558e80f [arm] Add support for split reg-stack argument passing to the dyn call code. Fixes #33080. 2015-08-14 14:05:28 -04:00
Rolf Bjarne Kvinge c4ab096d90 Fix configure.ac to detect WatchOS and define TARGET_WATCHOS. 2015-08-14 18:57:50 +02:00
Marcos Henrich 6723d1e5cc Merge pull request #1972 from esdrubal/proc_pidpath
[runtime] GetModuleFileNameEx
2015-08-14 10:08:23 +01:00
Alex Rønne Petersen aeccef382b Merge pull request #1975 from alexrp/profiler-gch-bt
[profiler] Add GC handle events with backtraces.
2015-08-14 10:44:56 +02:00
Sebastien Pouliot 7c422578bc [tests] Remove CWL from test catch clause as it can be confused with a real error [#32593] 2015-08-13 16:45:00 -04:00
Ludovic Henry 92a0ac52a7 [referencesource] Import System.Math 2015-08-13 16:44:51 -03:00
Rolf Bjarne Kvinge 7693e3dff3 Add specific configure option to enable the WatchOS BCL libraries. 2015-08-13 18:31:28 +02:00
Rolf Bjarne Kvinge 8058ef2af9 Build an initial version of System.Net.Http.dll for monotouch as part of the regular BCL build.
We have Facade assemblies that depend on System.Net.Http.dll to exist, so
we can't delay building it (at least one version of it).
2015-08-13 18:31:28 +02:00
João Matos a803711c2e Added support for WatchOS's armv7k to configure.ac. 2015-08-13 16:57:19 +01:00
Marek Habersack 7fe7f93188 Posix RTS test fixes and Android compatibility
Android's libc (bionic) defines the _GNU_SOURCE macro but fails to adhere
to the GNU sematics in (at least) one case - the strerror_r function.
The function follows XSI semantics instead of the GNU one which caused our
code to segfault on Android. This patch special-cases Android to use the XSI
semantics for strerror_r. This un-breaks some POSX real-time singals tests.

It also makes provisions for detecting whether the real-time signals are safe
to use on the current platform. They are safe for all platforms desktop Mono
runs on, but they're not safe on most Android platforms.
2015-08-13 11:53:28 +02:00
Marek Safar 5511b94946 [corlib] Remove unused code 2015-08-13 11:17:25 +02:00
Alex Rønne Petersen d055d688d9 [profiler] Add GC handle events with backtraces. 2015-08-12 08:44:57 +02:00
Alex Rønne Petersen a8cb543870 [profiler] Remove CodeAnalyst profiler module.
This product has been discontinued by AMD and we don't even have support for
building this profiler module in the build system anyway; chances are pretty
good that bitrot has set in.
2015-08-12 06:28:16 +02:00
Zoltan Varga af913d7c00 [jit] Add another suspend check to the JIT. 2015-08-11 22:26:56 -04:00
Zoltan Varga 68f9771cee [jit] Avoid asserts during stack walks if the thread is not attached. 2015-08-11 21:49:45 -04:00
Zoltan Varga 534bb6eaa0 [runtime] Make sure Monitor.Enter () is always inlined since it consists only of a call to an icall. 2015-08-11 21:11:40 -04:00
Zoltan Varga 08ed9b94b0 [aot] Fix the calculate of the llvm code range for aot image with only 1 llvm method. 2015-08-11 15:54:14 -04:00
Jo Shields cdb098617a Un-revoke fix in BNC#144655 - mono-find-provides should ONLY work on GAC libraries, and any packages which break on this behaviour should be fixed - rather than generating utterly broken Provides.
(cherry picked from commit 1f4133a06f252ec1b78637dd91e49f50836cf570)
2015-08-11 19:43:34 +01:00
Zoltan Varga bf8f49aa7a [runtime] Move the kevent() calls from KeventWatcher to the runtime, add support for interrupts. 2015-08-11 14:37:59 -04:00
Ludovic Henry 2945191b72 Merge pull request #1973 from rolfbjarne/bug32947
[threadpool-ms-io] Remove unnecessary asserts. Fixes #32947.
2015-08-11 14:20:36 -03:00
Rolf Bjarne Kvinge 880134db57 [threadpool-ms-io] Remove unnecessary asserts. Fixes #32947.
Neither is_socket_async_callback nor is_async_read_handler need to
actually successfully load the classes they're comparing against;
if the classes can't be loaded, then the input class is obviously
not of that class.

This occurs when mscorlib is linked, the classes to compare against
might be linked away.

https://bugzilla.xamarin.com/show_bug.cgi?id=32947
2015-08-11 15:11:56 +02:00
Marcos Henrich 5fd7d17911 [runtime] GetModuleFileNameEx
GetModuleFileNameEx now returns a full path instead of the process name.
Fixes #32579
2015-08-11 13:36:19 +01:00
Marcos Henrich 6fc86ee499 Merge pull request #1952 from esdrubal/proc_name
Fixes process names trimmed to 15 chars.
2015-08-11 13:10:27 +01:00
Zoltan Varga b8d1ccd159 [coop] Handle blocking in parked threads correctly. 2015-08-10 23:20:43 -04:00
Zoltan Varga c2c0008b8d [runtime] Add a missing MONO_FINISH_BLOCKING to ves_icall_System_Net_Dns_GetHostByName_internal. 2015-08-10 22:20:10 -04:00
Zoltan Varga 42456cda16 [jit] Emit the seq point for filter clauses after the op_get_exc instruction. 2015-08-10 20:55:32 -04:00
Zoltan Varga 00ef87ab6d Revert "[runtime] Move the kevent() calls from KeventWatcher to the runtime, add support for interrupts."
This reverts commit 7f44281658.

Revert this as icalls don't marshal kevent structures correctly.
2015-08-10 15:51:39 -04:00
Zoltan Varga 94b3fd4bd4 [runtime] Remove some debug printfs. 2015-08-10 15:25:03 -04:00
Zoltan Varga 80a69d2d61 [coop] Fix a crash introduced by edb4d8f3fa, some wrappers don't have wrapper infos. 2015-08-10 14:33:30 -04:00
Zoltan Varga 7f44281658 [runtime] Move the kevent() calls from KeventWatcher to the runtime, add support for interrupts. 2015-08-10 14:32:37 -04:00
Marcos Henrich 5b7a67e75c Fixes process names trimmed to 15 chars.
Process names were trimmed to 15 characters. proc_name was used to
retrieve the process name, by looking at its implementation we can see
that it returns a buffer which the size is MAXCOMLEN defined as 16.

When the proc_name result length is equal to 15 (MAXCOMLEN - 1) we now check if
proc_pidpath is able to return a longer process name.

Fixes #32539.
2015-08-10 17:53:36 +01:00
Rodrigo Kumpera 86df0d572b [coop] Fix MONO_SUSPEND_CHECK to use the right variable name. 2015-08-10 10:41:24 -04:00
Rodrigo Kumpera fcabe9f8c4 [coop] Cue card now mentions that blocking has a suspend count. 2015-08-10 10:25:22 -04:00
Rodrigo Kumpera edb4d8f3fa [coop] Don't emit safepoints in the wrapper of the polling function.
Otherwise during a collection the wrapper would call itself resulting
in a stack overflow.
2015-08-10 10:25:21 -04:00
Rodrigo Kumpera 1aa908eea8 [coop] Switch from thread_state_init_from_sigctx to thread_state_init.
Suspend needs to work in the intermediate state where the mono-thread
is attached but not the managed thread. This happens in the startup
and cleanup paths and leads to crashes there.

The suspend initiator is now responsible to check if the thread is
attached or not. Which is easy, just check lmf/jit_tls.
2015-08-10 10:25:16 -04:00
Rodrigo Kumpera 5604e0b594 [coop] Add thread_state_init that initializes the thread from the current stack state.
This new function works differently that others in that it always succeed, but might
provide incomplete data in some cases - like when the thread is not attached.
2015-08-10 10:23:18 -04:00
Rodrigo Kumpera 21e9c31515 [coop] Attach mono-thread as early as possible.
This makes early suspend checks work. This makes it easier
to debug suspend errors by asserting on suspend fails.
2015-08-10 10:23:18 -04:00
Rodrigo Kumpera bac9f672d9 [configure] Add checked build configure option. 2015-08-10 10:23:17 -04:00
Marek Safar 1304fc1546 [corlib] Handle Module in RuntimePropertyInfo. Fixes #32815 2015-08-10 13:03:44 +02:00
Marek Safar 87141d4dfc [mcs] Fix string interpolation parsing where inner expression contains { } tokens. Fixes #32832 2015-08-10 11:14:22 +02:00
Zoltan Varga 906ff55485 [runtime] Remove an unused functions. 2015-08-08 22:39:13 -04:00
Zoltan Varga b14fb40983 [runtime] Mark mono_monitor_try_enter_internal () as inline. 2015-08-08 22:39:00 -04:00
Zoltan Varga f68990d7c1 [runtime] Make synchronized methods use the Monitor.Enter(object,bool&) overload. 2015-08-08 22:31:52 -04:00
Zoltan Varga c5d8245246 [runtime] Fix the coop build on posix platforms. 2015-08-08 22:44:06 +00:00
Zoltan Varga 3d265f8dae [arm] Implement support for gc safe points. 2015-08-08 22:43:42 +00:00
Zoltan Varga 02c6b4430c [runtime] Remove mono_g_hash_table_new (), use mono_g_hash_table_new_type () instead. 2015-08-08 18:08:21 -04:00
Zoltan Varga 6bb06993a7 [runtime] Use a GHashTable instead of a MonoGHashTable in mono_class_from_name (), the hash table doesn't need to be GC aware. 2015-08-08 18:00:24 -04:00
Zoltan Varga d4024a4b55 [runtime] Remove the sgen_supported conditional from configure, we don't support architectures which don't have SGEN. 2015-08-08 13:36:00 -04:00
Marek Safar b99720966a Merge pull request #1968 from LogosBible/uribuilder-no-hostname
Fix UriBuilder.ToString() when the host is empty.
2015-08-08 09:00:21 +02:00
Zoltan Varga 46097ccbb1 Fix the build. 2015-08-07 22:22:31 -04:00
Zoltan Varga 83ca9ffc5d [jit] Add a suspect check into the middle of the JIT pipeline. 2015-08-07 20:40:39 -04:00
Zoltan Varga 6caa50dedb [runtime] Revert part of the previous commit to avoid the profiler crashing. 2015-08-07 16:11:16 -04:00
Zoltan Varga 0061a4f02e [runtime] Avoid passing gshared methods to clients of the embedding api. 2015-08-07 16:04:28 -04:00
Ludovic Henry ef760317a2 [runtime] Fix missing method at link time 2015-08-07 09:52:30 -04:00
sdridi 8c455550ab [Windows-VS2013] Added a post-build event to libmono that copies all required header files to a directory named include 2015-08-07 10:05:47 +01:00
Rolf Bjarne Kvinge 427d42aa51 Add a conditional for fork and exec* functions.
They're not available on WatchOS.
2015-08-07 10:56:21 +02:00
Zoltan Varga b22a4c2ffa [runtime] Avoid a memory overflow in Buffer.InternalBlockCopy () if the caller passes in a negative value by mistake. 2015-08-06 22:15:30 -04:00
Zoltan Varga f025dd445c [runtime] Remove some dead code. 2015-08-06 19:18:55 -04:00
Ludovic Henry abad8aaabd [runtime] Fix memory corruption due to incorrect use of MONO_OBJECT_SETREF
MONO_OBJECT_SETREF would use mono_gc_wbarrier_set_field which would write over 8 bytes ( *(void**)field = value ), while we want to write over 1 byte here.
2015-08-06 14:59:59 -04:00
Dave Dunkin b948e9c030 Add UriBuilder test for no hostname. 2015-08-06 11:55:46 -07:00
Martin Potter d3c8479b4e Uri.ShemeDelimiter should not be used when the host is empty. 2015-08-06 11:49:10 -07:00
João Matos 6a49f28fed Merge pull request #1966 from angeloc/master
Better handling of vasprintf checking
2015-08-06 13:22:20 +01:00
sdridi 47bdf35be9 Fixed MSVC solution to compile straight out of the box 2015-08-06 10:29:44 +01:00
Angelo Compagnucci 0bf6490145 Better handling of vasprintf checking
This patch improves the handling of vasprint checking. 
It switches the unneeded have_vasprintf variable with the
AC_CHECK_FUNCS defined ac_cv_func_vasprintf one.
2015-08-06 09:36:36 +02:00
Zoltan Varga 1db071a9e5 Merge pull request #1965 from akoeplinger/fix-flaky-test
[System.ServiceModel] Fix flaky Bug652331_2 test
2015-08-05 19:09:39 -04:00
Alexander Köplinger 66cf5d6247 [System.ServiceModel] Fix flaky Bug652331_2 test
The test sometimes failed on Jenkins with the timeout assert. Running only this single test locally
with `make check TESTNAME=System.ServiceModel.Dispatcher.Bug652331Test.Bug652331_2` however reproduced
this almost every single time.

It seems that WCF takes a bit to initialize until it accepts connections, so putting a little sleep
fixed this for me locally and running it in a loop for half an hour didn't assert even once.
2015-08-05 20:09:32 +02:00
João Matos b4357e8f6e [runtime] Re-enable the soft debugger on x86 without presence of signals.
As of b76665b848 the debugger does not rely on signals anymore for stepping.
2015-08-05 17:49:39 +01:00
João Matos 70b795cfd8 [sgen] Do not use Mach OS initialisation if using coop GC. 2015-08-05 17:47:06 +01:00
Ludovic Henry 435d21f5b1 [runtime] Add testing for unhandled exception 2015-08-05 09:18:51 -04:00
Ludovic Henry 9ffb681d06 [runtime] Refactor AsyncResult.Invoke icall and swallow exception on AsyncCallback
The swallowed exception is the behavior we can observe on .NET and Mono 4.0
2015-08-05 09:18:51 -04:00
João Matos 40c171799b Merge pull request #1963 from angeloc/patch-1
Fixing initialization of have_vasprintf
2015-08-05 12:50:16 +01:00
Angelo Compagnucci 1c3d615d93 Fixing initialization of have_vasprintf
This patch initialize properly have_vasprintf in case vasprint function is found.
Solves multiple definition of `vasprintf' error in case vasprint is not properly detected.
2015-08-05 12:59:45 +02:00
Marek Safar dc7031cabb [system.net.http] Add special handling for chunked transfer-encoding httpwebrequest initialization. Fixes #31877 2015-08-05 10:10:53 +02:00
Zoltan Varga bf325fe42e Fix the build. 2015-08-04 23:01:56 -04:00
Zoltan Varga b76665b848 [sdb] Transition to using sdb trampolines instead of signals for single stepping/breakpoints. 2015-08-04 22:59:12 -04:00
Zoltan Varga f5e1f9d185 [sdb] Improve logging a bit. 2015-08-04 22:37:12 -04:00
Rodrigo Kumpera 5f63f86d45 [runtime] Reenable Frak TLS on OSX 2015-08-04 22:04:36 -04:00
Ludovic Henry 1354dc1044 [bcl] Remove old ThreadPool managed class 2015-08-04 18:36:39 -04:00
Vlad Brezae c77aacb14f [tests] MonoThreadsSync structures are no longer allocated at the first Enter.
Overflow the nest count in order to achieve the same effect.
2015-08-04 15:02:05 -04:00
Vlad Brezae 49905c7b2d Throw exception when trying to unlock unowned lock. 2015-08-04 15:02:01 -04:00
Vlad Brezae 9033c85ce4 Unmanaged thin lock implementation.
This commit avoids allocation of new MonoThreadsSync structures for the typical cases of shallow nesting of uncontended locks. The necessary information (owner, nest and status bits) is embedded in the synchronisation field of a MonoObject. The lock is inflated when the nest overflows or when there is contention on the lock.

This greatly improves performance (over 10 times) for the case of locking a lock only a few times, due to the inflation avoidance. It also improves performance up to 25% for the case of locking a thin lock. A decrease in performance (up to 3 times slower) can happen for the case of repetitive nesting of a lock, due to the need of a CAS at each entry/exit.

Disable native fastpaths for now, until they are updated to the new implementation.

Merge notes from Rodrigo:
Remove the enter fast paths in monitor.c as the new code already has them.
2015-08-04 14:51:43 -04:00
triton f8b3cb3ea2 Added mono_runtime_posix_install_handlers stub for WatchOS. 2015-08-04 19:16:18 +01:00
triton c653f9553b Added SGen OS support code stubs for coop backend. 2015-08-04 19:15:43 +01:00
Ludovic Henry 5d5cca46f2 Revert "[runtime] Refactor AsyncResult.Invoke internal call"
This reverts commit e4ce838cd3.
2015-08-04 09:42:23 -04:00
Ludovic Henry 7f6c03a7d4 Revert "[runtime] Refactor AsyncResult creation with MonoAsyncCall"
This reverts commit 0e27abd93a.
2015-08-04 09:42:22 -04:00
Ludovic Henry fd02c73d71 Revert "[runtime] Move AsyncResult.Invoke to managed"
This reverts commit 29b07ab3ad.
2015-08-04 09:42:22 -04:00
Marek Safar 2fd45289e5 [mcs] Cached labels definite assignment check does not need exact match but anything larger than original set satisfies the condition. Fixes #32732 2015-08-04 15:26:50 +02:00
Marek Safar bdded2d319 [mcs] Special case return expression of Task<Task> in async block. Fixes #32712 2015-08-04 13:01:41 +02:00
Zoltan Varga 5a9d5e09f6 [llvm] Use the default code model on amd64, the 'large' code model leads to problems since the runtime doesn't support thunks on amd64. 2015-08-03 22:07:40 -04:00
Zoltan Varga bf2c1737c3 [jit] Remove monitor enter/exit trampolines, their performance is similar to calling the icalls directly, so its not worth the complexity. 2015-08-03 18:51:54 -04:00
Zoltan Varga 8f385c26c2 [runtime] Add a separate icall for Monitor.Enter(obj,&bool). 2015-08-03 18:35:42 -04:00
Zoltan Varga 064de165cf [runtime] Add fastpaths to the Monitor.Enter () methods. 2015-08-03 18:20:41 -04:00
Rodrigo Kumpera c6590df4fb Merge pull request #1912 from ludovic-henry/threadpool-managed-asyncresult
[runtime] Move AsyncResult.Invoke to managed
2015-08-03 17:37:54 -04:00
Ludovic Henry 29b07ab3ad [runtime] Move AsyncResult.Invoke to managed 2015-08-03 15:57:37 -04:00
Alexander Köplinger 27e667fcaa [System] Increase timeout of a test in SslStreamTest
The AuthenticateClientAndServer_ClientSendsNoData test sometimes failed on Jenkins,
but the 2s timeout is pretty short (it takes about 0.5s on my fast machine as well).

Increasing it to 5s should allow the test to work on the slower Jenkins machines as well.
2015-08-03 21:24:25 +02:00
Ludovic Henry 0e27abd93a [runtime] Refactor AsyncResult creation with MonoAsyncCall 2015-08-03 13:57:22 -04:00
Ludovic Henry e4ce838cd3 [runtime] Refactor AsyncResult.Invoke internal call
Instead of catching the exception and rethrowin it right away, we do not catch it. This simplifies the code, and will give us more insight into the underlying exception.

Also merge mono_async_result_invoke into ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke as it is the only place we use it.
2015-08-03 12:24:45 -04:00
Zoltan Varga 0058c9cd49 Merge pull request #1959 from alexrp/master
Fix atomic_add_i4 on PPC
2015-08-03 12:20:41 -04:00
Zoltan Varga e6af202f66 Merge pull request #1958 from rolfbjarne/aot-error-reporting
[aot] use g_error instead of fprintf + exit(1).
2015-08-03 12:01:46 -04:00
Alex Rønne Petersen 8f379f0c8f [ppc] Fix atomic_add_i4 support for 32-bit PPC. 2015-08-03 17:32:31 +02:00
Alex Rønne Petersen f967c79926 [ppc] Instruction length of atomic_add_i4 is 28. 2015-08-03 17:32:07 +02:00
Rolf Bjarne Kvinge 2f393535bc [aot] use g_error instead of fprintf + exit(1).
printfs don't always show up in the iOS device log, and exit(1) does
not create a crash report, making these conditions hard to debug
(all you get is "app X exited with code 1", and then you need to
attach a native debugger and break on 'exit' to figure out more).

g_error will end up producing output using NSLog (which always
shows up in the device log), and a crash report as well, making
debugging a lot easier.
2015-08-03 16:06:02 +02:00
Zoltan Varga 6e4b8c89aa [llvm] Reenable the 'handler without invokes' llvm restriction, it causes llvm to eliminate the handler, causing finally_block_ending_in_dead_bb.exe to fail on amd64. 2015-08-03 00:05:12 -04:00
Zoltan Varga 6828387fe0 Revert "[runtime] Disable finally_block_ending_in_dead_bb.exe on wrench, it fails with llvm."
This reverts commit 7b7692a988.

Revert this as its not needed.
2015-08-03 00:04:23 -04:00
Zoltan Varga 7b7692a988 [runtime] Disable finally_block_ending_in_dead_bb.exe on wrench, it fails with llvm. 2015-08-02 23:56:48 -04:00
Zoltan Varga 0416019a35 runtime] Add semicolons after the calls to the coop gc macros to avoid confusing editors. 2015-08-02 00:47:29 -04:00
Zoltan Varga c1ad40586e [runtime] Clean up the mini makefile a bit. 2015-08-02 00:42:01 -04:00
Zoltan Varga d37df4b0c6 [runtime] Clean up configure.ac a bit. 2015-08-02 00:13:49 -04:00
Zoltan Varga a33a8fac8f [arm] Remove usunsed arch/arm/tramp.c file. 2015-08-01 23:27:35 -04:00
Zoltan Varga 12cb465e9e [arm] Avoid running out of thunk space if the same instruction is patched multiple times. Fixes #32179. 2015-08-01 21:25:51 -04:00
Zoltan Varga 06df64e866 [aot] Avoid passing empty quoted arguments to the linker. 2015-08-01 20:42:37 -04:00
Zoltan Varga dc1001166d Fix a warning. 2015-08-01 19:45:14 -04:00
Zoltan Varga 1235e7f07b [llvm] Fix support for returning empty structs from pinvoke methods on amd64. 2015-08-01 19:34:29 -04:00
Zoltan Varga 432095fd3e [jit] Enable direct calls to the monitor icalls. 2015-08-01 19:34:28 -04:00
Zoltan Varga 49b70d288b [runtime] Use mono_set_pending_exception () in the monitor icalls. 2015-08-01 19:34:28 -04:00
Marek Safar 6da0ae8c41 Merge pull request #1955 from LogosBible/servicepoint_nre
Fix NRE in CheckAvailableForRecycling. Fixes #32685
2015-08-01 08:52:31 +02:00
Marek Safar 9c5b494cbe Merge pull request #1956 from akoeplinger/fix-processtest-race
[System] Fix a race in two ProcessTest tests
2015-08-01 07:50:47 +02:00
Alex Rønne Petersen b176c8e166 Merge pull request #1957 from akoeplinger/msbuild-fix
Revert "[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces"
2015-08-01 06:35:38 +02:00
Alexander Köplinger 9a9e721cd8 Revert "[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces"
This reverts commit 51297ed7ab.

It caused a regression for escaped quotes (%22) in msbuild properties. See https://github.com/mono/mono/commit/51297ed7ab06480df84520c758639b6cef0790d9#commitcomment-11827605.

Disable test that now fails again after the revert. Add new test that verifies the behavior originally broken by the change.
2015-08-01 04:13:07 +02:00
Alexander Köplinger 2f36c4bdcc [System] Fix a race in two ProcessTest tests
The tests sometimes failed in CI, due to a race condition between
the Exited event and our assertion of whether it was called.
2015-08-01 01:33:04 +02:00
Tom Philpot c90f9a9217 Fix NRE in CheckAvailableForRecycling. Fixes #32685 2015-07-31 15:38:35 -07:00
Jonathan Pryor 7d68d78eee [mkbundle] Add mkbundle --dos2unix parameter.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=25086
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=31875
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=32171

Reverts and reworks commit bcfec743.

The problem is that when Xamarin.Android is running mkbundle, dos2unix
should NEVER be used, because the Android NDK NEVER wants Unix-like
paths, which is what dos2unix creates.

Commit bcfec743 attempted to fix this by removing dos2unix invocation
from the Xamarin.Android codepath.

The problem is that the logic was backwards: it removed dos2unix
invocation when XAMARIN_ANDROID was NOT defined, and PRESERVED
dos2unix invocation when XAMARIN_ANDROID WAS defined.

Meaning commit bcfec743 broke normal/default mkbundle.exe use on
Windows -- it would no longer probe for and use dos2unix if present --
and Xamarin.Android use of mkbundle continued to check for and use
dos2unix if it was present, continuing the buggy behavior.

Doh!

Thus, a reworking: Add a `mkbundle --dos2unix` parameter.
If `mkbundle --dos2unix=false` is specified, dos2unix will NOT be
probed for, and will NOT be used. If `mkbundle --dos2unix` or
`mkbundle --dos2unix=true` is used, then dos2unix WILL be used.

This allows the caller to consistently, ahead of time, control
mkbundle's behavior regarding dos2unix, which will e.g. allow
Xamarin.Android to *always* specify --dos2unix=false, allowing things
to build as desired there.
2015-07-31 15:35:37 -04:00
Alexander Köplinger 832f63035f [System.Runtime.Remoting] Use NotWorking category for test instead of Ignore attribute
The TestFixtureSetUp would sometimes fail in CI, but none of the tests in this class are
actually run since they are all either [Category("NotWorking")] or [Ignore].

Moving the one test from Ignore to NotWorking category allows NUnit to recognize there
are no tests to run and skips the unnecessary TestFixtureSetUp completely.
2015-07-31 21:06:05 +02:00
Marek Safar dd36f93fa5 [mcs] Try to report better error message for file excedding PE/COFF limit. Fixes #32487 2015-07-31 14:36:28 +02:00
Marek Safar 725ed3f824 [runtime] Add 2.0 build assemblies to remapping table. Fixes #32561 2015-07-31 13:50:47 +02:00
Marek Safar d6fe6a6e47 [reflection] Filter out private accessors when queried from derived types. Fixes #32609 2015-07-31 09:45:25 +02:00
Zoltan Varga b4b12052ed Parallelize the generation of aot images for make fullaotcheck. 2015-07-30 22:45:30 -04:00
Zoltan Varga 98dff8f62d [aot] Fix the caching of runtime-invoke wrappers after the wrapper cache changes, two methods with the same signature might have different runtime invoke wrappers now, and the caching would break their lookup. 2015-07-30 17:24:23 -04:00
Marek Safar 13a9e56d8f [runtime] Support quoted assembly names. Fixes #32591 2015-07-30 19:18:18 +02:00
Rodrigo Kumpera 8f7b98b9b2 Merge pull request #1840 from ludovic-henry/iolayer-thread-interrupt
[runtime] Implement wait interrupt in thread info, instead of in the io-layer
2015-07-30 10:48:44 -04:00
Martin Baulig dd6f03681e [System]: Fix WebConnectionStream.SetHeadersAsync() logic for #31830.
This fixes commits 8ccfe0f8ff and
c109f9ca03.

Added new test:
https://github.com/xamarin/web-tests/commit/d60bc3f637ca2bf4aa1379b839d878e224d344c8

(cherry picked from commit c133880bc4)
2015-07-30 15:41:10 +02:00
Neale Ferguson 53f9a3f42a Add missing { 2015-07-30 07:09:37 -04:00
Zoltan Varga 9ed1e37112 [amd64] Allocate stack space for saving argument registers in the sdb trampoline code on winx64. 2015-07-29 23:04:42 -04:00
Zoltan Varga 20d9365516 [amd64] Allocate stack space for saving argument registers in the generic trampoline code on winx64. 2015-07-29 22:43:05 -04:00
Zoltan Varga a6380f15f0 [jit] Avoid emitting the DW_CFA_mono_advance_loc mono extension opcode into the .debug_frame section. 2015-07-29 22:29:14 -04:00
Vlad Brezae 35f7ece0bc Merge pull request #1929 from BrzVlad/feature-unwind4yall
Feature trampoline unwind info
2015-07-29 19:08:18 -07:00
Vlad Brezae 9232606586 [arm] Provide unwind info for tls thunks
We don't try to unwind from the fallback thunks since they call external code anyway.
2015-07-29 15:36:57 -07:00
Vlad Brezae 98c987d465 [arm] Simplify declaration of global symbols in asm 2015-07-29 15:36:57 -07:00
Vlad Brezae 26a6fbb2a3 [arm] Fix unwind info for managed methods
Add unwind information for the epilog.
2015-07-29 15:36:56 -07:00
Vlad Brezae 15a099bce0 [aot] Provide unwind info for plt trampolines 2015-07-29 15:36:56 -07:00
Vlad Brezae d5b0f1b3af [arm] Add unwind info for trampolines 2015-07-29 15:36:56 -07:00
Vlad Brezae 5bf40d382d [x86] Add unwind info for registered trampolines. 2015-07-29 15:36:56 -07:00
Vlad Brezae f84adb14b8 [amd64] Add unwind info for registered trampolines. 2015-07-29 15:36:56 -07:00
Zoltan Varga 0197297ff7 Remove an obsolete comment. 2015-07-29 18:29:24 -04:00
Zoltan Varga 0e5ea3f086 Revert "Report XDG Documents directory for SpecialFolder.MyDocuments"
This reverts commit d6553bc988.

Revert this as it breaks the build.
2015-07-29 18:15:37 -04:00
Vlad Brezae a10d98241e [runtime] Register tramp jit info to the corresponding domain 2015-07-29 15:06:38 -07:00
Vlad Brezae 68b41a000e [x86] Register throw trampolines 2015-07-29 15:06:38 -07:00
Vlad Brezae 93a9cc9418 [runtime] Register unbox trampolines 2015-07-29 15:06:38 -07:00
Vlad Brezae 4718f304a5 [arm] Register and add unwind information for page trampolines. 2015-07-29 15:06:37 -07:00
Vlad Brezae a2d6d4a3ca [runtime] Register imt trampolines 2015-07-29 15:06:37 -07:00
Vlad Brezae c1d688bf7c [runtime] Register get gsharedvt arg trampolines 2015-07-29 15:06:37 -07:00
Vlad Brezae 177f8d37ea [runtime] Register static rgctx trampolines 2015-07-29 15:06:37 -07:00
Vlad Brezae 9ffebc9d4e [runtime] Register tramp infos for delegate invoke trampolines
Also refactor MonoTrampInfo creation, similar to the other trampolines.
2015-07-29 15:06:37 -07:00
Vlad Brezae 582bfd5fcd [x86] Fix usage of virtual delegate invoke tramps for aot
We need to fallback if the vtable slot exceedes the limit.
2015-07-29 15:06:36 -07:00
Vlad Brezae e12e34a69c [runtime] Fix lookup of aot symbol for imt delegate invoke tramps
Offset for calls through imt is negative
2015-07-29 15:06:36 -07:00
Vlad Brezae 281018613f [runtime] Add missing delegate invoke trampolines 2015-07-29 15:06:36 -07:00
Vlad Brezae cc18cd5a87 [amd64] Fix failure to emit imt delegate invoke tramps
The problem was due to implicit casting of the dividend to unsigned (which overflows) when divided by unsigned.
2015-07-29 15:06:36 -07:00
Vlad Brezae 99153cdd59 [aot] Register tramp infos when loading trampolines in aot. 2015-07-29 15:06:36 -07:00
Vlad Brezae 214a610172 [runtime] Expose trampoline jit infos that have unwind info to the runtime
Some trampolines cannot have typical unwind information because they don't get the return address from the stack. Others are called from native code that doesn't have a managed-to-native transition so unwind information would be pointless at this point. We don't include these in the jit info tables for now, not to confuse the runtime further more.
2015-07-29 15:06:35 -07:00
Vlad Brezae 7e53633f99 [runtime] We already checked that the IP is within the clause 2015-07-29 15:06:35 -07:00
Vlad Brezae 6a882003cb [jit] Add different frame type for trampoline frames. 2015-07-29 15:06:35 -07:00
Vlad Brezae 6ac11612f5 [jit] Include the unwind_info into the tramp JitInfos 2015-07-29 15:06:35 -07:00
Zoltan Varga 60a4377b0e [llvm] Avoid emitting a dummy personality function. 2015-07-29 17:51:41 -04:00
Rodrigo Kumpera 3272188fb6 Merge pull request #1951 from akoeplinger/fix-monop
[monop] Set MONO_PATH when running tests so class libs are found
2015-07-29 17:26:06 -04:00
João Matos c50762e882 Merge pull request #1953 from brpocock/master
Report XDG Documents directory for SpecialFolder.MyDocuments
2015-07-29 22:14:46 +01:00
João Matos 85988f4de7 Merge pull request #1954 from kumpera/fix_aot_compilation
Fix OSX aot compilation when there's a space in a file path.
2015-07-29 22:08:48 +01:00
Rodrigo Kumpera 4c486b97b5 Fix aot compilation when the path has spaces. 2015-07-29 17:05:17 -04:00
Sebastien Pouliot be41f60264 [tests] iOS9 (beta) have fixed bug #27864, adjust test 2015-07-29 16:45:15 -04:00
Bruce-Robert Fenn Pocock d6553bc988 Report XDG Documents directory for SpecialFolder.MyDocuments 2015-07-29 16:02:43 -04:00
Rodrigo Kumpera 2ef316dd5c [runtime] Use MONO_SIZEOF_TYPE instead of sizeof (MonoType) and compiler generated copying.
On amd64 MONO_SIZEOF_TYPE is 12 and sizeof(MonoType) is 16. This leads to memory corruption
if one uses sizeof instead of the specific size.

This is one of those oddball behaviors of the runtime that makes easy things very hard. :(
2015-07-29 12:07:35 -04:00
Rodrigo Kumpera 074dccc43a [runtime] Introduce mono_method_get_wrapper_cache to fetch the right wrappers set for a given method.
This removes a ton of duplicated code around the runtime. There are still a few cases that could not be
unified due to the hashtables been initialized differently, which requires further reviewing.
2015-07-29 12:07:35 -04:00
Rodrigo Kumpera b8115d888a [runtime] Use a single function to free the contents of MonoWrapperCaches. Remove duplicated code. 2015-07-29 12:07:34 -04:00
Marek Safar cd77a34181 [corlib] Fix out of range FileStream position error message 2015-07-29 12:14:38 +02:00
Marek Safar 41814abe77 [mcs] Report error for missing win32 icon. 2015-07-29 00:19:09 +02:00
Marek Safar d8e924f72d [xbuild] Use correct property for Win32Icon. Fixes #32499 2015-07-29 00:19:09 +02:00
Zoltan Varga 92af8cc7fc [llvm] Emit the file info struct initializer using the proper types. 2015-07-28 17:03:58 -04:00
Zoltan Varga 68c2d43e65 [amd64] Avoid saving r11 outside the red zone in the generic trampoline code. 2015-07-28 16:50:05 -04:00
Alexander Köplinger a67ab28838 [monop] Set MONO_PATH when running tests so class libs are found
When the monop tests were added in 6c9ad41d85 the MONO_PATH
variable wasn't included. This means that the tests actually ran against the system-provided
Mono class libs instead of the in-tree versions (or failed in case of CI with only monolite).
2015-07-28 22:19:24 +02:00
Martin Baulig bf1e02d4d4 Revert "[System] Don't assume WebConnectionStream of unknown http methods require write stream. Fixes #31830"
This reverts commit 8ccfe0f8ff.

This commit breaks the Content-Type logic for existing HTTP verbs such as for instance
using DELETE with an empty body [1].  Added two new test cases [2] and [3] to the stable
branch of the web-tests (https://github.com/xamarin/web-tests/tree/stable) for the particular
scenario from bug #31830 as well as the default HttpClient.SendAsync() without a Content [4].

The rules are as follows:

1.) HttpWebRequest adds the Content-Length header if and only if you're calling
    GetRequestStream(); a length of 0 will be used if you don't actually write
    any content.

    This is true for POST, PUT, DELETE and "obscute" verbs.

2.) HttpClient.SendAsync() always adds a Content-Length header.

Tests:

[1] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestPost.cs#L84

[2] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestPost.cs#L296

[3] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestHttpClient.cs#L134

[4] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestHttpClient.cs#L127

(cherry picked from commit 3f1ae72f1b385c3c5e4b5ac2b93d13418c020f02)
2015-07-28 21:14:03 +02:00
Zoltan Varga 355ecbfe98 [runtime] Remove some dead code. 2015-07-28 14:01:23 -04:00
Zoltan Varga d6daf35d82 [runtime] Print an error message instead of asserting when encountering an old corlib. 2015-07-28 13:21:24 -04:00
triton eef135d689 [mini] Fixed void function returning warning. 2015-07-28 14:54:01 +01:00
triton 6528915b1d [msvc] Update Mono DLL export definitions. 2015-07-28 14:53:11 +01:00
triton ff141cf1ee [msvc] Update Visual Studio project files. 2015-07-28 14:52:31 +01:00
Marek Safar 4e5ccd6d98 [mcs] Do member declaration obsolete types references check after all members are defined. Fixes #32451 2015-07-28 15:04:05 +02:00
Alexander Kyte 0ecaf50e1d [runtime] Remove mono_marshal_free_inflated_wrappers because its only call site frees the caches anyways.
Since we now only remove methods from caches in the image set it belong we no longer needs to do it since
they will be gone together with the method itself.
2015-07-28 01:26:20 -04:00
Alexander Kyte 9b163221b5 [runtime] Move caches present in both MonoImage and MonoImageSet into an embedded struct. 2015-07-28 01:26:19 -04:00
Alexander Kyte 680c609219 [runtime] Duplicate some more of the image caches in MonoImageSet
Changes by Rodrigo Kumpera:

Added missing freeing code.
Fixed insertion into runtime_invoke_direct_cache.
Fixed some of the cleanup in mono_marshal_free_inflated_wrappers.
2015-07-28 01:26:19 -04:00
Alexander Kyte 1367c3954c [runtime] Removed confusing/cross-cutting function mono_method_inflated_lookup and inlined at only call site. 2015-07-28 01:26:19 -04:00
Alexander Kyte bd6c263cdc [runtime] Move caches from Images to ImageSets if their keys contain generic types
We currently have a partial ordering of dependencies between ImageSets and images.
If you free an image that an ImageSet depends on, you must free the
ImageSet. The inverse is not true. Freeing the ImageSet does not free
any images.

We had some caches in each Image which used method signatures as keys.
When an image signature refers to a type stored in an ImageSet, and that
ImageSet has been unloaded, the signature will remain in the cache for
the Image.

When we have another object hash to the same slot as this signature, we
must check if the two signatures are actually equal, that is if they are
equal keys or a hash collision. In this check we will refer to the
MonoType in the freed ImageSet.

By moving the caches containing inflated type references into the ImageSets
holding these inflated types, we ensure that the cache items are always safe
to dereference.

Why not simply remove the signatures from all caches they contain on
freeing the signature? This is much more work. A signature with a dozen
type parameters in a dozen images may have been used as a key in any of these
images. We would have to check all caches in all images the signature
refers to. As these caches use open addressing, in the worst time this
can take

```
(# images in signature) x (# caches per image) x (# of slots traversed on average)
```

steps. By placing it on the ImageSet, this takes only the steps required
to free a hash table. It is also easier to reason about.

Changes by Rodrigo Kumpera:

Added locking comments to the new fields in MonoImageSet.

Fixed the selected cache in mono_marshal_get_delegate_begin_invoke, mono_marshal_get_delegate_end_invoke,
mono_marshal_get_delegate_invoke_internal and mono_marshal_get_synchronized_wrapper.

The original code was using the image set of the class instead of the IS of the inflated method. This would
pick the wrong image if the method belonged to a different IS.
2015-07-28 01:26:18 -04:00
Rodrigo Kumpera 12e265cda6 [marsha] Use TRUE instead of 1 for setting a boolean field. 2015-07-28 01:26:18 -04:00
Alexander Kyte c905bcb682 [runtime] Copy signature return type when copying MonoMethodSignature
This commit also removed an extra signature duplicator living in
marshal.c, so that this fix is used consistently
2015-07-28 01:26:18 -04:00
Zoltan Varga 46fae9b2bf [runtime] Make the code more c++ clean by renaming this->this_obj. 2015-07-27 22:35:57 -04:00
Zoltan Varga eef9c63910 [jit] Make the jit code more c++ clean by renaming class->klass and this->this_arg/this_ins. 2015-07-27 22:35:57 -04:00
Zoltan Varga 7f84b17dde Merge pull request #1950 from akoeplinger/fix-responsefile-win
[build] library.make: Avoid collisions in response file name for facades on Windows
2015-07-27 20:59:47 -04:00
Rodrigo Kumpera 187bc41b1a Merge pull request #1943 from alexrp/profiler-improvements
Follow-up to #1926
2015-07-27 19:10:23 -04:00
Alexander Köplinger 173c89af23 [build] library.make: Avoid collisions in response file name for facades on Windows
When additional facades were added in 04114a5e9d, the Windows Cygwin build broke.
Turns out, when building the System.IO.Comporession facade assembly it wanted to use the SharpCompress sources
of the real assembly and couldn't find it (which made no sense since since the facade doesn't even list them in
its .sources file).

After inspecting library.make what happens is this: the response file is defined as $(PROFILE)_$(LIBRARY).response,
but this results in the same value for both the real assembly and the facade assembly.
This means that since the real assembly was compiled first, the response file contained the source list of the real
assembly - which was then used to compile the facade (make happily reused the response file since it already existed).

The fix is to put $(LIBRARY_SUBDIR) into the filename so the facade assembly gets a different response file.
Same for the makefrag.
2015-07-27 15:37:47 -07:00
Alex Rønne Petersen 0329a0f6d4 [runtime] Add docs for new domain and context API functions. 2015-07-28 00:36:22 +02:00
Zoltan Varga 37922e383f [runtime] Make some headers c++ clean. 2015-07-27 18:25:59 -04:00
Marek Safar 2f763d7e69 [mcs] Fix obsolete checks on resolved types when type is inflated generic type with concrete type arguments. 2015-07-27 20:10:21 +02:00
Bernhard Urban 427e3f59fe [mono-config] use right type for result of strlen 2015-07-27 10:38:42 -07:00
João Matos bb4e6d08ef Merge pull request #1923 from lukaszunity/start-managed-process-fix
Process.Start fix for managed program
2015-07-27 16:43:40 +01:00
João Matos d42301073e Merge pull request #1948 from akoeplinger/fix-httplistener-test-race
[System] Fix race condition in HttpListenerTest.ConnectionReuse test
2015-07-27 14:23:28 +01:00
Alexander Köplinger fb3d728e6a [System] Fix race condition in HttpListenerTest.ConnectionReuse test
There was a race so that sometimes ipEndPoint wasn't yet assigned when the method returned,
which resulted in the test failing like this:

 MESSAGE:  reuse1
  Expected: <127.0.0.1:54370>
  But was: null

To fix this the race, we now wait until ipEndPoint is assigned before returning.

The test was actually disabled on Android because of this (see 7cb4cc9c0e),
we can reenable it again as it should now work fine.
2015-07-27 15:17:58 +02:00
Marek Safar 8861e7bed6 [mcs] Reset doc reader state after expression bodied property. Fixes #32456 2015-07-27 14:11:33 +02:00
Marcos Henrich 3360de9221 Merge pull request #1909 from esdrubal/reflection
[SRE] Implemented missing SRE features.
2015-07-27 12:43:38 +01:00
João Matos 5aa729c24c Merge pull request #1947 from directhex/fix-kfreebsd
mono-threads-linux.c also applies to other OSes with GNU userland
2015-07-27 11:34:37 +01:00
Marek Safar 0db4e1775e [build] Remove generated files 2015-07-27 12:31:29 +02:00
Jo Shields 60635f32f8 mono-threads-linux.c also applies to other OSes with GNU userland
Fixes a build failure for GNU/kFreeBSD (which doesn't use mono-threads-freebsd.c, since GNU/kFreeBSD doesn't have pthread_np.h)
2015-07-27 09:20:47 +01:00
Marek Safar e7c058d61d Merge pull request #1941 from kasthack/system.web-fixes
[System.Web] Abstractions from reference source
2015-07-27 09:09:23 +02:00
Zoltan Varga 916766dc5a Merge pull request #1946 from markbeaton/markbeaton-tzaustralia
GetSystemTimeZones() not returning Australia zones
2015-07-26 22:43:30 -04:00
Mark Beaton c4810a3529 GetSystemTimeZones() not returning Australia zones
A call to TimeZoneInfo.GetSystemTimeZones() is not returning any of the timezones for Australia due to the "Australia" string being missing from the array of continents used to look up the zoneinfo data at /usr/share/zoneinfo. This patch adds the "Australia" value to the array.
2015-07-27 11:59:49 +10:00
Alex Rønne Petersen 52d6551c35 [profiler] Describe buffer size arithmetic with comments. 2015-07-26 22:09:45 +02:00
Marek Safar 8f49323033 Merge pull request #1944 from akoeplinger/remove-net40-ifdefs
[bcl] Remove NET_4_0 defines from class libs
2015-07-26 20:23:09 +02:00
Alexander Köplinger 98cf04084a [bcl] Remove NET_4_0 defines from class libs
NET_4_0 is always defined now, so the ifdefs are redundant.
I verified the libs are exactly the same after this change, so this is effectively a no-op.
2015-07-26 15:01:49 +02:00
Zoltan Varga a8990aca6c Merge pull request #1942 from akoeplinger/net4x
[build] Fix a few Makefiles to correctly use net_4_x instead of net_4_5
2015-07-25 15:46:13 -04:00
Alexander Köplinger b833f8b30d [RabbitMQ.Client] Add generated net_4_x-api-*.cs specs files and remove outdated ones 2015-07-25 17:47:29 +02:00
Alexander Köplinger 3a71f84cca [build] Fix a few Makefiles to correctly use net_4_x instead of net_4_5 2015-07-25 17:47:29 +02:00
Alexander Köplinger 4028c58a4c [Microsoft.Build] Fix name of framework directory in xbuild-testing RedistList
Fixes the BuildCommonResolveAssemblyReferences test that failed after the net_4_5 -> net_4_x switch.
2015-07-25 17:11:16 +02:00
Zoltan Varga 0d06636cde Revert "[jit] Allow NEW_AOTCONST () to work in JIT mode too, use this to simplify some code."
This reverts commit bf736f6c59.

Revert this as it seems to break the build.
2015-07-24 22:12:13 -04:00
kasthack 33a77c8635 [System.Web] Abstractions from reference source 2015-07-25 04:38:52 +03:00
Zoltan Varga bf736f6c59 [jit] Allow NEW_AOTCONST () to work in JIT mode too, use this to simplify some code. 2015-07-24 21:25:37 -04:00
Zoltan Varga ee1d6935f6 Fix installing resgen.exe. 2015-07-24 20:38:06 -04:00
Zoltan Varga 3cda046b61 Merge pull request #1940 from lewurm/master
[mono-config] update path to libMonoPosixHelper in runtime/ as well
2015-07-24 17:59:42 -04:00
Bernhard Urban 404f1d36de [mono-config] update path to libMonoPosixHelper in runtime/ as well 2015-07-24 14:33:34 -07:00
Zoltan Varga 51a23d5e2c Merge pull request #1939 from madewokherd/monoconddestroy
Define mono_cond_destroy on non-Windows.
2015-07-24 15:28:11 -04:00
Vincent Povirk bac1253103 Define mono_cond_destroy on non-Windows.
This commit is licensed as MIT/X11.
2015-07-24 14:06:55 -05:00
João Matos e730508206 [runtime] Rewrite MonoContext code to work via libunwind.
The latest Xcode 7 beta 4 SDK disallows usage of getcontext and friends.
2015-07-24 19:58:59 +01:00
João Matos 1b5578850f [runtime] Compile fixes for WatchOS. 2015-07-24 19:58:58 +01:00
João Matos 1bb19880fa [sgen] Adapt Mach OS support code to work with cooperative GC. 2015-07-24 19:58:58 +01:00
João Matos fb5301d74a [runtime] Workaround lack of Mach thread abort / suspend. 2015-07-24 19:58:57 +01:00
João Matos 90972a343b [runtime] Make console code work without HAVE_SIGACTION. 2015-07-24 19:58:57 +01:00
João Matos 0933c09608 [eglib] Workaround lack of raise(). 2015-07-24 19:58:56 +01:00
João Matos d3726dcde9 [runtime] Workaround lack of signal(). 2015-07-24 19:58:55 +01:00
João Matos c7a3b7fb65 [runtime] Workaround lack of pthread_kill(). 2015-07-24 19:58:55 +01:00
João Matos 8228d27d17 [runtime] Workaround lack of kill(). 2015-07-24 19:58:54 +01:00
João Matos 9b02d42462 [runtime] Check for kill function in Autoconf. 2015-07-24 19:56:17 +01:00
João Matos 0b76c6ac8c [runtime] Check for signal function in Autoconf. 2015-07-24 19:56:16 +01:00
Zoltan Varga 223e634cf5 Merge pull request #1938 from saper/updates_signal
[mswin][build] unbreak windows build on 'updates_signal'
2015-07-24 14:53:42 -04:00
Marcin Cieslak d8268196f8 [mswin][build] unbreak windows build on 'updates_signal' 2015-07-24 18:49:53 +00:00
Marek Safar 5acdd41356 [Mono.Debugger.Soft] Exclude invalid C# code 2015-07-24 18:10:11 +02:00
Marek Safar 7d2ce49ae4 [mcs] Fix crash during ambiguous implementation of the query pattern error reporting. Fixes #32060 2015-07-24 17:29:53 +02:00
Marek Safar fe16436401 [build] Use DEFAULT_PROFILE from configure to avoid problems with RUNTIME redefinition 2015-07-24 15:53:10 +02:00
Marek Safar 7eb3fb7aea [mcs] Report error when an expression tree contains a collection initializer with extension method 2015-07-24 15:53:10 +02:00
Marek Safar bbec52b880 [mcs] struct parameterless instance constructor feature was removed from C#6 for compatibility reasons 2015-07-24 15:53:10 +02:00
Marek Safar 8cdfcab598 [mcs] Change used assemblies checks to run on referenced (metadata written) assemblies only. Fixes #31933 2015-07-24 15:53:09 +02:00
Marcos Henrich aab7e2a47d [System] UriKind.RelativeOrAbsolute workaround.
In .NET an URI constructor from "/foo" and UriKind.RelativeOrAbsolute is
relative whereas in mono it is assumed as an absolute file path.

This provides supports for an easy workaround to make mono behave as
.NET.

The workaround consists in defining DotNetRelativeOrAbsolute and using
it instead of UriKind.RelativeOrAbsolute.

DotNetRelativeOrAbsolute should be defined as follows:

static UriKind DotNetRelativeOrAbsolute = (Type.GetType ("Mono.Runtime")
== null)? UriKind.RelativeOrAbsolute : (UriKind) 300;
2015-07-24 09:58:41 +01:00
Zoltan Varga e1101a5eb1 [runtime] Avoid stack overflow when marshalling an out stringbuilder argument in pinvoke callbacks. Fixes #31932. 2015-07-23 23:08:39 -04:00
Zoltan Varga d44657503a [arm] Allocate thunk space for tail calls. Fixes #32179. 2015-07-23 22:09:27 -04:00
Miguel de Icaza e6de431a54 [mono-config] Apply fix from Bernhard Urban 2015-07-23 17:11:56 -05:00
Miguel de Icaza d370e923a9 Undo the previous patch, as it contained an incorrect +3 in the size computation; Use my version instead 2015-07-23 16:53:26 -05:00
Miguel de Icaza 70920b3d66 Merge pull request #1937 from lewurm/master
mono: Use the relocated directory for finding support libraries in data/config
2015-07-23 16:45:35 -05:00
Bernhard Urban 6b5f6dd043 mono: Use the relocated directory for finding support libraries in data/config 2015-07-23 14:32:24 -07:00
BrennanConroy 429ee4b162 More robust get_address_info
We have been running into this issue: https://bugzilla.xamarin.com/show_bug.cgi?id=30018 a lot recently, after digging into getaddrinfo a bit we saw that the linked list of addrinfo structs had 1 or more valid ones which can be used and 1 bad one which should just be discarded.
2015-07-23 11:52:29 -07:00
Marek Safar 3aa5330d7e Bump reference sources 2015-07-23 15:57:01 +02:00
Marek Safar 366c2882f8 [corlib] ToUpper/ToLower have different rules for invariant culture. Fixes #31900.
Updated missing unicode to-upper/to-lower mappings and move all code to managed.
2015-07-23 15:08:17 +02:00
Zoltan Varga 71945fbdb9 [gsharedvt] Set exception_message when disabling LLVM. 2015-07-22 20:28:30 -04:00
Zoltan Varga b8c3006400 [arm] Enable support for a few more calling conventions for LLVM. 2015-07-22 20:28:30 -04:00
Zoltan Varga 9677d59cca Merge pull request #1935 from alexanderkyte/xdebug-refix
[runtime] Disable functions that call functions which require the bin writer if the bin writer is disabled.
2015-07-22 16:56:49 -04:00
Alexander Kyte 381003dfd4 [runtime] Disable functions that call functions which require the bin writer if the bin writer is disabled. 2015-07-22 16:54:42 -04:00
Marek Safar e2d95bf0a5 [xbuild] Add 14.0 toolsets path 2015-07-22 10:36:07 +02:00
Marek Safar bdf33794f7 [System.Configuration] Update default profile and remove old profiles files 2015-07-22 10:34:08 +02:00
Marek Safar 3a12d84673 [System.Data] Fixes make dist 2015-07-22 10:31:34 +02:00
Marek Safar d1c5a3e90b [System.Web.Extensions] Update default profile and remove old profiles files 2015-07-22 10:20:49 +02:00
Marek Safar aedaab80da [System.Web] Update encoded profile name 2015-07-22 10:06:50 +02:00
Marek Safar 67a198548c [System.Web.DynamicData] Update default profile and remove old profiles 2015-07-22 09:45:38 +02:00
Marek Safar 0779ff1eac [System.Xaml] Update default profile and remove old profiles 2015-07-22 09:01:39 +02:00
Marek Safar 672207f976 [build] Use DEFAULT_PROFILE from configure to avoid problems with RUNTIME redefinition 2015-07-22 08:55:21 +02:00
Marek Safar 825b328d65 [xbuild] Update tests default profile 2015-07-22 07:59:00 +02:00
Zoltan Varga 5911c63d74 [arm64] Add a test for passing HFA arguments on the stack. 2015-07-21 20:47:36 -04:00
Marek Habersack 4e5bf79f74 [tests] Android 4.4.4 doesn't have signal(2) 2015-07-22 00:15:48 +02:00
Marek Habersack 5c75836975 [tests] Fix path used by the test so that it works on Android 4.4.4 2015-07-22 00:15:48 +02:00
Marek Habersack fdc0f08ba9 [tests] Disable on Android, getpwnam_r doesn't exist there 2015-07-22 00:15:47 +02:00
Marek Habersack 6e170a7673 [tests] Don't assume CWD is writable
Use temporary path instead. CWD is / on Android and is not writable
2015-07-22 00:15:47 +02:00
Marek Habersack cfcc767916 [tests] Nunit syntax helpers don't exist in Xamarin.Android 2015-07-22 00:15:46 +02:00
Zoltan Varga 50b427db9d [llvm] Fix a problem introduced by 4a685f44c8, the size of the return type was computed incorrectly. 2015-07-21 18:11:38 -04:00
Rodrigo Kumpera 586b6b67e2 [profiler] Correct the profiler format. 2015-07-21 17:51:25 -04:00
Rodrigo Kumpera 4c066cf265 [profiler] Use version 11 for the 4.2 profiler changes plus fix docs on format. 2015-07-21 17:37:41 -04:00
Rodrigo Kumpera 7151c3c283 Merge pull request #1926 from alexrp/profiler-improvements
More profiler improvements
2015-07-21 16:38:35 -04:00
Zoltan Varga 62d46354b7 [runtime] Avoid including mcs/build/config.make into mini/Makefile.am, it can overwrite all kinds of make variables. Pass DEFAULT_PROFILE normally as an autoconf variable. 2015-07-21 15:59:12 -04:00
Rodrigo Kumpera 9e44c81c60 Merge pull request #1933 from alexrp/master
[runtime] Remove lock in context_adjust_static_data ().
2015-07-21 15:49:58 -04:00
Zoltan Varga b93ba8ceb2 [runtime] Rename mono_arch_find_jit_info () -> mono_arch_unwind_frame (). 2015-07-21 14:22:31 -04:00
João Matos fc79543407 [aot] Rewrite the options parser to properly handle arguments.
Basically our previous behaviour was just splitting strings by "," which did not behave as expected when passing strings.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=31996.
2015-07-21 19:09:30 +01:00
Marek Safar f711ae8624 [xbuild] Adjust tests profile path 2015-07-21 18:10:48 +02:00
Ludovic Henry f2a46d244e [runtime] Make sure EPOLLONESHOT is defined 2015-07-21 12:17:22 -03:00
Marek Safar e6701903ff [System.Web] Update InternalsVisibleTo to active test profiles only 2015-07-21 16:44:31 +02:00
Marek Safar 3f7e239a04 [System.Data] Rename default profile config file 2015-07-21 16:14:29 +02:00
Marek Safar d48c678e89 [corlib] Use better names for predefined encodings. Fixes #32137 2015-07-21 14:44:47 +02:00
Marek Habersack d5bd6b3e5e [test] Fix test on Android
On Android application runs with its CWD set to / and so the path
test modified in this commit expects to find a path of the //one form
which is not what the combine operation returns.
2015-07-21 11:16:19 +02:00
Marek Habersack 401571fa09 [tests] Disable some tests on Android due to missing APIs
bionic doesn't have the following entries:

  setgrent
  getgrnam_r
  setpwent

API 21 in the NDK conditionally declares some of those but they are absent
from either libc.so or libc.a.
2015-07-21 11:16:09 +02:00
Marek Safar e8da614827 [mcs] Set builder for partial method definition attributes. Fixes #31948 2015-07-21 11:11:48 +02:00
Alex Rønne Petersen f6f82dfe0c [runtime] Remove lock in context_adjust_static_data ().
The threads lock is already held when this function is called. Document this
fact and remove the harmless (but pointless) recursive locking.
2015-07-21 05:55:05 +02:00
Zoltan Varga 4e64d3aa69 [jit] Remove usage of MonoGenericSharingContext from most of the JIT. 2015-07-20 20:55:27 -04:00
Zoltan Varga bc4975452a Fix the build. 2015-07-20 20:30:35 -04:00
Rodrigo Kumpera df0bc54f44 [lock-tracer] Small improvements to the decoder. 2015-07-20 18:59:35 -04:00
Rodrigo Kumpera 5b216ba532 [mini] Fix locking order violation in mono_get_seq_points.
mono_get_seq_points takes the domain lock then calls mini_get_shared_method.

mini_get_shared_method then calls into general metadata code that eventually take
the loader lock.

The loader lock has precedence over the domain lock.
2015-07-20 18:59:35 -04:00
Rodrigo Kumpera 7c2e6265be [build] Rename RUNTIME variable to avoid clash with make.config's version
Starting with 62c86e2243 mono/mini/Makefile now includes mcs/build/config.make.
Both files define RUNTIME, but with different values. The mini one requires the usage of MONO_PATH while the one in
mcs don't.

To fix that we rename the mini var to MINI_RUNTIME.
2015-07-20 18:59:35 -04:00
Rodrigo Kumpera d61ccfbc62 [runtime] Fix locking in mono_image_file_for_image. 2015-07-20 18:59:35 -04:00
Zoltan Varga 573251d7f7 Fix the build. 2015-07-20 18:48:55 -04:00
Zoltan Varga 87728b143e [jit] Remove the usage of MonoGenericSharingContext from the back-ends, its no longer needed. 2015-07-20 18:25:26 -04:00
Zoltan Varga d60c514556 [jit] Remove mini_replace_type (), use mini_get_underlying_type () instead. 2015-07-20 17:55:28 -04:00
Zoltan Varga c5c2fecd7d [jit] Remove the MonoGenericContext/MonoCompile arguments from the various mini_type_is/mini_is_gsharedvt etc. functions, the types are now self-describing, i.e. its possible to determine whenever they are gshared, gsharedvt, etc. without consulting a MonoGenericContext. Remove mini_type_get_underlying_type (), use mini_get_underlying_type () instead. 2015-07-20 17:50:00 -04:00
Zoltan Varga bcf4f87ada [jit] Remove class init trampolines, use the same code for generic and non generic class inits, implement the slowpath using a JIT icall. 2015-07-20 15:33:30 -04:00
Ludovic Henry 5fd4126ac5 [threadpool-ms-io] Factor update removing 2015-07-20 16:16:37 -03:00
Ludovic Henry fa26493017 [threadpool-ms-io] Remove socket synchronously from backend when closing socket
To achieve this, we need to wait for the update to be applied to the backend.

This is mainly for the epoll backend, as we do not need to remove the fd from the backend when using kqueue.
2015-07-20 16:16:37 -03:00
Zoltan Varga 5ea5df60f0 [gshared] Fix constrained partial calls to Object:GetType (). 2015-07-20 15:14:50 -04:00
Rodrigo Kumpera c99b83e2f2 [lock-decoder] Update it to include the threads lock. 2015-07-20 14:23:36 -04:00
Rodrigo Kumpera 610f14c247 [runtime] Safe publish MonoImage::name_cache and exploit that around the runtime. Fix ImageLock nested use. 2015-07-20 14:23:36 -04:00
Marek Safar f160bb5ccc [mcs] Add missing interpolated string segmnent clone. Fixes #32135 2015-07-20 19:33:02 +02:00
Marek Safar 2fa37e3e1c [mcs] Parentheses expression can act as conditional access receiver. Fixes #32130 2015-07-20 18:41:06 +02:00
Marek Safar 55b4897568 [build] Clean up cross referenced files 2015-07-20 15:26:07 +02:00
Marek Safar 929c7de580 [mcs] Resolve nullable expression before unwrapping. Fixes #32054 2015-07-20 14:10:31 +02:00
Alexander Köplinger b90bd85f87 [System.ServiceModel.Web] Fix tarball generated by "make dist"
System.Runtime.Serialization.Json/JavaScriptReader.cs is needed by the System.Json assembly, but in
d44898a230 it was removed from net_2_0_System.ServiceModel.Web.dll.sources
which means it wasn't included in the tarball anymore and building it failed.

Fixing the tarball by including the file in EXTRA_DISTFILES.
2015-07-20 13:21:00 +02:00
Marek Safar c65aec96e4 Merge pull request #1931 from kasthack/system.web-fixes
[System.web] Reference source imports + HttpApplication fix
2015-07-20 10:27:49 +02:00
Zoltan Varga 68ad97bc53 [jit] Remove the support for MONO_ARCH_NOTIFY_PENDING_EXC, it only works on amd64, and its not worth the complexity. 2015-07-19 23:26:16 -04:00
Zoltan Varga 1cd9c24be1 [jit] Use mini_type_get_underlying_type () instead of mini_get_basic_type_from_generic (), make the latter static. 2015-07-19 22:24:21 -04:00
Radek Doulik 4d824ec1d4 [linker] Instead of preserving every method with a [Register] attribute...
[merged from monodroid by rodo]

part of

commit 0b9c100b60fc2502a0d6347d50cac444bb82b285
Author: Jonathan Pobst <[email protected]>
Date:   Wed Sep 28 15:50:39 2011 -0500

    Instead of preserving every method with a [Register] attribute on it in Mono.Android.dll, only save the things that the user actually uses.  Reduces HelloWorld release apk by ~1.3MB.
2015-07-19 10:42:43 +02:00
Radek Doulik 85ef32720f [linker] return count of marked methods
[merged from monodroid by rodo]

 - part of

commit 216f75038afee2105182fc6af329f1fc83c4298f
Author: Radek Doulik <[email protected]>
Date:   Sun Nov 23 11:40:42 2014 +0100

    [linker] mark methods (from Register attr) in base type when needed

     - fixes #10268
     - methods from these Register attributes were not marked:

       https://github.com/xamarin/monodroid/blob/master/src/Mono.Android/src/Android.Widget/AdapterView.cs#L132-135

       because the app used class derived from BaseAdapter class and the methods
       existed only in the base class and were not marked
2015-07-19 10:42:24 +02:00
Radek Doulik 9cb1729ada [linker] fix Linking for assemblies with type forwarders (like PCL)
[merged from monodroid by rodo]

commit 840487dd904a5552f77dcc7388b27c37ca09169f
Author: Radek Doulik <[email protected]>
Date:   Thu Oct 16 20:03:58 2014 +0200

     - sometime the assemblies with action set to Copy still might
       contain type references to forwarders and thus point to
       Delete assemblies, which are removed during linking, resulting
       in unresolvable type references

     - fixes https://bugzilla.xamarin.com/show_bug.cgi?id=23617
       XA forms template now builds and works OK
       XA app template builds and works OK
2015-07-19 10:42:03 +02:00
Radek Doulik c0ac993ec5 [linker] process only .xml files, catch xml exceptions
[merged from monodroid by rodo]

commit f51f044e30b822f191777a395563ef9d46f8b69d
Author: Radek Doulik <[email protected]>
Date:   Wed Mar 4 18:28:59 2015 +0100

     - fixes #27620

     - in this case we were trying to process Application.java
       as linker an assembly XML linker description, which led
       to uncaught XmlException
2015-07-19 10:41:36 +02:00
Radek Doulik f8180827a5 [linker] In ResolveFromXmlStep, bail if no <linker> element is found.
[merged from monodroid by rodo]

commit 2edecdc39ca55c65de4f57557e5e31b5d432eaa4
Author: Alex Rønne Petersen <[email protected]>
Date:   Mon Jul 1 15:35:59 2013 +0200

    The BlacklistStep pass will feed the ResolveFromXmlStep pass XML files
    that may not necessarily *be* linker descriptor files. This can happen
    if an embedded file happens to be named "Foo.Bar.xml" and an assembly
    called Foo.Bar is referenced in a project. The chances of this happening
    are probably very low, but better safe than sorry.
2015-07-19 10:40:50 +02:00
Radek Doulik 6685432a97 [linker] Fortify the BlacklistStep.
[merged from monodroid by rodo]

commit 3001f693c52be0da673446179daf498265024867
Author: Alex Rønne Petersen <[email protected]>
Date:   Tue Jul 30 20:06:21 2013 +0200

    1. Catch XmlExceptions in case of broken XML files.
    2. Only process files that actually end in ".xml".
2015-07-19 10:40:28 +02:00
Radek Doulik 7db10d04cb [linker] Support linker descriptor files embedded in the assemblies being linked.
[merged from monodroid by rodo]

commit 3e19b22eb24ff9faeebe1ace7461d8f91f807041
Author: Alex Rønne Petersen <[email protected]>
Date:   Mon Jul 1 15:34:26 2013 +0200

    This is in addition to those files that are already embedded in the linker assembly
    itself (such as mscorlib.xml). People can use this feature to tell the linker that
    certain methods/fields/types must be kept if a particular assembly is being referenced
    by embedding a descriptor file in it.
2015-07-19 10:40:14 +02:00
kasthack 276f80b066 [System.Web] Imported some interfaces, attributes and enums from reference source:
ISubscriptionToken, IModelNameProvider, BindingBehaviorAttribute, BindingBehavior, BindNeverAttribute, BindRequiredAttribute, ExtensibleModelBinderAttribute, ModelBinderProviderOptionsAttribute,  CodeCharts,  WebBrowsableAttribute, WebDescriptionAttribute, WebDisplayNameAttribute, AspNetWebSocketOptions
2015-07-18 18:30:15 +03:00
kasthack 8a5df4cdf1 [System.Web] Made HttpApplication method parameters match reference version 2015-07-18 17:39:05 +03:00
Marek Safar 2467550865 [System.Web] Fixes make dist 2015-07-18 07:37:02 +02:00
Marek Safar 904ca259ce [mcs] Update to latest mscorlib 2015-07-17 22:17:29 +02:00
Marek Safar 51bf97f97a [build] Update facades to mobile profiles 2015-07-17 16:38:40 +02:00
Marek Safar 60c0670022 [Facades] Add partial facades with missing (unknown) types 2015-07-17 14:51:22 +02:00
Marek Safar 8eeb73cd69 [System.Numerics.Vectors] Fixes public key 2015-07-17 09:34:38 +02:00
Zoltan Varga 508147e22d Fix a warning. 2015-07-16 20:12:33 -04:00
Zoltan Varga 4a685f44c8 [llvm] Add support for returning vtypes as a scalar, this is used on arm64. 2015-07-16 17:32:18 -04:00
Mark Probst 179a700b34 [sgen] Don't crash on canaries when called from mono_gc_scan_for_specific_ref().
This function is only ever called from the debugger, and we don't want
it to crash when a canary has been overwritten.
2015-07-16 13:48:28 -07:00
Ludovic Henry 894d4033e9 [threadpool-ms] Use define for monitor thread minimal lifetime 2015-07-16 16:32:18 -03:00
Ludovic Henry 408d052b33 [threadpool-ms] Fix monitor thread starting and ending at a multiple times per second 2015-07-16 16:25:47 -03:00
Marek Safar 70ffb46c6c [Facades] Add missing folder 2015-07-16 21:12:19 +02:00
Marek Safar 34dc31f4cc Remove aggressive filter 2015-07-16 21:11:48 +02:00
Marek Safar ffcba69d63 [build] Add System.Numerics.Vectors skeleton 2015-07-16 20:58:11 +02:00
João Matos 6fd8b69507 [runtime] Implemented MonoContext for WatchOS using ucontext.
We cannot use inline assembly for WatchOS.
2015-07-16 18:55:24 +01:00
Marek Habersack 9b35dc2e9c [tests] Fix tests on OS/X
OS/X, like Android, uses a symlink for the $TMP directory. The tests used to assume
that the link points to the /private/tmp directory (which is the case) but earlier
changes introduced here for Android employed a more generic mechanism to determine the
actual temporary directory.
This commit removes the '/private' prefix assumption from OS/X
2015-07-16 17:56:14 +02:00
Marek Safar 04114a5e9d [Facades] Add v3 facades 2015-07-16 17:32:04 +02:00
Marek Habersack b9cff43b3c [tests] 4.x profiles produce test assembly suffixed with 4_x now 2015-07-15 21:47:34 +02:00
Marek Habersack 9c6a9ea9b4 [tests] corlib tests are in corlib_test_net_4_x.dll now 2015-07-15 21:36:12 +02:00
Marek Habersack 04288920cc [tests] Disable until a server that works is found
This test depends on server behavior. I changed the server to xamarin.com
earlier on, but it stopped behaving as required recently. The test should
not rely on random servers, so until we have a server we can rely on I'm
disabling it.
2015-07-15 20:45:42 +02:00
Marek Habersack 78a9ce5b5c [tests] Crashes on Android 64-bit
Disable for all other architectures as well, as there's not enough
flexibility in this respect :(
2015-07-15 20:45:42 +02:00
Marek Habersack 7d357b299a [tests] Disable on Android due to runtime segfault
The Dispose call in FakeSafeHandle causes the Mono runtime to segfault
when passing the call up the chain. As a consequence of disabling the
base class call, the other tests disabled by this commit fail.
2015-07-15 20:45:41 +02:00
Marek Habersack cf14441d39 [tests] Runtime segfaults on Android, probably due to AppDomain.Unload 2015-07-15 20:45:40 +02:00
Marek Habersack 58060d3703 [tests] Disable tests not working on mobile platforms 2015-07-15 20:45:40 +02:00
Marek Habersack 5fb344b4d3 [tests] Add Xamarin.Android assembly name to list of probes 2015-07-15 20:45:39 +02:00
Marek Habersack 0a6e2a2ca2 [tests] Disable on Android due to environment differences
Assemblies in Xamarin.Android cannot be accessed as FileStream/files directly
2015-07-15 20:45:39 +02:00
Marek Habersack 7dcd6b480f [tests] Adjust the test for Android-specific behavior 2015-07-15 20:45:38 +02:00
Marek Habersack 6013224ecf [tests] Disable on Android due to environment differences
Xamarin.Android doesn't ship with the Mono.Compilerservices.SymbolWriter
assembly that is required by this test.
2015-07-15 20:45:38 +02:00
Marek Habersack 35f885dd2d [tests] Assembly.GetEntryAssembly works differently on Android
There's no entry assembly as such, adjust the test accordingly.
2015-07-15 20:45:37 +02:00
Marek Habersack 7a37a57bb5 [tests] Disable on Android due to environment differences
It's not possible to save the assembly in the current directory on Android and AssemblyBuilder.DefineDynamicModule will not
allow a full path to the assembly to be passed to it. Trying to change the current directory before saving will not work either as
FileStream will then prepend / to the file name (perhaps it's another bug) and write access to the filesystem root is, obviously, denied
2015-07-15 20:45:36 +02:00
Marek Habersack a53f6769cc [tests] Disable on Android due to environment differences
Xamarin.Android doesn't ship with the Mono.Compilerservices.SymbolWriter
assembly that is required by this test.
2015-07-15 20:45:36 +02:00
Marek Habersack 70511efc74 [tests] Disable on Android
Fails with System.MethodAccessException : Method `t17:.ctor ()' is inaccessible from method `t18:.ctor ()'
2015-07-15 20:45:35 +02:00
Marek Habersack 0e59c71dee [tests] Disable parts relying on APIs not in Mobile Profile 2015-07-15 20:45:35 +02:00
Marek Habersack 920da6b14f [tests] The test crashes the runtime 2015-07-15 20:45:34 +02:00
Marek Habersack 69014a0326 [tests] Disable code to prevent Mono runtime crash
AppDomain unloading causes a segfault with the Mono runtime on Android.
Until the cause is found and fixed this code must remain disabled.
2015-07-15 20:45:34 +02:00
Marek Habersack cc34b03b2f [tests] Disable on Android due to environment differences
Xamarin.Android doesn't ship with the Mono.Compilerservices.SymbolWriter
assembly that is required by this test.
2015-07-15 20:45:33 +02:00
Marek Habersack cadd1396cb [tests] Disable on Android due to environment differences
DefineResource doesn't allow path in its fileName parameter and the
test attempts to write to / in effect (which is the default CWD for
Android apps)
2015-07-15 20:45:32 +02:00
Marek Habersack 4bc5192886 [tests] Xamarin.Android works the same way as the desktop Mono 2015-07-15 20:45:32 +02:00
Marek Habersack 947e37c028 [tests] Adjust test to work in unsupported scenarios
On Android (possibly on other systems too) it is possible that no gateway address is available and its lack is NOT an error
Here is a sample of /proc/net/route from Nexus 9 running Android 5.1.1 (IPInterfaceProperties parses that file on Linux)

  Iface	Destination	Gateway 	Flags	RefCnt	Use	Metric	Mask		MTU	Window	IRTT
  wlan0	0001A8C0	00000000	0001	0	0	0	00FFFFFF	0	0	0

Gateway is set to any address and it is explicitly ignored by the route information parser

For comparison, here's route contents from an Android 4.4.4 device:

  Iface	Destination	Gateway 	Flags	RefCnt	Use	Metric	Mask		MTU	Window	IRTT
  wlan0	00000000	0101A8C0	0003	0	0	0	00000000	0	0	0
  wlan0	00000000	0101A8C0	0003	0	0	203	00000000	0	0	0
  wlan0	0001A8C0	00000000	0001	0	0	0	00FFFFFF	0	0	0
  wlan0	0001A8C0	00000000	0001	0	0	0	00FFFFFF	0	0	0
  wlan0	0001A8C0	00000000	0001	0	0	203	00FFFFFF	0	0	0
  wlan0	0101A8C0	00000000	0005	0	0	0	FFFFFFFF	0	0	0

Obviously, this test fails on the first device and succeeds on the second. For this reason the test is modified to succeed
in case of devices like the first one since it's not a real failure but a shortcoming of the .NET API
2015-07-15 20:45:31 +02:00
Marek Habersack 2378ff1a8c [tests] Fix tests which rely on temp dir location being a real dir
Android M (that's where I ran into it) makes the path returned by
Path.GetTempPath () a symlink to the real directory used for temporary
files. When the tests change the directory the symlink is followed and
subsequent reads of the current directory name will return the real dir
name which doesn't match what was constructed using the value returned by
GetTempPath ()
2015-07-15 20:45:31 +02:00
Marek Habersack ce550dff61 [tests] Fails on Android ARM64
The test works on all the other supported architectures but segfaults on
ARM64 (Nexus 9 running Lollipop 5.1.1)
2015-07-15 20:45:30 +02:00
Marek Habersack 497d8fa71e [test] Disable on Android for now
The test throws the following exception

  MonoTests.System.Security.Cryptography.AesCfbTests.Roundtrip=System.Security.Cryptography.CryptographicException : Bad PKCS7 padding. Invalid length 236.
  at Mono.Security.Cryptography.SymmetricTransform.ThrowBadPaddingException (PaddingMode padding, Int32 length, Int32 position) <0x3bf26858 + 0x000bb> in <filename unknown>:0
  at Mono.Security.Cryptography.SymmetricTransform.FinalDecrypt (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) <0x3bf264f8 + 0x0022f> in <filename unknown>:0
  at Mono.Security.Cryptography.SymmetricTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) <0x3bf219b0 + 0x00077> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.CfbTests.Decryptor (System.Security.Cryptography.SymmetricAlgorithm algo, System.Byte[] encdata) <0x3bf261f8 + 0x00221> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.CfbTests.CFB (System.Security.Cryptography.SymmetricAlgorithm algo, Int32 feedbackSize) <0x3bf20000 + 0x0011b> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.AesCfbTests.CFB (System.Security.Cryptography.SymmetricAlgorithm algo) <0x3ca53ef0 + 0x00043> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.CfbTests.ProcessPadding (System.Security.Cryptography.SymmetricAlgorithm algo) <0x3ca53e80 + 0x0004f> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.CfbTests.ProcessKeySizes (System.Security.Cryptography.SymmetricAlgorithm algo) <0x3bf3fc20 + 0x000b7> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.CfbTests.ProcessBlockSizes (System.Security.Cryptography.SymmetricAlgorithm algo) <0x3bf3f910 + 0x0007b> in <filename unknown>:0
  at MonoTests.System.Security.Cryptography.AesCfbTests.Roundtrip () <0x3bf3cf28 + 0x00073> in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x3bf3cc10 + 0x0008f> in <filename unknown>:0
2015-07-15 20:45:30 +02:00
Marek Habersack a0de21663e [tests] Don't use Assembly.Location on Android
Assembly.Location will contain just the assembly file name without any path, which
is not what the test(s) expect. The reason is that the assemblies on Android live
in the APK, are embedded in the native code or don't exist at all (AOT)
2015-07-15 20:45:29 +02:00
Marek Habersack 4ba51b2d63 [tests] Android behaves the same as desktop Mono
The same exceptions are thrown in Xamarin.Android, unlike in Xamarin.iOS which
behaves differently to desktop Mono
2015-07-15 20:45:29 +02:00
Marek Habersack 7cb4cc9c0e [tests] Disable for Android
The test works when only its fixture is ran, fails when ran as part of the
entire BCL test suite.
2015-07-15 20:45:28 +02:00
Marek Habersack be7f5259eb [tests] Disable because URL is no longer there
The test relies on presence of a specific file that is now gone. Disabled
until a stable URL is found :P
2015-07-15 20:45:27 +02:00
Marek Habersack a34f519919 [tests] Disable for Android
The test works when only its fixture is ran, fails when ran as part of the
entire BCL test suite.
2015-07-15 20:45:27 +02:00
Marek Habersack 278a97c61e [tests] Disable for Android
The test works when only its fixture is ran, fails when ran as part of the
entire BCL test suite.
2015-07-15 20:45:26 +02:00
Marek Habersack 4415d1f58e [tests] Android doesn't have access to Assembly.Location
Attempts to access the test dll which won't work on Android since the
dll is either in the apk or bundled in the native code or not there at
all (AOT)
2015-07-15 20:45:26 +02:00
Marek Habersack 405e9df234 [tests] Disable for Android
The tests work fine if only this fixture is ran, they fail when ran as part
of the entire test suite.
2015-07-15 20:45:25 +02:00
Marek Habersack efb7ced9c9 [tests] Disable for Android
The tests work fine if only this fixture is ran, they fail when ran as part
of the entire test suite.
2015-07-15 20:45:25 +02:00
Marek Habersack 0d8a22b3a0 [tests] System zlib errors out for these on Android 2015-07-15 20:45:24 +02:00
Marek Habersack 7dbce1ad58 [tests] Large locks not supported on Android
While bionic reports it supports 64-bit offsets for locks and exposes the
necessary APIs, attempt to use offsets larger than 32 bits results in
an error.
2015-07-15 20:45:23 +02:00
Marek Habersack f2d39fe696 [tests] The test hangs on Android 2015-07-15 20:45:23 +02:00
Marek Habersack 8948d49fec [tests] The test hangs on Android 2015-07-15 20:45:22 +02:00
Marek Habersack 28daa37f38 [tests] Use xamarin web server
http://elmundo.es/ started to send more than one cookie while
xamarin.com sends just one.
2015-07-15 20:45:22 +02:00
Marek Habersack 36288aca3a [tests] Don't assume specific charset
Don't assume a specific charset in HTTP response from a server. Google
changes response charset based on the country of the client's
IP. There's no point in checking for the specific charset, it's enough
to check whether the response header has correct format.
2015-07-15 20:45:21 +02:00
Marek Habersack 422f02adf2 [tests] Different CPUs have different precision
Fix the test to compare the subtraction result to value more
conservative than Double.Epsilon, to account for differences in
different CPU floating point units on Android.
2015-07-15 20:45:21 +02:00
Marek Habersack 389c66409b [tests] Use correct path in process tests
/bin/ls doesn't exist on Android, it's /system/bin/ls
2015-07-15 20:45:20 +02:00
Marek Habersack 2733407fb6 [test] There is no runtime directory on Android
We return an empty string which is considered to be a valid value in
Android. Adjust the test for that.
2015-07-15 20:45:20 +02:00
Marek Habersack 88160c4094 [tests] Use 2.1 profile assembly names for mobile 2015-07-15 20:45:19 +02:00
Marek Habersack 7cec10193b [tests] Make failures more descriptive and fix XA
The test failures didn't really indicate which of the Fail statements
caused the test failure. Also, the 10k offset turned out to be not
enough for the XA test suite (it's much bigger than that)
2015-07-15 20:45:18 +02:00
Marek Habersack c70e555970 [tests] Assembly.Location doesn't work on XA
Xamarin.Android stores assemblies inside apk (or bundled, or AOT-ed) and
so Assembly.Location will not point to a real path on the
filesystem. It merely contains assembly name.
2015-07-15 20:45:18 +02:00
Marek Habersack 39e0b4b507 [tests] No Mono.CompilerServices.SymbolWriter in XA 2015-07-15 20:45:17 +02:00
Marek Habersack debd0c9e8e [tests] No declarative security in mobile profile 2015-07-15 20:45:17 +02:00
Marek Habersack b28f08e67f [tests] Fix for when CWD is /
The test case doesn't account for the situation when the tests are ran
at the root of the Unix filesystem. This is, admittedly, a rare case on
Desktop but it's precisely what CWD is for Android processes. The test
would fail because it would get a path of the //Form instead of the /Form
2015-07-15 20:45:16 +02:00
Marek Habersack 3b0acf8d40 [tests] Works in stand-alone app, fails in nunit 2015-07-15 20:45:16 +02:00
Marek Habersack 9676c58e47 [tests] Fails on mobile with no details 2015-07-15 20:45:15 +02:00
Marek Habersack edaa4926a4 [tests] Doesn't work on mobile 2015-07-15 20:45:14 +02:00
Marek Habersack 8d71c9c4af [tests] Works in stand-alone app, fails in nunit 2015-07-15 20:45:14 +02:00
Marek Habersack 4a62b23240 [tests] Xamarin.Android has the desktop behavior 2015-07-15 20:45:13 +02:00
Marek Habersack ed03b96c7b [tests] Xamarin.Android already has the namespace 2015-07-15 20:45:13 +02:00
Marek Safar 978d44191a [build] Update missing file 2015-07-15 18:06:11 +02:00
Marek Safar 62c86e2243 [build] Update profiles path 2015-07-15 17:57:01 +02:00
Marek Safar 3d6a5aeada [build] Update profiles path 2015-07-15 17:34:54 +02:00
Marek Safar 7b48f80754 [Facades] More missing types 2015-07-15 17:30:20 +02:00
Marek Safar c9fe374985 [Facades] Update to 4.6 api 2015-07-15 16:35:59 +02:00
Marek Safar 0bc83209a0 [build] Update docs profile paths 2015-07-15 16:34:56 +02:00
Marek Safar d44898a230 [build] Switch to 4.6 profile as default profile 2015-07-15 16:10:19 +02:00
Marek Safar c4f0cacd96 Bump binary-reference-assemblies 2015-07-15 09:39:51 +02:00
Ludovic Henry 5839d38c24 [corlib] Use ManualResetEvent.WaitOne instead of Thread.Sleep to test Thread.Interrupt
This is because Thread.Sleep does not use the thread interrupt mechanism, while WaitHandle.{WaitOne, WaitAll and WaitAny} do
2015-07-14 19:04:15 -03:00
Ludovic Henry 02a15d6cf0 [runtime] Implement wait interrupt in thread info, instead of in the io-layer
This lets us take one more thing out of io-layer, to hopefully reduce it to a bare minimum some day.
2015-07-14 19:04:14 -03:00
Ludovic Henry 087e696c39 [utils] Remove dead code 2015-07-14 19:04:14 -03:00
Ludovic Henry 342f788abf [io-layer] Remove _wapi_handle_wait_signal_handle and _wapi_handle_wait_signal functions 2015-07-14 19:04:14 -03:00
Ludovic Henry 9b5c911edb [io-layer] Remove _wapi_thread_apc_pending function
All calls to _wapi_thread_apc_pending were done with a handle to the current thread. It is better to just use _wapi_thread_cur_apc_pending.
2015-07-14 19:04:13 -03:00
Martin Baulig 4efdd29f70 [xbuild]: Fix ResolveAssemblyReference.ResolveReference() with empty search paths.
When using shared projects, the search path and/or framework paths may sometimes
contain empty elements.

This fixes commit 5b12d9ae37.
2015-07-14 23:38:40 +02:00
Zoltan Varga 3859b12c0e [llvm] Add support for pass/returning vtypes by ref. 2015-07-14 17:19:17 -04:00
Marek Safar d07400cbd4 [system] Add missing APIs 2015-07-14 20:08:12 +02:00
Ludovic Henry 312ad9deef [threadpool-ms-io] Fix epoll socket close/remove race condition
With the previous commit, it fixes a range of bug that happens only with epoll. This is because, contrary to poll and kqueue, epoll keeps an internal state that has to be kept in sync with the threadpool_io->states hash table.

This threadpool_io->states hash table is keeping a list of file descriptor to watch, with the corresponding SocketAsyncResult to callback in case of event on the fd. But epoll also keeps its internal state that needs to me modified with EPOLL_CTL_ADD, EPOLL_CTL_MOD and EPOLL_CTL_DEL.
Contrary to kqueue, EPOLLONESHOT does not force epoll to remove the socket from its internal state once an event have been triggered; but it will just not fire this event again, until this event is reset. Also, epoll will remove a fd from its internal state when this fd is closed.

This will lead to a bunch of out-of-sync states like the following :
 - the user start reading asynchronously the STDOUT of a child process, the child process quit (closing the STDOUT fd), this fd is reused by the OS for something else (like a socket), the IO threadpool call epoll_ctl with EPOLL_CTL_MOD (because the fd is still in the states hashtable), but the OS returns an error because the underlying file is different, even if the fd is the same.
 - the user opens a socket, does some asynchronous operation on it, and close it; removing it from the table but not from epoll (as it does not call epoll_ctl with EPOLL_CTL_DEL). For another reason, the fd has not been closed in the OS (and thus in epoll), because it might, for example, still be open by another process. After that, we receive an event for this fd (as it is still in epoll), and between the time of the epoll_wait and the epoll_ctl with EPOLL_CTL_DEL, the fd is actually closed in the OS, leading to a EBADF error.

The g_warning have also been replaced by g_error, so we do not silently discard this kind of error in testing.
2015-07-14 14:56:06 -03:00
Ludovic Henry a004e31dc7 [bcl] Remove ProcessAsyncReader handle from IO ThreadPool on closing 2015-07-14 14:56:06 -03:00
Ludovic Henry cd777415a8 [threadpool-ms-io] Rework some utility functions 2015-07-14 14:56:06 -03:00
Ludovic Henry 3d92649606 [threadpool-ms-io] Replace the 2 locks by only 1 2015-07-14 14:56:05 -03:00
Zoltan Varga d7ef211929 [runtime] Fix the mono_get_lmf_addr () optimization for x86-ios. Fixes #31921. 2015-07-14 13:42:56 -04:00
Ludovic Henry 7ca32ef62a [utils] Factor lazy initialization of threadpool-ms and threadpool-ms-io for use by other modules 2015-07-14 12:37:40 -03:00
Zoltan Varga f5ce510c9d Disable the test added by 37ad145b2f, it doesn't work on all platforms. 2015-07-14 09:00:40 -04:00
Marek Safar 500c91bfb4 [ilasm] Imlicitly set enums value__ special flags 2015-07-14 11:32:23 +02:00
Rolf Bjarne Kvinge ca42f0f3cb Look for resgen2 where mcs is.
Fixes an issue on El Capitán where resgen2 isn't necessarily in PATH.
2015-07-14 10:24:43 +02:00
Vlad Brezae 8a740078c9 Merge pull request #1730 from BrzVlad/feature-arm-fast-tls
Feature arm fast tls
2015-07-13 19:42:56 -07:00
Ludovic Henry 8789851a63 [threadpool-ms] Add tracing 2015-07-13 22:52:22 -03:00
Marek Safar 9b0b4497fb [ilasm] Make only structs automatically sealed (partially reverts 541a65ddd3) 2015-07-13 23:14:43 +02:00
Marek Safar 541a65ddd3 [ilasm] Don't make enums and structs sealed when sealed modifier is not used 2015-07-13 22:38:04 +02:00
Zoltan Varga 94bb7f194b [jit] Fix float32 support for the interlocked opcodes. 2015-07-13 15:14:24 -04:00
Zoltan Varga 37ad145b2f [amd64] Fix marshalling of empty structures. 2015-07-13 13:57:25 -04:00
Marek Safar 7faba3ca52 [System] Don't assume WebConnectionStream of unknown http methods require write stream. Fixes #31830 2015-07-13 14:11:25 +02:00
Zoltan Varga 92adf9c4af Merge pull request #1927 from borgdylan/x86fix
fix the x86 build
2015-07-13 03:52:18 -04:00
Dylan Borg af6e844ed6 fix the x86 build 2015-07-13 09:18:03 +02:00
Zoltan Varga 03c0dd16c6 [runtime] Add support for portable pdb files without a MODULE table. Fix mono_ppdb_get_seq_points (). 2015-07-12 16:35:01 -04:00
Zoltan Varga cab53b1eb9 [runtime] Make mono_trace_set_printerr_handler () call g_set_printerr_handler (). Fixes #31451. 2015-07-12 12:37:39 -04:00
Zoltan Varga 9fa34b9f1b [runtime] Update portable pdb support for the latest spec. 2015-07-12 00:14:36 -04:00
Alex Rønne Petersen 4683ad4350 [profiler] Do the final sample dump on shutdown in the helper thread.
Reading the various fields on the profiler structure from the shutdown
thread is very racy; for example, we have no guarantee that we will see
a consistent GPtrArray structure for sorted_sample_events. It's better
to just let the helper thread empty the stat buffers when it shuts down.
2015-07-11 11:52:37 +02:00
Alex Rønne Petersen 0ec5cad047 [profiler] Process heapshot requests in all non-GC events. 2015-07-11 11:52:36 +02:00
Alex Rønne Petersen 4ce4b7621a [profiler] Fix a number of potential buffer overflows.
In many cases, we allocated less than we actually needed in the worst case. We
now spell out the size of each field in an event to make it less likely that
such mistakes are made in the future.
2015-07-11 11:52:36 +02:00
Alex Rønne Petersen d3752a5496 [profiler] Report more metadata load/unload information.
We now report:

* Start/stop events for threads, domains, and contexts.
* Friendly name changes for domains (as for threads).
* Assembly load/unload events (as for images).
* Unload events for images and classes.
2015-07-11 11:52:35 +02:00
Alex Rønne Petersen 8a7f7a6187 [profiler] Add a thread ID field to sample events.
Previously, it was impossible to determine which thread a sample came from
because the buffer header thread ID for all sample events is the same (that of
the profiler's helper thread).
2015-07-11 11:48:09 +02:00
Alex Rønne Petersen 7aa0ae71b3 [profiler] Sort sample events by thread ID before outputting them.
This significantly improves overall compression of sample events as successive
sample events for the same thread are highly likely to contain similar method
pointers in managed backtraces.
2015-07-11 11:39:12 +02:00
Zoltan Varga 23453f346d [aot] Emit the got into the bss section on osx too. 2015-07-10 15:01:41 -04:00
Vlad Brezae ce47bfe3f4 [tests] Add tls stress test 2015-07-10 11:43:43 -07:00
Vlad Brezae 421fa312a5 [arm] Add MONO_DEBUG option for using only fallback tls. 2015-07-10 11:43:43 -07:00
Vlad Brezae 377b9f68cc [arm] Add fast tls support on ios. 2015-07-10 11:43:43 -07:00
Vlad Brezae 2fee9bb6fe [sgen] Use the sgen allocator fastpath also when cross compilling.
The platform needs to support tls for it to be generated.
2015-07-10 11:43:42 -07:00
Vlad Brezae 50d960afc6 [sgen] Fix allocator creation when running with jit disabled.
We don't allocate the method header when not jitting.
2015-07-10 11:43:42 -07:00
Vlad Brezae 2c16da1828 [arm] Add fast tls support on android. 2015-07-10 11:43:42 -07:00
Vlad Brezae a1366dccaa [sgen] Allocator defines depend on the target not the host. 2015-07-10 11:43:42 -07:00
Vlad Brezae c28385dfff [arm] Add fast tls support on linux
Add support for OP_TLS operations. The code that implements this is comprised of getter and setter asm thunks, which is either inlined, or it uses external code. At runtime we check the implementation on the system, using the inlined thunks if we can.
2015-07-10 11:43:41 -07:00
Marek Safar 262c53a4ed [mcs] Emit symbol info local variables for compiler generated storey variables. Fixes #31784 2015-07-10 20:07:55 +02:00
Marek Safar 677ef8fe1d [mcs] Remove NET_4_0 ifdefs 2015-07-10 20:07:55 +02:00
Rodrigo Kumpera 0d9c8d1aff [jit] Use a feature macro instead of hardcoding users. 2015-07-10 13:36:15 -04:00
Rodrigo Kumpera e05fde7c23 Remove duplicated code. 2015-07-10 12:26:36 -04:00
Rodrigo Kumpera 7237750b52 [arm] Fixed the max length of seq_point. Fixes #31829. 2015-07-10 12:20:04 -04:00
Rodrigo Kumpera e6f6980b6c [jit] Disable fast tls on osx if MONO_HAVE_FAST_TLS is not defined. 2015-07-10 12:00:17 -04:00
Rodrigo Kumpera f0178aa93e [utils] Disable fast TLS on darwin until we have proper fallbacks in place. 2015-07-10 10:07:34 -04:00
Rodrigo Kumpera 1d0455c5ea [mini] Add some extra asserts around fast tls to ensure we don't mess up. 2015-07-10 10:07:33 -04:00
Rodrigo Kumpera 7cf92e5fd6 [utils] Don't abort at startup if remote TLS reads is not available.
Remote TLS reads is not a required feature for the runtime to work on
mach systems. We still want it available, but can leave the assertion
to happen when someone actually use it.

Usage won't happen today as part of regular code execution, so moving
the assert will make us more robust.
2015-07-10 10:07:33 -04:00
Rodrigo Kumpera 85aa333aa9 [utils] Add fallback TLS offset scanning to X86 and AMD64. 2015-07-10 10:07:33 -04:00
Rodrigo Kumpera 00af1bc367 Merge pull request #1922 from antonmes/master
Add TLS offset for pre-release OS X 10.11 on x86
2015-07-10 09:48:54 -04:00
João Matos 5158c7fd4f Merge pull request #1924 from bosmacs/master
Add TLS offset for pre-release OS X 10.11 x86, as #1919 did for x64
2015-07-10 13:12:46 +01:00
Craig S. Bosma 96a96d2ef0 Add TLS offset for pre-release OS X 10.11 x86, as in #1919 for x64 2015-07-10 06:56:23 -05:00
Lukasz c7159f1def Put quotes around path to mono. Fixes bug where Process.Start will fail for a managed process if the path to mono contains spaces. 2015-07-10 10:27:55 +02:00
Toxa 82091b3332 Add TLS offset for pre-release OS X 10.11 on x86 2015-07-10 08:32:54 +03:00
Matt Zinkevicius 157a580d38 Allow disabling the mono-find-provides/requires RPM processing scripts 2015-07-09 19:52:01 -06:00
Zoltan Varga 0ecac8b111 [llvm] Remove the restriction on handlers without invokes, its not needed any more. 2015-07-09 15:35:30 -04:00
Zoltan Varga 15955fafc5 [jit] Fix a regression introduced by ce567f4026. cfg->flags was initialized with a JitFlags value. 2015-07-09 15:32:53 -04:00
Zoltan Varga eb1f955744 [llvm] Fix the handling of nested clauses. 2015-07-09 15:22:59 -04:00
Jonathan Pryor 46a6b54840 Merge pull request #1888 from joelmartinez/mdoc-flagsbug
[mdoc] Adds custom formatting for the `ObjCRuntime.Platform` enum.
2015-07-09 12:26:26 -04:00
Marek Safar 7e97fdfb22 Bump reference sources 2015-07-09 18:01:17 +02:00
Marek Safar c67fa857b1 [System.Net.Http] Reading ContentLength value actually set header property value. Fixes #30561 2015-07-09 17:48:15 +02:00
João Matos 0f9f44e101 Merge pull request #1919 from bosmacs/master
Add TLS offset for pre-release OS X 10.11 on amd64
2015-07-09 01:19:07 +01:00
Craig S. Bosma c8a3c4fd36 Add TLS offset for pre-release OS X 10.11 on amd64 2015-07-08 19:02:54 -05:00
Zoltan Varga 7e47248076 [sdb] Allow boxed vtypes as this when invoking vtype methods. Fixes #30023. 2015-07-08 17:09:32 -04:00
Joel Martinez 375a9e9277 [mdoc] Adds custom formatting for the ObjCRuntime.Platform enum.
This enum, which can be found in Xamarin's iOS and Mac products use a custom encoding
scheme which resulted in invalid values being shown when processed with mdoc. This patch
adds a special case to watch for this particular enumeration value, and decodes the data
correctly.

Additionally, the code that formats the values for flags enumerations was refactored. Future extensibility of this feature can now be done by simply implementing a new `FlagsFormatter`, and applying the proper logic in the `MakeAttributesValueString` function.
2015-07-08 16:18:16 -04:00
Zoltan Varga 09747fb182 [llvm] Fix a problem introduced by the previous change. 2015-07-07 18:32:21 -04:00
Zoltan Varga 8a290deb65 [llvm] Refactor the aot code a bit. 2015-07-07 18:24:05 -04:00
Zoltan Varga 36623d3cc4 [sdb] Allow invoking of valuetype ctors. 2015-07-07 16:33:09 -04:00
João Matos f3e4d331e7 Merge pull request #1917 from rtollert/bump-nunit-4.5
Bump nunit from mono/2.0 to mono/4.5.
2015-07-07 19:53:50 +01:00
Richard Tollerton 6b76c7e984 Bump nunit from mono/2.0 to mono/4.5. 2015-07-07 12:17:04 -05:00
Marek Safar 093bdec2f3 Merge pull request #1914 from kasthack/master
[System.Web] Added missing HttpRequestBase, HttpRequestWrapper and HttpRequest methods + properties:
2015-07-07 10:54:40 +02:00
Zoltan Varga 3f77fc9ed9 [aot] Fix static linking support when using llvm. 2015-07-06 22:01:31 -04:00
Zoltan Varga 3632699bac [aot] Handle already gsharedvt methods correctly in add_extra_method_with_depth (). 2015-07-06 20:54:33 -04:00
Zoltan Varga 21135083e8 [gsharedvt] Handle gsharedvt methods correctly in check_method_sharing(). We need to pass mrgctx/vtable arguments for them since at runtime, the specific method called could be a non-gsharedvt method. 2015-07-06 19:52:01 -04:00
Ludovic Henry a79507705b [runtime] Remove unused MonoDomain fields 2015-07-06 16:38:38 -03:00
Rodrigo Kumpera 565833e9e9 Merge pull request #1911 from ludovic-henry/threadpool-unhandled-exception
[threadpool-ms] Fix unhandled exception support
2015-07-06 15:36:56 -04:00
Zoltan Varga ddd82672a5 [aot] Mark the data arrays emitted using llvm as constant. 2015-07-06 15:01:13 -04:00
Jonathan Pryor 0bf72ac919 [Mono.Posix] Allow building without [Obsolete] Mono.Posix.
For a future Xamarin.Android release, we'd like to include
Mono.Posix.dll for simple Unix interop support.

That said, since Mono.Posix has never been included with
Xamarin.Andorid before, this makes a perfect opportunity to remove
some [Obsolete] cruft within Mono.Posix.dll, namely the types within
the Mono.Posix namespace.

Unfortunately, simply not compiling the types within the Mono.Posix
directory doesn't result in compilable code, due to references to
types within the Mono.Posix namespace by other types, e.g.
Mono.Unix.PeerCred using Mono.Posix.PeerCredData.

Fix things so that the Mono.Posix sources can be omitted, allowing
compilation of an assembly with fewer [Obsolete] types.

This change shrinks the size of Mono.Posix.dll by ~10.5KB.
2015-07-06 14:03:32 -04:00
Marcos Henrich 76cd0bf2c1 [SRE] Improved token fixups processing.
The runtime requires a MemberInfo from the fixups.
A metadata token needs to be translated into a MemberInfo.
Nontheless Module.ResolveMember only works with loaded assemblies.

Local unbuilded members also needed to be resolved so a new method
ResolveOrGetRegisteredToken was added to retrieve from the runtime the
cached XXXBuilder for a token.
2015-07-06 16:24:36 +01:00
Marcos Henrich 63ee609960 [SRE] Added ModuleBuilder.GetRegisteredToken icall
ModuleBuilder.GetRegisteredToken returns a Builder previously registered
for a token.

This is required when the builded module has not been yet loaded into
memory but we still need to resolve the token into a builder.
2015-07-06 16:24:35 +01:00
Marcos Henrich 770002ecd0 [SRE] Using BitConverter.ToUInt32 to read token. 2015-07-06 16:24:34 +01:00
Marcos Henrich 24ae2cf835 [SRE] Removed GetXXXToken module exception.
The exceptions were removed because GetXXXToken should be able to return
tokens relative to the current module regardless of the XXX module.
2015-07-06 16:24:27 +01:00
Marcos Henrich bb139b85cd [SRE] Fixes GetMethodToken GetConstructorToken.
ModuleBuilder.GetMethodToken and ModuleBuilder.GetConstructorToken. no
longer crash when called with a null optionalParameterTypes.
2015-07-06 16:22:44 +01:00
Marcos Henrich 85343ce2de [SRE] Test ModuleBuilder methods with null params.
Test MethodBuilder.GetMethodToken and MethodBuilder.GetConstructorToken with
options parameter set to null.
2015-07-06 16:20:36 +01:00
Marcos Henrich 58ab14a6a8 [SRE] Added ConstructorBuilder.SetMethodBody. 2015-07-06 16:20:36 +01:00
Marcos Henrich f2a25c1d40 [SRE] Moved SetMethodBody code to ILGenerator. 2015-07-06 16:20:35 +01:00
Marcos Henrich 8d9b007e71 [SRE] Added missing method overloads.
Added GetMethodToken and GetConstructorToken overloads.
2015-07-06 12:36:25 +01:00
Marcos Henrich a4c2f42e06 [SRE] Added TypeBuilder.DefineNestedType overload. 2015-07-06 12:36:25 +01:00
Marcos Henrich b3ced10029 [corlib] Added method MethodBuilder.SetMethodBody. 2015-07-06 12:36:25 +01:00
Marcos Henrich 8987e4a5d6 [corlib] Added tests for MethodBuilder.
Added tests for MethodBuilder.CreateMethodBody and MethodBuilder.SetMethodBody.
2015-07-06 12:36:25 +01:00
Marcos Henrich 7e73eabc52 [corlib] Added referencesource types.
Mono now uses referencesource ExceptionHandlingClauseOptions and
ExceptionHandler.
2015-07-06 12:36:24 +01:00
Marcos Henrich 94e31f159f Merge pull request #1900 from esdrubal/cyclic-ref
[runtime] mono_class_from_name cyclic ref handling
2015-07-06 11:50:16 +01:00
Marcos Henrich a7c3e83d98 Merge pull request #1906 from esdrubal/xbuild-CopyLocal-fix
[xbuild] Fixes copied TargetFramework assemblies.
2015-07-06 11:49:40 +01:00
João Matos f7816d844a Merge pull request #1913 from RavuAlHemio/bug31635
[Mono.Posix] Special-case UTF-32 in PtrToString. Fixes #31635.
2015-07-06 11:10:32 +01:00
kasthack 303d876370 Added missing HttpRequestBase, HttpRequestWrapper and HttpRequest methods + properties:
* HttpRequestBase:GetBufferedInputStream, GetBufferlessInputStream,  InsertEntityBody, MapRawImageCoordinates, CurrentExecutionFilePathExtension, TimedOutToken
* HttpRequestWrapper: GetBufferedInputStream, GetBufferlessInputStream, MapRawImageCoordinates, TimedOutToken,
	* Fixed MapPath parameter name(overridePath -> virtualPath)
* HttpRequest: GetBufferedInputStream, GetBufferlessInputStream(bool), MapRawImageCoordinates, TimedOutToken
2015-07-06 09:23:51 +03:00
Ondřej Hošek 6bfb7e6d14 [Mono.Posix] Special-case UTF-32 in PtrToString. Fixes #31635.
Since UTF32Encoding returns 8 for GetMaxByteCount(1), PtrToString
expects 8 NUL bytes to stop scanning for the end of the string.
Since all the other UTF schemes are special-cased in
GetStringByteLength, do the same for UTF32Encoding.
2015-07-04 02:05:30 +02:00
Rodrigo Kumpera 5d93b2a292 [jit] Add emulation r4 to u8 conversion. Fixes #31582.
Most targets, like arm and amd64 don't support fast float to ulong conversion.
2015-07-03 14:32:04 -04:00
Ludovic Henry e53ccecd1a [threadpool-ms] Fix unhandled exception support 2015-07-03 00:44:01 -03:00
Ludovic Henry f3e35f228c [runtime] Fix cpu usage greater than 100% error
We simply relax the conditions as we do not need a very high precision.
2015-07-02 15:45:40 -03:00
Rodrigo Kumpera 6efe705614 Merge pull request #1907 from alexanderkyte/slow_aot_startup_hash
[runtime] Speed up find_aot_method_in_module
2015-07-02 14:03:15 -04:00
Alexis Christoforides ae2f50e57f [referencesource] Keep Mono's old default provider type value for RSA.
The value isn't used for the managed crypto code and is still validfor CryptoAPI, but if it changes Mono can't find keypairs made with earlier versions. Fixes #31199
2015-07-02 17:10:18 +03:00
Marcos Henrich 73e4bfeac7 Merge pull request #1860 from saper/tz-fix
[corlib] Assume UTC if no $TZ set. Fixes #30698.
2015-07-02 15:06:16 +01:00
Marcos Henrich 4f94e248c4 Bump reference sources 2015-07-02 10:53:40 +01:00
Ludovic Henry b1186d8d87 [threadpool-ms] Fix segfault when using sdb 2015-07-01 22:30:00 -03:00
Ludovic Henry bdfa2a2ef0 [runtime] Ease debugging of cpu_usage out of bound bug 2015-07-01 19:38:35 -03:00
Alexander Kyte 7bb3b98f58 [runtime] Conversion of a printf to string append for performance 2015-07-01 16:33:34 -04:00
Alexander Kyte 3d47daa63d [runtime] Avoid repeated method hashing in find_aot_module 2015-07-01 16:22:35 -04:00
Alexander Kyte e22887717f [runtime/tests] Added a stress test of find_aot_module. 2015-07-01 16:22:28 -04:00
Marcos Henrich 01dcc6c162 [runtime] mono_class_from_name cyclic ref handling
The changes fix stack overflows caused while traversing images with
cyclic references.

Fixes #31396
2015-07-01 17:26:28 +01:00
Sebastien Pouliot 080fc527bd [linker] Fix comparison of methods wrt generic parameters [#30488]
The check from [1] is fine when it's done once _or_ with an identical
target. However there's nothing to ensure (if done more than once) that
it's being used to represent the same thing every time.

That makes the code from [1] match methods like:

> System.IObservable`1<TResult> System.Reactive.Linq.IQueryLanguage::Repeat(TResult)

and

> System.IObservable`1<TSource> System.Reactive.Linq.QueryLanguage::Repeat(System.IObservable`1<TSource>)

where `TResult` is different in both checks.

This patch tracks what is used as the generic parameter (on first check)
and make sure it's identical if it's used again in the same signature.

Note: this is a very old bug (i.e. it's always been that way) but recent
changes to mono started to report such issues (a good thing) and, for AOT
compilation on XI, that resulted in MT3001 errors.

[1] https://github.com/mono/mono/blob/mono-3.10.0/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs#L250
2015-07-01 11:37:00 -04:00
Ludovic Henry 93bb234cea [threadpool] Remove mono threadpool implementation 2015-07-01 12:04:36 -03:00
Marcos Henrich 5b12d9ae37 [xbuild] Fixes copied TargetFramework assemblies.
xbuild was copying TargetFramework assemblies when the builded project
had dependencies in a TargetFramework.

Doing so is not the msbuild behaviour and was causing bugs while
resolving Types at load time.

Fixes #28592 and #31396
2015-07-01 15:49:37 +01:00
Marek Safar 613c2a9182 [system] Don't throw ObjectDisposedException on cancelled async WebConnection. Fixes #31507 2015-07-01 16:41:56 +02:00
Ludovic Henry 8be963e71b [threadpool-ms-io] Fix epoll
The socket would not be deleted with epoll_ctl (via epoll_reset_fd_at) when we would remove the state from threadpool_io.states. So when we would try to add it again, it would mark it as a new socket (as it wouldn't be present in threadpool_io.states), while it has not been deleted from epoll.
2015-07-01 11:20:07 -03:00
Rodrigo Kumpera fbec5a33f5 [utils] Remove a duplicated check that was commited by accident. 2015-06-30 16:45:13 -04:00
Ludovic Henry e2aaf5f1e9 [threadpool-ms-io] Fix compilation warning 2015-06-30 14:23:16 -03:00
Ludovic Henry a437cfa485 [io-layer] Disable shared handles support by default
They are a very fragile part of the runtime, as they are not very well aken care of.

We simply disable it by default for now. If everything still works as expected, we will completely remove the code.
2015-06-30 13:56:03 -03:00
Marek Safar 9b4901ba68 [mcs] Fixes name collision check for generic types within user namespaces. Fixes #30904 2015-06-30 11:50:57 +02:00
João Matos 2221dfc2d4 Merge pull request #1903 from vkargov/master
Fix the MinGW build.
2015-06-29 23:44:19 +01:00
Vladimir Kargov 12218c56e3 [runtime] Fix a crash on Windows during the cleanup phase caused by using a destroyed mutex. 2015-06-30 00:15:11 +03:00
Vladimir Kargov 237e1dd0ae [runtime] Add condition variable definitions that are missing on MinGW. 2015-06-30 00:12:08 +03:00
Zoltan Varga e02e386f22 Fix the build. 2015-06-28 18:53:49 -04:00
Neale Ferguson d78c44eb8c Fix and simplify float conversions 2015-06-28 15:55:12 -04:00
Zoltan Varga e9ee609924 Merge pull request #1901 from oafasting/master
Removed obsolete flag '-no-cpp-precomp' from darwin $CPPFLAGS
2015-06-28 10:31:23 -04:00
Ole A. Sjo Fasting 36eed8bcc2 removed flag -no-cpp-precomp from darwin cppglags, so that build is possible on osx 2015-06-28 13:58:49 +02:00
Zoltan Varga 4c6f366057 Fix the build. 2015-06-27 13:09:53 -04:00
Zoltan Varga f5ae0e5960 [aot] Emit AOT data structures using LLVM when using LLVM. 2015-06-26 15:07:05 -04:00
Miguel de Icaza f709994a7c Coverity: test if this is the way of silencing warnings 2015-06-26 12:41:02 -04:00
Zoltan Varga 80f427f36b Fix the loadable llvm build. 2015-06-26 11:59:07 -04:00
Marek Safar 51a802e889 [corlib] Fixes warning 2015-06-26 16:29:58 +02:00
Marek Safar c67cb401ae [corlib] Chinese (Simplified) and its legacy version are not equal. Fixes #31398 2015-06-26 16:28:07 +02:00
Marcin Cieslak b440b2e765 [resgen] Implement conditional resources (#if/#ifdef)
- Add support for #if, #ifdef, #if !SYMBOL, #else
and #endif directives

- Add /DEFINE: option:

  /D:SYMBOL1 /D:SYMBOL2 or /DEFINE:SYMBOL1,SYMBOL2
2015-06-26 10:30:05 +00:00
Marek Safar 03d3aa5e1d [corlib] Bump WaitAll_TimeoutWithExceptionsAfter timeouts 2015-06-26 12:14:14 +02:00
Marek Safar 4b675b9fbf [corlib] Add test for .net bug 2015-06-26 08:09:16 +02:00
Zoltan Varga a5f77b1997 [aot] Improve support for situations where mono_aot_get_method () etc. is passed an already gshared method. 2015-06-25 23:33:54 -04:00
Zoltan Varga a11552ac96 [aot] Remove an unused field from MonoAotModule. 2015-06-25 23:24:47 -04:00
Zoltan Varga 0450aa5e18 [aot] Encode the various aot tables into binary ourselves instead of relying on the assembler to do it, to make it easier to emit them using LLVM. 2015-06-25 23:08:33 -04:00
Zoltan Varga d1e96ecd29 Fix the DISABLE_JIT build. 2015-06-25 22:48:41 -04:00
Zoltan Varga c470c97f53 [aot] Clean up the naming of global symbols. 2015-06-25 22:24:00 -04:00
Zoltan Varga 493c27fbc4 [aot] Reorganize the emission of the MonoAotFileInfo structure to make it easier to emit it as LLVM data. 2015-06-25 21:47:40 -04:00
Zoltan Varga ce567f4026 [aot] Pass the aot method index to mini_method_compile (). 2015-06-25 20:28:10 -04:00
Zoltan Varga 8d75cf1659 [aot] Get rid of the 'methods' symbol in aot images, its no longer used. 2015-06-25 20:07:11 -04:00
Sebastien Pouliot 928a46005f [mono.sqlite] Provide the full path to the library for iOS 2015-06-25 18:43:12 -04:00
Zoltan Varga 89d7960667 Get rid of the of the usage of code offsets in aot-runtime.c, use method addresses instead. 2015-06-25 18:22:41 -04:00
Zoltan Varga aa8d8c0d04 [aot] Add support for running without a GOT for JITted code. 2015-06-25 17:58:32 -04:00
Zoltan Varga 2a9e0ea28f Fix the leaking of process streams when using RedirectStandardOutput etc., introduced by 3c47caca34. 2015-06-25 16:52:07 -04:00
Zoltan Varga 59e9320e33 Refactor the IMT call handling code into a separate function so it can be called from outside the trampoline code. 2015-06-25 16:40:30 -04:00
Zoltan Varga 79d153320c Clean up the trampoline code a bit. 2015-06-25 16:40:30 -04:00
Zoltan Varga c1aa0d3528 Clean up the imt trampoline code a bit. 2015-06-25 16:40:30 -04:00
Marek Safar f8bfe04f86 [system.net.http] Convert default request headers to string values using correct separator. Fixes #31336 2015-06-25 22:19:28 +02:00
Zoltan Varga 2e203a3f2e Merge pull request #1898 from alexanderkyte/debugger_variable_reflection
Fix TransparentProxy ObjectMirror value queries via debugger
2015-06-25 16:14:34 -04:00
Zoltan Varga dd66efe5bd Fix the compilation of the System tests. 2015-06-25 16:04:24 -04:00
Alexander Kyte 1035a366b0 [runtime] Handle TransparentProxies when getting object field values 2015-06-25 15:31:03 -04:00
Alexander Kyte 278977435c [runtime] Added a test for the repro of being unable to reflect an instance variable. 2015-06-25 15:30:54 -04:00
Miguel de Icaza e13ecbe243 Attempts to locate the C# and VB compilers based on the location of mscorlib, does not assume they are on the path. Fixes #31369 2015-06-25 13:57:04 -04:00
Marek Safar 4f4b324aa2 [system] Disable external process redirect test on mobile 2015-06-25 15:58:35 +02:00
Rolf Bjarne Kvinge 97f919f7b7 Add a monotouch_watch profile. 2015-06-25 13:28:11 +02:00
Rolf Bjarne Kvinge 772ba35faa Support #include directives in external sources files. 2015-06-25 13:27:26 +02:00
Rolf Bjarne Kvinge a9d8378eb4 Remove --with-[monotouch|xammac]=only from configure.
The Xamarin.iOS and Xamarin.Mac builds don't use these options,
so remove them to reduce unnecessary complexity.
2015-06-25 13:27:20 +02:00
Marek Safar ff73b91019 [mcs] Add null operator propagation to probing expressions. Fixes #31289 2015-06-25 09:23:13 +02:00
Zoltan Varga a1eee3c2a1 [runtime] Use MONO_GENERIC_CONTEXT_USED_CLASS/METHOD constants to mini.h. 2015-06-24 21:38:43 -04:00
Zoltan Varga 73c0695baf [runtime] Get rid of the MONO_GENERIC_SHARING env variable, its no longer needed. 2015-06-24 21:36:16 -04:00
Marek Safar 550195c728 [ilasm] Custom attributes syntax with typeref expression 2015-06-24 20:59:16 +02:00
Marek Safar b4d8e1588c [runtime] Update incorrect test (exposed by f2039ff720) 2015-06-24 16:51:13 +02:00
Alex Rønne Petersen ad600a087f Merge pull request #1869 from alexanderkyte/appdomain_parallel
[runtime] Fixed use-after-free in context freeing
2015-06-24 05:29:36 +02:00
Zoltan Varga 5220a7851d [jit] Properly set the klass of the MonoInst pushed on the IL stack by the refanyval opcode. Fixes #31231. 2015-06-23 22:17:13 -04:00
Ludovic Henry 476e5e7eb8 [corlib] Fix NRE in TaskScheduler.GetTaskSchedulersForDebugger
See external/referencesource/mscorlib/system/threading/Tasks/TaskScheduler.cs:582
2015-06-23 19:53:00 -03:00
Marek Safar f2039ff720 [ilasm] Pair methods using their calling convention, this allows to have static and non-static properties with same name 2015-06-23 19:35:59 +02:00
Marek Safar 47f5b69bfb [ilasm] Even more undocumented custom attributes syntax 2015-06-23 19:35:58 +02:00
Sebastien Pouliot eaee29fbd7 [linker] Add Mono.Cecil.*.Has* checks when comparing methods/types
* It reduce memory allocations by avoiding the creation of empty
  collections (only used to tell us there's a Count of 0);

* It also speed up execution, less object creation/GC time;

* Patch also remove some double-casts (is + as/cast)
2015-06-23 13:03:10 -04:00
meum 1d8284ed11 Fix dot stuffing in SmtpClient
As per RFC2821 section 4.5.2:
   -  Before sending a line of mail text, the SMTP client checks the
      first character of the line.  If it is a period, one additional
      period is inserted at the beginning of the line.
2015-06-23 17:03:59 +02:00
Zoltan Varga 5c4a0c67a9 Merge pull request #1874 from saper/bug_29679
[msbuild][crash] Enums are classes that can be assigned to value types
2015-06-22 15:54:14 -04:00
Mark Probst 263d3d5065 [sgen] Remove a weird unnecessary cast. 2015-06-22 12:07:01 -07:00
Mark Probst e4b0406c24 [sgen] GCObject* instead of void* 2015-06-22 12:07:00 -07:00
Mark Probst 643854c8cf [runtime] GC descriptor typedef. 2015-06-22 12:07:00 -07:00
Mark Probst 31e37fdc0a [sgen] Typedef for GC descriptors. 2015-06-22 12:07:00 -07:00
Mark Probst 335952335d [sgen] GCObject* instead of char* where appropriate. 2015-06-22 12:06:59 -07:00
Mark Probst ac98a2c9d9 [sgen] Make GCVTable type opaque, not a pointer. 2015-06-22 12:06:59 -07:00
Miguel de Icaza a0f6764ca7 Merge pull request #1887 from debugerr/patch-2
Null reference check before calling delegate
2015-06-22 14:50:59 -04:00
Ludovic Henry a25b2bfcfd [threadpool-ms-io] Rework socket removal job cancellation 2015-06-22 14:29:30 -03:00
Ludovic Henry 8d6a0e814f [threadpool-ms-io] Remove dependency on SocketAsyncResult list in the backends
This reduce the duplication and complexity of the code in the different backends
2015-06-22 14:29:30 -03:00
Ludovic Henry d8cf0dae81 [threadpool-ms-io] Fix race between socket add and remove
The following race could occur and lead to a EBADF error with kevent and epoll :
 1. mono_threadpool_ms_io_add is called with fd 1234
 2. mono_threadpool_ms_io_remove_socket is called when closing fd 1234
 3. selector_thread calls update_add with socket 1234, which will call kevent with this already closed socket

The solution is simply to remove all the SocketAsyncResult from states, as well as updates, for the given socket fd
2015-06-22 14:29:30 -03:00
Ludovic Henry 65692c1aa7 [threadpool-ms-io] Rework AsyncReadHandler detection 2015-06-22 14:29:29 -03:00
Ludovic Henry 10ad5ff1de [threadpool-ms-io] Fix update on epoll 2015-06-22 14:29:29 -03:00
Marek Safar e040f8f8d1 [ilasm] Add another undocumented custom attributes initializer syntax 2015-06-22 17:57:26 +02:00
Chris Hamons b92d706d0c Fix System.Messaging makefile logic issue
- Introduced in b044a27fe0
2015-06-22 10:22:12 -05:00
Marek Safar 52da65ddb5 [ilasm] Fix invalid codegen for method overloads with unique modop/modreq type only 2015-06-22 14:07:05 +02:00
Atsushi Eno cc9ddec7c4 [S.R.Serialization] fix default value comparison.
The fixed code used to invoke null.Equals(other).

The new test (by @alien0ada) shows the failing case.
2015-06-22 20:12:38 +09:00
Marek Safar 0780c58b98 [ilasm] Add emit of custom string attribute using member syntax 2015-06-21 13:21:15 +02:00
Zoltan Varga c55393e99d Merge pull request #1889 from alexanderkyte/debugger_locals_failure
[runtime] Add a missing NOP to the OP_SEQ_POINT arm code
2015-06-20 19:19:59 -04:00
Alexander Kyte 0c604e7175 [runtime] Add a missing NOP to the OP_SEQ_POINT arm code
We were failing MonoTests.DebuggerTests.Locals and
MonoTests.DebuggerTests.SingleStepping because we
stepped forward too far as a side effect of this missing
"padding" NOP.
2015-06-20 22:17:57 +00:00
Zoltan Varga fd2cdf9b9a Fix the build. 2015-06-19 16:28:18 -04:00
Zoltan Varga de7ccb75d5 [runtime] Make multiple -O= flags cumultative instead of negating the effects of the previous ones. 2015-06-19 16:22:26 -04:00
Zoltan Varga bcd9596e17 Merge pull request #1886 from BrzVlad/fix-arm-thread-state
[ios] Fix setting of thread state due to invalid argument
2015-06-19 14:15:04 -04:00
Marek Safar fde3b00fc8 [mcs] Add support for interpolated quoted strings 2015-06-19 18:37:58 +02:00
João Matos 41a41254c1 [aot] Build the LLVM temporary file paths with the temporary base name.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=28600.
2015-06-19 16:02:52 +01:00
João Matos 52fdc14c46 [aot] Build the temporary base name with the temporary path when it's present. 2015-06-19 16:02:51 +01:00
João Matos b922409cf4 [aot] Initialize the temporary path to an empty string. 2015-06-19 16:02:51 +01:00
Marek Safar b6e4411df1 [ilasm] Add project file 2015-06-19 11:47:39 +02:00
Marek Safar fe0c96790b [ilasm] Add support for multiple custom type modifiers attached to single type 2015-06-19 11:46:55 +02:00
Marek Safar 106e71e2c8 [mcs] Implements virtual read-only auto-property assignment via derived private field 2015-06-19 11:46:55 +02:00
Marek Safar acd63c6a96 [ilasm] Remove unused files 2015-06-19 11:46:55 +02:00
debugerr f2147a1529 Null reference check before calling delegate
We see a crash in LinuxNetworkChange.OnAvailabilityChanged when dereferencing the AvailabilityChanged delegate (NullReferenceException). There is a race here: the OnAvailabilityChanged is fired by deferring to the ThreadPool, which allows an unregister to come in between, removing the potential registration before we get called back.
2015-06-19 10:09:00 +02:00
Chris Hamons b044a27fe0 Create xammac_net_4_5 profile for XM 4.5 Unified to remove references to unshippable assmblies 2015-06-18 13:31:04 -05:00
Vlad Brezae d86a4f258f [ios] Fix setting of thread state due to invalid argument
This prevented aborts from working.
2015-06-18 11:27:52 -07:00
Marcos Henrich 521291560d [System.Core] Test MemoryMappedFile.CreateFromFile
Test MemoryMappedFile.CreateFromFile with null napName parameter.

Covers #30741 #30825.
2015-06-18 18:41:42 +01:00
Marek Safar 2c9ee7f2d5 [system] Implements IPv4Mask property on mac. Fixes #30880 2015-06-18 17:25:11 +02:00
João Matos 7b6e1158be Merge pull request #1884 from mono/fix-vb
[xbuild] Fix Microsoft.VisualBasic.targets to contain correct VbcToolExe
2015-06-18 14:04:52 +01:00
Alexander Köplinger 14633bda63 [xbuild] Fix Microsoft.VisualBasic.targets to contain correct VbcToolExe
Compiling VB projects was broken since a few releases but apparently went unnoticed.
The VbcToolExe path needs to be set to "vbnc.exe" because vbnc2 and vbnc shell scripts
don't work in this case and we only support building against the reference assemblies anyway
now for different targets.
2015-06-18 14:46:34 +02:00
Zoltan Varga e0872b2fae [jit] Disable passing the rgctx/vtable in some cases, its doesn't seem to be needed. The newobj code doesn't use the same logic, so the same method might end up being called with/without an rgctx, which is an error on LLVM since methods which receive an rgctx have a different signature. 2015-06-17 16:21:26 -04:00
Zoltan Varga d90d27f642 [runtime] Mark some linq tests as GSHAREDVT so they are skipped when running the fullaot tests on amd64. 2015-06-17 16:21:26 -04:00
Zoltan Varga 4e9e6ce33b [amd64] Fix some partial sharing problems. 2015-06-17 16:21:26 -04:00
Marek Safar cd43e81af1 [mcs] Add better logging for ikvm crashes during HasObject loading 2015-06-17 17:52:51 +02:00
Marek Safar cbc862c79c [mcs] Handle null propagation operator inside nested member access expression. Fixes #31092 2015-06-17 17:37:00 +02:00
Marek Safar 05b6b4f970 Merge pull request #1881 from mono/Therzok-patch-1
[mcs] Fix order of parameters for LineNumberEntry
2015-06-17 07:41:43 +02:00
Marius Ungureanu 2a2297b85e [mcs] Fix order of parameters for LineNumberEntry
Discovered by coverity in NRefactory.
2015-06-17 07:56:08 +03:00
Zoltan Varga 55d8296440 Fix a warning. 2015-06-16 22:45:38 -04:00
Zoltan Varga d96aceab70 [runtime] More full-aot+amd64 fixes. 2015-06-16 20:52:15 -04:00
Zoltan Varga c03088c64c [runtime] Fix full aot on amd64. 2015-06-16 20:25:16 -04:00
Alexander Kyte c4e0097c27 [runtime] Fixed use-after-free in context freeing
We had a use-after-free bug in context freeing that creating and freeing AppDomains in parallel exposed.

We called g_hash_table_remove in a callback to g_hash_table_foreach,
which
resulted in freeing the Slot struct that the g_hash_table_foreach was
holding a local reference to.

When it tried to get the chained 'next' element in the table, if
other threads caused enough memory pressure to reuse that memory
between freeing and getting the 'next' pointer, then we try to
dereference a garbage value and get a SIGSEGV.
2015-06-16 20:07:08 -04:00
Mark Mikofski 82157625b5 initialize ReaderQuotas, fixes bugzilla #15153
Fixes [Bug 15153](https://bugzilla.xamarin.com/show_bug.cgi?id=15153) "System.ServiceModel.NetTcpBinding properties are not pre-initialized while they are in .NET causing interoperability problems."

Specifically the `reader_quotas` member of `System.ServiceModel.NetTcpBinding` is not initialized to a new `XmlDictionaryReaderQuotas` object which causes a "NullReferenceException: Object reference not set to an instance of an object." whenever an attempt is made to set any attributes of that property. For example: `using System.ServiceModel; NetTcpBinding binding = new NetTcpBinding(SecurityMode.None); binding.ReaderQuotas.MaxStringContentLength = 8192;` raises "NullReferenceException: Object reference not set to an instance of an object."
2015-06-16 11:44:02 -07:00
João Matos 823aa3dd4e [WindowsBase] Fixed potential string overflow bug when getting Zip entry file length. 2015-06-16 19:28:25 +01:00
João Matos 0d5437fc32 [WindowsBase] Fixed string buffer overflow when handling Zip entries.
Fixes NuGet package handling, see https://bugzilla.xamarin.com/show_bug.cgi?id=26205.
2015-06-16 19:28:21 +01:00
Marcos Henrich ba1a809980 Merge pull request #1804 from esdrubal/processmodule
Adds managed assemblies to Process.Modules.
2015-06-16 18:15:29 +01:00
Marek Safar b5a732717e [mcs] Fix accessibility modifiers on accessors logic 2015-06-16 19:09:02 +02:00
Marcos Henrich 96f08f5e14 Updated csproj files. 2015-06-16 17:26:58 +01:00
Marek Safar 659c1cdf33 [mcs] Constraints checker needs to accomodate inflated base type contrained not converted to interfaces. Fixes #30973 2015-06-16 17:56:40 +02:00
Marek Safar f6665e553b [mono] Update swedish months and days to be always lower cased for some reason cldr have them wrong. Fixes #30851 2015-06-16 17:56:40 +02:00
Rolf Bjarne Kvinge fe76409a90 Define HAVE_SYSTEM for Windows. 2015-06-16 17:52:04 +02:00
João Matos 4ce7fd5b48 Merge pull request #1878 from rolfbjarne/have-system
Add a conditional for the system function.
2015-06-16 15:54:07 +01:00
Rolf Bjarne Kvinge 8588a5de19 Add a conditional for the system function.
It's not available in the iOS WatchOS simulator.
2015-06-16 16:51:58 +02:00
Marcos Henrich 92cffc729c [runtime] Fixed get_process_module module name.
Module name was equal to RefEmit_YouForgotToDefineAModule for some
modules in OS other than OSX.
2015-06-16 14:43:05 +01:00
Alex Rønne Petersen 3445ac5f22 Merge pull request #1877 from BrzVlad/fix-finalizer-exception
Fix finalizer exception
2015-06-16 11:23:14 +02:00
Alex Rønne Petersen f2531ff08c Merge pull request #1875 from directhex/use-variable-port-number-for-servicemodel-tests
Use random port numbers for ServiceModel tests.
2015-06-16 11:21:49 +02:00
Marcos Henrich 7f3b76a32f Merge pull request #1876 from esdrubal/mmf-segfault
Fixes MemoryMappedFile related segfault with dnvm
2015-06-16 10:14:14 +01:00
Zoltan Varga d0bc7a136e [jit] Add jit icalls used by the inline rgctx fetch code. 2015-06-15 22:50:32 -04:00
Zoltan Varga dd75eb942f [jit] Remove the 'caller' argument from the generic sharing code, its no longer needed, since we no longer compute its generic sharing context. 2015-06-15 22:19:18 -04:00
Zoltan Varga af178ab16b [gsharedvt] Avoid computing the generic sharing context of callers, its not longer needed. 2015-06-15 22:11:21 -04:00
Zoltan Varga 4468c687cd [jit] Get rid of MonoGenericSharingContext->var_is_vt/mvar_is_vt, they are not needed anymore since the same information is now encoded in the gshared_constraint field of MonoGenericParam. 2015-06-15 21:57:02 -04:00
Zoltan Varga 868f51ee2a [runtime] Disable some fullaot tests on x86, since it has no dyncall code. 2015-06-15 21:40:55 -04:00
Zoltan Varga fcad145fc6 [jit] Use emit_get_gsharedvt_info_klass () in one place. 2015-06-15 19:21:48 -04:00
Zoltan Varga ffde958573 [jit] Add an inline version of the rgctx fetch trampolines, not yet used. 2015-06-15 18:59:41 -04:00
Zoltan Varga a8c943dec8 [jit] Use cfg->cbb to refer to the current bblock, avoid using the 'bblock' variable defined in method_to_ir () for this purpose, since it needs to be updated after every call which changes cfg->cbb. 2015-06-15 18:33:39 -04:00
Vlad Brezae 14b6dcd51c [runtime] Fix mono_sem_timedwait for the case where we get interrupted.
On mach, semaphore_timedwait returns KERN_ABORTED instead of setting the errno variable. The timeout argument is relative so it needs to be updated. We don't need to update the timeout argument on other platforms since it has an absolute value.
2015-06-15 15:10:23 -07:00
Vlad Brezae e9e5bd152b [runtime] Fix failure to wait on semaphore due to invalid argument 2015-06-15 15:09:44 -07:00
Marcos Henrich ae633585df [System.Core] Updated MemoryMappedFileTest
Commented out PointerOffset asserts because its value is always 0.
Unlike .NET mono implementation creates MemoryMappedViews with no
PointerOffset.
2015-06-15 22:26:57 +01:00
Zoltan Varga f29e0b01ef [runtime] Fix another memory leak in the dwarf writer. 2015-06-15 16:06:04 -04:00
Zoltan Varga c973633ef2 [runtime] Fix a memory leak in the dwarf writer. 2015-06-15 16:04:04 -04:00
Zoltan Varga 181401eb9c [jit] Avoid a crash in the dwarf dumper if debug info is not found. 2015-06-15 15:30:07 -04:00
Vlad Brezae d34b0955cd [test] Fix finalizer-exception test
Me might be very unlucky and still have the object pinned in random stack memory. Allocate multiple objects so we are sure that at least one of them is finalized.
2015-06-15 12:16:49 -07:00
Marcos Henrich 2b87ee1f69 [runtime] mono_mmap_open_handle with null arg.
Fixes segmentation fault when mono_mmap_open_handle is called with a null mapName argument.
MemoryMappedFiles.CreateFromFile calls mono_mmap_open_handle, .NET implementation accepts a null mapName and CoreFX uses CreateFromFile with null mapName.

Fixes #30825 and #30741.
2015-06-15 17:33:16 +01:00
Marcos Henrich 4ccc225ba6 [System.Core] Using more reference source files.
Changed MemoryMappedFile related code to use reference source
MemoryMappedViewAccessor and MemoryMappedViewStream.

This change was motivated by segmentations faults while dnmv code was
calling a CoreFX class that uses reflection to call MemoryMappedFile
code.

Now that we are using more code from reference sources there should be
no problem.

Fixes #30741 and #30825.
2015-06-15 16:09:31 +01:00
Zoltan Varga 444d8ada3f [runtime] Fix the arm64 build. 2015-06-15 09:50:05 -04:00
Jo Shields 775ce53a74 Use random port numbers for ServiceModel tests.
This prevents race conditions when running multiple test suites at once on the same computer, as happens on our ARM builders.
2015-06-15 12:39:07 +01:00
Marcin Cieslak 706dc27665 Enums are classes that can be assigned to value types
Fixes:
	https://bugzilla.xamarin.com/show_bug.cgi?id=29679
2015-06-14 23:58:09 +00:00
Marek Habersack 69c0c34721 Merge pull request #1873 from saper/PR_SET_TRACER
Use PR_SET_PTRACER only if defined
2015-06-14 00:41:18 +02:00
Marcin Cieslak 706a6971ac Use PR_SET_PTRACER only if defined
This feature has been introduced in Linux 3.4,
older kernels do have prctl(2) but know
PR_SET_PTRACER not.
2015-06-13 16:37:10 +00:00
João Matos 4713c7e824 Merge pull request #1872 from saper/channeldisp_fix
[WIP] Fix tests breaking due to network ports
2015-06-13 12:31:38 +01:00
Marcin Cieslak c698cd9d23 [tests] Use LocalEphemeralEndPoint in HttpWebRequestTest 2015-06-13 11:02:42 +00:00
Marcin Cieslak 8fc17b0ac7 [tests] fix System.UriFormatException
Follow-up to 05a1144d4d
2015-06-13 09:55:25 +00:00
Marek Habersack 8c65f4b11e [runtime] Fix a typo, should be HAVE_PRCTL 2015-06-13 08:31:13 +02:00
Zoltan Varga cc6ba42012 [runtime] Make sure the interfaces returned by Type:GetInterfaces () are in the consistent order. Fixes #31020. 2015-06-13 00:20:20 -04:00
Zoltan Varga 215519f2f3 Fix a warning. 2015-06-12 23:49:36 -04:00
Zoltan Varga b50fdc594f [runtime] Fix support for MONO_UNWIND_LOOKUP_ACTUAL_METHOD in mono_stack_walk_no_il (). 2015-06-12 23:49:35 -04:00
Zoltan Varga 44f1e14309 Merge pull request #1871 from saper/EADDRINUSE
[tests] Avoid "Address already in use"
2015-06-12 19:12:11 -04:00
Marcin Cieslak 05a1144d4d [tests] Avoid "Address already in use"
Few tests using networking seem to fail due to
"Address already in use"
error that may be caused by opening listening
port too fast - because of some tests running
in parallel or because 2MSL TIME_WAIT period.
2015-06-12 22:33:58 +00:00
Marek Habersack 8564368790 [Linux] Set permission for gdb to attach
Most modern Linux distributions limit the ptrace scope to allow
attaching only to the direct child processes for security reasons. The
user on such machine has to modify sysctl in order to allow non-root
processes to attach to arbitrary processes, which opens up a potential
security issue. The alternative is what's implemented here - when we
crash and ask gdb to dump the stack we can bless the gdb process and allow
it to attach to our process using prctl(2)
2015-06-12 23:51:12 +02:00
Zoltan Varga 729e4c1dc3 [arm] Increase the number of stack args to 10 in the dyn call code. Fixes #31060. 2015-06-12 13:31:52 -04:00
Marcos Henrich dfa1ecaff7 [System] Made ProcessTest.Modules more verbose.
When Process.Modules fails it will now print the list of assemblies it
looked into.
2015-06-12 12:31:45 +01:00
Marcin Cieslak eade1efc77 [eglib] Prefer <langinfo.h> to <localcharset.h>
For platforms that have external libiconv
located in some non-default directory (e.g. /usr/local/lib)
it is very difficult to force libtool to pick
up a static libiconv.a when needed.

We currently build eglib as a static library,
and then we continue to link eglib (with -leglib)
to other binaries and libraries.

As -leglib is a static library, we should either

1) incorporate the contents of libiconv.a into
   libeglib.a (therefore we would _require_
   libiconv.a to be installed).

2) prepare stub libiconv.la file and provide it
   to all libeglib.a consumers as a dependency.

We should not just detect HAVE_LOCALCHARSET_H,
add it to CPPFLAGS and then continue without
linking libiconv properly as a static library;
This manifests with the error message during
linking:

   gunicode.c:223: undefined reference to `locale_charset'

This workaround makes us look for <langinfo.h>
first, which - if available - will be there in
the standard C library. This fixes the gunicode.c
problem for FreeBSD and similar platforms, that
may install GNU iconv as an add-on library.
2015-06-11 22:49:08 +00:00
Alex Rønne Petersen 5129dd43cf Merge pull request #1868 from BillSeurer/ppc-floats
[ppc] Basic powerpc64 little endian enablement
2015-06-11 23:24:26 +02:00
Rodrigo Kumpera 78d1a1dfb9 [eglib] Ensures that home and user name always have a non-null value. 2015-06-11 16:25:55 -04:00
João Matos f4123496fa [System.IO.Compression] Implement support for custom entry name encoding when writing Zip files.
When you write to archive files and entryNameEncoding is set to a value other than null, the specified entryNameEncoding is used to encode the entry names into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=30972.
2015-06-11 18:19:24 +01:00
João Matos 12e2b1d116 [SharpCompress] Add support for custom entry text encoding in Zip writer. 2015-06-11 18:18:51 +01:00
Miguel de Icaza 4da1e26c09 [Lucene] Replace the large 66M dependency to a 4M dependency with the subset that we use 2015-06-11 09:47:54 -07:00
Bill Seurer 4b77d7620f [ppc] Some additional basic ppc64 enablement 2015-06-11 09:26:07 -05:00
Bill Seurer 9be2537b0e [ppc] Fix chkfinite for little endian 2015-06-11 09:25:54 -05:00
Bill Seurer 55bf7bef97 [ppc] Fix floating point issue for little endian. 2015-06-11 09:25:33 -05:00
João Matos 9c3cdff186 Merge pull request #1867 from saper/ucontext_x86
Missing <ucontext.h> for x86
2015-06-11 13:57:38 +01:00
Marcin Cieslak 799643a6f7 Missing <ucontext.h> for x86
Obtained from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198404
2015-06-11 12:53:21 +00:00
João Matos ce50124547 Merge pull request #1866 from saper/libc7
Use libc.so.7 for FreeBSD
2015-06-11 13:45:07 +01:00
João Matos 414e7433ac Merge pull request #1865 from saper/shellredir
Use Bourne shell redirect 2>&1
2015-06-11 13:29:48 +01:00
Romain Tartière 4ad59b97e0 Use libc.so.7 for FreeBSD
/usr/lib/libc.so is now an ld script
and to a symbolic link to the
libc.so.7 library.

Obtained from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=179899
2015-06-11 12:27:57 +00:00
Romain Tartière dd608574db Use Bourne shell redirect 2>&1
Do not assume our shell is C-shell
compatible.

Obtained from: https://svnweb.freebsd.org/ports?view=revision&revision=324730
2015-06-11 12:26:31 +00:00
João Matos e453a6e52b Merge pull request #1864 from saper/procbyid
FreeBSD: sysctl() to get process information
2015-06-11 13:20:36 +01:00
Marcin Cieslak 461fa2c261 FreeBSD: sysctl() to get process information
Use normal sysctl(3) interface (just like
Mac OS X), the OpenBSD way does not seem to work.
2015-06-11 12:11:43 +00:00
João Matos ac1920466e Merge pull request #1863 from saper/sysctlfreebsd
Use sysctl and <link.h> interface for FreeBSD
2015-06-11 12:37:48 +01:00
Marek Safar b001eccaa7 [system] Clear content length when redirecting to get request. Fixes #30604 2015-06-11 11:30:00 +02:00
Marcin Cieslak 54f1fd8a98 Use sysctl and <link.h> interface for FreeBSD 2015-06-11 08:51:04 +00:00
Zoltan Varga 2eb59a67dd [aot] Remove some dead code. 2015-06-10 21:13:53 -04:00
Zoltan Varga 955ed4f62d [aot] Refactor the initialization of aot methods into a separate function. 2015-06-10 21:12:04 -04:00
Zoltan Varga 8b77bd30ba [aot] Remove unused MONO_OPT_SHARED support. 2015-06-10 20:44:37 -04:00
Zoltan Varga 74d6d95af1 [runtime] Work around an ios9 problem where dlopen() cant' find system libraries specified without paths. 2015-06-10 16:30:07 -04:00
Marek Safar ca2f879ce1 [system.net.http] Add special handling for authentication with content (requires content resend) and disabled buffering. Fixes #30869
This is not supported by public HttpWebRequest but HttpClient is running in this mode.
2015-06-10 21:23:11 +02:00
Zoltan Varga 6c7a949cb2 [arm] Fix crashes on ios9 by using 16kb trampoline pages. 2015-06-10 11:23:09 -04:00
Marek Safar 9a151e405b [system.xaml] Add ValueSerializerAttribute type forwarder 2015-06-09 21:51:35 +02:00
Zoltan Varga 5b5f0ab6ab [runtime] Print out some information before asserting when a loader error is not handled. 2015-06-09 15:47:48 -04:00
Zoltan Varga ff847d8b6d [jit] Avoid using class init trampolines in AOT mode, the overhead of plt entries is comparable to the overhead of the inline implementation. 2015-06-09 14:11:22 -04:00
Marcos Henrich 5edec4a9b8 [runtime] MonoClass are now cached. 2015-06-09 16:45:20 +01:00
Marek Habersack 784e8ad29e Merge pull request #1812 from masterofjellyfish/mvc5-missingmethods
[System.Web] Added missing methods for default VS2013 MVC template
2015-06-09 15:58:23 +02:00
Matthias Bogad 58e0608c10 [System.Web] ASP.Net MVC5 missing methods fixed
I have added System.HttpApplication.RegisterModule(), the missing two properties of the System.Web.Routing.RouteCollection as well as the corresponding property in the HttpRuntimeSection to completely turn this off. Microsofts MIT-Licensed counterparts of the official System.Web assembly from github [0] were used as a reference. It is kind-of bolted on, but should be good enough until the whole open-sourced System.Web is incorporated. It should at least get the default MVC5 Template from Visual Studio 2013 up and running, once the async pipeline for the owin stuff is fixed.

[0]: http://github.com/Microsoft/referencesource/

Additionally, the MissingMethodException "get_InClientBuildManager" in System.Web.Hosting.HostingEnvironment was fixed.
In this commit, the following bugs were fixed:
https://bugzilla.xamarin.com/show_bug.cgi?id=21810
https://bugzilla.xamarin.com/show_bug.cgi?id=16475
2015-06-09 14:06:52 +02:00
Zoltan Varga 8b466eca52 [jit] Implement full-aot support for virtual delegate invokes on x86. 2015-06-08 15:25:34 -04:00
Zoltan Varga 7f949fbb95 [aot] Avoid aot-ing partially sharable icalls. 2015-06-08 13:41:02 -04:00
Zoltan Varga af05feb88e [aot] Fix full-aot support for Comparer instances instantiated with enums. 2015-06-08 13:31:38 -04:00
Zoltan Varga bd4a8a07e6 [jit] Implement support for UnsafeMov in gshared code. 2015-06-08 13:22:20 -04:00
Zoltan Varga a385bf0a83 [aot] Add partial shared instances called by partial shared instances. 2015-06-08 13:17:59 -04:00
Zoltan Varga 16f403bca9 [jit] Represent fully-shared method instances the same way as partially shared instances instead of representing them using the generic method declaration. 2015-06-08 13:16:17 -04:00
Zoltan Varga 16c1e4371b [aot] Use normal methods instead of their remoting-invoke-with-check wrappers in full-aot mode. 2015-06-08 13:16:17 -04:00
Zoltan Varga c50809ebd5 [jit] Implement full-aot support for virtual delegate invokes on amd64. 2015-06-08 13:16:17 -04:00
Marek Safar de19957d20 [system.net.http] Apply custom to string formating to parsed values. Fixes #30897 2015-06-08 17:40:31 +02:00
Neale Ferguson bb8d8e475e Add support for -fPIE on s390x 2015-06-08 11:26:51 -04:00
João Matos 273dfb2f09 [runtime] Prefer eglib's g_snprintf as snprintf does not work under all platforms.
Fixes the MSVC build.
2015-06-08 16:05:10 +01:00
Marcos Henrich 33a3716af6 [System] Test ProcessModule managed assemblies. 2015-06-08 14:04:10 +01:00
Marcos Henrich b3069efc32 [runtime] Managed ProcessModule now has versions. 2015-06-08 14:02:08 +01:00
Marcos Henrich 46dc6758c6 [runtime] Process.Modules with managed assemblies.
System.Diagnostics.Process.Modules now also returns managed assemblies.
With this change it is now possible to use Process.Modules to retrieve
the place in memory of any loaded assembly.

ProcessModules relative to a managed assembly have a FileName that
starts with "[In Memory]".
2015-06-08 14:02:08 +01:00
Marek Safar e70972ac0f [windowsbase] Add ValueSerializerAttribute type forwarder. Fixes #30448 2015-06-08 14:23:04 +02:00
Rodrigo Kumpera aac7aed45e Merge pull request #1861 from saper/home-override
Override Environment.SpecialFolder.Personal with $HOME
2015-06-08 06:57:43 -05:00
Marek Safar 3c47caca34 [system] Don't dispose exposed redirected streams. Fixes #30868 2015-06-08 13:29:19 +02:00
Alex Rønne Petersen afd7d742ab Merge pull request #1859 from saper/unit-tests-static
[runtime] Use libtool convenience library for unit tests. Fixes #21520.
2015-06-08 02:42:13 +02:00
Marcin Cieslak cf4e7339e3 [corlib] Assume UTC if no $TZ set. Fixes #30360
Don't throw System.TimeZoneNotFoundException
if no $TZ is set and there is no /etc/localtime
or similar file.
2015-06-07 22:19:56 +00:00
Jan Beich f8d2aeea4a Override Environment.SpecialFolder.Personal with $HOME
Any port that writes to Environment.SpecialFolder.Personal during build
or when running tests may end up with files outside of stage area that
aren't cleaned up by the ports framework. The issue lies with Mono
looking in /etc/passwd first and only if no entry found there in HOME.

Patch based on discussion in

https://github.com/mono/mono/pull/371

Obtained from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193426
2015-06-07 22:07:52 +00:00
Marcin Cieslak e0289946b8 [runtime] Use libtool convenience library for unit tests. Fixes #21520.
In order to resolve interdependencies between
static libraries we should create a temporary
throw-away ("convenience") library via libtool.

Should unbreak unit tests on Linux
2015-06-07 21:35:43 +00:00
Zoltan Varga a270f04d9c [runtime] Fix mono_method_get_name () so it prints out type variables using their name when used inside the runtime. 2015-06-06 11:44:23 -04:00
Zoltan Varga 082295bf86 [aot] Add a corresponding instance of EnumEqualityComparer for EqualityComparer instances instantiated with enums. 2015-06-06 11:09:56 -04:00
Zoltan Varga 8d00f23370 Disable a test which can allocate and commit 4gb of memory on 64 bit platforms. 2015-06-05 18:14:43 -04:00
Rodrigo Kumpera 90bb2cdd6e [coop] When inserting safepoints at EH handlers, make sure they don't end up between start_handler and get_ex_obj
The problem is that those two ops are required to be one after the other as there's an implicit register dependency between them.

OP_SAFEPOINT would clobber that register (RAX on amd64) and cause all sorts of issues.
2015-06-05 15:48:24 -04:00
Alex Rønne Petersen 02b7567628 Merge pull request #1856 from alexrp/profiler-improvements
Profiler improvements
2015-06-05 21:22:52 +02:00
Marek Safar 74b5b65701 [mcs] Silently ignore invalid assembly name in InternalsVisibleTo. Fixes #30679 2015-06-05 16:55:57 +02:00
Ankit Jain f03a1b538b Merge pull request #1857 from slluis/fix-assembly-resolver
[MSBuild] Fix assembly resolution issue
2015-06-05 19:41:54 +05:30
Lluis Sanchez dd8aadfd58 [MSBuild] Fix minor assembly resolution issue
When getting the assembly name of a file, don't cache it if the
file has just been deleted.
2015-06-05 14:48:49 +02:00
Lluis Sanchez 31b628c9e7 [MSBuild] Fix assembly resolution issue
The ResolveAssemblyReference task class keeps a reference to an
instance of AssemblyResolver, and AssemblyResolver keeps a cache
of assembly names, indexed by file name. The problem is that
the cache doesn't take into account that files can change between
builds.

For example, if a referenced assembly doesn't exist, the cache
will store that the file doesn't have an assembly name. If after
the build the file is created and a new build operation is started,
the cache will still return that the file doesn't have a name.

This is not a problem when running xbuild from the command line,
since every build starts a new process, but MonoDevelop uses
the MSBuild API to load and build projects, and doesn't start
a new process every time, so the cache is never cleared.

The solution is to keep the last write timestamp in the cache,
so that it can check if the file changed before returning the
cached name. It also needs to do a better handling of non existant
files.
2015-06-05 12:00:34 +02:00
Zoltan Varga 5ccfced37c [sdb] Avoid marking seq points as nonempty-stack if they have a sym seq point. Fix the linking of seq points when an endfinally instruction is in a separate bblock. Fixes #30617. 2015-06-04 16:45:46 -04:00
Rodrigo Kumpera 6de51884fd Merge pull request #1849 from esdrubal/rfix
[corlib] MonoAssembly.LoadWithPartialNameInternal.
2015-06-04 15:16:26 -05:00
Alex Rønne Petersen 406d53e086 [profiler] Add myself as author. 2015-06-04 21:29:53 +02:00
Alex Rønne Petersen ef934f394b [profiler] Start jotting down some format oddities we should eventually fix. 2015-06-04 21:24:57 +02:00
Alex Rønne Petersen 1a22e028e0 [profiler] Fix missing TYPE_JIT events for alloc/exception/monitor backtraces. 2015-06-04 21:24:57 +02:00
Alex Rønne Petersen 6174e9a415 [profiler] Disable the ELF code for now.
This causes strange crashes on some Linux systems. We don't particularly need
the additional information to get useful backtraces (we can just fall back to
`dladdr`) so disable it for now.
2015-06-04 21:24:57 +02:00
Alex Rønne Petersen ab324cadc5 [profiler] Process coverage info regardless of call depth restriction.
Only enter/leave events should be subject to this.
2015-06-04 21:24:57 +02:00
Alex Rønne Petersen 27d2dd2a1a [profiler] Remove outdated compilation instructions. 2015-06-04 21:24:57 +02:00
Zoltan Varga 4f62f3fc57 [llvm] Decrease the basic block size cutoff to 3000 instructions, 5000 still leads to large slowdowns in llc on armv7 (TypeTest.GetProperties_Flags ()). 2015-06-04 15:10:50 -04:00
Zoltan Varga 50afff2db3 [arm] Implement support for nullable arguments in the dyncall code. Fixes #29491. 2015-06-04 12:46:22 -04:00
Zoltan Varga 2062525f96 [aot] Enable the direct emission of llvm object files in asmonly mode if the llvm output file ends with .o. 2015-06-03 22:45:53 -04:00
Zoltan Varga 550a8017ec [jit] Emulate OP_RREM if OP_FREM is emulated. Fixes #30698. 2015-06-03 14:40:24 -04:00
Zoltan Varga 158783843e [sdb] Fix interface/virtual calls to valuetype methods. 2015-06-03 13:52:52 -04:00
João Matos c04f20ba3b Merge pull request #1854 from svedm/master
Fix typo
2015-06-03 18:41:26 +01:00
Svetoslav dcaee6b560 Fix typo 2015-06-03 22:20:18 +05:00
Marek Safar 4692762549 Merge pull request #1851 from esdrubal/mmf
MemoryMappedFile improvements
2015-06-03 18:07:39 +02:00
Marcos Henrich a495f37aeb [corlib] Referencesource UnmanagedMemoryAccessor.
Corlib now uses referencesource System.IO.UnmanagedMemoryAccessor.
2015-06-03 15:41:03 +01:00
Marcos Henrich d527ed4980 [System.Core] Implemented PointerOffset
Implemented MemoryMappedViewAccessor.PointerOffset and
MemoryMappedViewStream.PointerOffset.
2015-06-03 15:41:02 +01:00
Marcos Henrich 978ebdcd47 [System.Core] Test MemoryMappedFile views.
MemoryMappedViewAccessor and MemoryMappedViewStream are now tested with
offsets.
2015-06-03 15:41:02 +01:00
Zoltan Varga 210df1d497 [bcl] Fix a sys.drawing test so it doesn't fail on misconfigured systems. 2015-06-03 08:49:45 -04:00
Marek Safar 7127e2e0a5 [mcs] Recursivelly check for left-hand side of an assignment of a null propagating operator. Fixes #30695 2015-06-03 12:04:51 +02:00
Jo Shields 3f7098683d Fix "make dist" for mono/utils/mono-complex.h 2015-06-03 08:01:24 +01:00
Alexis Christoforides 9820f6e148 [System.IO.KeventWatcher] Fix handling some cases where an item is moved out of the watched path.
If a file or directory are moved out of the watcher's path they are removed from the index, but they might still have events in the kevent() changelist. This would sometimes cause an exception.
2015-06-02 19:10:48 -04:00
Rodrigo Kumpera fb4366374d [jit] Fix the coop amd64 backend. 2015-06-02 14:47:29 -05:00
Marek Safar 3d6135a624 Merge pull request #1847 from alexanderkyte/left_shift_dynamic
[runtime] Emit the necessary left shift anding in the LambdaCompiler
2015-06-02 21:34:53 +02:00
Alexander Kyte c5d5da257e [runtime] Emit the necessary left shift anding in the LambdaCompiler
We were observing dtest-006.exe test failing on armhf. This test
checks that a right shift with a negative shift amount and a
dynamic base is shifted by the right amount.

We were failing it because we were excluding the step that we
do in regular code generation, which is to do a binary and of the shift
amount so it behaves like we are shifting by the original shift
amount modulo 32. The C# spec defines left shift like so.

This commit adds that to the LambdaCompiler.
2015-06-02 19:31:00 +00:00
Marek Safar fe797b7f54 [mcs] Apply explicit property param target to correct parameter index. Fixes #30587 2015-06-02 20:37:32 +02:00
Marek Safar 2fa2380595 [mcs] Add special HostProtection handling to deletes 2015-06-02 20:37:31 +02:00
Marcos Henrich 360f2deff8 [corlib] MonoAssembly.LoadWithPartialNameInternal.
Implemented MonoAssembly.LoadWithPartialNameInternal.
Implementation is not 100% correct without handling stackMark properly.
Improving this would require the generous amount of work of adding
StackCrawlMark support to the runtime.

Fixes #27103.
2015-06-02 14:52:02 +01:00
Alex Rønne Petersen 177f563b6d Merge pull request #1846 from BillSeurer/master
Add tailcall opcode for powerpc64le
2015-06-02 13:59:05 +02:00
João Matos b7af87321a Merge pull request #1848 from tritao/complex_math
Cross-platform complex math / MS Threadpool portability
2015-06-02 12:53:12 +01:00
Rolf Bjarne Kvinge 066d3eb6ba [corlib] Fix test after 5cee52916. 2015-06-02 13:00:38 +02:00
Joao Matos cae5827535 [ms-threadpool] Replaced complex math with portable Mono APIs. 2015-06-02 10:48:33 +01:00
Joao Matos 099ab41745 [runtime] Implemented cross-platform complex math code. 2015-06-02 10:47:53 +01:00
Marek Safar cb9a09b3f0 Bump ikvm & ikdasm 2015-06-02 08:51:37 +02:00
Alexis Christoforides a1828a2aa9 [System.IO.KeventWatcher] Disable the watcher when the root directory is deleted. Fixes #30043
This matches MS.NET behavior.
2015-06-01 23:07:07 -04:00
BrzVlad 24d62be2f7 Merge pull request #1841 from BrzVlad/fix-managed-alloc
Fix managed allocator
2015-06-01 16:41:02 -07:00
Zoltan Varga 21249b6e3b [amd64] Fully initialize the the MonoContext used by the generic trampoline code. 2015-06-01 18:42:32 -04:00
Zoltan Varga 9a8386091e [corlib] Make corlib use the v4 runtime version in mobile profiles. 2015-06-01 17:32:18 -04:00
Zoltan Varga 570c5be49d [jit] Fix the hashing/equals check for MONO_PATCH_INFO_JIT_ICALL_ADDR. 2015-06-01 16:42:35 -04:00
Vlad Brezae c24d753c03 [sgen] The normal managed allocator receives only one argument
Changed in a83f965db0
2015-06-01 12:34:32 -07:00
Zoltan Varga 272bdcaff3 Remove more CAS code. 2015-06-01 15:24:27 -04:00
Zoltan Varga 88b9fd6cc8 Remove more CAS code. 2015-06-01 15:24:27 -04:00
Sebastien Pouliot 6c51f352bd [corlib] Xamarin.Mac to continue default to the OS default codepage
XM 2.0 was the first version to ship the mobile (w/unified) and it used
the OS default codepage.

The previous, system mono, profile was already using the OS default
codepage so it make sense for XM to be consistent across profiles (
including the 4.5 subset)
2015-06-01 15:20:43 -04:00
Rodrigo Kumpera 8b75648151 [BCL] Partial revert of b83af940ff to use the right reference sources. 2015-06-01 14:39:59 -04:00
Rodrigo Kumpera 5af1f7d2f7 [BCL] Fix the mobile_static profile. 2015-06-01 14:39:58 -04:00
Zoltan Varga fa20f3caf9 [aot] Fix thumb support after the separate llvm changes. Fixes #30472. 2015-06-01 14:27:03 -04:00
Zoltan Varga b83af940ff [runtime] Fix the windows build. 2015-06-01 14:21:27 -04:00
Bill Seurer 63bcae6fca Add tailcall opcode for powerpc64le 2015-06-01 13:20:01 -05:00
Zoltan Varga 3beff78094 [runtime] Update object offsets. 2015-06-01 12:01:05 -04:00
Zoltan Varga 13e562a27f Fix make dist. 2015-06-01 11:40:24 -04:00
Marek Safar f37b5da5a7 [corlib] Update failing test 2015-06-01 16:58:20 +02:00
Zoltan Varga 7d400865a3 [amd64] Add fregs to MonoContext, only used by the trampoline code currently. 2015-06-01 10:34:38 -04:00
Marek Safar 50a1e4ce9d Merge pull request #1845 from esdrubal/httpfix
HttpListenerRequest Uri is now unescaped.
2015-06-01 16:25:11 +02:00
Marek Safar 67cd52b1d7 Bump reference sources 2015-06-01 15:47:42 +02:00
Marek Safar 7050ee1ee7 [System.Runtime.Serialization] Update public api 2015-06-01 15:46:38 +02:00
Marcos Henrich 37ff703afc [System] HttpListenerRequest Uri is now unescaped.
Fixes #29927
2015-06-01 14:43:41 +01:00
Marcos Henrich 2441d532e4 [System] Added HttpListenerRequestUriBuilder
Referencesource HttpListenerRequestUriBuilder can now be used.
2015-06-01 14:43:41 +01:00
Marek Safar 3f6b3e46b4 [ilasm] Add support for undocumented modopt/modreq using primitive types 2015-06-01 14:53:16 +02:00
Marcos Henrich 0361fc34a8 [System] Test HttpRequest Uri unescaping
Covers #29927
2015-06-01 11:33:34 +01:00
smirtw 6b146d49f9 Added sha512 and sha256 and defaults to SHA512
SHA1 is deprecated and microsoft won't accept SHA1 into the certificate store after 2016. Defaulting to SHA512 is a good practice to prevent unaware folks from generating weak ssl certs.
2015-05-31 11:11:43 -07:00
Zoltan Varga 54e8010aad [runtime] Fix the locking around the assembly->tokens table. Fixes #30551. 2015-05-31 12:43:21 -04:00
Zoltan Varga 9854b187a2 [amd64] Make the generic trampolines fill out a MonoContext structure on the stack, and put its address into MonoLMFTramp. 2015-05-30 21:04:28 -04:00
Zoltan Varga 984b0e375e [amd64] Compute frame size precisely for the generic trampoline. 2015-05-30 20:42:19 -04:00
Zoltan Varga 09a0763953 [amd64] Simplify the throw trampolines by constructing and passing a MonoContext instead of a reg array. 2015-05-30 18:48:46 -04:00
Zoltan Varga e8e78456dd Revert "[amd64] Simplify the throw trampolines by constructing and passing a MonoContext instead of a reg array."
This reverts commit c409bc9311.

Revert this as it breaks on linux.
2015-05-30 11:18:33 -04:00
Zoltan Varga 4bd2d86add Revert "[amd64] Add back a dummy argument to the throw trampolines to fix unaligned stack problems."
This reverts commit d262c343d1.

Revert this as it breaks on linux.
2015-05-30 11:18:07 -04:00
Zoltan Varga d262c343d1 [amd64] Add back a dummy argument to the throw trampolines to fix unaligned stack problems. 2015-05-30 10:51:24 -04:00
Marek Safar 460ac99d0a Merge pull request #1816 from esdrubal/getdaylight
[corlib] Fixed TimeZoneInfo.GetDaylightChanges.
2015-05-30 10:11:05 +02:00
Zoltan Varga c409bc9311 [amd64] Simplify the throw trampolines by constructing and passing a MonoContext instead of a reg array. 2015-05-29 21:13:23 -04:00
Zoltan Varga 09f8c0d231 [runtime] Update object offsets. 2015-05-29 21:01:38 -04:00
Zoltan Varga 92c36fdbd2 [amd64] Use a register array in MonoContext instead of named fields, this simplifies a lot of code. 2015-05-29 21:00:11 -04:00
Zoltan Varga 31753770c0 [llvm] Use the generic IL code for generic class inits. 2015-05-29 19:16:04 -04:00
Zoltan Varga 39de60515f [jit] Refactor the calls to class init trampolines into a common function. 2015-05-29 19:07:03 -04:00
Zoltan Varga effbf38142 [amd64] Make generic_class_init as clob:c. 2015-05-29 19:05:03 -04:00
Zoltan Varga 1900ab2a05 [sdb] Fix reading/writing locals when not all of the them have associated debug info. Fixes #30529. 2015-05-29 14:21:27 -04:00
Zoltan Varga a87a5cf71e [jit] Remove generic class init trampolines, all architectures either use OP_GENERIC_CLASS_INIT trampoline or an IL fallback. 2015-05-29 13:49:55 -04:00
Zoltan Varga cebe30dedd [jit] Emit a fallback IL version of generic class initialization. 2015-05-29 13:49:55 -04:00
Miguel de Icaza 7f72a2c795 [Version] I am sick of the mono --version showing '((detached/XX)', fixed it 2015-05-29 12:50:19 -04:00
Rodrigo Kumpera 67e92e2a28 Merge pull request #1817 from alexanderkyte/bug30085
[runtime] Fix resolution of a type with an incorrect assembly name.
2015-05-29 11:21:23 -05:00
Marek Safar 1f6d4a75db [PEAPI] Fixes custom attributes with byte array constant 2015-05-29 17:42:14 +02:00
Zoltan Varga 4183c9cbc5 [corlib] Avoid a nullref in CustomAttributeData.ToString () if its called without calling ConstructorArguments/NamedArguments. 2015-05-29 10:07:41 -04:00
Marcos Henrich 99619b55ce Bump referencesource 2015-05-29 14:58:24 +01:00
Marcos Henrich 15e133b791 Updated .csproj files. 2015-05-29 14:12:22 +01:00
Marek Safar 28e4fa0e0f [ilasm] Extend syntax of custom attribute constructor constants 2015-05-29 12:37:25 +02:00
Marek Safar 296f97e38d [corlib] Fixes commit f0bea6966a 2015-05-29 10:56:13 +02:00
Marek Safar f0bea6966a [corlib] Add timeout to NestedLeakingSynchronizationContext 2015-05-29 08:36:52 +02:00
Vlad Brezae 98d7ad4128 [boehm] Use managed allocator only for objects with known jit compile time size.
The allocator always expects to receive two arguments.
2015-05-28 16:08:37 -07:00
Alexander Kyte bba74d6778 [runtime] Fix resolution of a type with an incorrect assembly name. 2015-05-28 21:56:52 +00:00
Marek Safar 280b98a152 [mcs] Double closing parens don't have priority inside interpolated string. Fixes #30469 2015-05-28 17:23:49 +02:00
Zoltan Varga ccb0b35c76 [arm64] Add generic_class_init to cpu-arm64.md. 2015-05-28 10:52:14 -04:00
Marek Safar c2afedbd4e [corlib] Remove unused defines 2015-05-28 15:45:54 +02:00
Marek Safar c4915d7335 [corlib] Add role based security to desktop only 2015-05-28 15:41:33 +02:00
Marek Safar eeac1570ae [mcs] Await in finally clause with user catch block needs additional try scope. Fixes #30478 2015-05-28 15:41:32 +02:00
Alexander Köplinger 3712cf10bd [build] Fix encoding attribute in crash XML to be utf-8
Some tools choke on "utf8", it should be "utf-8" to be standards compliant.
2015-05-28 15:18:16 +02:00
Marek Safar 221d1acb3a Merge pull request #1838 from esdrubal/assemblyname
[corlib] AssemblyName.CultureName now matches .NET
2015-05-28 11:49:48 +02:00
Marcos Henrich ede3018242 [corlib] AssemblyName.CultureName now matches .NET
AssemblyName.CultureName was returning "neutral" for invariant culture
info whereas .NET returns "".

This was causing problems in Roslyn while comparing assemblies with
an empty culture name against references that would have culture name
set to "neutral".

Fixes #30502.
2015-05-28 10:42:17 +01:00
Marcos Henrich cb88bd4ba9 [corlib] Test AssemblyName.CultureName
Test that AssemblyName.CultureName matches .NET behaviour regarding
AssemblyName with invariant culture info.
2015-05-28 10:41:45 +01:00
Zoltan Varga 88d2b9da2a [runtime] Print wrapper methods in the same format as normal methods in stack traces. Fixes #30507. 2015-05-27 17:20:38 -04:00
Rodrigo Kumpera e87716bc7e [mini] Add assert around managed allocator to avoid passing it a zero size. 2015-05-27 16:42:33 -04:00
Zoltan Varga ebc2cd8c8e Revert "[x86] Enable support for OP_GENERIC_CLASS_INIT."
This reverts commit 2575daaacc.

Revert this as it breaks llvm, which passes the vtable argument on the stack.
2015-05-27 16:28:40 -04:00
Zoltan Varga 1ebeb2a47d [arm] Set more information in cinfo for fp returns, gsharedvt depends on it. 2015-05-27 15:34:39 -04:00
Marek Safar 0d65467d5a [corlib] Improve SynchronizationContext test dependency 2015-05-27 21:00:15 +02:00
Sebastien Pouliot d6b6950a77 [corlib] Let XI and XM define their own default encoding [#29928]
605192528d used UTF8Unmarked for MONOTOUCH
and XAMMAC. However it's initialized differently (than the old UTF8) and
caused unit test regressions in System and System.Net.Http unit tests

This new logic moves the default encoding creation into the products
themselves.
2015-05-27 13:35:38 -04:00
Sebastien Pouliot 6d0979a909 Revert "[corlib] Restore UTF8 as the default encoding for XI and XM [#29928]"
This reverts commit 605192528d.

Using EncodingHelper.UTF8Unmarked cause regressions in System and
System.Net.Http unit tests
2015-05-27 13:34:33 -04:00
João Matos 65f9215c22 [System.IO.Compression] Do not swallow inner exceptions in ZipArchive. 2015-05-27 17:27:34 +01:00
Neale Ferguson 8c36d04c87 Add support for OP_GENERIC_CLASS_INIT
Add support for async callback
2015-05-27 11:27:10 -04:00
Zoltan Varga 3b588df630 [llvm] Fix rethrowing exceptions on x86. 2015-05-27 11:23:34 -04:00
Marek Safar 1cd83569da [corlib] Clone all levels of captures ExceptionDispatchInfos 2015-05-27 17:14:01 +02:00
Zoltan Varga 200f157461 Merge pull request #1836 from ludovic-henry/referencesource-safehandle-tests
[corlib] Fix tests for System.Runtime.InteropServices.SafeHandle
2015-05-27 10:15:12 -04:00
Zoltan Varga 3753066849 Merge pull request #1835 from ludovic-henry/referencesource-threadlocal-tests
[corlib] Add test for ThreadLocal finalization
2015-05-27 09:35:35 -04:00
Ludovic Henry bdf0af5e62 [corlib] Fix tests for System.Runtime.InteropServices.SafeHandle
These tests would tend to leave non disposed SafeHandle which would later be finalized, then throwing ObjectDisposedException. They would also crash on .NET.
2015-05-27 10:28:49 -03:00
Ludovic Henry 8785f28ed6 [corlib] Add test for ThreadLocal finalization 2015-05-27 10:20:40 -03:00
Zoltan Varga b13795141d [llvm] Fix the loadable llvm build. 2015-05-27 08:57:46 -04:00
Marek Safar c35541d674 [corlib] Add more obsolete and not working types to MonoDroid 2015-05-27 11:32:33 +02:00
Marek Safar 62345ee9fd [system] Fixes incorrect tests 2015-05-27 10:49:56 +02:00
Zoltan Varga c814a25234 [jit] Properly compute the layout of generic instances created by partial sharing. Fixes #30204. 2015-05-26 20:22:52 -04:00
Zoltan Varga 2575daaacc [x86] Enable support for OP_GENERIC_CLASS_INIT. 2015-05-26 17:15:00 -04:00
Alex Rønne Petersen b67609f056 [mini] Remove MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE macro.
All architectures define this.
2015-05-26 16:48:58 -04:00
Zoltan Varga 795ba16c46 [configure] Bump version to 4.3.0. 2015-05-26 15:52:09 -04:00
Zoltan Varga 3b9c97fc90 [sgen] Use mono_class_has_finalizer () instead of klass->has_finalize. 2015-05-26 13:53:33 -04:00
Marek Safar cf766c92a7 [corlib] Clean up thread execution context 2015-05-26 17:42:27 +02:00
Zoltan Varga 58064152f2 [jit] Handle not attached threads in mono_thread_state_init_from_sigctx (). Hopefully fixes #28187. 2015-05-26 11:14:27 -04:00
Zoltan Varga 202b55be9b [System] Disable a test on mobile. 2015-05-26 10:48:06 -04:00
Marek Safar 378455b538 Merge pull request #1832 from Tragetaschen/fix-http-headers
Fix reading back a HTTP Request's Host header
2015-05-26 16:19:55 +02:00
Marek Safar 4bfbc0c75b [mcs] Emit correct binary comparison for useless is operator involving user value type with equality user operators 2015-05-26 14:16:47 +02:00
Rolf Bjarne Kvinge 2b46111528 [corlib] A few XI-internal functions have been renamed; use the new names. 2015-05-26 14:08:54 +02:00
Rolf Bjarne Kvinge 06eaf013eb [mdbrebase] Make sure to use a unique temporary filename.
Otherwise parallel invocations might end up stomping on eachother
(these two files are processed in parallel):

    Processing /work/maccore/master/maccore/builds/install/mac/xammac/bcl/mscorlib.dll.mdb
    Processing /work/maccore/master/maccore/builds/install/mac/net_4_5/bcl/mscorlib.dll.mdb

    Unhandled Exception:
    System.IO.FileNotFoundException: /var/folders/g9/k5kx4z211ld_lwlbfxv5rq040000gn/T/mscorlib.dll.mdb does not exist
    File name: '/var/folders/g9/k5kx4z211ld_lwlbfxv5rq040000gn/T/mscorlib.dll.mdb'
      at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00000] in <filename unknown>:0
      at Mono.MdbRebase.MdbRebase.RewriteMdbFile (System.String inputFile) [0x00000] in <filename unknown>:0
      at Mono.MdbRebase.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: /var/folders/g9/k5kx4z211ld_lwlbfxv5rq040000gn/T/mscorlib.dll.mdb does not exist
    File name: '/var/folders/g9/k5kx4z211ld_lwlbfxv5rq040000gn/T/mscorlib.dll.mdb'
      at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00000] in <filename unknown>:0
      at Mono.MdbRebase.MdbRebase.RewriteMdbFile (System.String inputFile) [0x00000] in <filename unknown>:0
      at Mono.MdbRebase.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
2015-05-26 14:08:53 +02:00
Rolf Bjarne Kvinge 43d7dc7e83 [mdbrebase] Add a quiet mode. 2015-05-26 14:08:53 +02:00
Rolf Bjarne Kvinge dbb9f7ae70 [mdbrebase] Indent properly. 2015-05-26 14:08:52 +02:00
Zoltan Varga 9623915cee [llvm] Fix the argument type of specific_trampoline_generic_class_init. 2015-05-26 07:58:38 -04:00
Marek Safar ee621cea34 [corlib] More thread code from reference sources, mostly for argument checks 2015-05-26 12:12:25 +02:00
Atsushi Eno 80093e6a4d [xbuild] make sure to load appropriate Microsoft.Build.Tasks*.dll.
When running MONO_LOG_LEVEL=debug xbuild with previous versions, it showed
that Microsoft.Build.Tasks.v4.0.dll was loaded, while the expected one was
Microsoft.Build.Tasks.v12.0.dll (as current xbuild script loads the one
from xbuild_12 profile). It was because Microsoft.Build.Tasks*.dll was
not referenced by xbuild.exe and thus it was loaded differently.

This hack adds strong reference to some class in Microsoft.Build.Tasks*.dll
of the corresponding version for each profile to resolve that issue.
2015-05-26 15:43:44 +08:00
Zoltan Varga 4bacc38aac Revert "[runtime] Use condvars instead of events for notifying the finalizer thread."
This reverts commit 5d36a53b2e.

Revert this as it causes hangs on wrench.
2015-05-25 22:03:58 -04:00
Zoltan Varga abda50d3ae [arm] Implement support for OP_GENERIC_CLASS_INIT. 2015-05-26 00:29:48 +00:00
Zoltan Varga 7b885bba56 [arm] Remove unused codegen files. 2015-05-26 00:29:47 +00:00
Joao Matos 1c38a07b54 [metadata] Replace non-portable usleep() with g_usleep() in MS threadpool. 2015-05-25 19:40:30 +01:00
Joao Matos 0bac16c486 [metadata] Fixed MSVC union compilation issues in MS threadpool. 2015-05-25 19:40:22 +01:00
Joao Matos dac2365030 [windows] Fixed MSVC config.h to define HAVE_COMPLEX_H. 2015-05-25 19:40:15 +01:00
Joao Matos c8cb145436 [sgen] Fixed compilation of sgen-workers.c under MSVC. 2015-05-25 19:40:07 +01:00
Joao Matos 0dd375255a [metadata] Fixed compilation of gc-stats.c under MSVC. 2015-05-25 19:39:59 +01:00
Joao Matos d09387907b [windows] Update MSVC DLL export definition files. 2015-05-25 19:39:52 +01:00
Joao Matos 6b98370101 [windows] Prepare VS build properties for proper DLL export/import definitions. 2015-05-25 19:39:45 +01:00
Joao Matos 2f97fa4262 [windows] Updated VS project files. 2015-05-25 19:39:38 +01:00
Zoltan Varga 6ae522d4da [llvm] Fix the IR generated for OP_GENERIC_CLASS_INIT. 2015-05-25 11:11:13 -04:00
Zoltan Varga 3e8becd92b [arm] Fix the handling of callee saved fp registers during unwinding, previously they were saved in an 32 bit array. Fixes #29726. 2015-05-25 11:00:37 -04:00
Marek Safar 5361ccb6b3 [corlib] Add TimeZoneInfo support to xammac 2015-05-25 16:34:04 +02:00
Marek Safar 97bfbacd0c [corlib] TimeZoneInfo.GetSystemTimeZones should work as singleton. Fixes #29906 2015-05-25 14:55:29 +02:00
Marek Safar 4dc9a90d7f [corlib] Clean up some of TimeZoneInfo ifdefs 2015-05-25 14:31:13 +02:00
Marek Safar 4cbe442b2e [corlib] SafeHandle from reference sources without code duplication. 2015-05-25 11:21:34 +02:00
Marek Safar b185d5dfa1 [mcs] Emit value type initializers without local reset before member are assigned. Fixes #30349 2015-05-24 16:13:40 +02:00
Kai Ruhnau 8483356376 Fixed parsing the host header field 2015-05-22 23:38:27 +02:00
Kai Ruhnau 1344fbc5fb Added a test for accessing HttpRequestHeader.Host 2015-05-22 23:38:27 +02:00
Marek Safar ac644c907d [corlib] Disable more CAS code 2015-05-22 21:04:52 +02:00
Marek Safar d339472524 [mcs] Emit decimal constant attribute sign using csc compatible format. Fixes #30267 2015-05-22 20:10:58 +02:00
Marek Safar 3fcc658371 [runtime] Check remoting support in mscorlib before wrappers are emitted. 2015-05-22 17:15:43 +02:00
Marek Safar 584056a62b [system.xml] Check different results under disabled cas 2015-05-22 17:15:43 +02:00
Marek Safar d3bda044e0 [corlib] ExecutionContext and other contexts from reference sources. Fixes #28793 and similar nested context switches issues. 2015-05-22 17:15:43 +02:00
João Matos e1c9e02099 [aot] Fixed the strip invocation to correctly handle paths with spaces. 2015-05-22 15:04:59 +01:00
João Matos bef3aa3388 [aot] Added a "temp-path" option to pass a location where to store temporary generation files. 2015-05-22 15:04:59 +01:00
João Matos c60627857c [aot] Document the "llvm-path" option. 2015-05-22 15:04:59 +01:00
João Matos fcb51d4d62 [aot] Refactored path cleaning code into a standalone function. 2015-05-22 15:04:58 +01:00
Sebastien Pouliot 605192528d [corlib] Restore UTF8 as the default encoding for XI and XM [#29928] 2015-05-22 09:55:37 -04:00
João Matos be2491409e Merge pull request #1829 from StephenMcConnel/bug-30325
Prevent DataGridViewTextBoxCell from using Disposed editor object
2015-05-22 11:24:45 +01:00
Marcos Henrich e602b242ff [corlib] Moved ValueType field into another class.
Adding fields to ValueType can mess with sub class layouts.
Fixes #30060.
2015-05-22 09:33:05 +01:00
Zoltan Varga 267812a6ff Merge pull request #1828 from alexanderkyte/jenkins_arm_profiler_crash
[runtime/profiler] Check that coverage hash tables have been initialized before freeing them.
2015-05-22 03:17:40 +02:00
Stephen McConnel 328fc576b3 Prevent DataGridViewTextBoxCell from using Disposed editor object
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=30325.
2015-05-21 17:48:53 -05:00
Alexander Kyte 3d744d3253 [runtime/profiler] Check that coverage hash tables have been initialized before freeing them. 2015-05-21 16:58:07 -04:00
Atsushi Eno 63a8b865f7 [WCF] bonus, NET_2_1 is blocking set_Timeout. It didn't exist in Moonlight. 2015-05-22 01:23:27 +08:00
Zoltan Varga 0e0c1757fc [aot] Handle partial sharing in mono_aot_get_unbox_trampoline (). 2015-05-21 15:59:26 +02:00
Zoltan Varga b1fafa451c [runtime] Handle generic methods in mono_method_get_vtable_slot (). Fixes #30276. 2015-05-21 15:59:26 +02:00
Atsushi Eno 35fd7cd2b2 [WCF] fix send timeout. Should fix bug #19697. Should fix bug #19697. Should fix bug #19697. Should fix bug #19697.
1. Preserve ChannelFactory so that it can retrieve its ServiceEndpoint's
Binding's Timeout values.
2. Use DefaultCommunicationTimeouts.SendTimeout instead of ReceiveTimeout.
It was either written when I don't understand the API well or might be
different in duplex channel (who cares? nothing supports it now and
we will be switching to referencesource).

It is going to be my final contribution to WCF old codebase. Bye bye forever.
2015-05-21 16:07:27 +08:00
Zoltan Varga d52d3ca580 [runtime] Fix the calculation of the blittable status of System.ValueType after the import of the MS reference source version. 2015-05-21 09:31:26 +02:00
Alex Rønne Petersen 435cc010e1 Merge pull request #1826 from alexanderkyte/remove_all_processes_callback_test
[runtime] Remove a test that leads to excessive heap thrashing and interferes with other tests.
2015-05-21 03:39:02 +02:00
Marek Safar 580062d831 [system.xml] Disable cas in mobile profiles only 2015-05-20 21:20:02 +02:00
Marek Safar 9bf2a3bfa9 Bump reference source 2015-05-20 21:06:43 +02:00
Marek Safar aac0b374df [system.xml] One more mobile serialization incompatibility 2015-05-20 20:32:23 +02:00
Marek Safar d9b9ed5611 [corlib] Remove unused thread field 2015-05-20 16:22:55 +02:00
Ludovic Henry cd5256acb1 [threads] Remove dead code 2015-05-20 10:56:53 -03:00
Marek Safar c6299a9e0b [corlib] Match closer ExecutionContextSwitcher methods 2015-05-20 15:56:01 +02:00
Ludovic Henry 5011172a13 [referencesource] Import System.Threading.ThreadLocal 2015-05-20 10:54:13 -03:00
Ludovic Henry 6e9ee35e54 [referencesource] Import System.Threading.ThreadLocal 2015-05-20 10:40:08 -03:00
Alex Rønne Petersen 134c7aff03 Merge pull request #1823 from iainx/anti-dos
[Profiler] Limit files loaded in the coverage profiler to 128k
2015-05-20 15:17:42 +02:00
Ludovic Henry a17af8c3d0 [referencesource] Import System.ValueType
Instead of importing the source from referencesource, the algorithm has been reimplemented in our version. This is because their implementation uses multiple internal calls that do not need to be.
2015-05-20 09:57:23 -03:00
iain holmes 3d3f410b40 [Profiler] Limit files loaded in the coverage profiler to 128k
Place an upper limit on files loaded in the coverage profiler to 128k. If the
system suppression file exceeds that (it is currently only 3k), then there's
some problem and the profiler will exit. For other user files passed on the
commandline, we print a warning message and ignore them.
2015-05-20 12:56:16 +01:00
Marek Safar 7215f95d58 [bcl] Mobile profiles fixes 2015-05-20 12:56:36 +02:00
Alexander Kyte cb47efb688 [runtime] Remove a test that leads to excessive heap thrashing and interferes with other tests. 2015-05-20 04:16:44 +00:00
Martin Baulig 754395be23 Merge pull request #1822 from mono/work-bug23792
[TLS]: Fix #23792.
2015-05-20 04:46:08 +02:00
Sebastien Pouliot 5910f16f0a Bump referencesource for XI #30205 2015-05-19 21:51:30 -04:00
Martin Baulig bc1966273c [TLS]: Fix #23792.
What happens here is the following:

When using chunked encoding, the ChunkStream sometimes mixes async and sync requests
on the underlying stream.  The async calls work great - just the sync ones create
problems.

In this particular bug, the server returns two ApplicationData records - one big one
and then a smaller one.  The chunk parser requests a sync read of 1024 bytes which
then result in a series of sync reads on the underlying network stream.  The first
two or three network reads don't return enough data to fill the huge ApplicationData
record - the last one then returns so much data that it fills both the remainder of
the first record and the entire second one.

If the caller issued a second sync read, then the implementation would catch this -
but the async code path does not.
2015-05-20 03:12:26 +02:00
Sebastien Pouliot 87a2e8742e Bump referencesource for fixes required by XI 2015-05-19 20:10:53 -04:00
Ludovic Henry ead5d3a420 [referencesource] Import System.Runtime.InteropServices.SafeHandle
Instead of importing the source from referencesource, the algorithm has been reimplemented in our version. This is because their implementation uses multiple internal calls that do not need to be, and they are simple enough to just be reimplemented in managed code.
2015-05-19 19:25:39 -03:00
Marek Safar 7df4375af5 [corlib] Remove unused files 2015-05-19 23:26:48 +02:00
Marek Safar 317c3a8efb [corlib] LocalDataStoreSlot from reference sources 2015-05-19 22:06:58 +02:00
João Matos fd676354d3 Merge pull request #1821 from iainx/replace-getline
[Profiler] Replace getline(3)
2015-05-19 18:14:29 +01:00
Marek Safar 20b83458ef [corlib] CompressedStack in not supported in mobile profile 2015-05-19 19:07:26 +02:00
iain holmes e355216076 [Profiler] Replace getline(3)
getline(3) is not available on Android API < 21, so we use our own custom
functions
2015-05-19 17:36:28 +01:00
Zoltan Varga aa590f8a59 [aot] Fix full aot support. 2015-05-19 16:47:57 +02:00
Marek Safar 02fc6c1433 [corlib] Small part of thread from reference sources 2015-05-19 11:44:30 +02:00
Neale Ferguson ee4ac15ae6 Fix delegate and IMT processing - devirtualization and generics test now pass 2015-05-18 21:49:10 -04:00
Miguel de Icaza bdfb4d590d [mono-proclib] Compile on non Mach-based Unix systems (see pull request 1819) 2015-05-18 21:38:06 -04:00
Miguel de Icaza d6d5106f0e [corlib/Tests] Added test for bug #30171 2015-05-18 18:04:05 -04:00
Zoltan Varga ad8a1ff41f [arm64] Define MONO_ARCH_HAS_MONO_CONTEXT. 2015-05-18 22:30:05 +02:00
Marcos Henrich cb90d1a750 [corlib] Fixed TimeZoneInfo.GetDaylightChanges.
Changed GetDaylightChanges to match .NET behaviour.

GetDaylightChanges now only returns DaylightTime.Start and
DaylightTime.End in the given year.

DaylightTime.Start and DaylightTime.End may not belong to the same DST
period.
2015-05-18 18:18:40 +01:00
Marcos Henrich 396016aa82 [corlib] Test TimeZoneInfo.GetDaylightChanges.
Testing TimeZoneInfo.GetDaylightChanges with Australia/Sydney time zone.
2015-05-18 17:12:30 +01:00
Zoltan Varga c7bf3e8683 [runtime] Add a test for 8 delegate arguments. 2015-05-18 17:25:56 +02:00
Marcos Henrich 6888d8291c [corlib] Fixed make android TZ testing targets.
tzi.exe now builds with new sources.
tzi.exe is now ran and compiled with current mono and mcs which avoids corlib version
problems.
2015-05-18 15:30:09 +01:00
João Matos 29ac7c3839 Merge pull request #1815 from jbevain/clean-mutex-windows
[runtime] Cleanup wrappers for windows cond-vars
2015-05-18 13:18:41 +01:00
Marek Safar 6435c0b688 [mcs] Update unicode categories allowed as Unicode escape sequences within identifiers. Fixes #24968 2015-05-18 14:04:55 +02:00
Jo Shields ecd633f6a5 Add missing mono-profiler-log.suppression to EXTRA_DIST 2015-05-18 10:46:13 +01:00
Jb Evain a6516c0483 [runtime] Cleanup wrappers for windows cond-vars 2015-05-18 11:10:42 +02:00
Alex Rønne Petersen f32cdd40ed Merge pull request #1626 from iainx/add-coverage-to-log-profiler
Add coverage to log profiler
2015-05-18 09:55:43 +02:00
Marek Safar 789eb7e54c Merge pull request #1811 from yann-morin-1998/yem/parallel-install
mcs: fix installation with parallel make
2015-05-18 08:29:32 +02:00
Rodrigo Kumpera 0b45503a1a Merge pull request #1809 from kumpera/double_loading_fix
[runtime] Avoid allocating interface offsets multiple times. Fixes #28398
2015-05-17 13:05:34 -04:00
Yann E. MORIN d755444be0 mcs: fix installation with parallel make
In mcs/ the install of xbuild_12 and xbuild_14 will end-up installing
the same files:
    ${NETFRAMEWORK_DIR}/v2.0/RedistList/FrameworkList.xml
    ${NETFRAMEWORK_DIR}/v3.0/RedistList/FrameworkList.xml
    ${NETFRAMEWORK_DIR}/v3.5/RedistList/FrameworkList.xml
    ${NETFRAMEWORK_DIR}/v4.0/Profile/Client/RedistList/FrameworkList.xml
    ${NETFRAMEWORK_DIR}/v4.0/RedistList/FrameworkList.xml
    ${NETFRAMEWORK_DIR}/v4.5.1/RedistList/FrameworkList.xml
    ${NETFRAMEWORK_DIR}/v4.5/RedistList/FrameworkList.xml

This is because there is no atomicity when installing each file, and
xbuild_12 and xbuild_14 may well run in parallel, each trying to install
each of those files; but the 'install' utility will first check if the
target file exists or not, and there is a race in doing so, thus leading
to build failures like so:
    http://autobuild.buildroot.org/results/c32/c3288c5d1fb94474f14a4a889e76135878d403bc/build-end.log
    http://autobuild.buildroot.org/results/3cb/3cb99e5c5672cbaa2a86020129a05dfde47cdb8f/build-end.log
    and many more:
    http://autobuild.buildroot.net/?reason=host-mono-4.0.0
    http://autobuild.buildroot.net/?reason=host-mono-4.0.1

So, ensure ordering of the install of xbuild_12 and xbuild_14 (the
ordering is completely arbitrary, either way gives the same installed
files).

Signed-off-by: "Yann E. MORIN" <[email protected]>
Cc: Angelo Compagnucci <[email protected]>
2015-05-17 15:15:12 +02:00
Zoltan Varga b42709296a [runtime] Remove the unused method field from MonoLMF on arm64. 2015-05-17 15:05:13 +02:00
Zoltan Varga f828063e89 [runtime] Fix the DISABLE_JIT/DISABLE_REMOTING build. 2015-05-17 15:04:53 +02:00
Zoltan Varga 23fe623c7c Fix the DISABLE_COM build. 2015-05-17 14:46:07 +02:00
Zoltan Varga 6de9c066ad [jit] Remove some unused code when MONO_ARCH_HAVE_OP_GENERIC_CLASS_INIT is defined. 2015-05-17 14:06:11 +02:00
Zoltan Varga 68857c4ba2 [runtime] Remove a few more DISABLE_ ifdefs. 2015-05-16 13:52:01 +02:00
Zoltan Varga e6aee5116c [runtime] Reduce the number of gc ifdefs in gc.c a bit more. 2015-05-16 13:34:30 +02:00
Zoltan Varga 5d36a53b2e [runtime] Use condvars instead of events for notifying the finalizer thread. 2015-05-16 13:23:56 +02:00
Zoltan Varga 0d1f6e84d1 Revert "[runtime] Use condvars instead of events for waiting for domain finalization."
This reverts commit f84084dd79.

Revert this until issues with interrupts can be sorted out.
2015-05-16 11:47:28 +02:00
Zoltan Varga ff16e16d39 Revert "[runtime] Use condvars instead of events for notifying the finalizer thread."
This reverts commit c84508b6f3.

Revert this until issues with interrupts can be sorted out.
2015-05-16 11:46:59 +02:00
Zoltan Varga c84508b6f3 [runtime] Use condvars instead of events for notifying the finalizer thread. 2015-05-16 11:03:49 +02:00
Zoltan Varga 288eae2eda [runtime] Remove compile time null gc dependencies from gc.c. 2015-05-16 10:16:07 +02:00
Zoltan Varga f84084dd79 [runtime] Use condvars instead of events for waiting for domain finalization. 2015-05-16 10:08:01 +02:00
Zoltan Varga 968b337ad9 [jit] Fix OP_GENERIC_CLASS_INIT on amd64 so it doesn't clobber the first arg register. 2015-05-16 09:58:05 +02:00
Zoltan Varga 0a8467536f [jit] Allow the inlining of generic class init trampolines on some platforms. Enable it for amd64. 2015-05-16 08:49:01 +02:00
Alex Rønne Petersen d599fe52d5 [runtime] Fix endianness issue with special static offsets.
On big endian systems, this code would break because we reinterpret the
structure as a `guint32` via memory. Fix this by reversing the order of
the fields on big endian systems.
2015-05-16 02:49:32 +02:00
Zoltan Varga 7895a1b971 [runtime] Disable spawning lldb on a native crash, since it doesn't quit automatically. 2015-05-16 01:50:10 +02:00
Zoltan Varga 88058205f8 [aot] Avoid defining symbols starting with numbers. Fixes #30099. 2015-05-16 01:11:42 +02:00
Miguel de Icaza f1778d1797 Add tests for #3811 2015-05-15 18:27:53 -04:00
Alex Rønne Petersen 75fad022c2 Merge pull request #1801 from alexrp/profiler-allocs
[runtime] Improve profiler allocation reporting
2015-05-15 21:29:48 +02:00
Rodrigo Kumpera 738acc78f1 Merge pull request #1654 from alexanderkyte/xunit-fixes
Fix various bugs causing hangs on Xunit
2015-05-15 15:24:44 -04:00
Miguel de Icaza 1a7719f4e1 Merge pull request #1805 from martincostello/master
Fix typos in man content for sn
2015-05-15 15:08:48 -04:00
Marek Safar 4ba6def9ed [corlib] Fixes mobile tests 2015-05-15 20:52:47 +02:00
Alex Rønne Petersen a83f965db0 [runtime] Use slow path managed allocators when profiling a FullAOT image.
This is needed because the fast paths in managed allocators (by design) don't
report allocations to the profiler. In regular JIT/AOT mode, managed allocators
are simply disabled to work around this when profiling. However, in FullAOT
mode, an image may have been compiled with managed allocators enabled which
results in the managed allocator actually being emitted into the AOT image.

So, when we want to profile a FullAOT image, we need to replace the regular
managed allocator with one that always goes through the slow path (i.e. calls
straight into the runtime). To that end, when we decode a MONO_WRAPPER_ALLOC
method ref, we redirect it to the appropriate slow path allocator if allocation
profiling is enabled.
2015-05-15 20:05:01 +02:00
João Matos 6788b71d65 [aot] Added command-line parsing support for hybrid AOT mode. 2015-05-15 16:52:32 +01:00
João Matos 0d1766729b [aot] Migrate the AOT compiler code to use MonoAotMode.
No behavioural changes intended.
2015-05-15 16:52:32 +01:00
João Matos f3631b5625 [runtime] Introduce new mono_jit_set_aot_mode public AOT API.
We're also deprecating `mono_jit_set_aot_only` which is a strictly on-off API and of limited value in the face of the new AOT modes.
2015-05-15 16:52:31 +01:00
João Matos 18b444a328 [runtime] Introduce MonoAotMode enum to the public API.
This will be used throughout the runtime to bookkeep the selected AOT code model.
2015-05-15 16:52:31 +01:00
iain holmes a5ab6c642e [Profiler] Add coverage information to the log profiler
Store coverage information in the mlpd file. Extend the mprof-report tool to
give a basic coverage summary.
2015-05-15 16:05:21 +01:00
iain holmes 914ecbcfec [Utils] Use g_direct_equal if NULL is passed in as the equals function 2015-05-15 15:32:54 +01:00
iain holmes d59f06bf31 [Utils] Add an iteration function to MonoConcurrentHashTable 2015-05-15 15:32:54 +01:00
Alex Rønne Petersen 1f8da92d47 Merge pull request #1656 from alexanderkyte/webservice_27561
[System.ServiceModel] Fix timeout defaulting to 0 seconds
2015-05-15 16:09:02 +02:00
Alex Rønne Petersen 7cb2c544b4 [runtime] Regenerate opcodef.def.
Note: Don't modify this file by hand.
2015-05-15 15:16:09 +02:00
Alex Rønne Petersen d99605b7ca [mini] Add regressionexitcode.out to .gitignore. 2015-05-15 15:16:09 +02:00
Alex Rønne Petersen 1768346f06 [runtime] Move profiler allocation reporting to GC implementations.
By reporting allocations in the GC implementations, we significantly reduce the
odds of someone forgetting to add a mono_profiler_allocation () call. These
previously had to be placed at all call sites of mono_gc_alloc_* () which was
in some cases forgotten, resulting in the profiler seeing objects in GC events
which appeared to not have been allocated.
2015-05-15 15:16:09 +02:00
Alex Rønne Petersen 1fae7cebda [runtime] Move object allocation into GC implementations.
This was already done for SGen, but Boehm and the null GC still had a bunch of
code in object.c to allocate and prepare objects. This has now been moved into
mono_gc_alloc_* () functions so that all 3 GC backends have the same interface
for allocation.
2015-05-15 15:16:09 +02:00
Alex Rønne Petersen d2986015a2 [runtime] Drop support for external libgc.
This has not been supported for a while, so remove it.
2015-05-15 15:16:08 +02:00
Marek Safar af1f5f88d6 [System.Data.DataSetExtensions] Switch to reference sources 2015-05-15 09:17:12 +02:00
Rodrigo Kumpera 972f726d03 [runtime] Avoid allocating interface offsets multiple times. Fixes #28398
setup_interface_offsets will be called multiple times. The code was originally
designed to avoid setting up this multiple times but a change to avoid making it assert
when used from SRE made it so that the check to avoid multiple initialization would
effectively make it be initialized multiple times.

See 628e025476 for the original change.
2015-05-14 22:02:28 -04:00
Alexander Köplinger eac7d992d8 [System.Data] Fix make dist 2015-05-15 01:24:10 +02:00
martincostello 15b4ee13fa Fix typos in "man sn". 2015-05-14 18:58:50 +01:00
João Matos 75175b2f26 [aot] Fixed linker invocation when cross-compiling to Android.
Fixes an Android AOT regression introduced by https://github.com/mono/mono/commit/b41ed5db82ad82f0540eef70d821318836fba107.
2015-05-14 18:22:09 +01:00
Marek Safar b0a5a112da [System.Data] Remove obsolete files 2015-05-14 19:09:28 +02:00
Marek Safar b9e6d33761 [system.data] More api from reference sources 2015-05-14 19:09:28 +02:00
Marek Safar 839556ab8b [system.data] SqlXml from reference sources 2015-05-14 19:09:28 +02:00
Zoltan Varga e993138227 [runtime] Fix the signature of native-func-aot wrappers. AOT the delegate invoke wrapper which is used to invoke it. Fixes #29970. 2015-05-14 18:38:18 +02:00
Miguel de Icaza 10b80454c8 Merge pull request #1793 from rolfbjarne/subminute-dstoffset-fix
[corlib] Tweak the fix for the reference sources' inability to support sub-minute DST offsets.
2015-05-14 12:29:13 -04:00
Alexander Kyte 90e4b09042 [runtime] Made mono_marshal_get_castclass_with_cache use the isinst fixes, refactored 2015-05-14 12:05:28 -04:00
Marek Safar 2ca1bff97e [corlib] Remove unused code 2015-05-14 14:06:11 +02:00
Marek Safar 3f0aeecfe2 [corlib] More reference code for string class 2015-05-14 13:48:01 +02:00
Marek Safar 19eeecfca1 [corlib] Remove unused code 2015-05-14 13:48:01 +02:00
Ludovic Henry b84deedb6e [corlib] Remove unused code 2015-05-14 10:56:02 +01:00
Ludovic Henry 331c80c2aa [threadpool-ms] Fix compilation warning 2015-05-14 10:24:08 +01:00
Ludovic Henry d8aeecf147 [null-gc] Ensure mono_gc_set_skip_thread is compiled 2015-05-14 10:22:41 +01:00
Ludovic Henry 0127638583 [threads] Revert part of e05ba2a2fb 2015-05-14 09:28:10 +01:00
Zoltan Varga 593338049d [arm64] Increase max length of seq_point instruction. 2015-05-14 09:21:59 +02:00
Zoltan Varga 082de058c3 [aot] Avoid generating instances of AsyncMethodBuilderCore/AsyncVoidMethodBuilder methods, use the gsharedvt versions instead. Fixes part of #29615. 2015-05-14 09:18:04 +02:00
Marek Safar 5eb160d05e [corlib] Remove unused code 2015-05-14 08:40:15 +02:00
Alexander Kyte b52f3de356 [runtime] Do not cache isinstance for TransparentProxies
When using a TransparentProxy, we run into the problem that the cache is
shared between all marshalbyrefobjects. The fix here is to not update
the cache when using a TransparentProxy, so that the correct slow path
is used.
2015-05-13 18:59:58 -04:00
Ludovic Henry 749466e90a [threads] Remove dead code 2015-05-13 23:08:16 +01:00
Ludovic Henry 199da98d9d [threads] Remove thread_exit callback as the logic is redundant between the GCs 2015-05-13 23:08:16 +01:00
Ludovic Henry 3e0d937e6c [threads] Remove dead code 2015-05-13 23:08:16 +01:00
Ludovic Henry 497b2b60d0 [sgen] Remove unnecessary #define 2015-05-13 23:08:16 +01:00
Ludovic Henry e05ba2a2fb [threads] Remove useless indirection for thread creation on Posix platforms 2015-05-13 23:08:15 +01:00
Marek Safar 16a9a3e24c Revert "Fixes a5478121f0215a9d9068931ac7fd2b6ae459b036 reference sources"
This reverts commit c98a779e91.
2015-05-13 20:14:46 +02:00
Alexander Kyte e4d491cdd7 [System.ServiceModel] Fix timeout defaulting to 0 seconds 2015-05-13 13:54:53 -04:00
Marek Safar c98a779e91 Fixes a5478121f0215a9d9068931ac7fd2b6ae459b036 reference sources 2015-05-13 19:46:16 +02:00
Marek Safar f7026bd8e2 [system.web] Add System.Design reference instead of referencing files 2015-05-13 19:45:09 +02:00
Ludovic Henry 1886cdc73f [referencesource] Import System.Double and System.Simple 2015-05-13 18:31:09 +01:00
Alex Rønne Petersen 45d61b6453 Merge pull request #1784 from alexrp/profiler-init
[profiler] Initialize threads in runtime initialization callback
2015-05-13 19:02:50 +02:00
Marek Safar f4f5864fde [system.web.service] desktop version from reference sources 2015-05-13 18:47:08 +02:00
Marek Safar d8c7c68064 [System.Data.Design] Make TypedDataSetSchemaImporterExtension not working instead of throwing NIE 2015-05-13 18:47:07 +02:00
Marek Safar 401a35cd69 [system.xml] Serialization from reference sources for desktop 2015-05-13 18:47:07 +02:00
Alex Rønne Petersen 14317bf8a7 Merge pull request #1797 from schani/feature-pinning-stats
[sgen] Fix pinning statistics
2015-05-13 18:42:52 +02:00
Zoltan Varga 1d83b90fd1 [runtime] Fix the initialization of the pid array in ves_icall_System_Diagnostics_Process_GetProcesses_internal (). 2015-05-13 18:41:26 +02:00
Alex Rønne Petersen df27ba1a5e Merge pull request #1799 from evincarofautumn/fix-heavy-stat-warnings
[sgen] Fix warnings with heavy stats.
2015-05-13 13:48:09 +02:00
Jon Purdy 875606b12b [sgen] Fix warnings with heavy stats.
The types of these counters were changed in 5f33085d, so the atomic
updates (should have) stopped working. We can just mutate them
non-atomically.
2015-05-12 15:41:18 -07:00
Mark Probst 90a43c010b [sgen] Make pinning stats operational again. 2015-05-12 14:41:25 -07:00
Mark Probst 411398cbb2 [sgen] mono_gc_printf should not append newlines. 2015-05-12 14:41:24 -07:00
Mark Probst b8fcbbb302 [sgen] Simplify sgen_conservatively_pin_objects_from().
We're doing essentially the same check twice, and not doing the
pinning stats correctly.
2015-05-12 14:41:24 -07:00
Mark Probst 2994e24415 Merge pull request #1796 from evincarofautumn/fix-heavy-stats-2
[sgen] Actually fix heavy stats.
2015-05-12 14:39:25 -07:00
Jon Purdy fa47efacc3 [sgen] Actually fix heavy stats. 2015-05-12 14:31:29 -07:00
Mark Probst 13a7e83224 Merge pull request #1795 from evincarofautumn/fix-heavy-stats
[sgen] Fix heavy statistics.
2015-05-12 14:18:40 -07:00
Jon Purdy 65b194393b [sgen] Fix heavy statistics. 2015-05-12 14:15:22 -07:00
Rodrigo Kumpera cc40e2e17d Merge pull request #1668 from alexanderkyte/bug1856
[runtime] Overwrite stacktrace for exception on re-throw. Fixes #1856.
2015-05-12 17:11:18 -04:00
Alexis Christoforides a630299893 [runtime] Fixed typo in previous commit, added sleep 2015-05-12 16:07:54 -04:00
Alexis Christoforides ee234e8d70 [runtime] When attaching a tools thread, spin-wait for thread system init. Fixes #29538 2015-05-12 15:30:18 -04:00
Marek Safar 914e2bcf40 [system.xml] System.Xml.Serialization.Advanced from reference sources 2015-05-12 18:43:06 +02:00
Marek Safar bfd7953e86 Merge pull request #1794 from jbevain/monofield_getmodule
[corlib] Implement MonoField Module property
2015-05-12 16:50:07 +02:00
Jb Evain 44b81a65f4 Add unit test for FieldInfo.Module 2015-05-12 16:40:33 +02:00
Marek Safar 7555cf9b30 Bump reference sources 2015-05-12 16:29:51 +02:00
Jb Evain 5744a3d7fa [corlib] Implement MonoField Module property 2015-05-12 16:22:18 +02:00
Zoltan Varga 92a592398c [runtime] Really fix --disable-visibility-hidden. 2015-05-12 16:09:10 +02:00
Marek Safar 226511f0eb Bump reference sources 2015-05-12 16:00:32 +02:00
Marek Safar 9876575398 [corlib] Fix Test attribute name collisiong causing all tests to be ignored 2015-05-12 16:00:03 +02:00
Marek Safar 2a02d63b50 [System.ComponentModel.DataAnnotations] Remove unused types 2015-05-12 14:39:05 +02:00
Marek Safar 3d4ef2cee6 [build] Don't set special library path for monolite boostrap. It causes issue when system and other assemblies during bootrap need to access mscorlib api which is newer than monolite. 2015-05-12 14:10:17 +02:00
Rolf Bjarne Kvinge 926bd9d44c [corlib] Tweak the fix for the reference sources' inability to support sub-minute DST offsets.
It seems the base utc offset can also have a sub-minute resolution
in Unix, which means we need to apply the whole-minute rounding to
the final result (dstDelta) instead of the intermediate ttype.Offset
value.

We need to try to fetch the exact timezone id to expose this bug,
since fetching all system timezones will just not return any
problematic timezones (and there is thus no way to distinguish
inexistent timezones from timezones that failed to load).
2015-05-12 13:17:47 +02:00
Rolf Bjarne Kvinge 764aeb28b6 [corlib] Update SecurityCriticalAttribute test for updated mobile API. 2015-05-12 13:14:32 +02:00
Marek Safar 5f959e7bac [system.xml] Resource string from reference sources 2015-05-12 11:56:27 +02:00
Marek Safar 285c7dd5b7 [mcs] Support multiple string resource files 2015-05-12 11:45:27 +02:00
Atsushi Eno b30a20dd71 bump referencesource for System.Data (remove wrong MDAC ver. check for Odbc) 2015-05-12 14:54:34 +08:00
Atsushi Eno 19487986c5 Fix System.dll mobile builds. 2015-05-12 14:53:05 +08:00
Atsushi Eno b8ee40b9f3 Revert "[system.xml] System.Xml.Serialization.Advanced from reference sources"
This reverts commit e66d448104.
2015-05-12 14:44:59 +08:00
Atsushi Eno ddca46d22b Revert "[system.xml] Serialization from reference sources for desktop"
This reverts commit 6ae517ea65.
2015-05-12 14:42:19 +08:00
Rodrigo Kumpera 093a116f0f Merge pull request #1783 from alexanderkyte/thread_transition_crash
[runtime] Make thread abort synchronous
2015-05-11 14:59:04 -04:00
Ludovic Henry 7bb908bc03 [bcl] Fix Process.OnExited multiple call with the MS ThreadPool 2015-05-11 18:44:49 +01:00
Alexis Christoforides 485a0964ab [runtime] Add a couple of asserts to thread attach methods 2015-05-11 11:56:20 -04:00
Marek Safar 98740abe89 [system] CompilerParameters from reference sources 2015-05-11 16:55:52 +02:00
Marek Safar 6ae517ea65 [system.xml] Serialization from reference sources for desktop 2015-05-11 15:37:01 +02:00
Marek Safar 6454d7b844 [System.Runtime.Caching] Fix warnings 2015-05-11 15:37:01 +02:00
Marek Safar 2aab942e38 Merge pull request #1788 from ermshiperete/master-Xamarin-29935
Unit test that demonstrates Xamarin-29935
2015-05-11 15:33:23 +02:00
Eberhard Beilharz 5afea62a8c Unit test that demonstrates Xamarin-29935
Change-Id: I3510a2ccb897e0a0baf03af3a34bb74d6b700e03
2015-05-11 15:31:04 +02:00
Ludovic Henry 0b2967af2e [threadpool-ms] Remove thread waiting and memory cleanup
This could lead to hangs because threadpool->counter._.active would not be decremented. It means we cannot cleanup memory as the threads may still try to access the threadpool global variable.
2015-05-11 13:37:25 +01:00
Ludovic Henry 89d6cbdd4a [threadpool-ms] Fix assertion error "threadpool-ms.c:731, condition `counter._.working >= 0' not met" 2015-05-11 11:48:32 +01:00
Zoltan Varga f512ea07b2 [runtime] Implement support for locals info for portable pdb files. 2015-05-11 03:24:14 -04:00
Zoltan Varga 79b09ea0cb [runtime] Finish support for sequence point info for the portable pdb format. 2015-05-10 05:43:53 -04:00
Zoltan Varga b2bb9fde0a [runtime] Fix some FIXMEs in mono_ppdb_get_seq_points (). 2015-05-10 04:27:32 -04:00
Zoltan Varga 293a2f1a0d [runtime] Add mono_ppdb_get_seq_points () function, same as mono_debug_symfile_get_seq_points () but for portable pdb files. 2015-05-10 02:55:47 -04:00
Zoltan Varga 566da179cb [runtime] Add a mono_debug_get_seq_points () function which is a wrapper for mono_debug_symfile_get_seq_points (). 2015-05-10 02:43:00 -04:00
Zoltan Varga d94874b3b3 [runtime] Rename mono_debug_symfile_get_line_numbers_full () to mono_debug_symfile_get_seq_points (), return most of the information in an array of MonoSymSeqPoint structures. Remove unused mono_debug_symfile_get_line_numbers () function. 2015-05-10 02:23:11 -04:00
Zoltan Varga 86d55b362f [runtime] Remove more unused debugger code. 2015-05-10 02:23:11 -04:00
Marek Safar ffb5c90e08 [system.runtime.caching] Remove inappropropriate use of Marshal.SizeOf. Fixes #29667 2015-05-09 12:24:20 +02:00
Marek Safar a8e603f055 [system.data] Fix culture specific test 2015-05-09 11:50:11 +02:00
Zoltan Varga a11d525098 [jit] Avoid an assertion in the virtual delegate optimization if the target method is not virtual. 2015-05-09 01:16:05 -04:00
Zoltan Varga 99a5e9eca5 [runtime] Add beginnings of support for Portable PDB symbol files. 2015-05-08 23:26:00 -04:00
Zoltan Varga c5bbe92de6 [runtime] Add support for the new metadata tables used by the Portable PDB file format. 2015-05-08 23:24:00 -04:00
Zoltan Varga df511639ec [runtime] Add support for loading metadata images without a PE wrapper. 2015-05-08 23:21:33 -04:00
Alex Rønne Petersen ac84b9afea [profiler] Initialize threads in runtime initialization callback.
For the helper and writer thread to actually work, we need Mono's threading
subsystem to be initialized (so we can use TLS and hazard pointers). We now
wait with starting these threads until Mono gives us the go-ahead.

This means that a bit more data will be buffered up in the thread-local log
buffers during startup, but it shouldn't really matter in practice.
2015-05-09 04:07:22 +02:00
Zoltan Varga 74be9b6b66 [runtime] Use a condvar for waiting for the finalizer thread to shut down. 2015-05-08 18:28:46 -04:00
Zoltan Varga 6970210c7e [runtime] Add a mono_cond_timedwait_ms () function which takes a timeout argument in milliseconds. 2015-05-08 18:28:12 -04:00
Zoltan Varga de603c9af3 [runtime] Add a FIXME to mono_cond_timedwait () on windows. 2015-05-08 15:24:50 -04:00
Mark Probst b21f2c9560 [sgen] Only flush binary protocol buffers when world is stopped. 2015-05-08 11:32:54 -07:00
Miguel de Icaza 6c9ad41d85 [monop] Band-aid, cope with IKVM's Type.Namespace crashing on generic types
[monop] Add test suite for monop
2015-05-08 13:38:18 -04:00
Alexander Kyte 632ddbf84d [runtime] Make thread abort synchronous
Due to asynchronous abortion a crash is being seen on
posix systems where the abort signal handler is having a
data race and not exiting the suspend signal handler early.

When it tries to make a state transition because of this, it
cannot and it crashes.

This fixes it by making it synchronous.
2015-05-08 13:24:53 -04:00
Ludovic Henry 8f1d53d31b [threadpool-ms] Revert part of fd0ff7bff9 as it causes deadlocks on cleanup 2015-05-08 18:09:23 +01:00
Alex Rønne Petersen 975b1e7c35 Merge pull request #1781 from alexrp/master
[runtime] Improve context static LocalDataStoreSlot support
2015-05-08 18:10:06 +02:00
Alex Rønne Petersen 0bc0b176bc Merge pull request #1782 from alexrp/profiler-symbol-fix
[utils] Export concurrent hash table and lock free queue functions
2015-05-08 15:00:03 +02:00
Marek Safar e66d448104 [system.xml] System.Xml.Serialization.Advanced from reference sources 2015-05-08 14:41:32 +02:00
Marek Safar 69101f50ec [system.xml] serialization handlers from reference sources 2015-05-08 14:41:32 +02:00
Ludovic Henry fd0ff7bff9 [threadpool-ms] Reenable threadpool cleanup 2015-05-08 13:28:27 +01:00
Ludovic Henry 6e58bc0843 [threadpool-ms] Refactor worker creation and domain unloading 2015-05-08 13:28:27 +01:00
Ludovic Henry 02c391f6ba [threadpool-ms] Ensure monitor thread does not start if runtime is shutting down 2015-05-08 13:28:26 +01:00
Ludovic Henry 2af815c0e9 [threadpool-ms] Fix potential bug on monitor thread interuption 2015-05-08 13:28:26 +01:00
Ludovic Henry ded068692d [threadpool-ms] Refactor lock for working and parked threads 2015-05-08 13:28:26 +01:00
Ludovic Henry a8e82f17c4 [threadpool-ms] Guarantee icall parameter size 2015-05-08 13:28:26 +01:00
Alex Rønne Petersen f378198ed0 [utils] Export concurrent hash table and lock free queue functions. 2015-05-08 12:56:20 +02:00
Marek Safar 90d072e8de [system.xml] System.Xml.Serialization.Configuration from reference sources 2015-05-08 11:15:50 +02:00
Alex Rønne Petersen 11521369a8 [runtime] Improve context static LocalDataStoreSlot support.
The context-specific code now mirrors the thread-specific code and uses the
internal NamedDataSlot class. The runtime code now correctly frees context
static data allocated via this class.
2015-05-08 11:05:22 +02:00
Zoltan Varga 3dfbbffadb Fix make dist. 2015-05-08 05:01:04 -04:00
Zoltan Varga 38f95850b1 Fix the build. 2015-05-08 04:59:18 -04:00
Marek Safar 38f4bd1f95 [corlib] Bump reference souces. Fixes #29808 2015-05-08 10:33:50 +02:00
Marek Safar f4c60610b7 [system.data] remove unused files from mobile profile 2015-05-08 08:49:27 +02:00
Zoltan Varga 2d50afe45a [sdb] Remove the usage of WaitForSingleObject (), use cond vars instead on all platforms. 2015-05-07 23:17:27 -04:00
Zoltan Varga d58c00eada [runtime] Implement support for condition variables on windows using the win32 CONDITION_VARIABLE type available from Windows Vista. 2015-05-07 23:06:17 -04:00
Zoltan Varga 64e77296ae [runtime] Fix the windows build. 2015-05-07 23:06:17 -04:00
Alex Rønne Petersen a486d4dd7b [runtime] Update LocalDataStoreSlot code to the new special static offset format. 2015-05-08 04:15:55 +02:00
Atsushi Eno 0137334b6f Merge pull request #1778 from JetBrains/xbuild_do_not_stop_buildnodemanager
xbuild: do not stop BuildNodeManager after one build
2015-05-08 10:58:39 +09:00
Zoltan Varga f7b9bb3bf0 [runtime] Disable the broken code which aligns small structs to 4/8 bytes. Add a MONO_DEBUG option to enable it. 2015-05-07 21:23:26 -04:00
Zoltan Varga 15c1dcf664 Merge pull request #1780 from alexrp/master
[runtime] Initialize contexts after the GC
2015-05-07 21:03:18 -04:00
Alex Rønne Petersen 5595e3de2b [runtime] Initialize contexts after the GC.
This is necessary since they use GC handles. So the handles_section must
be initialized before we try to use it.
2015-05-08 02:53:25 +02:00
Mark Probst 5260a42cd5 [runtime] Fix a few warnings. 2015-05-07 14:45:25 -07:00
Alex Rønne Petersen 736ffe64c5 Merge pull request #1777 from alexrp/sgen-separation
[sgen] Move bridge debugging code out of the independent SGen code
2015-05-07 22:48:30 +02:00
triton 4a9ea9c819 Revert "[genmdesc] Improved unknown specifier error handling for Perl version."
This reverts commit 05ce4f6ee1.

It's giving some problems on Monodroid build:

/Users/builder/data/lanes/1196/012ff355/source/mono/mono/mini/cpu-arm.md
Invalid specifier len:4 at line 51 at /Users/builder/data/lanes/1196/012ff355/source/mono/mono/mini/genmdesc.pl line 153, <DESC> line 51.
2015-05-07 20:32:15 +01:00
Marek Safar 82e5791466 [system.data] SqlConnectionStringBuilder from reference sources. Fixes #29823 2015-05-07 20:57:53 +02:00
Marek Safar 251ee4c04e [mcs] Flow analysis assignment from field expressions is now aware of special cased value types. Fixes #29276 2015-05-07 18:25:01 +02:00
Atsushi Eno 6447b00e9c Remove unused System.Runtime.Serialization code.
System.ServiceModel.Web/System.Runtime.Serialization.Json is left as is
because they seem to be used by System.Json build...
2015-05-08 01:13:32 +09:00
Zoltan Varga b0a4c876f2 [arm] Fix a problem introduced by 3469c138c6. 2015-05-07 11:56:01 -04:00
Atsushi Eno 9f006cd104 remove old System.Data code. 2015-05-08 00:50:27 +09:00
Leonid Shalupov c6f0cef1c5 xbuild: do not stop BuildNodeManager after one build (prevents subsequent builds from executing) 2015-05-07 17:24:36 +02:00
João Matos d105620caa [genmdesc] Fixed generator to allow instructions lengths equal to 0.
I was induced in error because of the following comment in the machine read specs:

`# len:number         describe the maximun length in bytes of the instruction
# number is a positive integer`
2015-05-07 16:11:10 +01:00
Ludovic Henry 443eac8071 [tools] Fix sgen-grep-binprot after sgen code move to mono/sgen 2015-05-07 16:08:13 +01:00
Ludovic Henry fb41850597 [threadpool-ms] Change the meaning of ThreadPoolCounter active and working 2015-05-07 16:08:13 +01:00
João Matos 771027fd03 [arm] Fixed regression related to invalid specifier for vcall2 instruction in ARM machine description.
Introduced in https://github.com/mono/mono/commit/3469c138c67e4b7e0afcc6a31046fcca7931d660.
2015-05-07 15:34:18 +01:00
João Matos 05ce4f6ee1 [genmdesc] Improved unknown specifier error handling for Perl version.
Should help catch regressions like the one introduced in https://github.com/mono/mono/commit/3469c138c67e4b7e0afcc6a31046fcca7931d660#diff-e3dadd3f8246691b408c41c0441d49fcR358 at build time.
2015-05-07 15:34:18 +01:00
João Matos 37ba61388e [genmdesc] Improved instruction length error handling for Perl version.
Should help catch regressions like the one introduced in https://github.com/mono/mono/commit/3469c138c67e4b7e0afcc6a31046fcca7931d660#diff-e3dadd3f8246691b408c41c0441d49fcR358 at build time.
2015-05-07 15:34:17 +01:00
João Matos 8dee94c5b9 [genmdesc] Improved instruction length error handling for C version. 2015-05-07 15:34:17 +01:00
Atsushi Eno 8abe9d21b6 Merge pull request #1773 from ztzg/sql-server-datetime2
Allow transferring datetime2/datetimeoffset to/from SQL Server 2012
2015-05-07 19:03:11 +09:00
Atsushi Eno 371944bed9 Merge pull request #1772 from ztzg/sql-server-variant
Fix SQL Server 2012 variant parameters and return values
2015-05-07 18:54:49 +09:00
Atsushi Eno b661dde23a Merge pull request #1771 from ztzg/sql-server-bulk-insert
Fix SQL Server 2012 bulk insert issues
2015-05-07 18:53:41 +09:00
Atsushi Eno 12a41c8d50 [xbuild] for resolving assemblies from pkg-config, prefer specified version
... even if SpecificVersion is false. There is no reason to prefer any
mismatching version when SpecificVersion=false.

That behavior caused monodevelop build failures because of incorrectly-
resolved gtk# packages. After this fix, this issue goes away.
https://github.com/mono/monodevelop/blob/2436ad1874694ec811871dacf9a659a79b5fad0d/README.md#known-problems
2015-05-07 16:25:32 +09:00
Alex Rønne Petersen 3566b027c8 [sgen] Move bridge debugging code out of the independent SGen code. 2015-05-07 04:52:28 +02:00
Alexander Köplinger 462a293178 [tests] Trim whitespace from testname in dummy unit test XML, Jenkins test display doesn't like it 2015-05-07 03:28:11 +02:00
Alexander Köplinger 6593867feb [tests] Small fixes to the dummy unit test XML output to make it a compliant NUnit file 2015-05-06 23:38:14 +02:00
Zoltan Varga c044dd6524 [jit] Treat MONO_ARCH_IMT_REG as allways defined. 2015-05-06 17:31:23 -04:00
Zoltan Varga 41b8883053 [runtime] Fix configure so it really uses -fvisibility=hidden. 2015-05-06 16:16:00 -04:00
Rodrigo Kumpera fa97bf542c [threading] Fix a race during shutdown where a thread could have a suspend requested after it's too late for it to be served.
During thread shutdown, it gets to a point where the thread can no longer server suspend requests. To fix that
we ensure the thread gets one last suspend opportunity before going down.
2015-05-06 16:11:41 -04:00
Rodrigo Kumpera 1aa0de2e20 [runtime] Don't call managed code when OVF. 2015-05-06 15:43:06 -04:00
Rodrigo Kumpera f13fedfbd5 [coop] Fix marshal code of reset-abort calls to use an IntPtr cookie var instead of int32. 2015-05-06 15:43:06 -04:00
Rodrigo Kumpera b00f1dc96f [coop] Ensure the polling tramp has a wrapper. 2015-05-06 15:43:05 -04:00
Alex Rønne Petersen b54cbfeec4 Merge pull request #1750 from alexrp/precise-ctx-static-scan
Improve thread/context static field scanning
2015-05-06 21:02:04 +02:00
Alex Rønne Petersen 1bc9a1048c Merge pull request #1742 from alexrp/symbol-renaming
Clean up some C symbols polluting the global namespace
2015-05-06 20:56:13 +02:00
João Matos fa03b8ee56 Merge pull request #1776 from evincarofautumn/fix-independent-sgen
[sgen] Fix non-Mono SGen clients.
2015-05-06 19:51:47 +01:00
Jon Purdy fa413dc1be [sgen] Fix non-Mono SGen clients. 2015-05-06 11:39:53 -07:00
Zoltan Varga 172c2aab5f [jit] Print out the numeric opcode name in mono_inst_name () when logging is disabled. 2015-05-06 14:37:43 -04:00
João Matos 0cbee32db0 Merge pull request #1775 from StephenMcConnel/bug-29724A
Fix bug in new SWF.MWFFileView.Dispose method (Xamarin 29724)
2015-05-06 17:37:46 +01:00
Stephen McConnel 2c5b75dc6b Fix bug in new SWF.MWFFileView.Dispose method (Xamarin 29724)
The fix for Xamarin 29724 submitted a day or two ago wasn't quite right.
2015-05-06 11:34:52 -05:00
Alexander Kyte 6b02759d6d [Remoting] Avoid needing to resolve the type by serializing the TypeInfo
This is a better fix for the problem of what type to give an object
when the actual type can't be loaded in the current domain.
2015-05-06 12:15:58 -04:00
Alexander Kyte 2bc8f49dfe [Remoting] Remove X-domain references through marshalling of method attributes 2015-05-06 12:15:57 -04:00
Marek Safar c5fa24e68c [build] Fixes reference sources hash 2015-05-06 17:17:00 +02:00
Marek Safar 1bda13b996 [bcl] Mobile profiles fixes 2015-05-06 17:11:33 +02:00
João Matos 5fbeb4d62e [runtime] Fixed always_inline function might not be inlinable warning on GCC.
This fix was suggested by @schani to the warning spam that we've started to see.
2015-05-06 15:08:17 +01:00
João Matos 8ddca7e6d7 [runtime] Fixed warning by including <winsock2.h> before <windows.h>. 2015-05-06 15:05:04 +01:00
João Matos b7cbb7de5a [runtime] Fixed unused count variable warning by moving some code around. 2015-05-06 15:04:30 +01:00
João Matos 03fa920102 [runtime] Fixed warning by including <winsock2.h> before <windows.h>. 2015-05-06 15:03:58 +01:00
João Matos 44127d6c4c [runtime] Fixed warning by only using #pragma warning on MSVC. 2015-05-06 15:03:45 +01:00
João Matos 750d82f54b [mini] Do not try to set the usermode exception policy unless we're targeting Windows.
Fixes Windows cross-compilation.
2015-05-06 15:01:40 +01:00
João Matos 9602e20595 [mini] Do not use the ELF writer when hosting on Windows. 2015-05-06 15:00:18 +01:00
Zoltan Varga ae495e8bd4 [runtime] Fix support for callvirt delegates with a vtype first argument. Fixes #29665. 2015-05-06 04:57:41 -04:00
Marek Safar b3e7d55dd4 Merge pull request #1774 from akoeplinger/unit-test-reporting-improvements
[RFC] Improve unit test reporting when test runner crashes
2015-05-06 09:28:04 +02:00
Alexander Köplinger 98f32fe96d [RFC] Improve unit test reporting when test runner crashes 2015-05-05 21:39:35 -04:00
Alex Rønne Petersen 7f08218b54 [sgen] Fix an accidental symbol export in sgen-workers.c. 2015-05-06 03:02:54 +02:00
Alex Rønne Petersen 5d683d012e [mini] Rename machine description symbol names to avoid global namespace pollution. 2015-05-06 03:02:11 +02:00
Alex Rønne Petersen 1cab4433d3 [utils] Rename JSON writer symbols to avoid global namespace pollution. 2015-05-06 03:02:11 +02:00
Alex Rønne Petersen f1c12de25e [mini] Rename image writer symbols to avoid global namespace pollution. 2015-05-06 03:02:11 +02:00
Alex Rønne Petersen db5bfbb4cf [runtime] Rename seq point symbols to avoid global namespace pollution. 2015-05-06 03:02:10 +02:00
Alex Rønne Petersen d6cac73af4 [runtime] Remove unused _mono_debug_address_from_il_offset function. 2015-05-06 03:02:10 +02:00
Alex Rønne Petersen 904580023b [utils] Avoid symbol namespace pollution in iomap code. 2015-05-06 03:02:10 +02:00
Alex Rønne Petersen 26d9d14075 [utils] Rename SHA-1 symbols to not pollute the global namespace. 2015-05-06 03:02:10 +02:00
Alex Rønne Petersen cd201807e8 [runtime] Rename GCHandle_CheckCurrentDomain to not pollute the global namespace. 2015-05-06 03:02:10 +02:00
Alex Rønne Petersen 988c429bac [wapi] Fix some symbol names to be remapped the same way as the rest.
This is in the interest of reducing namespace pollution.
2015-05-06 03:02:09 +02:00
Alex Rønne Petersen 3df6f77cba [runtime] Rework special static offset handling.
Special static offsets now have a less magical format:

 [0]   6-bit index into the array of chunks.
 [6]   25-bit offset into the array.
 [31]  Bit indicating thread or context static.

Also wrapped accesses to these fields in macros and a bitfield struct.
2015-05-06 01:30:51 +02:00
Alex Rønne Petersen 7b78fd1f74 [runtime] Unify thread/context static field scanning and management.
Context static data is now scanned precisely in the same way as thread static
data. To facilitate this, the memory management of context static data has been
fixed to work similarly to thread static data. This further required that all
contexts be available for iteration, so contexts are now added to a global hash
table (by GC handle) when they are created.
2015-05-06 01:30:51 +02:00
Alex Rønne Petersen 4ee3df3fdc [remoting] Increment the context ID counter atomically. 2015-05-06 01:30:51 +02:00
Alex Rønne Petersen 72bce87621 [runtime] Rewrite TLS slot marking to use MonoBitSet. 2015-05-06 01:30:51 +02:00
Alex Rønne Petersen e03d67b765 [utils] Add MONO_BITSET_FOREACH macro. 2015-05-06 01:30:50 +02:00
Mark Probst 017dce9f15 [sgen] Fix logging format specifiers. t modifier is not standard. 2015-05-05 15:21:58 -07:00
Damien Diederen 33654c3418 [Mono.Data.Tds] Serialize GUIDs as 16-byte arrays (rather than zero)
Make sure we do not accidentally to encode an object by breaking out for
unknown TypeCode.Object instances (this is where the zero bytes used to
silently come from).
2015-05-05 22:21:13 +02:00
Damien Diederen d7a417a349 [System.Data.SqlClient] Enable bulk insert of DateTime{,Offset} instances
This commit adds the missing mapping from DateTimeOffset to its SqlDbType,
and makes sure they are converted to string 1. in a locale-insensitive
manner, and 2. with maximum precision.
2015-05-05 22:21:13 +02:00
Damien Diederen 1858ce4a94 [System.Data.SqlClient] Avoid "invalid source table" exception in bulk inserts
Mono's implementation of DataTableMappingCollection used not to care,
but MS', merged from the .NET reference sources, throws an exception
if the source table name is empty.
2015-05-05 22:20:19 +02:00
Damien Diederen 85a746c386 [System.Data.SqlClient] Bulk copy: Query metadata in pending transaction
Without this, the bulk copy engine fails with a nested transaction error.

We now just reuse the current transaction to do the work.
2015-05-05 22:07:24 +02:00
Damien Diederen 3a81bfc275 [Mono.Data.Tds] Deserialize variant-wrapped fixed-size integers (1-8 bytes)
Without this, variant output parameters are left unconsumed in the
input stream, and null is returned.

The new code skips the max length uint, and decodes a subset of the
variant types.  What is not recognized is skipped, and we return null
as the previous code used to do.

(Ideally, the subset of GetColumnValue which decodes types which can
be embedded in a variant should be factored out to a different method,
and reused from GetVariantValue.)
2015-05-05 21:20:49 +02:00
Damien Diederen 77ef86e529 [Mono.Data.Tds] Register TdsColumnType.Variant as a "blob" type
On the wire, Variants are preceded by uint-encoded max length and
actual length (not bytes like smaller types).  Without this patch,
SQL Server 2008 SP2 rejects our requests as truncated.
2015-05-05 21:20:28 +02:00
Damien Diederen c6e96ff141 [Mono.Data.Tds] Add "sql_variant" case to TdsMetaParameter.GetMetaType 2015-05-05 21:20:21 +02:00
Damien Diederen 9bcae63da7 [System.Data.SqlClient] Set SqlParameter.SqlDbType even for SqlDbType.Variant
Without this, the TdsMetaParameter.TypeName ends up being null, which
crashes TdsMetaParameter.GetMetaType () when the variant value is
about to be serialized on the wire.
2015-05-05 21:20:08 +02:00
Damien Diederen f055c46a24 [Mono.Data.Tds] Serialize SqlDbType.DateTime{2,Offset} as char(n)
DateTime2 and DateTimeOffset are not directly supported by the TDS 7.1
wire protocol, which is the version implemented by Mono's current TDS
driver.  (Tds80.cs does in fact advertise version 0x00000071.)

Bumping the protocol version to 0x03000a73 or 0x03000b73, for TDS
7.3.A/7.3.B, is not sufficient; the stream generated by the driver
causes SQL Server to kill the connection right after the login packet.
More investigation is needed on that front.

SQL Server is fine, however, with us sending timestamps in
literal (ISO 8601) format down the wire, packed within ASCII char(n)
strings.  Which is what this patch does, which allows client code
perform inserts using, e.g.:

    var param = new SqlParameter("@Value", SqlDbType.DateTime2);
    param.Value = DateTime.Now;
    command.Parameters.Add(param);
2015-05-05 21:05:27 +02:00
Damien Diederen 81a0830d9e [System.Data.SqlClient] Map SqlDbType.DateTime{2,Offset} 2015-05-05 21:05:16 +02:00
Ludovic Henry 19c7dcd8f3 [threadpool-ms] Disable cleanup
The cleanup code would wait for all worker threads to finish, but that could lead to some workload that would block. By disabling the cleanup code, we do not wait on anything to happen, we count on the OS to clean everything up.
2015-05-05 19:32:36 +01:00
Ludovic Henry 611a43ee0f [delegate] Replace multicast delegate implementation
Replace the reversed linked implementation by an array based implementation. This will improve Combine performance, as well as ease delegate to virtual function optimization.
2015-05-05 17:36:53 +01:00
João Matos 690aa51537 Link to the general releases page instead of a specific version in NEWS.
Addresses some feedback from c30887a23e.
2015-05-05 16:15:42 +01:00
João Matos c30887a23e Update release notes URLs in the NEWS file. 2015-05-05 16:00:39 +01:00
Alex Rønne Petersen 5a57d12ffc Merge pull request #1766 from alexrp/sgen-separation
[sgen] Move the independent parts of SGen to a separate library
2015-05-05 16:30:26 +02:00
Marek Safar 46edec071c [runtime] Add more 3.0 fx assemblies to remapping table. Fixes #29459 2015-05-05 15:27:36 +02:00
Marek Safar 8e3e9d8408 [mcs] Use reference from closest storey which holds captured this. Fixes #29506 2015-05-05 15:02:17 +02:00
Zoltan Varga 691f540dd3 [runtime] Remove more unused CAS code. 2015-05-05 07:29:45 -04:00
Marek Safar c3cce27732 [build] Revert part of 036c41714a 2015-05-05 11:42:36 +02:00
Zoltan Varga 1e9b4787b1 [arm] Use the OP_TAILCALL code on ios as well. 2015-05-04 22:21:00 -04:00
Zoltan Varga d7be158c6b [sdb] Substract 1 from the ip in the soft breakpoint handling code to avoid associating the ip with the next seq point if two sequence points are emitted after each other. 2015-05-04 22:21:00 -04:00
Miguel de Icaza 6a2560229d Update, drop ssapre from the man page 2015-05-04 22:02:31 -04:00
Miguel de Icaza aa16c96cbb Update documentation, add float32 section 2015-05-04 21:27:17 -04:00
Zoltan Varga f2339f3ce9 [jit] Disable the binary writer on arm, dlopen () can't read the images it creates on some newer linux versions. 2015-05-04 20:41:22 -04:00
Zoltan Varga e42139d72c Merge pull request #1768 from StephenMcConnel/bug-29724
Fix memory leak in SWF.FileDialog due to thumbnail images
2015-05-04 20:13:38 -04:00
Zoltan Varga b41ed5db82 [arm] Use gcc --shared for linking aot images. 2015-05-04 20:11:47 -04:00
Stephen McConnel bcecb992fc Fix memory leak in SWF.FileDialog due to thumbnail images
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=29724.
2015-05-04 18:43:38 -05:00
Zoltan Varga 7639eda430 Fix a warning. 2015-05-04 18:20:01 -04:00
Zoltan Varga 036c41714a [arm] Fix the DISABLE_JIT build. 2015-05-04 17:57:48 -04:00
Zoltan Varga eaf00365d1 [jit] Remove unfinished regalloc2. 2015-05-04 17:50:51 -04:00
Zoltan Varga 0e46874631 [runtime] Remove CAS stuff from configure. 2015-05-04 17:40:12 -04:00
Zoltan Varga 02c0bf01a1 [runtime] Remove CAS stuff from configure. 2015-05-04 17:39:56 -04:00
Zoltan Varga 52f8ef5f5c [runtime] Remove CAS tests. 2015-05-04 17:35:29 -04:00
Zoltan Varga 239e9848a4 [corlib] Remove unused CAS icalls. 2015-05-04 17:35:09 -04:00
Zoltan Varga 38e55c77f9 [runtime] Remove --security=smcs-temporary-hack and --security=cas options and the code supporting them. 2015-05-04 17:22:43 -04:00
Alex Rønne Petersen 364677641c Merge pull request #1767 from alexanderkyte/err_namespace_fix
[runtime] Use correct namespace for FileNotFoundException
2015-05-04 21:56:13 +02:00
Alexander Kyte e4fc9c9840 [runtime] Use correct namespace for FileNotFoundException 2015-05-04 15:48:55 -04:00
Alex Rønne Petersen 0c71975bce [sgen] Move the independent parts of SGen to a separate library. 2015-05-04 21:09:29 +02:00
João Matos 22212dcb47 [System.IO.Compression] Fixed reading of Zip archives with malformed extra data entries.
From a ZIP spec:

"Extra field: Used to store additional information.
The field consistes of a sequence of header and data pairs, where the header has a 2 byte identifier and a 2 byte data size field."

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

Reported upstream: https://github.com/adamhathcock/sharpcompress/issues/54
2015-05-04 18:31:01 +01:00
Marek Safar be577089cc [mcs] Auto-properties can still be assigned from constructor when no setter is specified. Fixes #29691 2015-05-04 18:31:51 +02:00
João Matos 4bbeecf15d [runtime] Fixed SeqPointInfo objects to also work under ARM64. 2015-05-04 17:07:01 +01:00
João Matos 2667205186 [runtime] Re-organized object offsets into shared and architecture-specific sections. 2015-05-04 17:07:01 +01:00
João Matos fd5f1c73e0 [runtime] Improve readability on nested preprocessor defines. 2015-05-04 17:07:01 +01:00
João Matos 8689dc1796 [runtime] Move x86_64 offsets next to the x86 ones. 2015-05-04 17:07:01 +01:00
Marek Safar 0c5e53feec [mcs] Report better error for assignment to readonly properties hiding type name 2015-05-04 17:34:44 +02:00
Marcos Henrich 2c4b3b7f00 [corlib] Fixes DST without AdjustmentRules.
Fixes IsDaylightSavingTime returning false when
SupportsDaylightSavingTime was set to false because TimeZoneInfo was
create with no AdjustmentRules.

Now if TimeZoneInfo uses transitions SupportsDaylightSavingTime will be
set to true regardless of AdjustmentRules.
2015-05-04 15:43:51 +01:00
Marek Safar 99a5ed9399 [corlib] Bump security reference sources 2015-05-04 16:18:29 +02:00
João Matos a2d74adc0e [runtime] Fixed LLVM Windows cross-compilation.
This configuration was broken with https://github.com/mono/mono/commit/4a20119029a0ba36866be8575909085c3742e85b.

Manifested as the following error:
```configure: error: LLVM executable /Users/builder/data/lanes/1196/47be2825/source/monodroid/builds/cross/windows-llvm/usr/bin/llvm-config not found.```
2015-05-04 14:58:49 +01:00
Marcos Henrich ac290a48b7 Merge pull request #1752 from esdrubal/strefactor
[corlib] Deduplicated StackTrace ToString code.
2015-05-04 14:37:25 +01:00
Zoltan Varga c314f9cb4a [jit] Remove the changes to mono-codeman in 62d46b469b, they are not needed anymore with the new approach for handling thunks. 2015-05-04 03:53:35 -04:00
Zoltan Varga 8f04680fc2 [arm] Fix the build. 2015-05-03 19:22:39 -04:00
Zoltan Varga 9df344c69d [x86] Fix the build. 2015-05-03 16:27:12 -04:00
Zoltan Varga a000d0f8f0 Merge pull request #1765 from akoeplinger/fix-sgen-independence-win
[sgen] Fix Windows build
2015-05-03 16:21:42 -04:00
Alexander Köplinger 4306a97a46 [sgen] Fix Windows build
There were some changes in the recent sgen overhaul (https://github.com/mono/mono/pull/1648) that weren't applied to Windows.
2015-05-03 11:42:19 -07:00
Alex Rønne Petersen ac4cf68d87 Merge pull request #1763 from JetBrains/empty_appdomainsetup_configurationfile
Do not fail on empty or too short AppDomainSetup.ConfigurationFile
2015-05-03 15:17:28 +02:00
Zoltan Varga 7e8b4615ee [arm] Implement the mono_arch_patch_code_new () function. 2015-05-03 06:03:31 -04:00
Zoltan Varga 71939f2a05 [x86] Implement the mono_arch_patch_code_new () function. 2015-05-03 05:58:46 -04:00
Zoltan Varga 55e7b84ef3 [jit] Add a new version of the mono_arch_patch_code () function to reduce code duplication between backends. 2015-05-03 05:48:03 -04:00
Zoltan Varga 952fca344e [jit] Remove unused 'dyn_code_mp' argument from mono_arch_patch_code (). 2015-05-03 04:56:52 -04:00
Zoltan Varga de0ae52bc5 [arm] Fix the build. 2015-05-03 02:55:07 -04:00
Zoltan Varga 1f1ec58dcf [arm] Remove some obsolete comments and code. Emit thunks while holding the lock. 2015-05-03 02:48:35 -04:00
Zoltan Varga fe572840a8 [arm] Refactor handle_thunk () to avoid locking and O(n^2) searches during JITting. 2015-05-03 02:02:12 -04:00
Zoltan Varga e73aa80ac3 [arm] Use the thunks area emitted next to method code for resolving thunks, remove the older code which was searching for thunks inside codeman chunks. 2015-05-03 01:33:58 -04:00
Zoltan Varga a129e46fa6 [jit] Pass a MonoCompile argument to mono_arch_patch_code () so it can access the thunks area during JITting. 2015-05-02 23:24:34 -04:00
Zoltan Varga 67bad2fae3 [arm] Use the thunks area after the method code to resolve thunks. 2015-05-02 23:01:54 -04:00
Zoltan Varga 31ff0c0965 [runtime] Add some missing icalls referenced by the reference sources. 2015-05-02 21:26:53 -04:00
Zoltan Varga ea8a04f0c3 [sdb] Fix saving the state in the debugger_agent_breakpoint_from_context () function. 2015-05-02 21:13:24 -04:00
Zoltan Varga f3115c6b62 [arm] Transition the arm backend to use the mini_get_single_step_trampoline()/mini_get_breakpoint_trampoline() functions when using soft breakpoints. 2015-05-02 21:13:24 -04:00
Leonid Shalupov c34ad2beb3 Do not fail on empty or too short AppDomainSetup.ConfigurationFile 2015-05-02 21:23:01 +02:00
Zoltan Varga 4ed1355c1d Merge pull request #1762 from Mailaender/patch-1
Fixed FSF postal address in legacy license
2015-05-02 04:54:14 -04:00
Matthias Mailänder 9e916f54f2 Update COPYING.LIB
from https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt
2015-05-02 10:24:00 +02:00
Zoltan Varga 3db3fa41d5 [jit] Fix the DISABLE_JIT build. 2015-05-02 02:00:47 -04:00
Zoltan Varga 9b282cbe0d [runtime] Fix the cross compiler build. 2015-05-02 01:02:36 -04:00
Mark Probst e0fd6bdb42 Merge pull request #1760 from evincarofautumn/object-provenances
[sgen] Record object provenances in binary protocol.
2015-05-01 16:29:51 -07:00
Jon Purdy c09bb74207 [sgen] Record object provenances in binary protocol. 2015-05-01 15:37:51 -07:00
Jon Purdy 55a95fc2db [tools] Add help message to sgen-grep-binprot. 2015-05-01 15:27:58 -07:00
Jon Purdy 3b0df7898b [tools] Support Booleans in sgen-grep-binprot. 2015-05-01 13:35:57 -07:00
Ludovic Henry 0b2cd8e035 [runtime] Ensure mono-rand is opened once and only once 2015-05-01 20:58:26 +01:00
Ludovic Henry b1d0f42e1c [threadpool] Refactor begin/end invoke runtime support 2015-05-01 20:56:32 +01:00
Zoltan Varga bd27ef859f [jit] Put back some code removed by d2e184bbf7 by mistake. 2015-05-01 15:45:41 -04:00
Zoltan Varga d2e184bbf7 [jit] Allocate the thunks area next to the method code if the backend can compute its exact size (by setting cfg->thunk_area). Store it in MonoJitInfo so the backend patching code can access it. 2015-05-01 15:44:10 -04:00
Mark Probst 9de07d8eb4 [sgen] Fix heavy binary protocol. 2015-05-01 10:36:40 -07:00
Atsushi Eno f7672d6b4b [WCF] partially revert ServiceModel.Internals InternalsVisibleTo. 2015-05-02 00:08:01 +09:00
Atsushi Eno a6a2877b63 [DurableInstancing] add a handful of [InternalsVisibleTo]s. 2015-05-01 22:28:44 +09:00
Atsushi Eno ae62ea8229 [S.R.Serialization] fix some [InternalsVisibleTo]s. 2015-05-01 22:27:04 +09:00
Atsushi Eno 3f87ade7f0 [DurableInstancing] forgot to add SRCore.cs 2015-05-01 16:02:14 +09:00
Atsushi Eno fd03dbc3bd System.Runtime.DurableInstancing switches to referencesource with revised deps.
This dll has been nothing but stub. The new dll just builds, unverified.
2015-05-01 15:58:16 +09:00
Atsushi Eno cdbf324ac0 add InternalsVisibleTo(DurableInstancing) in ServiceModel.Internals. 2015-05-01 15:50:41 +09:00
Zoltan Varga a30442a7de [jit] Merge regalloc.c into mini-codegen.c. 2015-05-01 01:33:00 -04:00
Zoltan Varga 1038b9de3f [jit] Print out floating point arguments as well in mono_print_ins_index (). 2015-05-01 01:31:19 -04:00
Zoltan Varga 2e5f43d8f7 Revert "[jit] Remove unused regalloc.c file."
This reverts commit 6c17420f98.

Revert this, the file is still used.
2015-05-01 01:29:06 -04:00
Zoltan Varga 5fd256b6e1 [runtime] Remove unused wrapper dir. 2015-05-01 01:24:40 -04:00
Zoltan Varga 6c17420f98 [jit] Remove unused regalloc.c file. 2015-05-01 01:16:55 -04:00
Zoltan Varga f696525f99 [runtime] Remove --wapi option which depends on the unsupported shared handle support. 2015-05-01 01:12:31 -04:00
Zoltan Varga af19ddf4e6 [jit] Remove unmaintained ssapre.c/h file. 2015-05-01 01:07:44 -04:00
Alexander Köplinger d9e2643529 [xbuild] Add missing files to EXTRA_DISTFILES to fix tarball 2015-05-01 04:59:35 +02:00
Zoltan Varga 3469c138c6 [arm] Reorganize the argument passing code, implement support for HFA arguments on armhf. 2015-04-30 18:36:19 -04:00
Alex Rønne Petersen 4a084041be Merge pull request #1753 from schani/feature-yet-more-sgen-improvements
Yet more SGen improvements
2015-04-30 23:07:11 +02:00
Marek Safar 52d9079213 [corlib] Add legacy mobile apis 2015-04-30 15:02:24 +02:00
João Matos 731e2fa6aa [tools] Added the beginnings of a static analysis checking tool for Mono.
This is still a big work-in-progress and not ready to be tested. It might be used in the future for custom AST static analysis of Mono source code.
2015-04-30 13:43:47 +01:00
Alex Rønne Petersen 2fa7ee3fba Revert "[runtime] Introduce versioning of the profiler API."
This reverts commit 138ae5a07f.

After some discussion, I don't think this adds as much value as I
initially thought it would.
2015-04-30 10:50:56 +02:00
Zoltan Varga cde500b508 Merge pull request #1754 from aaronhoffman/nunmber
Fix spelling of number in IOException message
2015-04-30 01:48:37 -04:00
Aaron Hoffman 641f55922f Fix spelling of number in IOException message 2015-04-29 23:18:26 -05:00
Zoltan Varga 2538b0db0a [arm] Use the generic method for passing the IMT argument on ARM. 2015-04-29 21:36:13 -04:00
Alexander Köplinger ffdbf77f41 [System.Runtime.Serialization] Fix "make distcheck"
These files were missing from the tarball.
2015-04-30 00:24:36 +02:00
Mark Probst 0f331fe685 [sgen] Add the stopping thread to the world stopping protocol entry. 2015-04-29 14:54:15 -07:00
Mark Probst da5ebd148f [sgen] Binary protocol entry for stack scanning. 2015-04-29 14:54:15 -07:00
Mark Probst 7560e670ac [sgen] SGEN_UPDATE_REFERENCE was used where it shouldn't be.
This has no implications other than for debugging.
2015-04-29 14:54:14 -07:00
Mark Probst f25348e789 [sgen] For object copies, check whether we can use memmove in the wbarrier. 2015-04-29 14:54:13 -07:00
Mark Probst a2013d84fb [sgen] Make mono_gc_scan_for_specific_ref() also scan thread stacks. 2015-04-29 14:54:08 -07:00
Marek Safar a1a73366db [corlib] Bump reference sources for api tweaks 2015-04-29 22:16:02 +02:00
Mark Probst 4cc3516463 Merge pull request #1648 from schani/sgen-independence
SGen Independence
2015-04-29 10:59:27 -07:00
Mark Probst df66a41d10 [sgen] Always invoke the world restarting protocol call. Fixes heapshot. 2015-04-29 11:00:14 -07:00
Mark Probst b51b7f5ac8 [sgen] Fix warnings on Linux. 2015-04-29 11:00:13 -07:00
Mark Probst 48efb8bf0d [sgen] Missing include for independent compilation. 2015-04-29 11:00:13 -07:00
Mark Probst 5870113e5b [sgen] Fix warnings. 2015-04-29 11:00:12 -07:00
Mark Probst f2a6b675f4 [sgen] Write barrier prototypes in sgen-gc.h. 2015-04-29 11:00:12 -07:00
Mark Probst 26c3a4b377 [sgen] Fix headers for independent compilation. 2015-04-29 11:00:12 -07:00
Mark Probst 977783a344 [sgen] Client debug function for checking whether class is inited. 2015-04-29 11:00:11 -07:00
Mark Probst 561dfc35a0 [sgen] SGEN_TV_ELAPSED returns a long. 2015-04-29 11:00:11 -07:00
Mark Probst ebdb3a608d [sgen] Remove dead code and data and make things static. 2015-04-29 11:00:10 -07:00
Mark Probst 5fc000b22f [sgen] More client interface documentation. 2015-04-29 11:00:10 -07:00
Mark Probst dca2b68be9 [sgen] Call mono_gc_register_thread() from Mono client code. 2015-04-29 11:00:09 -07:00
Mark Probst 8c0cbd6e00 [sgen] Make hazard pointer stuff work without Mono, enabling concurrent M&S. 2015-04-29 11:00:09 -07:00
Mark Probst 3df7a2f569 [sgen] Get rid of sgen_client_vtable_has_references(). 2015-04-29 11:00:08 -07:00
Mark Probst 1abd023390 [sgen] Document the client interface header a bit. 2015-04-29 11:00:08 -07:00
Mark Probst 2b3948572e [sgen] Don't use sgen_client_vtable_get_namespace() to check an object's validity.
Some clients might not have namespaces, so they might return NULL.
2015-04-29 11:00:08 -07:00
Mark Probst 67c74d10cf [sgen] Don't return a pointer from the out-of-memory function.
The pointer the function would have to return would be to a chunk of managed
memory, for the object to be allocated.  It can't do that because it is not in charge
of the managed heap.  The best it could do would be to free some unmanaged
memory and tell the allocator try again.
2015-04-29 11:00:07 -07:00
Mark Probst 80b5c9cdc3 [sgen] Rename the total heap size reporting client function, and pass size as size_t. 2015-04-29 11:00:07 -07:00
Mark Probst 5df196bc68 [sgen] Get rid of sgen_client_object_register_finalizer_if_necessary(). 2015-04-29 11:00:06 -07:00
Mark Probst 3cbd4eca69 [sgen] Get rid of sgen_client_object_is_array_fill(). 2015-04-29 11:00:06 -07:00
Mark Probst c7d3126752 [sgen] Get rid of sgen_client_vtable_get_instance_size(). 2015-04-29 11:00:05 -07:00
Mark Probst f74eca0ce4 [sgen] Put sgen_thread_attach() in Mono client code. 2015-04-29 11:00:05 -07:00
Mark Probst f03cfdb821 [sgen] Don't return unused thread count from stop/start world functions. 2015-04-29 11:00:04 -07:00
Mark Probst 3788fa3f46 [sgen] Remove sgen_client_object_safe_name(). 2015-04-29 11:00:04 -07:00
Mark Probst 32f0e158e6 [sgen] Move POSIX STW thread info stuff to Mono client code. 2015-04-29 11:00:04 -07:00
Mark Probst 74a0b66364 [sgen] Move global stop count variable to Mono client code. 2015-04-29 11:00:03 -07:00
Mark Probst 4a34b1695b [sgen] Fix warnings and remove dead code. 2015-04-29 11:00:03 -07:00
Mark Probst 8c114356ec [sgen] Make client header file name configurable. 2015-04-29 11:00:03 -07:00
Mark Probst 227fe4a7cc [sgen] Make SGen compile without Mono. 2015-04-29 11:00:02 -07:00
Mark Probst 7d7917102f [sgen] Use consistent include paths. 2015-04-29 11:00:02 -07:00
Mark Probst 483ffe64b8 [sgen] Add missing headers for compiling with glib. 2015-04-29 11:00:02 -07:00
Mark Probst 065f6e1068 [sgen] Add a few missing returns when compiling with glib.
`g_error()` isn't marked as not returning in glib.
2015-04-29 11:00:01 -07:00
Mark Probst f99940ca83 [sgen] Get rid of MonoObject and MonoVTable in sgen-debug.c. 2015-04-29 11:00:01 -07:00
Mark Probst 0b4cc9b05e [sgen] sgen_os_init() must be called from Mono client code. 2015-04-29 11:00:01 -07:00
Mark Probst 05fe3f182c [sgen] Client function for registering worker threads. 2015-04-29 11:00:01 -07:00
Mark Probst 030dd8bea8 [sgen] We can't have negative numbers in gc-parse.c.
`size_t` is non-negative.  We catch overflow by checking that shifting right
again produces the original unshifted value.
2015-04-29 11:00:00 -07:00
Mark Probst 09462f7711 [sgen] Do pinning stats based on vtable, not class.
We need to get rid of MonoClass in SGen.
2015-04-29 11:00:00 -07:00
Mark Probst 9741a8e8f7 [sgen] Declare time spans in GGTimingInfo as gint64.
We use `SGEN_TV_DECLARE` for instants of time, not time spans.
2015-04-29 11:00:00 -07:00
Mark Probst 59b51bea0a [sgen] Remove dead code. 2015-04-29 11:00:00 -07:00
Mark Probst 831a8db00b [sgen] Move Mono specific function declarations to sgen-client-mono.h. 2015-04-29 10:59:53 -07:00
Mark Probst 18ecc132c3 [sgen] Do domain-specific finalizer and weak link stuff via predicate callbacks. 2015-04-29 10:59:53 -07:00
Mark Probst 8350ade75f [sgen] Handle no-managed-allocator debug option in Mono client code. 2015-04-29 10:59:53 -07:00
Mark Probst b4f31d0ec6 [sgen] We used the wrong unmask function in sgen-nursery-allocator.c. 2015-04-29 10:59:52 -07:00
Mark Probst d12908781c [sgen] Don't use MonoObject. 2015-04-29 10:59:52 -07:00
Mark Probst 1f7a9b353a [sgen] Move thread info to Mono client code. 2015-04-29 10:59:51 -07:00
Mark Probst 85791ba0ad [sgen] Update mono_perfcounters in Mono client code. 2015-04-29 10:59:51 -07:00
Mark Probst 0636b33979 [sgen] Don't use mono_bool in SGen. 2015-04-29 10:59:51 -07:00
Mark Probst e54c2c4222 [sgen] Have our own aligned address hash function.
Just to get rid of a dependency.
2015-04-29 10:59:50 -07:00
Mark Probst 721d6a6d58 [sgen] Client function sgen_client_vtable_get_instance_size(). 2015-04-29 10:59:50 -07:00
Mark Probst 4df739b9ec [sgen] mono_gc_register_thread() is not Mono specific. 2015-04-29 10:59:49 -07:00
Mark Probst 3d845c71d6 [runtime] Make a variable static. 2015-04-29 10:59:49 -07:00
Mark Probst e4a6b70ab1 [sgen] Remove dependency on gc-internal.h. 2015-04-29 10:59:49 -07:00
Mark Probst 15cf9affa6 [sgen] Make bridge processing a client issue. 2015-04-29 10:59:49 -07:00
Mark Probst ba590456b3 [sgen] Semaphore type defined in client code.
`mono-semaphore.h` depends on io-layer, which we can't expect
anybody to include.
2015-04-29 10:59:48 -07:00
Mark Probst 8ddb33b334 [sgen] sgen-archdep.h is now Mono-specific. 2015-04-29 10:59:48 -07:00
Mark Probst e87255714c [sgen] Remove dependency on mono-gc.h. 2015-04-29 10:59:48 -07:00
Mark Probst 899288fd57 [sgen] Remove superfluous include. 2015-04-29 10:59:47 -07:00
Mark Probst 46045aa5fe [sgen] Move time stuff to client code. 2015-04-29 10:59:47 -07:00
Mark Probst c8f668ab2d [sgen] Move virtual memory allocation to client code. 2015-04-29 10:59:47 -07:00
Mark Probst 864d7b6512 [sgen] Move gc_callbacks to Mono client code. 2015-04-29 10:59:47 -07:00
Mark Probst 21ab98f5bb [sgen] Move runtime_data to Mono client code. 2015-04-29 10:59:46 -07:00
Mark Probst a93d2e8013 [sgen] Move thread context to Mono client code. 2015-04-29 10:59:46 -07:00
Mark Probst 9e7604ce5f [sgen] Move stack limits to client code. 2015-04-29 10:59:46 -07:00
Mark Probst 19b39c42ea [sgen] Move gc_disabled to Mono-specific code. 2015-04-29 10:57:55 -07:00
Mark Probst 9740cde073 [sgen] Move skip and in_critical_region to Mono-specific code. 2015-04-29 10:57:54 -07:00
Mark Probst 22774f38d5 [sgen] Move stack scanning to client code. 2015-04-29 10:57:54 -07:00
Mark Probst 7becb7c5d4 [sgen] Moved stopped_ip and stopped_domain to Mono-specific code. 2015-04-29 10:57:54 -07:00
Mark Probst 30efae36e7 [sgen] Move MonoThreadInfo part of SgenThreadInfo to client code. 2015-04-29 10:57:54 -07:00
Mark Probst 05eb967348 [sgen] Move remaining logging to Mono-specific code. 2015-04-29 10:57:53 -07:00
Mark Probst 5f33085d65 [sgen] Move counters to client code. 2015-04-29 10:57:53 -07:00
Mark Probst bb22ad20a7 [sgen] Move all profiler calls to Mono-specific code. 2015-04-29 10:57:53 -07:00
Mark Probst 60afcfb4af [sgen] Move DTrace stuff into the client header.
This should always be inlined.  We also need this there because we'll put the
profiler calls there.

This introduces fickle dependencies in the order of which things are declared
and inlined.  It would be nice to have a cleaner solution.
2015-04-29 10:57:52 -07:00
Mark Probst 22b6f62f4a [sgen] Use pointer array for pin stats instead of linked list. 2015-04-29 10:57:52 -07:00
Mark Probst 7b8d065369 [sgen] Move moved-object profiler event to Mono-specific code. 2015-04-29 10:57:52 -07:00
Mark Probst e1129cae4c [sgen] Make STW part of the client code. 2015-04-29 10:57:52 -07:00
Mark Probst 4c43884a59 [sgen] Move DTrace support to Mono-specific code.
We use client callbacks from the binary protocol functions.  There are some DTrace probes
which we don't have binary protocol entries for.  Since DTrace isn't properly supported
anyway (and doesn't even work as it should on OSX), we just remove those probes instead
of making new binary protocol entries.
2015-04-29 10:57:51 -07:00
Mark Probst aade9dde44 [sgen] Remove dead declaration. 2015-04-29 10:57:51 -07:00
Mark Probst 7366ebf5bb [sgen] Move nursery debug code to sgen-debug.c. 2015-04-29 10:57:51 -07:00
Mark Probst d6d516dfe0 [sgen] Remove unnecessary includes. 2015-04-29 10:57:50 -07:00
Mark Probst a0646d4701 [sgen] Move some thread stuff to sgen-mono.c. 2015-04-29 10:57:50 -07:00
Mark Probst 225938bb3b [sgen] Move more random small stuff to sgen-mono.c. 2015-04-29 10:57:50 -07:00
Mark Probst d3af0a6fae [sgen] Move managed write barrier to sgen-mono.c. 2015-04-29 10:57:50 -07:00
Mark Probst c4ba94ec01 [sgen] Use macro for object header and minimum object size. 2015-04-29 10:57:49 -07:00
Mark Probst 986f2727a6 [sgen] Move some small callbacks to sgen-mono.c. 2015-04-29 10:57:49 -07:00
Mark Probst ab4449d923 [sgen] Move heap walking into sgen-mono.c. 2015-04-29 10:57:49 -07:00
Mark Probst b575835001 [sgen] Move array fill object check into client code. 2015-04-29 10:57:49 -07:00
Mark Probst 9b5f45fdfe [sgen] Omit unnecessary casts. 2015-04-29 10:57:48 -07:00
Mark Probst 758beb893b [sgen] Typedef GCObject and GCVTable to MonoObject and MonoVTable. 2015-04-29 10:57:48 -07:00
Mark Probst 16524f73f2 [sgen] Move GCObject and GCVTable to client code. 2015-04-29 10:57:48 -07:00
Mark Probst 2b655519c0 [sgen] GCObject and GCVTable instead of MonoObject and MonoVTable. 2015-04-29 10:57:48 -07:00
Mark Probst 7240b497bb [sgen] Move root profiling to sgen-mono.c. 2015-04-29 10:57:47 -07:00
Mark Probst cbb012e983 [sgen] Use pointer queue instead of list for finalize ready objects. 2015-04-29 10:57:47 -07:00
Mark Probst 8bf4f09152 [sgen] Move sgen_safe_name() to client code. 2015-04-29 10:57:47 -07:00
Mark Probst 6c7c2f3071 [sgen] Use write barrier for fields to set array references.
They do the same thing.
2015-04-29 10:57:46 -07:00
Mark Probst d6f7bb62ad [sgen] Moved object size calculation to client code. 2015-04-29 10:57:46 -07:00
Mark Probst 44a9f512e1 [sgen] Move mono_gc_set_string_length() to sgen-mono.c. 2015-04-29 10:57:46 -07:00
Mark Probst d55cab8d55 [sgen] Move array and string allocation to client code. 2015-04-29 10:57:46 -07:00
Mark Probst 876371ebc1 [sgen] Move some array filling stuff into client code. 2015-04-29 10:57:45 -07:00
Mark Probst a376fbcd47 [sgen] Moved Mono-specific cardtable scanning to client code. 2015-04-29 10:57:45 -07:00
Mark Probst e35fe7beaa [sgen] Trivial prettification of sgen-mono.c. 2015-04-29 10:57:45 -07:00
Mark Probst 20eacf086b [sgen] Move TLS emit macros to Mono-specific file. 2015-04-29 10:57:45 -07:00
Mark Probst 04c0445095 [sgen] Make wbarrier_value_copy take the element size, not the class. 2015-04-29 10:57:44 -07:00
Mark Probst c000cc895a [sgen] Move managed allocator to Mono-specific code. 2015-04-29 10:57:44 -07:00
Mark Probst 690e499e3c [sgen] Move has_critical_finalizer() to client code. 2015-04-29 10:57:44 -07:00
Mark Probst dabdc5f3ff [sgen] Move array filling into client code. 2015-04-29 10:57:44 -07:00
Mark Probst 5b1d55ca3a [sgen] Move domain clearing into client code. 2015-04-29 10:57:43 -07:00
Mark Probst 6d8a48f7b9 [sgen] Move ephemerons to client code. 2015-04-29 10:57:43 -07:00
Mark Probst cc43ac1923 [sgen] Move some support functions into sgen-gc.h. 2015-04-29 10:57:43 -07:00
Mark Probst 69f776dc18 [sgen] Move finalization callback stuff to sgen-mono.c.
Also introduce `sgen-client.h` which will eventually contain a spec of the
interface a client of SGen has to implement.
2015-04-29 10:57:43 -07:00
Mark Probst ef4606f5c4 [sgen] Move Mono-specific wbarriers to sgen-mono.c. 2015-04-29 10:57:42 -07:00
Mark Probst 08605a5af3 [sgen] Add FIXME about pinning statistics. 2015-04-29 10:57:42 -07:00
Mark Probst aae49e3fc3 [sgen] Move heap dumping code into sgen-debug.c. 2015-04-29 10:57:42 -07:00
Mark Probst 8dbd690773 [sgen] Move do_pin_stats flag into sgen-pinning-stats.c. 2015-04-29 10:57:42 -07:00
Marcos Henrich 92d14c71c1 [corlib] Deduplicated StackTrace ToString code.
StackStrace.ToString logic was duplicated in System.Exception and
System.Diagnostics.StackTrace.

Exception.StackTrace output was not changed.

StackTrace.ToString's method signature was changed, it is now the same
as Exception.StackTrace, which is more similar to the .NET one. This
affects generics and ref parameters representation.
2015-04-29 16:00:56 +01:00
Rolf Bjarne Kvinge 52a8a9b92d Merge pull request #1748 from rolfbjarne/proclib-fix
[runtime] Don't call mach_port_deallocate on tasks we don't own.
2015-04-29 16:13:49 +02:00
Rolf Bjarne Kvinge 810db09874 [runtime] Don't call mach_port_deallocate on tasks we don't own.
Fixes random/strange hangs/crashes (many native API starts returning
out-of-memory errors when there is plenty of memory available, other
just hang inexplicably) when profiling.
2015-04-29 15:44:48 +02:00
Marek Safar bef9e67deb [corlib] Fixes security tests failures 2015-04-29 13:41:26 +02:00
Zoltan Varga 631a2591ad [jit] Remove #ifdef MONO_ARCH_VTABLE_REG, it is defined on all architectures. 2015-04-29 05:17:10 -04:00
Alexander Köplinger 884675574a [build] Fix "make dist"
A few files didn't get added to EXTRA_DIST when the MS threadpool code was introduced.
2015-04-29 07:08:05 +02:00
Mark Probst 23372959cf [sgen] Check SP on thread suspend correctly. Fixes #29177. 2015-04-28 15:05:11 -07:00
Alex Rønne Petersen c4fba88384 Merge pull request #1747 from alexrp/gc-internal-api
Remove MONO_API from some internal GC APIs
2015-04-28 19:38:51 +02:00
Marek Safar dd3a5900b9 [corlib] Add new test 2015-04-28 19:33:41 +02:00
Marek Safar 11ecdc6b6f [corlib] More cryptography from reference sources 2015-04-28 19:05:32 +02:00
Marcos Henrich a27db5252f Merge pull request #1696 from esdrubal/tzrefactor
TimeZone Refactoring.
2015-04-28 16:36:08 +01:00
João Matos a8747582f3 [runtime] Move mono_error_assert_ok to mono-error-internals.h.
I originally introduced it as a public API but after some discussion we decided it's best as a private API.
2015-04-28 15:58:10 +01:00
Marek Safar 7697bc86fd [corlib] More cryptography from reference sources 2015-04-28 13:38:15 +02:00
Alex Rønne Petersen 456294d907 Merge pull request #1734 from anikilatorbeta/patch-1
Upadate socket and add OSSupportsIPv4 in net 4.0
2015-04-28 10:45:40 +02:00
Alex Rønne Petersen e6c1b789fa Remove MONO_API from some internal GC APIs. 2015-04-28 03:26:24 +02:00
Mark Probst 92e3c59575 [sgen] Fix a card table bug on 64 bits.
When copying value types (like via Array.Copy) it was possible to
encounter a memory region going over the end of the card table array.
In that case we would overwrite data after the card table and fail
to mark cards at the start of the array.

It's hard to do a test case for this because we allocate the shadow card
table directly after the regular one, so the overwrite is benign.  It would
also require allocating very large arrays (>2Gb) and run very slowly.
2015-04-27 17:42:54 -07:00
Alex Rønne Petersen a4ee723a80 Merge pull request #1745 from alexrp/warning-police
Warning police
2015-04-28 02:18:40 +02:00
Rodrigo Kumpera 1dec57e9ee Merge pull request #1743 from alexrp/profiler-versioning
Introduce versioning of the profiler API
2015-04-27 15:25:06 -04:00
Marek Safar d86dc4c41a [system.xml] Fix public api 2015-04-27 20:06:46 +02:00
Marek Safar 7f7b366d68 [build] Fix bootstrap from 2.0 only era mono 2015-04-27 19:04:20 +02:00
Marek Safar 08d0e5a283 [build] Remove 2.0 sdk from monolite when we are 4.0 only 2015-04-27 18:18:28 +02:00
João Matos ef6cf49fd9 Introduce mono_error_assert_ok for checking and asserting that a MonoError is OK.
We're adding this new API call to replace the `g_assert (mono_error_ok (&error));` code pattern so that when there's an error we can print the error message from the MonoError.
2015-04-27 17:10:28 +01:00
Marek Safar 1396b52d96 [corlib] Implement monomethod Module property 2015-04-27 17:24:33 +02:00
Marek Safar db4e52816c [corlib] Add string CompareOrdinal arguments checks 2015-04-27 16:29:27 +02:00
Alex Rønne Petersen 3f992da422 [utils] Fix a bad format specifier. 2015-04-27 16:18:51 +02:00
Alex Rønne Petersen c4d2938593 [mini] Fix some warnings related to co-op suspend code. 2015-04-27 16:18:26 +02:00
Alex Rønne Petersen 1a89e6364b [runtime] Remove some unused functions. 2015-04-27 16:18:11 +02:00
Alex Rønne Petersen 88e0e21979 [threadpool] Fix some prototypes in the MS thread pool code. 2015-04-27 16:17:38 +02:00
Alex Rønne Petersen a9a0721773 [sgen] Add missing return in thread pool's thread_func (). 2015-04-27 16:17:06 +02:00
Marcos Henrich 6d5579d3b8 Merge pull request #1738 from rolfbjarne/dublin-1916-dst
[corlib] Cope with the reference sources' inability to support sub-minute DST offsets
2015-04-27 12:15:25 +01:00
Rolf Bjarne Kvinge 4c206074a7 [corlib] Cope with the reference sources' inability to support sub-minute DST offsets.
The reference sources do not support sub-minute DST offsets as the exception below
shows, while Europe/Dublin has a DST offset of 34:39 in 1916.

There is no equivalent TimeZoneInfo for Europe/Dublin in .NET, so the problem
doesn't show up there.

System.ArgumentException: The TimeSpan parameter cannot be specified more precisely than whole minutes.
	Parameter name: daylightDelta

  at System.TimeZoneInfo/AdjustmentRule.ValidateAdjustmentRule (System.DateTime,System.DateTime,System.TimeSpan,System.TimeZoneInfo/TransitionTime,System.TimeZoneInfo/TransitionTime) [0x0012c] in /work/mono/master/external/referencesource/mscorlib/system/timezoneinfo.cs:3907
  at System.TimeZoneInfo/AdjustmentRule.CreateAdjustmentRule (System.DateTime,System.DateTime,System.TimeSpan,System.TimeZoneInfo/TransitionTime,System.TimeZoneInfo/TransitionTime) [0x00000] in /work/mono/master/external/referencesource/mscorlib/system/timezoneinfo.cs:3836
  at System.TimeZoneInfo.ParseTZBuffer (string,byte[],int) [0x002ca] in /work/mono/master/mcs/class/corlib/System/TimeZoneInfo.cs:1230
  at System.TimeZoneInfo.BuildFromStream (string,System.IO.Stream) [0x00030] in /work/mono/master/mcs/class/corlib/System/TimeZoneInfo.cs:479
  at System.TimeZoneInfo.FindSystemTimeZoneByFileName (string,string) [0x00018] in /work/mono/master/mcs/class/corlib/System/TimeZoneInfo.cs:463
  at System.TimeZoneInfo.FindSystemTimeZoneById (string) [0x00075] in /work/mono/master/mcs/class/corlib/System/TimeZoneInfo.cs:450
  at MonoTests.System.TimeZoneInfoTest/FindSystemTimeZoneByIdTests.Dublin () [0x00015] in /work/mono/master/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs:812
2015-04-27 12:28:40 +02:00
Alex Rønne Petersen 138ae5a07f [runtime] Introduce versioning of the profiler API.
The profiler API needs to evolve with the runtime. By versioning the API we can
at least to some degree let developers know when their modules are out of date
and how to update them.
2015-04-27 07:59:07 +02:00
Zoltan Varga 1a599e241b [aot] Refactor some of the architecture specific functions a little. 2015-04-25 01:10:20 -04:00
Zoltan Varga 98d2528e22 Fix a warning. 2015-04-24 21:44:41 -04:00
Rodrigo Kumpera 4a20119029 [configure] Another attempt at fixing windows cross compilers. 2015-04-24 18:28:36 -04:00
Alex Rønne Petersen 715e6b9ec6 [mini] Remove now-unused InternalSetChar intrinsic. 2015-04-24 23:51:01 +02:00
Alex Rønne Petersen d55dc024fd [mini] Fix intrinsic signature checks to take into account the 'this' parameter. 2015-04-24 23:50:34 +02:00
Mark Probst a6c73d8a56 [sgen] Document a shutdown sequence bug. 2015-04-24 11:21:13 -07:00
Atsushi Eno b839d14fed Merge pull request #1736 from atsushieno/import-wcf
Import System.Runtime.Serialization from referencesource.
2015-04-24 23:53:38 +09:00
Rolf Bjarne Kvinge f0e27b34c6 Include the problematic time zone in the exception message when throwing a TimeZoneNotFoundException. 2015-04-24 12:53:25 +02:00
Atsushi Eno 537fb5cea1 [Sys.Data] fix SqlParameter SystemType lookup after referencesource merge.
This should fix bug #29078, patch by Neale Ferguson.
2015-04-24 15:49:44 +09:00
Atsushi Eno 0fa576b6d3 [S.R.Serialization] fix mobile static build. 2015-04-24 15:08:24 +09:00
Atsushi Eno b3c9247df6 Merge branch 'master' into import-wcf 2015-04-24 15:08:18 +09:00
Atsushi Eno 8556e610a9 bump referencesource for S.R.Serialization import. 2015-04-24 15:07:20 +09:00
Atsushi Eno ad06a4d80a [S.R.Serialization] fill message strings. 2015-04-24 14:37:00 +09:00
Atsushi Eno 09ed3155fa [WCF] disable not working announcement client test.
WS-Discovery never got working, skip cosmetic test to not block porting.
2015-04-24 14:37:00 +09:00
Atsushi Eno c9b71ae6c4 Add System.ServiceModel.Internals and SMDiagnostics to the build. 2015-04-24 14:36:59 +09:00
Atsushi Eno c0451031c6 [WCF] similar to Binary writer fixes, do not close Text writer.
Just like BinaryMessageFormatter needed to use another CreateBinaryWriter()
overload to NOT close the input stream, use CreateTextWriter() overload that
does not close the stream.
2015-04-24 14:36:59 +09:00
Atsushi Eno b58f0e8232 [WCF] fix JSON deserialization test that didn't match .NET behavior.
JSON array is deserialized as Array, not List<T>.
2015-04-24 14:36:59 +09:00
Atsushi Eno 4fab0ddf50 [WCF] fix syndication extension Add() resolution by appropriate accessibility.
I wonder why, but when switched to referencesource, it turned out that
ResourceCollectionInfo calls SyndicationElementExtensionCollection.Add()
which targets a private overload, but (of course) failed and resolved to
another overload that takes object, and thus resulting in invalid code path.

With this fix the call to Add() resolves to the expected one and does not
regress with referencesource import.
2015-04-24 14:36:59 +09:00
Atsushi Eno 365abf5ee5 [WCF] fixed a couple of DateTime related tests that also failed on .NET IN JST.
Those tests were added without considering TimeZone difference. They cause
several kind of errors (SerializationException etc.) in JST (+09:00) or any
timezone that is earlier than UTC.

We likely had some "working" implementation, but was incompatible with .NET.
2015-04-24 14:36:58 +09:00
Atsushi Eno daa2f0b4f5 [WCF] mark JsonReader tests that proves referencesource bugs as [Ignore]d.
.NET WCF JSON serializer has been known to be buggy...
2015-04-24 14:36:58 +09:00
Atsushi Eno d2cdee078d [WCF] XmlReader from GetReaderAtBodyContents() should not be missing xmlns-es.
The namespace declarations existed when the entire Message is read but not
in the partial body contents. They caused regressions when we use
serialization stack from referencesource.

It is possible that more namespaces may be requied, but we will be importing
System.ServiceModel later on and then the issue will go away.
So far we don't want regression as long as they show up in our NUnit tests.
2015-04-24 14:36:58 +09:00
Atsushi Eno b96232d37a [WCF] exclude extra schema by referencesource XsdDataContractExporter.
Unlike our own XsdDataContractExporter, referencesource one generates
an extra schema that targets xs:* (XmlSchema.Namespace).
That should not be generated as part of WSDL, so exclude it.
2015-04-24 14:36:58 +09:00
Atsushi Eno f204f35dfe [WCF] fix another use of XmlBinaryWriter that closes stream and accesses it later. 2015-04-24 14:36:57 +09:00
Atsushi Eno e94bc465ca [WCF] referencesource XmlBinaryWriter closes stream by default, so keep it open.
Otherwise MemoryStream.Position complains that it is already disposed.
2015-04-24 14:36:57 +09:00
Atsushi Eno 5bc665e8c4 [S.R.Serialization] for some use cases we don't expect reflection exception.
We do throw TargetInvocationException because we can only use reflection.
So unwrap those exceptions. It is kind of silly though...
2015-04-24 14:36:57 +09:00
Atsushi Eno 72550114a2 [S.R.Serialization] change all NotDotNet Json reader tests to [Ignore]. 2015-04-24 14:36:57 +09:00
Atsushi Eno 1ca18d222c [S.R.Serialization] fix Json reader member duplicate check index. 2015-04-24 14:36:56 +09:00
Atsushi Eno bad2fdb5e8 [S.R.Serialization] fix condition on simple dictionary output. 2015-04-24 14:36:56 +09:00
Atsushi Eno cda40030b2 [S.R.Serialization] add Json reader/writer interpreters.
They don't pass all the tests in System.ServiceModel.Web yet.
2015-04-24 14:36:55 +09:00
Atsushi Eno 05dc210442 [S.R.Serialization] remove debugging code. 2015-04-24 14:36:55 +09:00
Atsushi Eno bb44512b80 [S.R.Serialization] fix MTOM writer test to match .NET behavior.
WriteStartDocument() can be used with document and document does not accept
more than one element, which basically contradicts MTOM writer usage.

For EOL changes, MTOM writer should not alter content EOL chars.
2015-04-24 14:36:55 +09:00
Atsushi Eno f556bf8d32 [S.R.Serialization] fix XsdDataContractImporter test to match .NET behavior.
It is likely that the second contract conflicts with the existing one and
WCF renames it to avoid that.
2015-04-24 14:36:55 +09:00
Atsushi Eno 924a79ea63 [S.R.Serialization] fix wrong test that doesn't match .NET behavior.
There is no BOM output on Windows either.
2015-04-24 14:36:54 +09:00
Atsushi Eno fc05116b03 [S.R.Serialization] implement XmlDataContract's interpreter method. 2015-04-24 14:36:54 +09:00
Atsushi Eno 2481129c45 [S.R.Serialization] additional type check for collection serialization is also needed. 2015-04-24 14:36:54 +09:00
Atsushi Eno a7051c6365 [S.R.Serialization] additional type check for array serialization is needed. 2015-04-24 14:36:54 +09:00
Atsushi Eno 98c812ee24 [S.R.Serialization] do not update memberType when not expected.
The removed code caused unexpected omission of xsi:type by giving "false"
Type information that is from the actual value (when the expected type is
different, xsi:type should be written).
2015-04-24 14:36:54 +09:00
Atsushi Eno 99a7c698f0 [S.R.Serialization] fix nullable serialization to match referencesource codegen.
The original code is complicated enough that I misinterpreted the logic...

The reulting code should look like this:

	DateTime? expr_94 = timeSubmitted;
	DateTime dateTime;
	bool arg_B5_0;
	if (XmlObjectSerializerWriteContext.GetHasValue<DateTime> (expr_94)) {
		dateTime = XmlObjectSerializerWriteContext.GetNullableValue<DateTime> (expr_94);
		arg_B5_0 = false;
	}
	else {
		dateTime = XmlObjectSerializerWriteContext.GetDefaultValue<DateTime> ();
		arg_B5_0 = true;
	}

The fixed code should be like this now.
2015-04-24 14:36:53 +09:00
Atsushi Eno f6d778c148 [S.R.Serialization] fix deserialization of primitive arrays in reader interpreter.
Basically the primary cause of the problem was that invoked primitive array
reader methods via reflection had 'out' parameter, which needed special care.
2015-04-24 14:36:53 +09:00
Atsushi Eno 1a8b8015a7 [S.R.Serialization] fix member indexing on reading deserialized members. 2015-04-24 14:36:53 +09:00
Atsushi Eno 828b7fb7a0 [S.R.Serialization] fix array element deserialization.
Array elements were not deserialized correctly and causing null (default)
items put into the array.
2015-04-24 14:36:53 +09:00
Atsushi Eno c5d45b2857 [S.R.Serialization] fix writer interpreter on enumerating non-dictionary.
Collection serialization was mostly failing, when it was non-dictionary.

Now it should be closer to referencesource dynamic code behavior.
2015-04-24 14:36:52 +09:00
Atsushi Eno affe15ccff [S.R.Serialization] fix reader interpreter: "required" check was broken.
Now it should match referencesource behavior.
2015-04-24 14:36:52 +09:00
Atsushi Eno d1152054a2 [S.R.Serialization] Fix TryWritePrimitive() parameter assignment.
It was inconsistent with what referencesource codegen does.
2015-04-24 14:36:52 +09:00
Atsushi Eno 51c1b640e7 [S.R.Serialization] add missing ConvertValue on xml reader interpreter. 2015-04-24 14:36:52 +09:00
Atsushi Eno dd19347ef2 [S.R.Serialization] fix broken test (exposed by referencesource import work). 2015-04-24 14:36:51 +09:00
Atsushi Eno 4cd398d756 build System.ServiceModel.Internals everywhere. 2015-04-24 14:36:51 +09:00
Atsushi Eno 9f0d571781 [S.R.Serialization] implement XmlFormatReaderGenerator interpreter.
Though it's still buggy and shows several nunit test failures yet.
2015-04-24 14:36:51 +09:00
Atsushi Eno 02915b9d61 [S.R.Serialization] implemented interpreter-based XmlFormatWriterGenerator. 2015-04-24 14:36:51 +09:00
Atsushi Eno 569890717a [S.R.Serialization] switch to (non-emit) reflection-based implementation stubs.
The new code is to implement reflection (non-emit) based serialization
so that it works on iOS.

Actually I _totally_ switched to this new implementation because dynamic
method based implementation also doesn't work fine, even on desktop
(due to invocation failure on internal methods, it seems that our dynamic
method needs some bugfixes).

The new methods with NotImplementedException in new classes need to be
implemented.
2015-04-24 14:36:51 +09:00
Atsushi Eno 1b419b8975 Fix mobile build (breakage caused by referencesource switch). 2015-04-24 14:36:50 +09:00
Atsushi Eno 548e2be329 [S.R.Serialization] switch to USE_REFEMIT to reduce test failures.
We don't use neither of expression trees nor SRE anyways, but it's easier
to reduce noises in nunit test failures to review the rest.
2015-04-24 14:36:50 +09:00
Atsushi Eno e0ac7695f0 Add system.runtime.serialization config, makes several tests pass. 2015-04-24 14:36:50 +09:00
Atsushi Eno b3a7d0aa00 [S.R.Serialization] switch to referencesources.
It builds on net_4_5 and monodroid so far.

We still need to eliminate dynamic code generation to make it work on iOS.
2015-04-24 14:36:50 +09:00
Atsushi Eno 3059d85b84 [S.Xml] Add [InternalsVisibleTo(S.R.Serialization)]. 2015-04-24 14:36:49 +09:00
Alex Rønne Petersen b00dd292a5 Merge pull request #1735 from akoeplinger/mingw-fix
[io-layer] Fix Windows build on mingw
2015-04-24 04:13:10 +02:00
Alexander Köplinger a7d083456f [io-layer] Fix Windows build on mingw
When we moved to Vista as the minimum build target, the mingw build broke.
The reason is that mingw's mswsock.h has the following code:

    #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
    int WSAAPI WSAPoll(WSAPOLLFD, ULONG, INT);
    #endif

Unfortunately, due to a bug mingw 4.0 doesn't define WSAPOLLFD and the compiler
raises an error. See http://sourceforge.net/p/mingw/bugs/1980 for more details.

As a workaround, inline the typedef for WSAPOLLFD from the mentioned bug report.

Also removed an unecessary check for _WIN32_WINNT < 0x0502 from the file.
2015-04-23 19:07:41 -07:00
anikilatorbeta dfb71ad5af Upadate socket and add OSSupportsIPv4 in net 4.0
add OSSupportsIPv4 in net 4.0

https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.ossupportsipv4%28v=vs.110%29.aspx

and ObsoleteAttribute https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.supportsipv4%28v=vs.110%29.aspx
2015-04-23 21:50:11 -03:00
Zoltan Varga 450e1ebe7b [jit] Use mini_get_underlying_type () in mini_type_is_vtype () so it works with partial sharing. 2015-04-23 18:44:29 -04:00
Ludovic Henry 3e4b814879 [threadpool] Remove native call to Socket.(Receive|Send)_internal
This is now done in managed in SocketAsyncWorker.cs since 0c9dcf73c2
2015-04-23 21:45:28 +01:00
Ludovic Henry 0fdf8d387c [threadpool-ms] Fix race condition 2015-04-23 20:47:26 +01:00
Zoltan Varga b0e63a8b1a [runtime] Fix the arm build. 2015-04-23 13:25:32 -04:00
Rolf Bjarne Kvinge 33860f8afd [System.Data] Bring back PropertyAttributes, StrongTypingException and TypedDataSetGeneratorException to the mobile build. 2015-04-23 13:02:46 +02:00
Rolf Bjarne Kvinge 8d876c3d58 [mono-api-html] Use html5-compatible code for colorizing (i.e. css instead of font/s/u). 2015-04-23 12:24:11 +02:00
Rolf Bjarne Kvinge 1ddaf1f4d4 [mono-api-html] Ignore non-important attribute differences and other improvements.
* Properly colorize removed types (as red).
* Print 'NotSerialized' field attribute change (as not breaking).
* Ignore 'HasSecurity' and 'PInvokeImpl' method attribute differences.
* Render property indexers (and detect name change in property indexer parameters).
* Improve debug spew to print proper method/field attributes.
2015-04-23 12:23:21 +02:00
Zoltan Varga 4cf2a9681b Merge pull request #1731 from mono/fix-abort-arm-thumb
[arm] Fix aborting of threads in managed code
2015-04-23 03:05:09 -04:00
Vlad Brezae 212e286e9e [arm] Fix aborting of threads in managed code
When installing the async callback in the context we need to update the thumb bit accordingly.
2015-04-22 23:45:45 +00:00
Radek Doulik facbf81e05 [pdb2mdb] fix decimal values reading
apply patch from monodroid

    Author: Dean Ellis <[email protected]>
    Date:   Thu Apr 17 12:34:00 2014 +0100

        [MSBuild] Error MSB3375 when attempting to debug PCL in VS

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

        The code to read the decimal values from
        the pdb did not work in all circumstances.
        This change uses the recommended code for
        reading the bits for a decimal from MSDN

        see http://msdn.microsoft.com/en-us/library/system.decimal.getbits.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-3

        It also includes an ArgumentException
        handler just in case it fails.
2015-04-22 22:46:49 +02:00
Alex Rønne Petersen 01b874d09f Merge pull request #1728 from akoeplinger/revert-xp
Revert "[msvc] Change target MSVC release from v120 to v120_xp"
2015-04-22 18:54:10 +02:00
Rodrigo Kumpera fa9daf9c7a [threading] Remove dead code that was used only by old suspend. 2015-04-22 12:20:16 -04:00
Alexander Köplinger 1347f7421d Fix comment that still referred to Windows XP in configure.ac 2015-04-22 18:15:25 +02:00
Alexander Köplinger b271f01f24 Revert "[msvc] Change target MSVC release from v120 to v120_xp"
This reverts commit 577482e336.

We dropped XP support (see https://github.com/mono/mono/pull/1723),
so this is no longer necessary.
2015-04-22 18:14:40 +02:00
João Matos bf0d9bb19b Merge pull request #1725 from alexanderkyte/cache_crash
[System.Runtime.Caching] Added missing locking around cache's sortedset.
2015-04-22 15:29:32 +01:00
João Matos 5b64b929f0 Merge pull request #1726 from jaredpar/build-roslyn
Improve Visual Basic build support
2015-04-22 15:27:21 +01:00
Sebastien Pouliot 669572d6c9 [linker] Mark SecurityDeclarations [#28918]
Security declarations looks very similar to custom attributes - but
they are not (e.g. a different metadata table).

They need to be marked, just like other metadata, by the linker because
they can encode types that won't show up in the type (or assembly)
references.

Ignoring this can create an invalid binary (the kind that even Cecil
can't load back for further processing).
2015-04-21 21:42:11 -04:00
Sebastien Pouliot a497d8ad0c [linker] Resolve AssemblyName[Reference] when sweeping [#29211]
The exact name (e.g. version) might differ between the original
AssemblyNameReference and the one being used (e.g. PCL).

To make sure we remove unused references we need to resolve
the AssemblyNameReference into AssemblyDefinition and then
continue the sweep based on the _new_ AssemblyNameReference.
2015-04-21 21:29:56 -04:00
Sebastien Pouliot e5dada307a Bump referencesources to restore compatibility with UnmanagedType enum 2015-04-21 21:26:35 -04:00
Zoltan Varga 717ce03d2d [sdb] Remove more unused code. 2015-04-21 19:07:23 -04:00
Zoltan Varga 551d40cb19 [sdb] Remove more unused interrupt code. 2015-04-21 19:01:51 -04:00
Zoltan Varga 33014196c9 [sdb] Remove unused mono_debugger_agent_thread_interrupt () function. 2015-04-21 18:54:44 -04:00
Zoltan Varga 737bc2e353 [sdb] Remove an osx workaround which isn't needed with the new suspend code. 2015-04-21 18:50:07 -04:00
Zoltan Varga 9dfcb07f16 Fix some warnings. 2015-04-21 18:39:53 -04:00
Rodrigo Kumpera 81a9fcc9c7 Merge pull request #1723 from madewokherd/winvista
Bump Windows requirement to Vista.
2015-04-21 17:03:22 -05:00
Rodrigo Kumpera 9f92e1c7fd [runtime] It's spring cleaning in MonoInternalThread. Remove 8 (yes, eight) unused fields. 2015-04-21 17:50:50 -04:00
Rodrigo Kumpera 43971cdf05 [threading] Remove old suspend code now that all targets support it.
The new suspend code works on all major targets, so it's time to remove old suspend.

This change removes all relevant native code, managed code could see some cleanup.
2015-04-21 17:09:37 -04:00
jaredpar 43af8d475d Improve Visual Basic build support
This fixes a couple of small issues with the Visual Basic build support:

- The VBC task now respects the $(NoStdLib) MSBuild option.
- The field @(ReferencePath) should be used for References in the VBC
target as it is for the CSC target.
- The CreateVisualBasicManifestResourceNames task is compiled and used
in the same manner as CreateCSharpManifestResourceNames hence it should
be loaded via UsingTask in the same manner as well.
- Include the VisualBasic Portable targets files.
2015-04-21 09:47:59 -07:00
Rodrigo Kumpera a801b374ef Merge pull request #1699 from ludovic-henry/threadpool-managed
[threadpool-io] Move (Socket)AsyncResult invocation code to managed + Various improvements
2015-04-21 11:41:01 -05:00
Alexander Köplinger 02e3e46d90 Merge pull request #1721 from jaredpar/fix-attribute-gen
Emit assembly attributes after Import statements
2015-04-21 18:35:24 +02:00
jaredpar 210e351187 Emit assembly attributes after Import statements
The VB language requires that code files have statements in the
following order:

- Option
- Import
- Assembly level attributes
- Namespaces / other declarations

The VBCodeGenerator type when given both import and assembly level
attribute statements was generating the attributes first.  This lead to
compilation errors in the generated file.

This change fixes the generator to emit assembly level attributes in
the proper location in the file (and adds the corresponding unit tests
as well).
2015-04-21 08:15:18 -07:00
Chris Hamons 0723b3a8fb Fix Options.cs warning on mobile builds
- Explictly disable warning CS0618 for Options.cs in Mono.Options
2015-04-21 10:04:06 -05:00
Marcos Henrich 33af6316a2 [System] Replaced System.Process lock(this)
To avoid concurrency problems lock(this) should not be used in public
classes.
2015-04-21 15:54:08 +01:00
Marcos Henrich e94270c456 [System] Process.Exited is now thread safe.
Fixes Exited event triggering multiple times.
2015-04-21 14:09:20 +01:00
Miguel de Icaza c7e9aac84f Merge pull request #1720 from blucz/master
Fix NullReferenceException in timer thread
2015-04-20 22:00:09 -04:00
Alexander Kyte 311e032219 [System.Runtime.Caching] Added missing locking around cache's sortedset. 2015-04-20 19:07:14 -04:00
Rodrigo Kumpera cd10756a3c [threading] Fix coop+windows compilation. 2015-04-20 16:46:13 -04:00
Vincent Povirk 46c5bdd114 Bump Windows version requirement to Vista. 2015-04-20 15:14:22 -05:00
Vincent Povirk d039392b62 Add configure check for inet_pton on Windows. 2015-04-20 15:05:50 -05:00
Rodrigo Kumpera 30f1a70a0b [threading] Just skipping GC is not enough, we need to transition the threadpool to blocking. 2015-04-20 16:01:29 -04:00
Rodrigo Kumpera a95525a65a [threading] Add coop support to sdb. 2015-04-20 15:59:06 -04:00
Miguel de Icaza 53dc56ee39 [Socket] Add DualMode property and adjust to Mono semantics (continuation to #20048)
The new socket constructor that only takes a SocketType and a
ProtocolType defaults to InterNetworkV6 (this was done on a previous patch).

In addition, we explicitly set "DualMode" to true, so that on Windows,
this gets set explicitly (it does not matter on Unix).

We surface the DualMode property to allow servers that want to just
bind to the IPv6 address to do so by creating the socket and then
changing DualMode to false.

This is *not* the same setting that Windows has, but it is the
semantics that Mono applications depend on.  So a test has been added
to ensure that we do not regress.

This also switches to use SocketOptionName from the ReferenceSources.
2015-04-20 15:55:26 -04:00
Ludovic Henry 1cc9973e24 [threadpool-io] Fix epoll init 2015-04-20 16:15:08 +01:00
Ludovic Henry b823208f3f [threadpool-io] Move epoll/kqueue/poll specific code to dedicated files
This is to make the addition of backends easier
2015-04-20 16:15:08 +01:00
Ludovic Henry 0c9dcf73c2 [threadpool-io] Move Mono(Socket)RuntimeWorkItem ExecuteWorkItem code to (Socket)AsyncResult in managed 2015-04-20 16:15:07 +01:00
Marek Safar 63a3a3aed7 [corlib] cryptography from reference sources 2015-04-20 16:50:56 +02:00
Marcos Henrich e097a98f3b Merge pull request #1691 from esdrubal/exitevent
Improved Process.Exited
2015-04-20 15:04:32 +01:00
Marcos Henrich 0b4bc83e79 Merge pull request #1222 from LogosBible/uri-trycreate
Lower-case the host in Uri.TryCreate to match behavior of constructors
2015-04-20 14:06:22 +01:00
Marek Safar a9d48d370f [corlib] Fix mobile tests 2015-04-20 13:46:52 +02:00
Ludovic Henry 551b337e4e [threadpool-io] Make updates non backend specific 2015-04-20 12:23:40 +01:00
Ludovic Henry 71bdba5ad7 [threadpool-io] Do not wait on socket if there are no SocketAsyncResults to call 2015-04-20 12:23:39 +01:00
Zoltan Varga a5f5a4431a [llvm] Refactor the intrinsics registration code a bit. 2015-04-18 23:47:28 -04:00
Miguel de Icaza 3d9c9787ab [Socket] Fix the socket ctor base call, and document the reason; Fixes #20048 2015-04-18 22:01:49 -04:00
Zoltan Varga 25ff41d435 [runtime] Fix a regression in the socket code introduced by 6999fc2677. 2015-04-18 20:17:37 -04:00
Zoltan Varga ce3a0a57ef [runtime] Add a checked version of mono_class_from_name (). 2015-04-18 12:03:15 -04:00
Zoltan Varga a4b4954296 Fix a warning. 2015-04-18 11:43:02 -04:00
Zoltan Varga 621df16d31 Revert "[runtime] Add a _checked version for mono_class_from_name ()."
This reverts commit 652c882f3d84309fdb1b97978871c8aa76916fd2.

Revert this as it breaks tests.
2015-04-18 00:25:29 -04:00
Zoltan Varga 61e5feb6b7 [runtime] Remove unused mono_metadata_parse_signature_full () function. 2015-04-18 00:25:28 -04:00
Zoltan Varga d0ccda58c6 [runtime] Add a _checked version for mono_class_from_name (). 2015-04-18 00:25:28 -04:00
Rodrigo Kumpera 753aa0990d [jit] Fix the build. 2015-04-17 17:01:27 -04:00
Zoltan Varga 0b96691cc6 [jit] Allow the storage of trampolines in the jit info tables. Currently, this is only used by mono_print_method_from_ip (). 2015-04-17 16:49:11 -04:00
Zoltan Varga a1b9eb6a0a [runtime] Enable the managed test runner for the gshared tests as well. 2015-04-17 16:49:11 -04:00
Rodrigo Kumpera 072ab0db83 [threading] [jit] Fix non coop osx build. 2015-04-17 15:27:54 -04:00
Brian Luczkiewicz 8f23006468 Fix NullReferenceException in timer thread
Every once in a while, we run into a NullReferenceException attempting to dispose a null timer. It's very rare and we can't reproduce. However, reading this code, it seems possible that two timer callbacks could pile up, and if they did, the first one might dispose the timer, and then the second one would attempt to dispose null.
2015-04-17 15:22:40 -04:00
Rodrigo Kumpera 6b2e92f179 [coop] Add missing coop checks for WFSO and WFMO. 2015-04-17 15:20:54 -04:00
Rodrigo Kumpera ed046873c5 Revert "[threading] Move the safe pointing of WFSO and WFMO into the io-layer, since it's simpler to have it there."
This reverts commit 0327832893.
2015-04-17 15:20:54 -04:00
Rodrigo Kumpera 6999fc2677 [coop] get_addrinfo_family_hint could call into managed, which is not allowed while in blocking mode. 2015-04-17 15:20:54 -04:00
Rodrigo Kumpera 0e12ff3017 [jit] Rework the managed code suspend polling and add COOP_GC support.
This change enables managed polling to work with both NaCL and coop as they are exactly the same except for the variables used.

We cleanup how safepoints are injects to be done on a separate pass instead of having in spread around the JIT.

We now inject safepoints at EH handler entry as those did not previously have them.

The generated AOT code was greatly optimized by having the polling variable checked before doing the icall. This more
than doubles the performance of the generated code.
2015-04-17 15:20:53 -04:00
Rodrigo Kumpera 79b617f775 [jit] Fix the loop recognition pass to handle single BB loops and enable logging by default. 2015-04-17 15:20:53 -04:00
Rodrigo Kumpera 207b1fa616 [threading] Add a global variable that is set while a global suspend is hapening.
This global var is meant to be used by JIT'd code to efficiently implement polling.
2015-04-17 15:20:53 -04:00
Zoltan Varga 8de00a141d [runtime] Fix the creation of multi-dimensional arrays using ConstructorInfo.Invoke (). Fixes #29183. 2015-04-17 15:05:51 -04:00
Ludovic Henry af7ab54757 [threadpool-ms] Change boolean return type from gboolean to MonoBoolean for icalls 2015-04-17 17:54:17 +01:00
Ludovic Henry 558ca688b7 [threadpool-ms] Fix sgen runtime test crash 2015-04-17 17:42:43 +01:00
João Matos 5e64104c6f [runtime] Revert this change as it strips the volatileness of the load. 2015-04-17 17:35:56 +01:00
Marek Safar 00795ab248 [corlib] Security attributes from reference sources 2015-04-17 16:59:49 +02:00
Marek Safar 8dc7ac94b7 [corlib] Update public api 2015-04-17 16:06:05 +02:00
Marek Safar 0940c74b1e [corlib] Versioning from reference sources 2015-04-17 15:38:37 +02:00
Ludovic Henry b61cfec1f4 [runtime] Fix call to task_for_pid in proclib utils
task_for_pid requires special privileges on osx 10.5+ and ios, so it's better to avoid calling it.
2015-04-17 13:58:54 +01:00
Marek Safar 8da357b3e7 [corlib] SafeHandles from reference sources 2015-04-17 14:32:10 +02:00
João Matos 3b193af24d Merge pull request #1717 from jaredpar/vb-build-props
Expand Visual Basic build support
2015-04-17 12:28:23 +01:00
João Matos 3fa9d4d5c9 Merge pull request #1716 from esdrubal/jsdeserialize
[System.Web.Extension] Fixes JavaScriptSerializer.Deserialize.
2015-04-17 12:10:45 +01:00
Marek Safar 8bbbc63752 [system] Fixes mobile build 2015-04-17 12:09:08 +02:00
Marek Safar a87bf6db67 [corlib] Fixes build 2015-04-17 11:34:57 +02:00
Marek Safar 1d36c68a1e Bump reference sources for build fix 2015-04-17 11:01:59 +02:00
Marek Safar 92da5bc43f [corlib] Mobile build fixes 2015-04-17 10:37:16 +02:00
Marek Safar 6947138c8a [facades] Add missing attributes 2015-04-17 10:37:16 +02:00
Marek Safar ca1c420674 [corlib] More exceptions from reference sources 2015-04-17 10:37:16 +02:00
jaredpar e20ddef0b6 Expand Visual Basic build support
This change adds support for the following MSBuild properties which are specific to VB compilation:

- OptionInfer: controls the /optioninfer switch
- VBRuntime: controls the /vbruntime switch
2015-04-16 13:27:03 -07:00
Neale Ferguson da5795054b Add support for mono_arch_create_monitor_[enter|exit]_trampoline 2015-04-16 16:14:19 -04:00
Zoltan Varga c73363cee4 [runtime] Fix support for delegates with a byref first argument bound to a valuetype method. Fixes #25717. 2015-04-16 15:10:19 -04:00
Marcos Henrich 0ac4c24116 [System.Web.Extension] Fixes js deserialization.
Fixes JavaScriptSerializer.Deserialize of values with trailing spaces.
Fixes #4148.
2015-04-16 19:12:29 +01:00
Marcos Henrich d8e2ec1832 [System.Web.Extension] Added tests.
Tests JavaScriptSerializer.Deserialize with trailing white spaces.
Covers #4148
2015-04-16 19:11:33 +01:00
João Matos 99014074e0 [runtime] While we're here update the code to match the style guide. 2015-04-16 17:56:32 +01:00
João Matos ae44f77a75 [runtime] Fixed extra address-of in lock free code. 2015-04-16 17:49:46 +01:00
Marek Safar f4997d3800 [corlib] Update reference sources com sources 2015-04-16 17:47:31 +02:00
Rodrigo Kumpera a2b07bc25e Merge pull request #1715 from tritao/cpp_fixes
C++ compliance fixes
2015-04-16 10:28:28 -05:00
João Matos 030a43a812 [runtime] C++ compliance fixes. 2015-04-16 16:11:00 +01:00
Marek Safar c6e9591d0c [corlib] Remove useless TypeLib assembly attribute (it's not always available) 2015-04-16 16:31:56 +02:00
Marek Safar fc00dc2324 [mcs] Better error reporting for incorrect implicitly typed local variable declaration. Fixes #28069 2015-04-16 16:31:26 +02:00
Miguel de Icaza 9dd7a04810 [man/certmgr] Update documentation 2015-04-16 09:50:11 -04:00
Marek Safar b98d9dc1c8 [corlib] Claims from reference sources 2015-04-16 11:28:41 +02:00
Mark Probst d55cfe091b [sgen] Fix a concurrent mark bug.
This made `sgen-descriptors.exe` crash with an assertion.
2015-04-15 15:56:28 -07:00
Marek Safar 9faaa72407 [system.xml] Update failing test 2015-04-16 00:08:01 +02:00
Marek Safar 37080045d7 [corlib] Remove duplicate file entry 2015-04-15 22:23:02 +02:00
Marek Safar 6d326f1c90 [mcs] Update failing test 2015-04-15 22:23:02 +02:00
João Matos f34e856519 Merge pull request #1714 from madewokherd/condwait
Release the mutex in mono_cond_[timed]wait on Windows.
2015-04-15 21:15:53 +01:00
Vincent Povirk 81b82a5034 Release the mutex in mono_cond_[timed]wait on Windows.
This commit is licensed as MIT/X11.
2015-04-15 14:57:11 -05:00
Marek Safar 2e559f4ec9 [corlib] Runtime attributes from reference sources 2015-04-15 18:05:07 +02:00
Marek Safar c2344f5135 [corlib] Return custom attributes in order they were compiled. Fixes #28692 2015-04-15 12:47:49 +02:00
Marek Safar 26bb4585a0 [corlib] Update failing test 2015-04-15 11:00:37 +02:00
Marek Safar c750efbb03 Merge pull request #1693 from Garciat/fix-assembly-get-satellite
[corlib] Check for missing/empty Assembly.Location. Fixes #28876
2015-04-15 10:50:56 +02:00
Marek Safar 3a7585be9d [corlib] Add test for in memory assemblies (#28876) 2015-04-15 10:48:40 +02:00
Miguel de Icaza ca4650bf92 Merge pull request #1713 from joelmartinez/docs-monodoc-getassembly
[monodoc] Updated how generators load resource streams.
2015-04-15 00:20:11 -04:00
Atsushi Eno 7a828d5d4f remove unused CodeDom sources. 2015-04-15 12:42:41 +09:00
Atsushi Eno c8c1a778e8 Merge pull request #1709 from atsushieno/import-codedom-core
Import CodeDom types and Compiler.CodeGenerator class from referencesource
2015-04-15 12:21:12 +09:00
Mark Probst 32184f29e6 [sgen] Free mod-union tables for LOS objects. 2015-04-14 16:23:21 -07:00
Mark Probst fdb1eecfb0 [sgen] Use mod-union to add remsets from concurrent collector.
Concurrent mark modified the card table directly, which had two
drawbacks.

First, it meant that nursery collections would also have to scan the
cards marked by the concurrent collector, which was unnecessary work.

Second, because the nursery collector also modified the cardtable, it
meant that the two could not run concurrently, i.e., we had to suspend
concurrent marking work whenever a nursery collection occurred.
2015-04-14 16:23:20 -07:00
Mark Probst 307545d624 [sgen] Separate concurrent M&S object operations into start, concurrent, finish. 2015-04-14 16:23:20 -07:00
Mark Probst 439b643a43 [sgen] Use enum instead of two bools in major_copy_or_mark_from_roots(). 2015-04-14 16:23:20 -07:00
Mark Probst 8c50748e3a [sgen] Get rid of redundant argument to major_copy_or_mark_from_roots(). 2015-04-14 16:23:20 -07:00
Mark Probst 7f9c8960fe [sgen] Get rid of global current_object_ops. 2015-04-14 16:23:20 -07:00
Mark Probst 8fc2f229f2 [sgen] Make scan context have a pointer to object operations.
Instead of copying everything from the object operations into the
context.
2015-04-14 16:23:19 -07:00
Mark Probst d0b5f545d5 [sgen] Replace sgen_get_current_object_ops() by passing a ScanCopyContext.
Getting rid of global state.  The idea is for the context to contain
everything that the mark/scan loop needs to do its work.
2015-04-14 16:23:19 -07:00
Zoltan Varga 2e59e73e24 [jit] Fix an unpatched jump in the monitor exit trampoline on amd64. 2015-04-14 18:58:03 -04:00
Zoltan Varga 3a4f91ffb5 [jit] No need to check for info!=NULL in the trampoline creation functions, the caller always passes in a non-null value. 2015-04-14 18:58:03 -04:00
Mark Probst 4a6cbcfedf [sgen] Fix a race condition in the new worker/threadpool code. 2015-04-14 15:42:09 -07:00
Rodrigo Kumpera 0327832893 [threading] Move the safe pointing of WFSO and WFMO into the io-layer, since it's simpler to have it there. 2015-04-14 18:34:02 -04:00
Rodrigo Kumpera 4025d23682 [threading] Handle more non-trivial locks. 2015-04-14 18:34:02 -04:00
Rodrigo Kumpera 528c373152 [threading] Wrap the threads lock with cooperative coode. 2015-04-14 18:34:01 -04:00
Ludovic Henry 42b52f1506 [threadpool] Make GC skip worker and monitor threads when being parked or sleeping 2015-04-14 23:01:50 +01:00
Joel Martinez 68126fc088 [monodoc] Updated how generators load resource streams.
The issue was discovered when using monodoc in an asp.net application; while the code was developed and worked successfully in the local Visual Studio web server, it failed when deployed and executed in IIS. The reason it seems is because of the use of `.GetCallingAssembly()`, which was returning an unexpected assembly reference. This resulted in the `.GetManifestResourceStream` returning null for resources that are definitely a part of monodoc.dll.

Once the code was changed to get the assembly using a type reference of a type that's definitely in monodoc.dll ... the code resumed working as expected.
2015-04-14 17:56:53 -04:00
João Matos 12615adbdf Merge pull request #1711 from jldgit/jldgit-gdb-script
Corrected mono-gdb.py use of "\u%X".format (val)
2015-04-14 22:05:02 +01:00
Rodrigo Kumpera 3cb0fdabf9 Merge pull request #1710 from alexanderkyte/always_use_imt
[runtime] Further removed code that doubted IMT
2015-04-14 14:36:11 -05:00
Alexander Kyte f4e44e771f [runtime] Further removed code that doubted IMT 2015-04-14 15:20:22 -04:00
Zoltan Varga 94bb27144c [jit] Print out IL clause offsets in verbose mode. 2015-04-14 15:00:47 -04:00
James 63e7f0cee2 Corrected mono-gdb.py use of "\u%X".format (val)
This line of code would cause an error to pop up in gdb when starting.
2015-04-14 14:40:23 -04:00
Atsushi Eno cb58cc98bb [CodeDom] disable wrong test (see [Ignore] comment). 2015-04-15 03:29:06 +09:00
Zoltan Varga e2c8f3727e [jit] Fix the support for filter clauses by avoiding passing in the exception using a register, since call_handler () can't handle it. 2015-04-14 14:27:10 -04:00
Zoltan Varga 0d9df95717 [runtime] Fix freeing invalid memory in CreateProcess () if the executable was not found. Fixes #28209. 2015-04-14 14:26:01 -04:00
Zoltan Varga f22a4cb4c3 [jit] Fix the detection of the Selector.GetHandle intrinsics, and fix the emission of assembly for it so it also works on arm64. 2015-04-14 13:19:52 -04:00
Atsushi Eno 08debfcef3 Import CodeDom types and Compiler.CodeGenerator class from referencesource.
This does not import System.CodeDom.Compiler because some of them depends
on Windows specific stuff.

CodeGenerator is imported because ours depends on our own internal
Visitor implementation and could not build without making changes a lot.
2015-04-15 01:35:04 +09:00
Marek Safar 322af7e074 [mcs] Consider nested types when looking for potential types via using static. Fixes #29044 2015-04-14 17:59:33 +02:00
Zoltan Varga 8fad4b7607 [aot] Avoid saving MonoJitExceptionInfo->exvar_offset for catch clauses on platforms where its not used. 2015-04-14 10:58:52 -04:00
Zoltan Varga c9ef839928 [jit] Remove some dead code from get_shared_class (). 2015-04-14 10:53:40 -04:00
Zoltan Varga bf8c60a47b [jit] Get rid of the MONO_ARCH_HAVE_OP_GET_EX_OBJ define, use MONO_CONTEXT_SET_LLVM_EXC_REG instead. 2015-04-14 10:39:20 -04:00
Zoltan Varga e76860503e [jit] Enable passing the exception object in a register on arm. 2015-04-14 10:22:10 -04:00
Zoltan Varga 5bf9e8eb5b Fix a warning. 2015-04-13 22:51:50 -04:00
Zoltan Varga 7867b0bc0e [jit] Enable passing the exception object in a register on x86. 2015-04-13 22:46:39 -04:00
Zoltan Varga 174ef19852 [jit] Implement support for passing in the exception object to catch clauses in a register instead of storing it into its stack slot. This is identical to the way the c++ ehabi works. Enable it for amd64. 2015-04-13 21:02:47 -04:00
Mark Probst 639dea2b1c [runtime] Spurious wake-ups are not a FIXME. 2015-04-13 16:18:53 -07:00
Rodrigo Kumpera 18e87daaff [threading] Let the GC skip monitor thread while it sleeps. 2015-04-13 19:05:52 -04:00
Rodrigo Kumpera 7a8a42b0ea [threading] The common trampoline must reset the blocking state on entry. 2015-04-13 19:05:52 -04:00
Rodrigo Kumpera 79d6d67f2b [threading] Make all locks use the new try blocking mode. 2015-04-13 19:05:51 -04:00
Rodrigo Kumpera f4da7083e8 [threading] Introduce the notion of try block to be used by recursive locks.
This allows a piece of code to handle the cases where it's called in running and blocker context
and must always be in blocking context.

This probably makes code more modular at the expense of an easy to follow and debug execution model.

Since we don't currently annotate all icalls with blocking sections we do it with locks but they can
nest and recurse which requires this support for try block.
2015-04-13 19:05:51 -04:00
Mark Probst 37e5a38d4c [sgen] Fix a bug when waiting on a condition. 2015-04-13 15:55:58 -07:00
Zoltan Varga 28d16b2c52 [jit] Enable support for partial sharing for generic instances. 2015-04-13 18:04:08 -04:00
Zoltan Varga 1cab7b0535 [jit] Change MonoGenericParam.gshared_constraint to be a full MonoType so it can encode generic instances too. 2015-04-13 15:50:43 -04:00
Zoltan Varga ffd7c42bc9 Fix the build. 2015-04-13 15:44:21 -04:00
Zoltan Varga bc3fda9237 [runtime] Add a utility target to patch libtool to get rid of the the 'file ... has no symbols' warnings. 2015-04-13 15:14:40 -04:00
Zoltan Varga 2ffce7f1bf Merge pull request #1708 from alexanderkyte/always_use_imt
[runtime] Remove checks for mono_use_imt because always true.
2015-04-13 14:48:35 -04:00
Alexander Kyte 4d31a8b43f [runtime] As mono_use_imt is always true, remove dead code paths where it is not. 2015-04-13 14:41:00 -04:00
Marek Safar b2f3a260c7 [corlib] First specific culture returned by enumerator was not fully initialized. Fixes #29039 2015-04-13 19:16:29 +02:00
Marek Safar ff9226422d [corlib] Throw correctly captured ExceptionDispatchInfo exceptions. Fixes #24647 (and many async stacktraces too) 2015-04-13 17:46:06 +02:00
João Matos bd471cb710 Merge pull request #1704 from Therzok/master
Add gitter badge.
2015-04-13 15:19:06 +01:00
Marek Safar b526af0b08 [mcs] Decorate imported constants with static modifier to work with using static. Fixes #28976 2015-04-13 14:19:59 +02:00
Marek Safar eba8a5dd3d [corlib] Fixes mobile tests 2015-04-13 14:19:59 +02:00
Ludovic Henry a12d3732e4 [Socket] Fix SocketTest.TtlChangeOverflow test failing on non Mac platform
This revert behavior to prior to c45161d065
2015-04-13 12:16:20 +01:00
Marek Safar 670fcaf62a Merge pull request #1685 from esdrubal/touint64
ParseNumber.StringToInt now check for overflows.
2015-04-13 12:43:07 +02:00
Zoltan Varga e37594b0ee Revert "[jit] Avoid generating remoting invoke wrappers for icalls."
This reverts commit 4f124705ac.

Revert this as it causes corlib test failures.
2015-04-12 22:43:02 -04:00
Zoltan Varga b6037c6fe3 [jit] Implement support for constrained calls in partially shared methods. 2015-04-12 22:27:33 -04:00
Zoltan Varga 162baf38c7 Merge pull request #1703 from Garciat/ignore-systemdata-gen
[git] Ignore System.Data built sources
2015-04-12 11:20:35 -04:00
Zoltan Varga 4355a73caa [aot] Save/restore the names of the gshared generic params. 2015-04-11 22:23:48 -04:00
Zoltan Varga 4f124705ac [jit] Avoid generating remoting invoke wrappers for icalls. 2015-04-11 22:23:48 -04:00
Zoltan Varga 44b37eb2fd Fix a warning. 2015-04-11 22:23:48 -04:00
Zoltan Varga 6a4644ca9c Merge pull request #1705 from akoeplinger/fix-win-build
[configure] Fix Windows cygwin build broken by 3bc2eb8
2015-04-11 17:49:57 -04:00
Alexander Köplinger 4f14861aca [configure] Fix Windows cygwin build broken by 3bc2eb8cb7
The commit removed the AC_DEFINE for TARGET_WIN32 from configure.ac,
but many parts of the build rely on it so the build broke.

Fixed this by defining TARGET_WIN32 when we detect it is the target
and do the same for HOST_WIN32.
2015-04-11 22:52:30 +02:00
Ungureanu Marius 84fb741d43 Add gitter badge. 2015-04-11 19:25:53 +03:00
Gabriel Garcia 565ddd0150 [git] Ignore built sources 2015-04-11 09:42:52 -04:00
Zoltan Varga 62d46b469b [jit] Add support for computing the size of the branch binding area by backends and passing it to the code manager. Not used yet. 2015-04-10 21:52:39 -04:00
Zoltan Varga 97f3a148e8 [arm64] Increase the amount of memory used to bind branches since the arm64 thunk code is larger (16 bytes). Fixes #28747. 2015-04-10 21:47:33 -04:00
Sebastien Pouliot 5186dea237 [linker] Fix scope resolution of custom attributes (generic/array) argument types that refers to PCL facades [#28823] 2015-04-10 17:33:41 -04:00
Mark Probst d70376bcb6 [sgen] Fix a concurrent sweep bug. 2015-04-10 12:48:02 -07:00
Zoltan Varga 2a96a02351 [aot] Avoid duplicate plt symbols for plt entries for synchronized methods. Fixes #28961. 2015-04-10 11:13:04 -04:00
Marek Safar 7f56d39668 [corlib] ComTypes from reference sources 2015-04-10 17:04:26 +02:00
Marek Safar d0efb29476 [corlib] Remove unused files 2015-04-10 16:50:06 +02:00
Marek Safar 1d0be40a5b [corlib] ConstrainedExecution from reference sources 2015-04-10 16:47:30 +02:00
Marek Safar bc0b1ebcc0 [corlib] Globalization enums from reference sources 2015-04-10 16:38:23 +02:00
Marcos Henrich b378965d2a [System] Added missing files to mobile_System.dll.sources. 2015-04-10 10:16:14 -04:00
João Matos c2407d1379 Merge pull request #1701 from bojanrajkovic/fix-order-of-parameters-to-argumentexception-constructor
Fix order of parameters when creating ArgumentException
2015-04-10 15:13:32 +01:00
Bojan Rajkovic 301b66dd99 Fix order of parameters when creating ArgumentException
ArgumentOutOfRangeException expects the parameter name first, then the message. ArgumentException is precisely the opposite, and expects the message first, and then the parameter name. They were swapped here.
2015-04-10 10:10:55 -04:00
Marek Safar 4fc75b3e72 [corlib] TextInfo from reference sources 2015-04-10 15:07:58 +02:00
Marcos Henrich 11dd761965 [corlib] Adopted .NET TimeZone behavior for UTC DateTime.
In .NET regardless the current time zone, TimeZone.CurrentTimeZone.GetUtcOffset returns TimeSpan.Zero when called with an UTC DateTime.
Similarly IsDaylightSaveTime returns false when called with an UTC DateTime.
2015-04-10 08:45:54 -04:00
Marcos Henrich 3f190d6053 [corlib] Changed TimeZoneTest to be invariant to culture. 2015-04-10 08:34:22 -04:00
Marcos Henrich d6ac996b97 [corlib] Test TimeZone methods with UTC DateTime in DST. 2015-04-10 08:32:27 -04:00
Marcos Henrich f79db678d8 [System] Removed SafeSocketHandle unused code. 2015-04-10 10:57:23 +01:00
Marek Safar 167ea85899 [corlib] Fixes endianess issue in resourcereader 2015-04-10 10:32:35 +02:00
Marek Safar c1bc7890f5 [corlib] comparer fixes 2015-04-10 07:57:02 +02:00
Mark Probst 6e28186845 [sgen] Fix describe_ptr() and make it print namespace, too.
It didn't handle interior pointers correctly.
2015-04-09 17:22:39 -07:00
Mark Probst f6c4a9e42b Merge branch 'feature-concurrent-sweep' 2015-04-09 16:13:32 -07:00
Rodrigo Kumpera a95ec1f5bc Merge pull request #1698 from ludovic-henry/socket-reorg-2
Reorganize Socket code
2015-04-09 17:04:38 -05:00
Ludovic Henry 7cec1dbe8b [threadpool-io] Fix android build 2015-04-09 22:31:34 +01:00
Marek Safar 4eee47c42a [corlib] Equality comparer fixes 2015-04-09 22:55:10 +02:00
Alex Rønne Petersen bf98c077ea Remove Moonlight references from man mcs. 2015-04-09 21:18:22 +02:00
Alex Rønne Petersen 77e66ab8e8 Remove Olive support from the build system.
These libraries are no longer developed.
2015-04-09 21:18:22 +02:00
Zoltan Varga 2cab68d28c [jit] Use the same dwarf<->hw register mapping on x86 for both LLVM and jitted code, the one used by LLVM is the official version. 2015-04-09 15:10:55 -04:00
Zoltan Varga 5601dec49e [sdb] Make a log message less verbose. 2015-04-09 14:54:41 -04:00
Zoltan Varga a759581fef [sdb] Transition from step over to step into when control leaves managed code. Fixes #28557. 2015-04-09 14:37:54 -04:00
Marek Safar 8203b9bca7 [corlib] Fixes mobile build 2015-04-09 20:05:07 +02:00
Jo Shields 00fc3a6307 [RPM] Fix MONO_PATH in RPM dependency generators
Otherwise, RPMs don't have any dependency information

(cherry picked from commit 0dfb848cde)
2015-04-09 15:57:07 +01:00
Ludovic Henry 52d761a1f6 [Socket] Use type specific read and write queue for SocketAsyncWorker 2015-04-09 15:46:18 +01:00
Ludovic Henry 333a93ab7b [Socket] Cleanup of SocketAsyncWorker, SocketAsyncResult and SocketAsyncEventArgs 2015-04-09 15:41:27 +01:00
Marek Safar 0c268383cd [corlib] Buffer from reference sources 2015-04-09 16:01:46 +02:00
Marek Safar d88c018b74 [corlib] new test 2015-04-09 16:01:46 +02:00
Ludovic Henry 1c41e59174 [Socket] Refactor SocketAsyncResult enqueuing 2015-04-09 14:37:34 +01:00
Ludovic Henry 6ab21e3084 [runtime] Remove system from mono_defaults.system as it is a unloadable assembly 2015-04-09 14:37:33 +01:00
Ludovic Henry 0341f06e99 [Socket] Move remaining icalls and struct from Socket_2_1.cs to Socket.cs 2015-04-09 14:37:33 +01:00
Ludovic Henry dfc6fbb157 [Socket] Inline InvalidAsyncOp into ValidateEndIAsyncResult 2015-04-09 14:37:32 +01:00
Ludovic Henry 1c0c785ad9 [Socket] Move Dispose related methods to their region 2015-04-09 14:37:31 +01:00
Ludovic Henry 80445ada38 [Socket] Move Shutdown related methods to their region 2015-04-09 14:37:30 +01:00
Ludovic Henry a9031bfbcb [Socket] Move Close related methods to their region 2015-04-09 14:37:29 +01:00
Ludovic Henry badcf36458 [Socket] Move IOControl related methods to their region 2015-04-09 14:37:28 +01:00
Ludovic Henry 96a51d05d9 [Socket] Move Poll related methods to their region 2015-04-09 14:37:27 +01:00
Ludovic Henry c45161d065 [Socket] Move SetSocketOption related methods to their region 2015-04-09 14:37:26 +01:00
Ludovic Henry 66204d1ce3 [Socket] Move GetSocketOption related methods to their region 2015-04-09 14:37:26 +01:00
Ludovic Henry d9b72bb750 [Socket] Move SendPackets related methods to their region 2015-04-09 14:37:25 +01:00
Ludovic Henry 2250570156 [Socket] Move Listen related methods to their region 2015-04-09 14:37:24 +01:00
Ludovic Henry 1dd589cf59 [Socket] Move DuplicateAndClose related methods to their region 2015-04-09 14:37:23 +01:00
Ludovic Henry 9346cd1aa7 [Socket] Remove unused CheckRange method 2015-04-09 14:37:22 +01:00
Ludovic Henry 54f36e42da [Socket] Move Bind related methods to their region 2015-04-09 14:37:22 +01:00
Ludovic Henry d9249983bc [Socket] Move SendFile related methods to their region 2015-04-09 14:37:21 +01:00
Ludovic Henry abe9bc89b6 [Socket] Move SendTo related methods to their region 2015-04-09 14:37:20 +01:00
Ludovic Henry 4907ad68f0 [Socket] Move Send related methods to their region 2015-04-09 14:37:19 +01:00
Ludovic Henry 7299a2bd89 [Socket] Move ReceiveMessageFrom related methods to their region 2015-04-09 14:37:18 +01:00
Ludovic Henry 5ed347d0e5 [Socket] Move ReceiveFrom related methods to their region 2015-04-09 14:37:17 +01:00
Ludovic Henry 4a358f9a79 [Socket] Move Receive related methods to their region 2015-04-09 14:37:17 +01:00
Ludovic Henry eb4e038553 [Socket] Move Disconnect related methods to their region 2015-04-09 14:37:16 +01:00
Ludovic Henry d82106d2b7 [Socket] Move Connect related methods to their region 2015-04-09 14:37:15 +01:00
Ludovic Henry 3555555dba [Socket] Move Accept related methods to their own region 2015-04-09 14:37:14 +01:00
Ludovic Henry 9103278ddc [Socket] Move properties to their own region 2015-04-09 14:37:13 +01:00
João Matos 458b3269aa [mini] Fixed ifdef warning.
/Users/joao/Dev/droid5.1/mono/mono/mini/unwind.c:71:18: warning: extra tokens at end of #ifdef directive [-Wextra-tokens]
2015-04-09 13:28:24 +01:00
Marek Safar 716adcebde [corlib] Generic comparers from reference sources 2015-04-09 14:26:43 +02:00
Marcos Henrich c9ec78db14 [corlib] Monodroid now uses CurrentSystemTimeZone. 2015-04-09 12:42:12 +01:00
Marcos Henrich e5e406438c [corlib] Removed TimeZone unused methods. 2015-04-09 12:40:04 +01:00
Marcos Henrich bd7e2efe46 [corlib] CurrentSystemTimeZone is now using TimeZoneInfo.Local.
ICall GetTimeZoneData is no longer used and was removed.
2015-04-09 12:37:01 +01:00
Marcos Henrich d73bc81c5f [corlib] Added to TimeZoneInfo method GetDaylightChanges.
TimeZoneInfo.GetDaylightChanges returns DaylightTime from AdjustmentRules but when those are not available it is also able to do it from transitions.
2015-04-09 12:32:37 +01:00
Alex Rønne Petersen 811674bc63 Merge pull request #1695 from gregoryyoung/master
add compilation instructions
2015-04-09 12:09:53 +02:00
Greg Young 5a228a65a0 add compilation instructions 2015-04-09 13:03:26 +03:00
Marek Safar 9965afbe2f [corlib] GetGenericArguments from reference sources 2015-04-09 11:38:20 +02:00
Zoltan Varga 82f567d2e8 [jit] Rename gen_seq_points_debug_data to gen_sdb_seq_points. 2015-04-08 21:18:10 -04:00
Zoltan Varga 0468321ad1 [jit] Correctly disable seq points in wrapper on android. 2015-04-08 21:06:01 -04:00
Neale Ferguson 21399ed40b Correct lengths of move_i4_to_f and move_f_to_i4 2015-04-08 19:00:13 -04:00
Mark Probst b7ca3af3da [aot] Exit with an error message if there's no managed allocator.
This can happen with various SGen debug options, like canaries.
See bug #28857
2015-04-08 14:24:28 -07:00
Alexander Köplinger ff393312ec Fix centos badge and remove ppc badge in readme
The ppc Jenkins workers are offline right now and aren't expected to come back in the near future.
2015-04-08 22:43:43 +02:00
Zoltan Varga b3c69e6659 Fix some warnings. 2015-04-08 15:41:28 -04:00
Ludovic Henry e2e2229460 [Socket] Move Select related methods to their own region 2015-04-08 20:32:22 +01:00
Rodrigo Kumpera 3bc2eb8cb7 [configure] Fix windows cross compilation to generate the proper defines. 2015-04-08 15:25:04 -04:00
Rodrigo Kumpera 2b54e95eb5 [jit] Fix the usage of host/target defines for amd64 and windows. 2015-04-08 15:25:03 -04:00
Rodrigo Kumpera 8771b398cb [runtime] Fix the file mmap api to correctly use the host/target defines. 2015-04-08 15:25:03 -04:00
Zoltan Varga d42770d7de [runtime] Include sys/time.h to get struct timeval definition. 2015-04-08 15:01:35 -04:00
Ludovic Henry 66886a5c63 [Socket] Move CheckProtocolSupport to static constructor 2015-04-08 19:29:51 +01:00
Ludovic Henry 3fed6ef12f [Socket] Move Socket constructors to Socket.cs 2015-04-08 19:26:20 +01:00
Ludovic Henry c049a8b361 [Socket] Move Socket fields out of Socket_2_1.cs to Socket.cs 2015-04-08 19:13:18 +01:00
Marek Safar 7f52573aa2 [corlib] TimeZoneInfo.AdjustmentRule from reference sources 2015-04-08 19:31:59 +02:00
João Matos 64a27123d7 [mini] Fixed stack unwinding / DWARF register numbers when doing x86 cross compilation on OSX.
Eventually we want to add a better fix for this, like for instance adding this behaviour to the LLVM-specific code path
but until we can research more under exactly what conditions we need to do this then implement this simple workaround.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=27055.
2015-04-08 18:28:39 +01:00
Ludovic Henry 0916f916f6 [Socket] Move SocketAsyncCall out of Socket_2_1.cs to SocketAsyncCallback.cs 2015-04-08 18:26:42 +01:00
Ludovic Henry 6c72a6e005 [Socket] Move Worker out of Socket_2_1.cs to SocketAsyncWorker.cs 2015-04-08 18:25:13 +01:00
Ludovic Henry 17df15ecb6 [Socket] Move SocketAsyncResult out of Socket_2_1.cs 2015-04-08 17:46:41 +01:00
Ludovic Henry ecc6abaf6d [Socket] Move SocketOperation out of Socket_2_1.cs 2015-04-08 17:38:44 +01:00
Alexander Köplinger 88b5e5a618 Fix "make dist"
EXTRA_DIST still included files that were removed in 467ca088b6 and 4cd4437b1f.
2015-04-08 17:38:13 +02:00
Marek Safar 97ad68721b [corlib] More System types from reference sources 2015-04-08 17:35:32 +02:00
Marek Safar 0f42d213e1 [corlib] System delegates from reference sources 2015-04-08 17:35:31 +02:00
Marek Safar 23b6557c2e [corlib] System interfaces from reference sources 2015-04-08 17:35:31 +02:00
Marek Safar a80f9db6f6 [corlib] Console keys from reference sources 2015-04-08 17:35:31 +02:00
Gabriel Garcia fcf25bea84 Check for missing Assembly.Location 2015-04-08 10:48:16 -04:00
Alex Rønne Petersen be6b58600a [metadata] Remove old monosn.c (we have a managed sn now). 2015-04-08 16:48:05 +02:00
Marcos Henrich 5a7a7a0620 [System] Process.WaitForExit now triggers event Exited. 2015-04-08 14:44:09 +01:00
Marcos Henrich 287ba33275 [System] Test that Process.WaitForExit triggers the event Exited. 2015-04-08 14:42:03 +01:00
Marcos Henrich 0f48483411 [System] Process no longer calls OnExit if HasExited is false.
Fixes #26362.
2015-04-08 14:40:09 +01:00
Marcos Henrich f9b1cff021 [System] Test Process.Exited. Covers #26362.
Process.Exited should not be called if Process.HasExited is false.
2015-04-08 14:35:01 +01:00
Marek Safar a6b630813a [corlib] System attributes from reference sources 2015-04-08 15:20:57 +02:00
Marek Safar 789421f760 [corlib] IO exceptions from reference sources 2015-04-08 15:05:09 +02:00
Miguel de Icaza e93aa85e62 [mono.1] Document MONO_THREADPOOL 2015-04-08 08:20:03 -04:00
Marek Safar ebb011b871 [corlib] TypeLoadException from reference sources 2015-04-08 13:25:16 +02:00
Marek Safar fa020e965f [corlib] Add System.Object type handling in TypeInfo. Fixes #28369 2015-04-08 09:35:10 +02:00
Zoltan Varga cba42c385e [aot] Enable partial sharing when using full aot. 2015-04-07 23:29:30 -04:00
Zoltan Varga f849ff4ba5 [aot] Fix overflows when printing stats. 2015-04-07 23:29:11 -04:00
Zoltan Varga 9b0c4038ef [llvm] Remove an arm restriction, its no longer needed. 2015-04-07 20:02:53 -04:00
Zoltan Varga f8e392b3ed [llvm] Fix the previous change. 2015-04-07 19:51:40 -04:00
Zoltan Varga 2b792b8d08 [llvm] Avoid generating invalid llvm il for volatile sbyte variables. 2015-04-07 19:47:02 -04:00
Zoltan Varga bbee8d4d5e Revert "[configure] Clean up target name matching for $host != $target case."
This reverts commit 53f55647a5.

Revert this as it breaks the mobile build.
2015-04-07 18:18:42 -04:00
Rodrigo Kumpera 118c3a0c3f [runtime] Update the offsets table for amd64. 2015-04-07 17:03:48 -05:00
Zoltan Varga 947c1bbd9c [jit] Disable deadce in the liveness2 pass as well when compiling for sdb. Fixes #28847. 2015-04-07 17:50:56 -04:00
Rodrigo Kumpera b02523cfd1 [utils] Use open instead of fopen on unix targets. 2015-04-07 16:14:26 -05:00
Rodrigo Kumpera 9206989872 portability fixes. 2015-04-07 16:14:26 -05:00
Marek Safar 5aca5b826a [System.ServiceModel.Internals] Cleanup makefile 2015-04-07 22:57:25 +02:00
Zoltan Varga 1364644d22 [runtime] Make some threadpool icalls non static to fix the mobile build. 2015-04-07 16:29:18 -04:00
Zoltan Varga c94837ac9e [corlib] Add back some helper methods to String which were removed during the transition to reference sources. 2015-04-07 16:29:18 -04:00
Alex Rønne Petersen 53f55647a5 [configure] Clean up target name matching for $host != $target case.
We fully control the $target values here as we don't use canonicalization for
them. So we have no reason or excuse to be using wildcards in them.

E.g. any Linux $target in this case would previously be assumed to be Android.
2015-04-07 22:25:42 +02:00
Rodrigo Kumpera 0ce9e2ceac [jit] Make mono_thread_state_init_from_sigctx work with a coop cross compiler. 2015-04-07 16:03:44 -04:00
Rodrigo Kumpera d759d81c61 [configure] Add new target. 2015-04-07 16:03:43 -04:00
Marcos Henrich 6d778d70bf [corlib] ParseNumber.StringToInt now check for overflows.
The overflow check is only performed when the result is big enough.
The overflow check is done by decomposing 64 bit operations into 32 bit operations.
Fixes #17817.
2015-04-07 19:38:37 +01:00
Marek Safar 1db6ed7fb1 [SMDiagnostics] Fixes mobile build 2015-04-07 20:20:39 +02:00
Marek Safar 9916d42805 [corlib] Fixes mobile build 2015-04-07 19:58:35 +02:00
Marek Safar 58389f3618 [system.data] Fixes mobile build 2015-04-07 19:58:35 +02:00
Alex Rønne Petersen 817ae3d1db [mini] Support MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING on PPC. 2015-04-07 19:20:19 +02:00
Alex Rønne Petersen dc517162d4 [mini] Support MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING on x86. 2015-04-07 19:20:14 +02:00
Alex Rønne Petersen 5729637478 [mini] Support MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING on MIPS. 2015-04-07 19:14:50 +02:00
João Matos bcb651443d Merge pull request #1684 from Garciat/fix-zlib-helper
[System] Fix DeflateStream throw on empty flush, double flush. Fixes #28777
2015-04-07 17:31:12 +01:00
Zoltan Varga 6c38ce4ea4 Merge pull request #1689 from alexrp/remove-cruft
Remove cruft
2015-04-07 12:27:06 -04:00
Marek Safar 00abead41b [mcs] Fix betterness of candidates with optional parameters against unexpanded params parameters. Fixes #28837 2015-04-07 18:26:34 +02:00
Zoltan Varga 06956aac05 Merge pull request #1690 from nealef/master
s390x fixes/enhancements
2015-04-07 12:23:03 -04:00
Martin Baulig 8b33287f89 Merge pull request #1661 from HellBrick/connection-group-deadlock
Fixed deadlock in WebConnectionGroup.Close()
2015-04-07 18:16:26 +02:00
Neale Ferguson f6294778fe decimal-ms.c:
- Fix handling of lo64 on big endian systems (fixes 28672)

mono-endian.h:
- Add optimization for s390x read64/read32/read16 operations

exceptions-s390x.c:
- Add profiling support for exception handler
2015-04-07 12:15:43 -04:00
Zoltan Varga 15a5ae7a01 [runtime] Fix the arm build. 2015-04-07 11:35:15 -04:00
Zoltan Varga 20bd088cbb [runtime] Fix the mobile build. 2015-04-07 10:57:50 -04:00
Marek Safar 4d4b9e652d [mcs] Clone stack-alloc type expression. Fixes #28774 2015-04-07 16:34:28 +02:00
Marek Safar 2b1e2322a0 [mcs] Report missing property accessor for auto-implemented properties only when base has it. Fixes #28772 2015-04-07 16:11:23 +02:00
Alex Rønne Petersen d33c6107b5 Remove old make-bundle stuff.
This has all since been replaced with mkbundle.
2015-04-07 15:05:23 +02:00
Alex Rønne Petersen c6133ee765 Remove outdated TODO files in the mono subdirectory. 2015-04-07 15:05:07 +02:00
Alex Rønne Petersen cea435f68d Remove mono/mini/README.
No real information in this one.
2015-04-07 14:56:38 +02:00
Alex Rønne Petersen 22e2de6529 Remove mono/mini/mini.prj.
This hasn't been updated for ages.
2015-04-07 14:55:25 +02:00
Marek Safar 0d79ff6979 [mcs] Bump ikvm to get fixed known custom attribute handling. Fixes #28014 2015-04-07 14:53:05 +02:00
Alex Rønne Petersen d34f71c4ca [profiler] Remove the old version of the log profiler. 2015-04-07 14:52:22 +02:00
Alex Rønne Petersen 1657026514 [profiler] Remove old mono-cov profiler.
We're replacing this with coverage support in the log profiler.
2015-04-07 14:51:27 +02:00
Alex Rønne Petersen 4cd4437b1f Remove mono/profiler/log-profiler.txt.
This is just the man page.
2015-04-07 14:49:28 +02:00
Alex Rønne Petersen 467ca088b6 Remove outdated documentation from the docs subdirectory. 2015-04-07 14:46:41 +02:00
Alex Rønne Petersen 7fd61974ba Remove old notes subdirectory. 2015-04-07 14:41:23 +02:00
Alex Rønne Petersen 44f87d758e Remove build-mingw32.sh.
This script has not been maintained for a very long time and (as far
as I know) is not used by anyone.
2015-04-07 14:41:22 +02:00
Alex Rønne Petersen b39e7e9d78 Remove AUTHORS file.
We've tried to keep up-to-date files/pages on active maintainers and it's
failed every time. This file is no exception.
2015-04-07 14:41:22 +02:00
Alex Rønne Petersen 4f510a6d02 Remove README.vsnet as it's largely irrelevant now. 2015-04-07 14:41:21 +02:00
Alex Rønne Petersen 455debc3d4 Remove spec file as we don't use it anymore.
See: https://github.com/directhex/mono-snapshot
2015-04-07 14:41:18 +02:00
Gabriel Garcia 2dcdfe76d0 [System] Fix DeflateStream throw on empty flush, double flush. Fixes #28777 2015-04-07 06:22:32 -04:00
Alex Rønne Petersen 54ab50194a [profiler] Update data format version.
ed663c84a6 introduced a new enum value.
2015-04-07 06:21:37 +02:00
Zoltan Varga c1d442bdc5 Merge pull request #1688 from alexanderkyte/handle_changing_processor_num
[runtime] Use _SC_NPROCESSORS_CONF not _SC_NPROCESSORS_ONLN
2015-04-06 22:38:48 -04:00
Zoltan Varga 2477b7e3c9 [runtime] Allocate more space to thunks in dynamic methods. Fixes #28747. 2015-04-06 21:45:07 -04:00
Alexander Köplinger a579b35829 Fix build broken by 4de22ecb21
config.h needs to be included before HAVE_COMPLEX_H is used, or it won't work.
2015-04-07 03:19:28 +02:00
Rodrigo Kumpera 4de22ecb21 [config] Move the complex.h check to autoconf instead of a PLATFORM_ANDROID check. 2015-04-06 18:38:47 -04:00
Rodrigo Kumpera 4732cbd1db Merge pull request #1686 from akoeplinger/integrate-net20_35-reference-assemblies
Integrate binary reference assemblies for v2.0/3.5 into the build system
2015-04-06 17:21:31 -04:00
Zoltan Varga 50b8ab45ef [runtime] Fix a double free when freeing some wrapper caches. 2015-04-06 17:13:19 -04:00
Rodrigo Kumpera d1dc58df4e [mini] Fix DISABLE_JIT support for simd. 2015-04-06 16:01:40 -05:00
Zoltan Varga 0f188ab4c4 [runtime] Remove unused wapi_interrupt_thread () fuction. 2015-04-06 16:05:29 -04:00
Alexander Kyte 76ecc392cd [runtime] Use _SC_NPROCESSORS_CONF not _SC_NPROCESSORS_ONLN
We had a failing arm test which exposed that our caching of the
number of processors was leading to some inconsistencies when
the number of processors increased. TODO: Use the actual number of
online processors when rebalancing threadpool.
2015-04-06 15:42:49 -04:00
Marcos Henrich 24748ce981 Merge pull request #1624 from esdrubal/getprocesstimes
[runtime] GetProcessTimes now works with all processes.
2015-04-06 19:46:31 +01:00
Zoltan Varga 8d5eb9ec60 [runtime] Remove unused io-layer/system.{c,h}. 2015-04-06 14:46:46 -04:00
Alexander Köplinger 25f5d50737 Integrate binary reference assemblies for v2.0/3.5 into the build system
Rename the net_4_0 profile which is already only used to trigger copying of reference assemblies
to binary_reference_assemblies and include the 2.0/3.5 files there. This should make it easier
to add more profiles in the future and doesn't clutter the build system as much as making separate
net_2_0 and net_3_5 profiles that do the same.
2015-04-06 20:37:34 +02:00
Marcos Henrich 9abdfead5c [corlib] Added test for Convert.ToInt64 and ToUInt64 overflows.
Added tests cover #17817.
2015-04-06 19:19:46 +01:00
Rodrigo Kumpera ffd38a0fa4 Merge pull request #1665 from alexanderkyte/sgen-alloc-assert
[runtime] Do not set flag to skip initialization of generic classes. Lea...
2015-04-06 14:14:20 -04:00
Alexander Kyte f985c6809b [runtime] Overwrite stacktrace for exception on re-throw. Fixes #1856.
This fixes a bug where we did not completely mimic .NET's exception handling.

We previously held onto the stacktrace when an exception was thrown if it already had one. This differs from how .NET behaves, which is to always set the stacktrace to the place that it was last thrown.

Ex:

using System;

class C
{
    static Exception e;

    static void Throw ()
    {
        try {
            int.Parse (null);
        } catch (Exception ex) {
            e = ex;
        }
    }

    public static void Main ()
    {
        Throw ();

        try {
            throw e;
        } catch (Exception ex) {
            Console.WriteLine (ex.StackTrace);
        }
    }
}

Would previously output:

  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
  at C.Throw () [0x00000] in <filename unknown>:0

when

   at C.Main()

is what .NET output. After this commit we output the same stacktrace as .NET.
2015-04-06 13:24:47 -04:00
Rodrigo Kumpera 24a328b83c Update the reference assemblies we ship in mono. 2015-04-06 12:49:27 -04:00
Atsushi Eno 9d9faec5df Fix SMDiagnostics build. 2015-04-07 01:30:56 +09:00
Atsushi Eno 6c5b486073 [wcf] use different public key for mobile builds. 2015-04-07 01:30:32 +09:00
Atsushi Eno 69cbb0fb3c Add another FrameworkPublicKeyFull which is based on silverlight.pub on mobile. 2015-04-07 01:30:11 +09:00
Atsushi Eno 3fcaf601c1 Add System.ServiceModel.Internals and SMDiagnostics to the build.
They build in both desktop and mobile profiles, but the sources are
mostly unchanged i.e. they contain Windows dependent code (DllImports).

The plan here is to import everything essential in WCF as buildable
sources, then remove Windows dependencies, then implement (or bring back)
mobile-ready code. But this commit can be used for different strategies
(like, we import sources from working parts, step by step).
2015-04-07 00:11:11 +09:00
João Matos 6acb0ebc46 Merge pull request #1682 from Garciat/patch-1
[System.IO.Compression] Check for buffer overrun in DeflateStream.Write
2015-04-06 15:54:08 +01:00
Alex Rønne Petersen dbed540b63 Merge pull request #1683 from akoeplinger/fix-make-distcheck
Fix a few "make distcheck" errors
2015-04-06 16:44:30 +02:00
Alexander Köplinger 9ddafb97d0 [bcl] Fix "make distcheck"
Added a missing file to DISTFILES
2015-04-06 04:19:23 +02:00
Alexander Köplinger 26745f5685 [runtime] Fix "make distcheck"
Use $(srcdir) instead of ./ for commands so the path is correct.
Also added missing files to EXTRA_DIST.
2015-04-06 04:19:22 +02:00
Mark Probst b46fca74a1 [runtime] Fix warnings. 2015-04-05 17:42:21 -07:00
Gabriel Garcia 3ea808102c Protect against overflow
https://github.com/mono/mono/pull/1682#commitcomment-10578913
2015-04-05 17:11:01 -04:00
Alexander Köplinger 8223a8a6f2 [Mono.Parallel] Fix "make distcheck"
ConcurrentOrderedList isn't referenced in corlib's .sources file or anywhere else anymore,
so it was missing during "make distcheck".

Mono.Parallel still needs it though (and it is the only place), so move the file there.
2015-04-05 19:35:45 +02:00
Gabriel Garcia 8c3f126e70 Test: Check for buffer overrun 2015-04-05 11:57:43 -04:00
Gabriel Garcia 7e9f2d4563 Check for buffer overrun 2015-04-05 11:41:36 -04:00
Ludovic Henry 199cc80efb [threadpool] Fix FullAOT build (2) 2015-04-05 11:29:08 +02:00
Ludovic Henry bbdf534369 bump reference source 2015-04-04 17:30:26 +02:00
Marcos Henrich ff126751d5 [corlib] TimeZoneInfo.TryAddTicks is now private. 2015-04-04 15:15:57 +01:00
Mark Probst 1a43231534 [sgen] Don't assert in GC.GetTotalMemory. 2015-04-03 14:15:02 -07:00
Mark Probst ae4c1ef4e9 [sgen] Format block iteration macros. 2015-04-03 12:27:29 -07:00
Mark Probst a4e8ad333e [sgen] Remove a debug printf. 2015-04-03 11:42:57 -07:00
Marek Safar 5486ebff0c [mcs] Accessibility of protected internal members in a derived class that is nested inside another class. Fixes #28022 2015-04-03 18:11:36 +02:00
Marek Safar 8069880d39 [mcs] Mutate nested storey initialization only when needed. Fixes #28211 2015-04-03 15:46:13 +02:00
João Matos a362cb7ec4 Merge pull request #1679 from knguyen0928/master
Support more oids: aes128, aes256, sha256, sha512
2015-04-03 11:20:51 +01:00
Marcos Henrich 4614473ae5 Merge pull request #1678 from esdrubal/tzindst
TimeZoneInfo bug fixing.
2015-04-03 05:19:01 -04:00
Marcos Henrich 55e06987d3 [corlib] Refactored TimeZoneInfo DateTime overflow checks.
Added more overflow checks.
Fixed some overflow checks.
2015-04-03 03:58:49 -04:00
Zoltan Varga 50401f5f7c [amd64] Add full-aot support for the sdb trampolines. 2015-04-03 01:08:17 -04:00
Zoltan Varga d86446f8c2 [amd64] Use soft breakpoints in aot mode. 2015-04-02 19:56:25 -04:00
Mark Probst 8278dd36e9 [sgen] Increase assert levels. 2015-04-02 16:41:32 -07:00
Mark Probst d62f8e204f [sgen] Mark a function inline. 2015-04-02 16:41:32 -07:00
Mark Probst 74065cb71f [sgen] Don't CAS when setting block state. 2015-04-02 16:41:32 -07:00
Mark Probst c1385d214e [sgen] Reinstate old M&S section reserve. 2015-04-02 16:41:31 -07:00
Mark Probst 9bcdbf2558 [sgen] Remove some dead code and data. 2015-04-02 16:41:31 -07:00
Mark Probst 01930f5b48 [sgen] Have the worker state just be an integer. 2015-04-02 16:41:31 -07:00
Mark Probst 83dfb12187 [sgen] Workers use thread pool.
So we only have one worker thread that's used both for marking and,
later, for sweeping, too.
2015-04-02 16:41:31 -07:00
Mark Probst 183dc2905b [sgen] Wait for the sweep job properly. 2015-04-02 16:41:31 -07:00
Mark Probst 6fb229abc8 [sgen] Implement a simple thread pool and do concurrent sweep with it.
We cannot start threads during stop-the-world pauses (some thread APIs,
including pthreads, can deadlock), and we want to do marking and sweeping
with the same threads.  This new thread pool facility will allow that.
2015-04-02 16:41:30 -07:00
Mark Probst 8333c2f4e7 [sgen] Fix a comment. 2015-04-02 16:41:30 -07:00
Mark Probst 55a2ff8f48 [sgen] Don't unnecessarily compute object size index. 2015-04-02 16:41:30 -07:00
Mark Probst ec2572d90b [sgen] Only do a debug block iteration on a higher assert level. 2015-04-02 16:41:30 -07:00
Mark Probst 1639beff7c [sgen] Comments. 2015-04-02 16:41:29 -07:00
Mark Probst c4b9b5cbe1 [sgen] Don't repeat code and don't load multiple times. 2015-04-02 16:41:29 -07:00
Mark Probst 75cfa06054 [sgen] Rename a function to better reflect what it does. 2015-04-02 16:41:29 -07:00
Mark Probst 14626e122f [sgen] sweep_block() returns whether it actually swept. 2015-04-02 16:41:29 -07:00
Mark Probst f5f2d2fb96 [sgen] Lock-free block array.
We tag pointers to blocks that are currently being processed.  Those
must not even be dereferenced by other threads because the sweep
thread might free them at any point.
2015-04-02 16:41:28 -07:00
Mark Probst 68ba43ac72 [sgen] Clean up FIXMEs. 2015-04-02 16:41:28 -07:00
Mark Probst 578e66c235 [sgen] Just one iteration over the blocks at start of major collection. 2015-04-02 16:41:28 -07:00
Mark Probst c24e166b3e [sgen] Remove dead macros. 2015-04-02 16:41:28 -07:00
Mark Probst b5b493d2da [sgen] Assert world is stopped and not sweeping when iterating blocks. 2015-04-02 16:41:28 -07:00
Mark Probst dc9f7f0d2c [sgen] Whenever we wait for sweep, help the sweeping thread.
And since we always wait for the sweep now we can do iterations over
the blocks without taking the lock.
2015-04-02 16:41:27 -07:00
Mark Probst b36a81c904 [sgen] Simplify allowance logic.
Don't use the difference to the last collection, but just calculate the maximum heap
size and trigger a collection when it's reached.
2015-04-02 16:41:27 -07:00
Mark Probst f38b8aeccd [sgen] Count major sections before/after sweep correctly. 2015-04-02 16:41:27 -07:00
Mark Probst 216713ebb6 [sgen] num_major_sections must be updated atomically.
It's updated from nursery collections and from the sweep thread concurrently.
2015-04-02 16:41:27 -07:00
Mark Probst 98d93adfde [sgen] Write binary protocol for card scan before scanning the card. 2015-04-02 16:41:26 -07:00
Mark Probst 37068c1915 [sgen] Don't iterate over block array while it's being compacted. 2015-04-02 16:41:26 -07:00
Mark Probst 0a4d98c597 [sgen] Remove dead parameter to sweep_block(). 2015-04-02 16:41:26 -07:00
Mark Probst fcdb3a9111 [sgen] Allow card table scanning to do block checking work. 2015-04-02 16:41:26 -07:00
Mark Probst 7627baae51 [sgen] Fix initial block state.
New blocks need to be swept if they're allocated during a non-concurrent major
collection or while a concurrent major collection is running.
2015-04-02 16:41:26 -07:00
Mark Probst 440ca36610 [sgen] Comments. 2015-04-02 16:41:25 -07:00
Mark Probst 24262e02c1 [sgen] Make function for block checking wait for another potential thread. 2015-04-02 16:41:25 -07:00
Mark Probst 079804f45a [sgen] Fix M&S heap consistency checks. 2015-04-02 16:41:25 -07:00
Mark Probst b5682e3e0d [sgen] Set the block state to CHECKING with the allocated blocks lock held. 2015-04-02 16:41:24 -07:00
Mark Probst 86eb54dddd [sgen] Traverse block array from high to low in sweep thread.
The nursery collector requires that sweeping has finished, and instead
of waiting it will cooperate with the sweep thread to finish more
quickly.  The sweep thread will traverse the block array from high
indexes to low ones while the nursery collector will go from low to
high.  They will contend only very briefly when they meet somewhere in
the middle.
2015-04-02 16:41:24 -07:00
Mark Probst 9cabf9abb2 [sgen] Factor out function that checks individual blocks for sweeping. 2015-04-02 16:41:24 -07:00
Mark Probst 60078aecf6 [sgen] Binary protocol entries for block alloc/free/change state. 2015-04-02 16:41:24 -07:00
Mark Probst 3b1059b824 [sgen] Card clearing and moving to shadow cards don't require sweep. 2015-04-02 16:41:23 -07:00
Mark Probst fdfaade45e [sgen] Concurrent sweep 2015-04-02 16:41:23 -07:00
Mark Probst 7412b449e9 [sgen] Replace swept with more detailed block state. 2015-04-02 16:41:23 -07:00
Mark Probst 8e8efe39dd [sgen] On forced major collections, free blocks. 2015-04-02 16:41:23 -07:00
Mark Probst bfdfbe1206 [sgen] Make memory governor ready for concurrent sweep. 2015-04-02 16:41:22 -07:00
Mark Probst e6699baa6c [sgen] Sweep state instead of have_swept. 2015-04-02 16:41:22 -07:00
Mark Probst 0caf65b147 [sgen] Make slots free list lock-free. 2015-04-02 16:41:22 -07:00
Mark Probst 788b7846f2 [sgen] Guard allocated block array with a mutex.
Both the concurrent sweep thread as well as the nursery collector will
need access to the block array.  Until we've made that lock-free,
we're simply using a lock.
2015-04-02 16:41:22 -07:00
Mark Probst 207f2a7475 [sgen] Function for querying whether world is stopped. 2015-04-02 16:41:21 -07:00
Mark Probst 1fbaf720cf [sgen] Split sweeping into three parts: start, block loop, finish. 2015-04-02 16:41:21 -07:00
Alexander Köplinger 7f97d6fb3c [System.Data] Fix 'make dist' 2015-04-03 00:23:26 +02:00
Zoltan Varga 0551f69b7e Merge pull request #1680 from schani/feature-profiler-exception-handling
[profiler] Add missing code buffers for exception handling.
2015-04-02 17:33:07 -04:00
Mark Probst ed663c84a6 [profiler] Add missing code buffers for exception handling. 2015-04-02 14:12:31 -07:00
Zoltan Varga 9ca4dc118e [llvm] Emit division by zero/overflow checks for div/rem opcodes inside eh clauses, this is needed because llvm is not aware that these instructions can raise exceptions. 2015-04-02 16:34:24 -04:00
Sebastien Pouliot 7934663bb8 [linker] Ensure updated Scope for exported types (e.g. unlinked PCL facade assemblies in a Nuget) [#28617] 2015-04-02 15:43:33 -04:00
Sebastien Pouliot deda3beb52 [tools] Fix mono-cil-strip to return non-zero on failure [#28617] 2015-04-02 15:41:38 -04:00
Khoa Nguyen 921b855093 More test for RSA Oid from FriendlyName 2015-04-02 13:14:55 -05:00
Khoa Nguyen 37a0a011d5 Add tests for supporting more oids: aes128, aes256, sha256, sha512 2015-04-02 13:09:43 -05:00
Zoltan Varga a1db9aed23 Revert "[runtime] Use mono_set_pending_exception () in a few more places."
This reverts commit 0ae611a9eb.

Revert this as it causes crashes in the System.ServiceModel tests.
2015-04-02 12:39:57 -04:00
Khoa Nguyen 2ed62415b6 Support more oids: aes128, aes256, sha256, sha512 2015-04-02 10:50:43 -05:00
Marek Safar ede464c4e0 [mcs] Check best dynamic candidate type parameters constrains only if it's single candidate. Fixes #28653 2015-04-02 17:34:51 +02:00
Marek Safar 759c8dcfa3 [mcs] Contextual var keywork cannot be shadowed by a namespace. Fixes #28648 2015-04-02 17:34:51 +02:00
Marek Safar 72d7a092c5 [mcs] DefaultParameterValue treats dynamic as object. Fixes #28645 2015-04-02 17:34:51 +02:00
Marcos Henrich e427b80122 [corlib] Fixed ParseTZBuffer with DST periods longer than a year.
AdjustmentRule specifies a DST period that starts and ends within a year.
When we have a DST period longer than a year, the generated AdjustmentRule may not be usable.
Thus we fallback to the transitions.
Fixes #24086.
2015-04-02 16:02:23 +01:00
João Matos 1dc9369450 Merge pull request #1677 from ninjarobot/fix-test-again
Fix XmlSerializationTest again.
2015-04-02 15:53:29 +01:00
Marcos Henrich bcc65637da [corlib] Removed referencesource duplicated code. 2015-04-02 15:52:00 +01:00
Dave Curylo bae8fad714 Fix XmlSerializationTest again. 2015-04-02 10:51:31 -04:00
Marcos Henrich 2ea2aa6f7f [corlib] Renamed GetUtcOffset to GetUtcOffsetHelper.
The new name is to avoid using the helper method instead of GetUtcOffset.
2015-04-02 15:47:17 +01:00
Marcos Henrich e1acc28647 [corlib] Changed TimeZoneInfo methods to use GetUtcOffset.
In some cases rules are not available so we use GetUtcOffset instead of GetApplicableRule.
2015-04-02 15:44:45 +01:00
João Matos 8a8e35f8a1 Merge pull request #1676 from ninjarobot/fix-xml-ser-tests
Corrects error in XmlSerializerTests.
2015-04-02 15:43:41 +01:00
Dave Curylo 389008df93 Corrects error in XmlSerializerTests. 2015-04-02 10:38:33 -04:00
Marek Safar ae820d9ea3 [mcs] Handle null operator inside parenthesis expression. Fixes #28172 2015-04-02 15:22:45 +02:00
Marek Safar 31557f8f7b [mcs] Type parameter hidden methods should consider default parameters. Fixes #28651 2015-04-02 14:50:20 +02:00
João Matos 33ff5d8de9 Merge pull request #1672 from ninjarobot/patch-2
XmlSerializer should set *non* readonly {V}Specified fields
2015-04-02 13:05:43 +01:00
Marek Safar 4688209dd2 [corlib] CompareInfo from reference sources 2015-04-02 12:53:25 +02:00
Dave Curylo c58f019266 XmlSerializer should set *non* readonly {V}Specified fields
Addresses an oversight in PR 1257 that caused {V}Specified fields to not be set during XML deserialization in some circumstances.

Adds test for optional value serialization round trip
2015-04-01 21:56:49 -04:00
Zoltan Varga b4b7aee0af Merge pull request #1674 from alexanderkyte/gdb_support
[runtime] Disable XDEBUG on OSX
2015-04-01 19:32:40 -04:00
Zoltan Varga 0ae611a9eb [runtime] Use mono_set_pending_exception () in a few more places. 2015-04-01 19:30:37 -04:00
Zoltan Varga 9c1cc41d97 [jit] Avoid a crash if constrained_gsharedvt_call_setup () fails. 2015-04-01 16:53:58 -04:00
Miguel de Icaza 1562789a15 [doc] Format comment so our tools can process this 2015-04-01 16:18:13 -04:00
Rodrigo Kumpera 301b370f25 [threading] Fix compilation of coop suspend on windows. 2015-04-01 16:12:00 -04:00
Alexander Kyte d6a7e425e8 [Runtime] Disable xdebug on OSX because it does not work and prevents gdb use. 2015-04-01 15:48:38 -04:00
Rodrigo Kumpera 03b7f17ecd [corlib] FEATURE_STRONGNAME_MIGRATION should be used in all profiles to avoid breaking compat. 2015-04-01 14:29:24 -04:00
Rodrigo Kumpera be570e4f3f Merge pull request #1671 from kumpera/mobile_static_fixication
Fix some of the issues with the mobile_static profile.
2015-04-01 13:04:49 -04:00
João Matos df2451caf1 Merge pull request #1673 from alexanderkyte/minor_cpp_fixes
[runtime] Fixed index comparison typo in class.c
2015-04-01 16:48:07 +01:00
Alexander Kyte 4e334d5d6a [runtime] Fixed index comparison typo in class.c 2015-04-01 11:45:11 -04:00
Ludovic Henry 1ee3dc43a9 [threadpool] Fix potential infinite loop 2015-04-01 16:39:19 +01:00
Atsushi Eno 9a9ed94626 bump referencesource to fix Sys.Data mobile_static build. 2015-04-01 23:05:08 +09:00
Rodrigo Kumpera c37e01b48d [mobile] Fix the build order between System.Numerics and System.Data due to dependencies between them. 2015-04-01 09:35:23 -04:00
Rodrigo Kumpera 69f38c0cbe [corlib] Fix the mobile_static profile. 2015-04-01 09:35:18 -04:00
Marek Safar d5be7eb756 [corlib] Update more decimal separators. Further fixes for #17615 2015-04-01 14:22:16 +02:00
Marek Safar 87d259007a [system.net.http] Use correct separator for headers tostring 2015-04-01 10:01:00 +02:00
Sebastien Pouliot e4e6710df1 [tests] ManualResetEventSlim.SpinCount depends on the number of CPU/cores and we can't assume everything as multiple CPU/cores [#28611] 2015-03-31 21:30:15 -04:00
Zoltan Varga c6b25f7f24 [jit] Use mono_error_set_pending_exception () in jit icalls. 2015-03-31 21:26:35 -04:00
Zoltan Varga b80d06dfa0 [runtime] Move mono_error_raise_exception () to metadata/ to fix a layering issue. Add mono_error_set_pending_exception () helper function. 2015-03-31 21:23:36 -04:00
Zoltan Varga acdcee6a43 [jit] Increase some trampoline sizes. 2015-03-31 18:36:11 -04:00
Zoltan Varga 5a049a5573 [llvm] Reenable support for nested clauses. 2015-03-31 18:32:27 -04:00
Zoltan Varga b3037b829b [runtime] Add more caches to mono_marshal_get_native_wrapper () to avoid mixing wrappers with/without exception checks. 2015-03-31 18:32:10 -04:00
Alexander Kyte 90ef0ccc07 [runtime] Don't set flag to skip future initialization on half-baked classes 2015-03-31 17:18:40 -04:00
Zoltan Varga 2868ae13bd [llvm] Disable support for nested clauses for now as it causes regressions in the corlib tests. 2015-03-31 17:01:11 -04:00
Zoltan Varga fda8918ad0 [llvm] Implement support for nested clauses. 2015-03-31 16:31:08 -04:00
Zoltan Varga 2c79fbd566 [amd64] Enable thunk creation when using LLVM as well. 2015-03-31 16:31:08 -04:00
Ludovic Henry e823702a31 [threadpool] Fix typo 2015-03-31 20:34:09 +01:00
Ludovic Henry 36baea1294 [threadpool] Add IO support + Needed refactoring of threadpool 2015-03-31 17:48:02 +01:00
Ludovic Henry 128b1a3e89 [threadpool] Move MonoAsyncResult invocation out of the ThreadPool 2015-03-31 17:48:00 +01:00
Ludovic Henry d7dfccb3a6 [threadpool] Move threadpool-microsoft.{c,h} to threadpool-ms.{c,h}
Avoid having really long filenames when adding threadpool-ms-io.{c,h}
2015-03-31 17:47:59 +01:00
Ludovic Henry 8ab3f6577e [threadpool] Remove RegisteredWaitHandle runtime code, as it is all in managed 2015-03-31 17:47:59 +01:00
Marek Safar 687b8bc0f3 [corlib] NumberFormatInfo from reference sources 2015-03-31 16:06:07 +02:00
Rodrigo Kumpera b65b99d6c2 [socket-io] Fix crasher in System test suite. 2015-03-30 22:52:56 -04:00
Alexander Köplinger ebf68cb708 [readme] Fix monolite instructions
EXTERNAL_MCS is misleading and wrong there, the build uses monolite automatically when appropriate.
2015-03-31 01:13:29 +02:00
Zoltan Varga 85109662c0 Add an --enable-gsharedvt configure option, same as the misnamed --enable-gsharing. 2015-03-30 16:53:48 -04:00
Marek Safar 88f920a7e8 [corlib] More globalization from reference sources 2015-03-30 18:34:40 +02:00
Marek Safar 5b1ee3ae63 [corlib] Fix commonly used encoding names 2015-03-30 18:34:40 +02:00
Marek Safar 54c079ad01 [corlib] Update culture currency separators 2015-03-30 18:34:39 +02:00
João Matos 8e8e3055f3 [runtime] Fixed a warning.
It can happen that THREAD_INFO_TYPE is already defined by a previously included header to just undefine it before re-redefining it.
2015-03-30 17:22:16 +01:00
João Matos 27a2f0ebea [mini] Fixed the build.
LLVM_FAILURE will try to `goto FAILURE` so we need to add a label to the function to make the compiler happy.
2015-03-30 17:22:15 +01:00
João Matos a3a643d447 [runtime] Enable the complex math support code on Android.
Previously I thought these implementations were not needed but dlopen () was complaining when loading libmonosgen.so on Android so we do need them.
2015-03-30 17:22:15 +01:00
João Matos 2608323126 [runtime] Add some complex math support code.
This is adapted from FreeBSD's code.
2015-03-30 17:22:15 +01:00
Zoltan Varga dd258e5f7f Bump referencesource to bcee91f8a0212e687db4d1d1a906f1f97e775051. 2015-03-30 11:32:37 -04:00
Marek Safar 8f07e6c5db Remove old files 2015-03-30 17:12:23 +02:00
Rodrigo Kumpera 7d318ea4fa [runtime] Fix the build. 2015-03-30 11:08:33 -04:00
Zoltan Varga bf271f1a40 [llvm] Fix an uninitialized variable error. 2015-03-30 08:27:57 -04:00
HellBrick 7ee2810f4a Moved WebConnectionGroup.Close() call out of the ServicePoint lock
WebConnectionGroup.Close() calls WebConnection.Close(), which takes connection lock and then takes the service point lock. Calling WebConnectionGroup.Close() leads to taking the service point lock *before* the connection lock, which leads to a deadlock.
2015-03-30 12:45:27 +03:00
Marek Safar f504a2b781 [corlib] Replace more system exceptions from reference sources 2015-03-30 11:04:31 +02:00
Zoltan Varga f9bdc96a15 [llvm] Generate code at the start of exception clauses to branch to the proper nesting clause so the EH code can branch to the innermost landing pad in the future. This is needed because LLVM always expects the innermost landing pad to be called. 2015-03-29 22:26:58 -04:00
Zoltan Varga b387b3be2c [runtime] Fix the passing of arguments to the stringbuilder ctor in mono_string_builder_new (). 2015-03-29 22:26:58 -04:00
Rodrigo Kumpera 8448c00630 [threading] Wrap socket code with coop suspend. 2015-03-29 12:11:12 -04:00
Rodrigo Kumpera 1cf48b8676 [threading] Wrap IO icalls. 2015-03-29 12:11:12 -04:00
Rodrigo Kumpera 050ac7a608 [threading] type init lock is complex enough that needs suspend protection. 2015-03-29 12:11:11 -04:00
Rodrigo Kumpera 50eea7f127 [threading] Make the loader and domain locks coop suspend aware. 2015-03-29 12:11:10 -04:00
Rodrigo Kumpera 1e15bda7da [runtime] When interning strings, allocate without holding the ldstr lock. 2015-03-29 12:11:10 -04:00
Rodrigo Kumpera 3a82ac2a59 [threading] Wrap monitor code with coop suspend. 2015-03-29 12:11:09 -04:00
Rodrigo Kumpera f582a3fbba [threading] Make thread management coop suspend aware. 2015-03-29 12:11:03 -04:00
Rodrigo Kumpera 2800db163f [threading] Make the GC lock coop suspend aware. 2015-03-28 20:46:09 -04:00
Rodrigo Kumpera d74eda461c [threading] Make n2m and m2n wrappers coop suspend aware. 2015-03-28 20:45:45 -04:00
Rodrigo Kumpera e20471ad6b [threading] Make thread start suspend aware 2015-03-28 20:44:09 -04:00
Marek Safar 45c8541ecc Merge pull request #1666 from akoeplinger/fix-mono-options-messages
[Mono.Options] Fix messages in tests that changed after bf66c00bc7
2015-03-28 09:20:05 +01:00
Zoltan Varga fb5f842089 [llvm] Extract some of the eh code into a separate function. 2015-03-27 18:49:08 -04:00
Alexander Köplinger a9230cc258 [Mono.Options] Fix messages in tests that changed after bf66c00bc7 2015-03-27 22:37:11 +01:00
Marcos Henrich c7ba3619f3 [runtime] Updates comments. 2015-03-27 20:36:35 +00:00
Marcos Henrich b27c429878 [runtime] GetProcessTimes now works with all processes.
Fixes 26363.
2015-03-27 20:36:34 +00:00
Zoltan Varga f048e17058 Add a test for the interning of String.Empty. 2015-03-27 15:24:33 -04:00
Zoltan Varga 61ec591084 [runtime] Intern String.Empty. 2015-03-27 15:23:19 -04:00
Miguel de Icaza a22b9fc66b Relicense socket-io.c to MIT 2015-03-27 14:46:05 -04:00
Marek Safar bf66c00bc7 [corlib] System exception from reference sources. Some had broken serialization support 2015-03-27 18:15:46 +01:00
Atsushi Eno 6926b5836c Use common consts in [InternalsVisibleTo] PublicKey specifications. 2015-03-28 01:46:09 +09:00
João Matos 18fe819708 Merge pull request #1664 from jbraswell/master
Fix issue with inserting null values into integer and datetime columns i...
2015-03-27 16:27:32 +00:00
Marek Safar 54b20c425d [mcs] Import of interface member which is hidden by parameterless member. Fixes #28201 2015-03-27 11:27:20 +01:00
Zoltan Varga 2640dbed40 [jit] Avoid emitting seq points in inlined methods. 2015-03-27 06:26:13 -04:00
Marek Safar 71e65a64d8 Fixes System.Design build, the missing file does not apper to be needed 2015-03-27 11:12:50 +01:00
Marek Safar 87a7d20763 Fixes System.Data build 2015-03-27 10:59:15 +01:00
Zoltan Varga 8b3cfb97eb [runtime] Synchronize the overflow checks between mono_string_new_size () and mono_gc_alloc_string (). 2015-03-27 05:51:22 -04:00
Marek Safar 02c0f8cf88 Bump reference sources to fix the build 2015-03-27 07:34:15 +01:00
Marek Safar b1f7fb3d76 [mcs] Reset flowanalysis finally scope per parameters block. Fixes #28196 2015-03-27 07:33:49 +01:00
Jonathan Braswell 7ed9d55b18 Fix issue with inserting null values into integer and datetime columns in Sql Server.
This resolves https://bugzilla.xamarin.com/show_bug.cgi?id=26546.
2015-03-26 23:43:12 -04:00
Atsushi Eno 059538c11a Merge pull request #1662 from atsushieno/import-system-data-partial
Import System.Data from referencesource
2015-03-27 10:37:21 +09:00
Rodrigo Kumpera b4d0381877 [threading] Add a coop backend. This paves the way to introduce cooperativeness into the runtime.
Coop requires the following set of rules:

-blocking code must be wrapped with MONO_PREPARE_BLOCKING / MONO_FINISH_BLOCKING
Must not read managed refs read/writes inside the block
Managed memory (i.e. inside a byte[]) must be previously pinned[1]

-state escaping transitions (lazy thunks and others sneaky n2m transitions) must be wrapped with MONO_PREPARE_RESET_BLOCKING / MONO_FINISH_RESET_BLOCKING
This lands the thread in runnable state, so be careful to keep it suspendable by following the target environment rules.

The set of rules for what runtime code can/can't are still in flux, but here's the tentative list:

== On Wrapping syscall/waits

- Wrap it on the callee. We can't necessarily know in which context the syscall will be called. This will reduce reentrancy issues as blocking is not reentrant.

- Don't go blocking while holding locks as this will certainly deadlock.

- Avoid allocating memory while holding locks.

- Annotate blocking restrictions in the comments in the same way we do it for locking.

== On aborting blocking

- Avoid it as much as possible as it might lead to unbound pauses.

- Make sure you can always restore back to blocking.

[1] Since we conservatively scan the native stack, acquiring the ref outside of the block is enough for now.
2015-03-26 19:44:17 -04:00
Rodrigo Kumpera 084cb4d103 [threading] Improve logging and troubleshooting helpers in coop suspend code.
Make sure all logging include the thread tid to ease correlation.

Add counters to check for proper balance of post/wait on the suspend semaphore.

Massive improvement in the coop suspend wait timeout crasher. It will now print
a cue card on the internal states. This makes finding the offending threads much easier.
2015-03-26 19:44:16 -04:00
Marek Safar 0d8231bb9e [system.net.http] Parse range values using long range. Fixes #26109 2015-03-26 23:46:31 +01:00
Marek Safar 723bccc551 Merge pull request #1663 from JetBrains/valueserializerattribute
Move System.Windows.Markup.ValueSerializerAttribute to System assembly
2015-03-26 23:09:32 +01:00
Marek Safar 169ec6b890 [mcs] The left-hand side of an assignment cannot contain a null propagating operator. Fixes #28435 2015-03-26 22:51:56 +01:00
Leonid Shalupov 830bf66a13 move System.Windows.Markup.ValueSerializerAttribute to System assembly, as Microsoft does in .NET Framework 4.5
See MSDN https://msdn.microsoft.com/en-us/library/system.windows.markup.valueserializerattribute(v=vs.110).aspx
2015-03-26 19:18:26 +01:00
Zoltan Varga 14c5e0e144 [llvm] Avoid registering an exception table handler in jit mode, the same info is already available using another callback. 2015-03-26 12:31:34 -04:00
Marek Safar 7a5ea5244a [mcs] Special case flowanalysis of primitive structs. Fixes #28296 2015-03-26 16:58:22 +01:00
Zoltan Varga cb9586ef9c [runtime] Update some comments. 2015-03-26 11:45:38 -04:00
Zoltan Varga 438e3b5ac3 Merge pull request #1659 from alexanderkyte/stringbuilder-referencesource
Fixed StringBuilder marshaling capacity error, and then the tests broken by fixing it.
2015-03-26 11:29:01 -04:00
Atsushi Eno abd2d59acb [Sys.Data] add InternalsVisibleTo(System.Data.DataSetExtensions). 2015-03-26 23:35:18 +09:00
Zoltan Varga 3a0929e114 Merge pull request #1658 from esdrubal/spgenerics
Improved generics in exception's stack traces and mono-symbolicate.
2015-03-26 09:43:06 -04:00
Atsushi Eno 5f8ad43886 Merge branch 'master' into import-system-data-partial 2015-03-26 22:23:49 +09:00
Atsushi Eno 37778f0cfd [Sys.Data.DSExtensions] add AsEnumerable() test. 2015-03-26 21:54:11 +09:00
Atsushi Eno cf3175c108 [Sys.Data,DSExtensions] fix hacky IsClosed() check.
It didn't work with referencesource.
2015-03-26 21:53:22 +09:00
Atsushi Eno 5e9da44ee0 [Sys.Data,DSExtensions] fix build wrt referencesource updates.
It caused name conflict with internal Sys.Data type (due to InternalsVisibleTo).
2015-03-26 21:52:18 +09:00
Marcos Henrich 84832ef221 [mono-symbolicate] Updated tool test.
Test now checks generic methods, generic classes, methods overloads, ref/out parameters.
2015-03-26 10:45:27 +00:00
Marcos Henrich 2a86ced42f [mono-symbolicate] make check now runs mono with -O=-inline.
Inlining otimization is disabled so the full call stack can be displayed.
2015-03-26 10:45:27 +00:00
Marcos Henrich dece3b4dd7 [mono-symbolicate] Improved tool stack trace handling.
Generics are no longer a problem.
2015-03-26 10:45:26 +00:00
Marcos Henrich 6aa8aa4810 [corlib] Changed Exception.GetFullNameForStackTrace to .NET behavior.
.NET displays the method definition generic argument names instead of types.
2015-03-26 10:45:25 +00:00
Marcos Henrich 4b46084c96 [corlib] Exception stack traces now show method index if needed.
Method index will be set if the method metadata token is shared by multiple generic specializations.
For StackFrame.GetILOffsetFromFile to work with generics methods a method index is required.
2015-03-26 10:45:25 +00:00
Marcos Henrich 93c9e38273 [runtime] .msym now stores method index.
The method index is required to disambiguate between generic methods that share the same metadata token.
2015-03-26 10:45:24 +00:00
Marcos Henrich 8420aef987 [runtime] Added function mono_aot_find_method_index.
Method index will be included in some aot stack traces, when method metadata token is not enough (e.g: generic methods).
2015-03-26 10:28:19 +00:00
João Matos e7042f6321 Merge pull request #1660 from akoeplinger/fix-zone-url-with-at-sign
[corlib] Don't strip @ char in Mono.Security.Uri for absolute path
2015-03-26 10:22:43 +00:00
Zoltan Varga 03503bc020 [runtime] Avoid a crash in mini_thread_cleanup () for attached threads. 2015-03-26 06:06:29 -04:00
Zoltan Varga 861ea992dc [readme] Remove xamcore reference. 2015-03-26 06:04:11 -04:00
Zoltan Varga b9abb7c34b Bump referencesource to pick up 3176b17a2c636dfd5f885435f8449598ecd4197f. 2015-03-26 06:03:16 -04:00
Zoltan Varga 3e14fe5bf3 [runtime] Initialize String.Empty from native code to allow removal of String:.cctor (). 2015-03-26 06:03:15 -04:00
Marek Safar 26a8c65af8 [mcs] Report abstract member hiding only for members which one can override. Fixes #28213 2015-03-26 10:07:55 +01:00
HellBrick 893bacaf9a Fixed deadlock in WebConnectionGroup.Close()
The fix is similar to the one used in the TryRecycle() method: we defer connection closing until after we've left the lock. The original bug: https://bugzilla.xamarin.com/show_bug.cgi?id=27348
2015-03-26 11:48:30 +03:00
Zoltan Varga f8c885d697 [mkbundle] Use mingw assembler on windows. 2015-03-26 04:18:33 -04:00
Atsushi Eno 8b7ad259c5 Fix winforms tests that don't match .NET behavior. 2015-03-26 10:46:11 +09:00
Alexander Köplinger d759188d30 [corlib] Don't strip @ char in Mono.Security.Uri for absolute path
When creating a Mono.Security.Uri with the string "file:///var/lib/jenkins/workspace/test-mono-mainline@2/..."
(happens sometimes in System.Security.Policy.Zone-related unit tests on Jenkins) the current implementation
strips everything up until the @ sign.

Zone thinks the file doesn't exist locally as the Uri.LocalPath doesn't refer to a valid file on disk
anymore and this results in an incorrect zone value, making the tests fail.

Fixing this by treating the @ char differently when it is in an absolute path (as is done for other chars).
2015-03-26 02:35:57 +01:00
Martin Baulig 6808e6a5e6 [System]: Fix the AllowWriteStreamBuffering check. Bugs #26640 and #26936.
Added new tests for this to the web-tests:
https://github.com/xamarin/web-tests/commit/e7b5ac42897e629e9e4107cf6f9ae9e0a9fef45a

and re-enabled this one, which regressed:
https://github.com/xamarin/web-tests/commit/046da02c631c8799c7ab5025cd3b685f4a3e66f6
2015-03-26 01:26:19 +01:00
Martin Baulig a081090e77 Bump referencesource and add test for the problem. 2015-03-25 22:33:02 +01:00
Marek Safar ffd377bb96 Update failing test 2015-03-25 20:28:50 +01:00
Marek Safar eec68d08b1 [System.Runtime.Serialization.Formatters.Soap] A test fix to remove hashtable order dependency 2015-03-25 20:07:42 +01:00
Alexander Kyte dd4a723754 [corlib] Fixed StringBuilder construction bugs in marshalling caused by changes to capacity setting. 2015-03-25 14:19:34 -04:00
Marek Safar df423753f1 Revert "[mcs] Special case flowanalysis of primitive structs only when they are imported. Fixes #28296"
This reverts commit b50e898ece.
2015-03-25 19:17:31 +01:00
Rodrigo Kumpera 579a7b4748 [threading] Reorganize code to work with the coop backend.
This splits the native backend from core functionality it needs to provide. For example,on posix, we want to
use the pthread_create code regardless of the backend enabled.
2015-03-25 13:49:38 -04:00
Rodrigo Kumpera 17896b0902 [threading] Introduce a pair of states to handle native suspend.
Native code should not normally be in runnable state. That's reserved only for managed code. In theory.
In practice any code that can witness the managed heap must be in the runnable state.

This in practice means all runtime code (icalls) and embeders. Right now lets focus on the runtime side.

The solution for this is to wrap all calls that could lead to unbound suspension in code that coordinates
with the GC - most syscalls that can block. This is realized with a pair of additional thread states.

1)Blocking: This the state where the runtime is doing something that can potentially block. The suspend count
will be > 0 if the current thread is suspended. In practice it won't suspend, just wait on resume.

2)Blocking and suspended: When leaving the blocking state, if the thread has a pending suspend, we transition
to this state while waiting for resume.
2015-03-25 13:49:38 -04:00
Rodrigo Kumpera ae58b3085a [threading] Move jit_data from MonoThreadInternal to MonoThreadInfo. Cleanup jit attach code to support earlier attaching.
This move allows us to save the thread state much earlier on. In addition to the move, we now produce thread contexts without
the JIT TLS set. This might end up been an issue in some corner cases, just like with domain, so we'll address those when
they show up.
2015-03-25 13:49:38 -04:00
Rodrigo Kumpera ae8a8fb08d [threading] Surface mono_thread_info_current_unchecked. 2015-03-25 13:49:37 -04:00
Rodrigo Kumpera 98b283714a [threading] Log the thread tid instead of the MonoThreadInfo pointer.
Other places are already logging tid so this makes correlation possible.

TID is a better pick than the MonoThreadInfo pointer as it's easier to find the thread on gdb.
2015-03-25 13:49:37 -04:00
Rodrigo Kumpera b614f16800 [threading] Add configure option to enable cooperative suspend. 2015-03-25 13:49:37 -04:00
Atsushi Eno ba779e83fd [Sys.Data] fix data adapter tests. ByteFx.Data and Npgsql are gone. 2015-03-26 02:22:00 +09:00
Marek Safar b50e898ece [mcs] Special case flowanalysis of primitive structs only when they are imported. Fixes #28296 2015-03-25 17:59:48 +01:00
Zoltan Varga fb08db1765 [jit] Trucate the shift amount in the long shift emulation functions to better mirror the behavior of the processor shift instructions. 2015-03-25 12:39:30 -04:00
Atsushi Eno 2737a5a2f8 bump referencesource. 2015-03-26 01:28:57 +09:00
Marek Safar f46e880311 [corlib] Add missing file 2015-03-25 17:26:47 +01:00
Atsushi Eno 0f1738c6bf System.Design.dll depended on System.Data internals so remove deps.
The old internal types don't exist in new System.Data.dll.
2015-03-26 01:25:04 +09:00
Atsushi Eno f763a00632 [Sys.Data] reuse our SqlClient implementation.
Basically Microsoft SqlClient implementation is full of Windows dependencies
that doesn't work elsewhere. Our implementation has been fully managed
TDS implementation, so we want to bring it back.

This only builds and is not known to "work" yet.
2015-03-26 01:25:04 +09:00
Atsushi Eno 45b00acfd2 [Sys.Data] there are many tests that were unverified on .NET. Fix them. 2015-03-26 01:25:03 +09:00
Atsushi Eno b232392703 [Sys.Data] Fix bogus tests: DataRelation cannot be created for non-dataset cols. 2015-03-26 01:25:02 +09:00
Atsushi Eno 92ca41585b Fix mobile builds with several #if-s in referencesource. 2015-03-26 01:25:02 +09:00
Atsushi Eno bc92f49109 bump referencesource. 2015-03-26 01:25:02 +09:00
Marek Safar d8f53a2d39 Merge pull request #1644 from ztone/eval_class_attr
[eval] Allow class attributes
2015-03-25 17:24:55 +01:00
Atsushi Eno c48e31fa9e [Sys.Data] replace dummy Res.cs messages with real ones.
It uses ../System.XML/genresstrings.sh.
2015-03-26 01:24:24 +09:00
Atsushi Eno 3d46f1d9c7 [System.Data] completely replace sources with referencesource.
Hence, it does NOT work fine due to various win32/native dependencies
that need to be replaced.
2015-03-26 01:24:24 +09:00
Atsushi Eno 2ffd706212 [build/common] Add EcmaFullKey. 2015-03-26 01:24:23 +09:00
Marek Safar de86cb955b [mcs] Resize identifier buffer in all cases. Fixes #28292 2015-03-25 17:17:23 +01:00
Alexander Kyte 828e749949 [corlib] Fixed wrongly changing capacities in stringbuilder marshalling 2015-03-25 12:14:06 -04:00
Marek Safar db2a67f0d5 [mcs] Fix parsing of interpolated strings inside conditional expression. Fixes #28293 2015-03-25 16:34:29 +01:00
Alexander Köplinger 31bc329ddc Fix a typo and code indentation in readme.md 2015-03-25 15:28:24 +01:00
Marek Safar e58097e957 [corlib] String from reference sources, fixes mostly string.format issues 2015-03-25 15:08:06 +01:00
João Matos 2faa7dc28d [runtime] Fixed the build on Android by relying on header checking for system headers. 2015-03-25 14:04:40 +00:00
João Matos df23dc46c6 [runtime] Fixed complex.h usage in MS's thread pool to work in Android.
Android does not provide complex.h in the API levels that we compile against so bundle our own header (based on the one from FreeBSD).

Turns out GCC already provides built-in handling for the complex functions used by the code so there's no need to provide our own implementations.
2015-03-25 14:04:40 +00:00
João Matos 9577c879ee Merge pull request #1657 from alexrp/disable-perf-events
[profiler] Disable `perf` events by default.
2015-03-25 12:59:30 +00:00
Zoltan Varga 5c275e72d7 [io-layer] Fix the freeing of MonoProcess structures. Fixes #28209. 2015-03-25 08:32:14 -04:00
Alex Rønne Petersen ce418756c9 [profiler] Disable perf events by default.
As it turns out, `perf` support crashes/hangs on a lot of Linux
kernels in the wild, and produces no output on some Android devices.
So, given that using a signal + helper thread is more reliable, use
it by default and make `perf` support optional.

The configure flag is now `--enable-perf-events`.
2015-03-25 13:22:39 +01:00
Alex Rønne Petersen 97b59a9741 [profiler] Avoid a slow path in mono_jit_info_table_find (). 2015-03-25 13:13:38 +01:00
Alex Rønne Petersen 7e163fce46 [profiler] Really fix looking up JIT info for AOT'd methods.
mono_aot_get_method () will not necessarily put methods into the
MonoDomain::jit_code_hash table. But it does return an IP that we
can use to look up the JIT info with mono_jit_info_table_find ().
2015-03-25 13:04:43 +01:00
Marek Safar 7ade5f7d7b [mcs] Allow built-in types to have partial declaration 2015-03-25 12:34:26 +01:00
Zoltan Varga fd7f2f07f0 [runtime] Revert eaf200b37b and all fixes to it since it still causes hangs. 2015-03-25 05:14:42 -04:00
Zoltan Varga c8c2d227be [runtime] Avoid returning null from Marshal.AllocCoTaskMem () if size is 0. Fixes #28383. 2015-03-25 01:29:27 -04:00
Zoltan Varga 8e091fd004 [runtime] Fix list removal in eaf200b37b. 2015-03-25 01:07:13 -04:00
Miguel de Icaza 0648b50cdf Add submodule instructions 2015-03-24 22:13:10 -04:00
Alex Soto cdfc2d6b9a [MonoDataSqlite] Add test for Xamarin.iOS specific bug 27864
src: https://bugzilla.xamarin.com/show_bug.cgi?id=27864

As of iOS 8.2 Apple updated Sqlite and broke queries that used to work
pre iOS 8.2 like the select command in this test, The pruppose of this
test is to know when apple fixes this. Expected test behaivour is as follows.

* If iOS 8.2+ Test will pass as long as apple does not fix the bug
* If iOS < 8.2 Test will pass as it does work as expected
* If iOS 8.2+ and apple fixed bug 27864 test will fail and we will need to
  remove the fail check on lines 105 and 106
2015-03-24 17:24:02 -06:00
Zoltan Varga b4fc24bab0 [amd64] Fix OP_SHR_IMM/OP_SHL_IMM. 2015-03-24 17:54:51 -04:00
Zoltan Varga 423cd5280f [runtime] Fix another regression caused by eaf200b37b. 2015-03-24 16:51:31 -04:00
Zoltan Varga d03981860e [arm] Handle OP_SEQ_POINT opcodes during peephole optimizations correctly. 2015-03-24 16:46:44 -04:00
Zoltan Varga afb1de8b7c Merge pull request #1655 from ghuntley/patch-1
corrected spelling mistakes.
2015-03-24 16:44:02 -04:00
Geoffrey Huntley 6cb40b05fd corrected spelling mistakes. 2015-03-25 07:38:58 +11:00
Zoltan Varga e4fc9ed0cd [runtime] Fix an uninitialized memory error added by eaf200b37b. 2015-03-24 14:56:06 -04:00
Zoltan Varga eaf200b37b [io-layer] Fix the freeing of MonoProcess structures. Fixes #28209. 2015-03-24 12:35:41 -04:00
Sebastien Pouliot b07e58ed99 [tests] Tweak MemoryMappedFile test case that fails on iOS/ARM64 [#27667]
Filled with Apple. From bug report:

The problem appears to be caused by a bug in mmap on the arm64 ios.

In this test, we request a page and mmap returns successfully, but when trying
to access the mapped memory, the program crashes after the 4097th byte, meaning
that it only maps us 4kb(???). It should be mentioned that on arm64 ios the
page size is 16kb.
2015-03-24 10:46:33 -04:00
Marek Safar f0e39b7bab [corlib] ngen attributes from reference sources 2015-03-24 14:59:52 +01:00
Marek Safar 3d351a3b9d [corlib] Remove unused files 2015-03-24 14:59:52 +01:00
Marek Safar e16e002a3a [corlib] ExceptionServices from reference sources 2015-03-24 14:59:52 +01:00
Marek Safar 98fce55b7e [corlib] Debugger attributes from reference sources 2015-03-24 14:59:52 +01:00
João Matos 381708c6cd Merge pull request #1634 from StephenMcConnel/bug-28025
Show thumbnail images in SWF.(Open,Save)FileDialog
2015-03-24 11:31:51 +00:00
Ludovic Henry 54be424882 [runtime] Remove unnecessary winbase.h header include on Windows 2015-03-24 11:28:39 +00:00
João Matos 5190434004 Merge pull request #1652 from debuglevel/bugfix-crosscompile
fixed case-sensitive file name for cross compilation
2015-03-24 11:25:08 +00:00
Zoltan Varga 6b4119a8e1 Merge pull request #1588 from BrzVlad/feature-aot-wbarrier
AOT write barrier method
2015-03-24 05:29:29 -04:00
Marek Safar e82dc02e27 Merge pull request #1638 from esdrubal/servicepoint
[System] Fixed RemoveConnectionGroup concurrent issue.
2015-03-24 10:25:57 +01:00
Zoltan Varga fe15af27f1 Merge pull request #1632 from alexanderkyte/bug24118
[corlib] Fixed change in 4b4ddb66b3 that prevented use of remoting fast path
2015-03-24 05:24:58 -04:00
Marek Safar e959cc70a4 [system] FrameworkName from reference sources 2015-03-24 09:30:03 +01:00
Marek Safar 273377896c [mcs] Emit correct assignment to ref pointer 2015-03-24 08:43:54 +01:00
Marek Safar 00da227b09 Fixes build 2015-03-24 07:27:57 +01:00
Marek Safar 5928965bda [system.windows.forms] Add AssemblyNamesTypeResolutionService to correctly fix 78b63f29d5 2015-03-24 07:15:03 +01:00
Alex Rønne Petersen 8ce49aeb39 Typo fix... 2015-03-24 02:44:52 +01:00
Alex Rønne Petersen 8cfe0fb9e8 [arm] Also fix OP_ATOMIC_STORE_R4. 2015-03-24 02:43:15 +01:00
Miguel de Icaza d84ec9f6fd Man page update 2015-03-23 21:31:12 -04:00
Mark Probst 569e0265da Merge pull request #1596 from schani/feature-sgen-improvements
Small SGen fixes and improvements
2015-03-23 15:36:03 -07:00
Mark Probst 8a7aeb7a97 [sgen] Fix slot size calculation.
The way we calculated slot sizes was very brittle when it came to
small slots.  Reducing the size of the block header could trigger it
skipping an important small size class, which would lead to increased
memory usage and slower execution times.

Now we always produce all possible small slot sizes, up to four times
the minimum object size.
2015-03-23 15:34:06 -07:00
Mark Probst 27d742e99c [sgen] Remove stealing.
We only have one worker thread.  There is no point in stealing.
2015-03-23 15:34:06 -07:00
Mark Probst 4ee3709d17 [sgen] Save more space in M&S block infos. 2015-03-23 15:34:06 -07:00
Mark Probst 0078135fe1 [sgen] Do pinning of M&S blocks in one pass. Saves time and memory. 2015-03-23 15:34:05 -07:00
Mark Probst db7f017433 [sgen] Store worker's job names for debugging. 2015-03-23 15:34:05 -07:00
Mark Probst 19dc5a91a0 [sgen] Allow skipping of entries in sgen-grep-binprot. 2015-03-23 15:34:05 -07:00
Mark Probst eb24f1cb56 [sgen] Some clarifying comments and rearrangements. 2015-03-23 15:34:05 -07:00
Mark Probst 9dada5274f [sgen] Remove dead code. 2015-03-23 15:34:05 -07:00
Mark Probst d4c27ef577 [sgen] Binary protocol entry for pin-staging cemented objects. 2015-03-23 15:34:04 -07:00
Mark Probst 43752c07ce [sgen] Only scan mod-union in LOS on marked objects. 2015-03-23 15:34:04 -07:00
Mark Probst db00d189de [sgen] Free lists in blocks must be volatile. 2015-03-23 15:34:04 -07:00
Mark Probst 47fc9ff800 [sgen] Rename a callback for clarity. 2015-03-23 15:34:04 -07:00
Mark Probst 4f546cdcb4 [sgen] Don't scan until jobs done in worker thread.
The jobs must always have priority because the concurrent collector
waits for them to finish before restarting the world.
2015-03-23 15:34:03 -07:00
Mark Probst 5b009431e7 [sgen] Fix names and remove superfluous parameters. 2015-03-23 15:34:03 -07:00
Mark Probst d08417cfe7 [sgen] Move debug code to sgen-debug.c. 2015-03-23 15:34:03 -07:00
Mark Probst a0e7914ef8 [sgen] Rename have_computed_minor_collection_allowance to free_swept_blocks.
Because that's what it actually does.
2015-03-23 15:34:03 -07:00
Mark Probst 3b842277dd [sgen] Remove superfluous function indirection. 2015-03-23 15:34:03 -07:00
Mark Probst d877651ddd [sgen] Replace have_swept pointer with callback.
We want to use a state variable instead of `have_swept`, so we need a callback
to abstract.
2015-03-23 15:34:02 -07:00
Mark Probst f1d0587eca [sgen] Don't pass redundant scan_mod_union to major_finish_collection(). 2015-03-23 15:34:02 -07:00
Mark Probst cb84d02dad [sgen] Disable cementing for concurrent M&S.
The code just worked because it never reset cementing.  It needs to be
completely rewritten.

With cementing enabled, at the start of a major concurrent
collection, we cannot reset it.  That's because if we have
cemented objects, some remsets to them will be missing, and the
major collector does not scan the whole heap immediately, like
the non-concurrent one does.

The proper way to do it seems to be to reset cementing before
finishing a concurrent collection.  All major objects that point
to formerly cemented objects must either be marked in the
mod-union table or the current card table.  When we scan the card
tables, we should be able to just evict objects.

Currently, the finishing collection pause still does some
scanning via the worker thread.  This might be a problem.
2015-03-23 15:34:02 -07:00
Mark Probst af0a841ac1 [sgen] Don't re-check reference after marking in concurrent mark.
If the reference was modified, it was done by the mutator, in which case it will
have marked the card if necessary.
2015-03-23 15:34:02 -07:00
Sebastien Pouliot 298962b7dd [tests] Tweak DateTime.AddMillisecondsOutOfRangeException* tests to work on ARM [#28311] 2015-03-23 18:08:47 -04:00
Neale Ferguson ca5bebb67c Fix decimal comparison by using signed char comparison of signs; Fix size of jmp instruction sequence 2015-03-23 17:43:41 -04:00
Rodrigo Kumpera cee3ef1011 Merge pull request #1631 from alexanderkyte/stringbuilder-referencesource
Switch to using referencesource StringBuilder, with runtime fixes and tests
2015-03-23 17:18:59 -04:00
Rodrigo Kumpera 01d33033b6 Merge pull request #1595 from directhex/randomize-tcp-ports-in-tests
Randomize tcp ports in tests
2015-03-23 17:09:13 -04:00
Rodrigo Kumpera 6e60374fc3 [threading] Use a RT signal for abort when possible. 2015-03-23 16:09:36 -04:00
Zoltan Varga fc846a4acb [arm] Fix OP_ATOMIC_LOAD_R4. 2015-03-23 14:25:17 -04:00
Marek Safar 919684c7af [system] Don't replace CategoryAttribute value with key when not found. Fixes #28331 2015-03-23 17:44:02 +01:00
Zoltan Varga 68106cd2f5 Fix a warning. 2015-03-23 11:51:39 -04:00
Marek Safar 52003dc6f7 [corlib] System.Resources from reference sources 2015-03-23 16:49:15 +01:00
Jo Shields 85c7025f9d Add port randomization to ClientWebSocketTest and HttpListenerTest
These two are consistently failing due to port re-use. Other hard-coded
ports exist, but let's target the *known* issues primarily, and can
handle the others ad-hoc if they demonstrate that they're problematic.
2015-03-23 14:42:16 +00:00
Jo Shields 02981d6bc0 Add a helper class to assign a random port for a test.
This helps in cases where two copies of the test suite are
running simultaneously, and both want to use the same hard-coded
ports in tests.
2015-03-23 14:40:44 +00:00
Marc Kohaupt 9af71e92aa fixed case-sensitive file name for cross compilation 2015-03-23 14:43:14 +01:00
João Matos 2255f5d2b3 Merge pull request #1646 from myrup/master
TimeZoneInfo.Local improvements
2015-03-23 13:02:47 +00:00
Marek Safar 2dd0f1aa0b [corlib] MethodBase from reference sources 2015-03-23 10:59:32 +01:00
Marek Safar c32bc77dba [corlib] Member|TypeInfo from reference sources 2015-03-23 09:25:59 +01:00
Marek Safar 78b63f29d5 [system.windows.forms] Update failing test 2015-03-23 09:25:58 +01:00
Zoltan Varga 6a74b1952f [runtime] Throw an exception on allocation failure from Marshal.AllocHGlobal/ReAllocHGlobal. Fixes #28290. 2015-03-22 03:56:09 -04:00
Zoltan Varga 0e692a4699 [aot] Remove support for non-separate llvm mode. 2015-03-22 01:44:03 -04:00
Zoltan Varga 3b7b1d0ee3 [jit] Remove support for LLVM_API_VERSION < 4. 2015-03-22 01:32:17 -04:00
Jonathan Pryor 44bccacc12 Merge pull request #1641 from joelmartinez/docs-monodoc-mdoc-patches
monodoc/mdoc patches
2015-03-21 08:23:22 -04:00
Zoltan Varga afd07af772 [jit] Enable partial sharing only in full-aot mode. 2015-03-21 05:18:04 -04:00
Zoltan Varga 525132a68b [jit] Unify the handling of the type parameters in generic sharing. Instead of using the generic parameters of the generic definition for reference types, use a generated type parameter with gshared_constraint set to MONO_TYPE_OBJECT. 2015-03-20 21:38:33 -04:00
Sebastien Pouliot 48d64eb82a [tests] Some of the new decimal tests (ported from MS tests) do not work on every culture, this set one that works for them 2015-03-20 15:25:52 -04:00
Marek Safar 93310d9e66 [corlib] Remove unmanaged type IsVisible path. Fixes #28235 2015-03-20 17:38:19 +01:00
Marek Safar 50b27bb659 [corlib] Enable legacy LCID api 2015-03-20 14:50:43 +01:00
Marek Safar b5562aac99 [mcs] Test update 2015-03-20 14:50:43 +01:00
Marek Safar 32f1d4fa07 Revert "Fix more System.Web tests."
This reverts commit 7fa35b58ca.
2015-03-20 14:50:42 +01:00
Marek Safar 97384e4371 [corlib] Pointer from reference sources 2015-03-20 14:50:42 +01:00
João Matos af0be5ce1c [runtime] Check for MSVC instead of non-GCC in mono_threads_core_set_name.
This is just a small cleanup and will also work for Clang since it defines _MSC_VER in MSVC-compatible mode.
2015-03-20 13:03:55 +00:00
Marek Safar 2c95d347b6 [corlib] More simple System.Reflection types from reference sources 2015-03-20 12:25:07 +01:00
Zoltan Varga 7fa35b58ca Fix more System.Web tests. 2015-03-20 07:04:42 -04:00
João Matos c4969d2e1a Merge pull request #1647 from svedm/master
Fix duplicate sub-expressions
2015-03-20 11:02:52 +00:00
Svetoslav Karasev 6bbd7e7c4a Fix duplicate sub-expressions 2015-03-20 15:56:59 +05:00
Marek Safar e373163859 [corlib] Add new test 2015-03-20 11:20:58 +01:00
myrup 2e90ab901d Fixed TimeZoneInfo.Local windows xp issue
Windows xp StandardName property has an exception when system time is UTC.
2015-03-20 10:50:43 +01:00
Marek Safar d7c4554b90 [corlib] MemberInfoSerializationHolder from reference sources. Fixes generics serialization and other issues 2015-03-20 10:39:58 +01:00
Marek Safar 4913b6b537 [system.web] Update failing test 2015-03-20 10:17:55 +01:00
myrup 48bf9b6d29 Added null check
CreateLocal could fail in an unexpected manner. The change re-enables fall back to environment variable "TZ" and allows TimeZoneInfoNotFoundExceptions to be thrown instead of NullReferenceException.
2015-03-20 09:42:34 +01:00
Zoltan Varga ad7370256c Merge pull request #1645 from myrup/master
Fixed TimeZoneInfo.Local on windows xp
2015-03-19 23:51:21 -04:00
Zoltan Varga c43e4dd749 [aot] Fix support for direct icalls in llvm mode. 2015-03-19 23:25:45 -04:00
Zoltan Varga 3fe087c453 [jit] Use unique castclass caches in all cases. Fixes #27787. 2015-03-19 22:45:49 -04:00
Zoltan Varga c3facda138 [runtime] Fix the isinst_with_cache wrapper on 64 bit platforms. 2015-03-19 22:44:43 -04:00
myrup 9abf43e02a Fixed TimeZoneInfo.Local on windows xp
Fall back to “StandardName” subkey when “TimeZoneKeyName” isn’t present.
2015-03-20 00:39:19 +01:00
Zoltan Varga e2614fc56e [sdb] Add support for TypedReferences. Fixes #28181. 2015-03-19 19:33:26 -04:00
Zoltan Varga 9a01841382 [corlib] Implement FieldInfo.SetValueDirect (). 2015-03-19 18:59:52 -04:00
Stone Gislason 12ee824f5f [eval] Allow class attributes 2015-03-19 21:50:20 +00:00
Marek Safar 939a8f904b [corlib] Return top-level parameter custom attributes when no base methods exists. Fixes #28184 2015-03-19 22:43:00 +01:00
Zoltan Varga adccb63177 [io-layer] Avoid closing std file descriptors on shutdown. Fixes #28098. 2015-03-19 17:35:46 -04:00
Marek Safar d437ea4bbc [corlib] TypedReference from reference sources 2015-03-19 22:00:11 +01:00
Marek Safar 840c5b7e41 Merge pull request #1642 from vestild/modulebuilder-definetype
[System.Reflection.Emit] fix typo in ModuleBuilder.DefineType
2015-03-19 21:45:42 +01:00
Vlad Zaitsev bd82bd3689 [System.Reflection.Emit] fix typo in ModuleBuilder.DefineType 2015-03-20 00:42:06 +05:00
João Matos 0ff25ec2d5 [mini] Small code cleanup, check for iOS host instead of Apple/ARM. 2015-03-19 18:44:40 +00:00
João Matos 86093bbe48 [windows] Fixed thread async suspend assert.
This should be asserting for 1 instead of 0, this way we actually assert that the thread was resumed.
2015-03-19 18:44:40 +00:00
João Matos 13a1b2e747 [windows] Remove some cruft used by the old Windows installer. 2015-03-19 18:44:40 +00:00
Marek Safar 375408f92a [runtime] Remove unused icall 2015-03-19 16:28:10 +01:00
Joel Martinez 6a35acd4e1 [monodoc] Added PlatformDocApi to the list of valid related sections.
The use case here is when you are documenting a managed wrapper on top of a native platform API. This related link can be used to link to the original platform documentation for that member. This lets the reader look up the semantics of the native call without you having to duplicate the documentation in the managed reference docs; leaving you to focus your energies on documenting any unique considerations when calling this managed API.

Example:
```xml
<related type="PlatformDocAPI" href="https://msdn.microsoft.com/en-us/library/system.console.writeline">Microsoft documentation for <c>System.Console.WriteLine</c></related>
```
2015-03-19 10:41:50 -04:00
Joel Martinez 1e45f99905 [monodoc] Fixed issue generating EcmaCref URLs.
If you have a URL of the form ``T:System.Collections.Generic.Dictionary`2``, it parses correctly, but the `EcmaDesc` instance returned by the parser will throw an exception if you try to call the `.ToEcmaCref ()` method. This patch resolves this issue and returns a correctly formatted URL in this instance. Unit test included.
2015-03-19 10:41:50 -04:00
Joel Martinez 89882a6776 [mdoc] Fixes an update issue with generic and non-generic members.
The existing update was not doing a good job of matching members that have both generic and non-generic members. So for example, if you had a method, `Foo<T>`, and added a non-generic version in a future update (`Foo`); you could end up with a situation where one of the members was being duplicated.
2015-03-19 10:41:48 -04:00
Sebastien Pouliot d2b1d45390 [mono-api-html] Small simplification when 'breaking' does not apply to the rendering 2015-03-19 08:33:28 -04:00
Sebastien Pouliot fccf4b6345 [mono-api-html] Include base type changes in API diffs 2015-03-19 08:32:36 -04:00
Marek Safar a0f0aa6213 [corlib] Default FieldInfo Get|SetValueDirect should throw NotSupportedException 2015-03-19 12:42:43 +01:00
Marek Safar c1bca01981 [System] Fix SafeSocketHandle race introduced in 9ae88709db.
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00014] in /Users/marek/git/mono/external/referencesource/mscorlib/system/throwhelper.cs:56
  at System.Collections.Generic.List`1[System.Threading.Thread].get_Item (Int32 index) [0x0000e] in /Users/marek/git/mono/external/referencesource/mscorlib/system/collections/generic/list.cs:199
  at System.Net.Sockets.SafeSocketHandle.ReleaseHandle () [0x00052] in /Users/marek/git/mono/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs:79
  at System.Runtime.InteropServices.SafeHandle.RunRelease () [0x00091] in /Users/marek/git/mono/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:203
  at System.Runtime.InteropServices.SafeHandle.Dispose (Boolean disposing) [0x00019] in /Users/marek/git/mono/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:171
  at System.Runtime.InteropServices.SafeHandle.Dispose () [0x00003] in /Users/marek/git/mono/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:150
  at System.Net.Sockets.Socket.Dispose (Boolean disposing) [0x0004d] in /Users/marek/git/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1168
  at System.Net.Sockets.Socket.Dispose () [0x00003] in /Users/marek/git/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1174
  at System.Net.Sockets.Socket.Close () [0x00009] in /Users/marek/git/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1185
  at System.Net.Sockets.TcpListener.Stop () [0x0000d] in /Users/marek/git/mono/mcs/class/System/System.Net.Sockets/TcpListener.cs:296
  at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StopListening (System.Object data) [0x00022] in /Users/marek/git/mono/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs:257
  at System.Runtime.Remoting.Channels.Tcp.TcpChannel.StopListening (System.Object data) [0x00013] in /Users/marek/git/mono/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs:105
  at System.Runtime.Remoting.Channels.ChannelServices.UnregisterChannel (IChannel chnl) [0x00057] in /Users/marek/git/mono/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs:463
  at MonoTests.Remoting.CallsDomainServer.Stop () [0x00012] in /Users/marek/git/mono/mcs/class/System.Runtime.Remoting/Test/BaseCalls.cs:445
  at (wrapper remoting-invoke-with-check) MonoTests.Remoting.CallsDomainServer:Stop ()
  at (wrapper xdomain-dispatch) MonoTests.Remoting.CallsDomainServer:Stop (object,byte[]&,byte[]&)
2015-03-19 10:16:28 +01:00
Zoltan Varga 29e00446a2 [corlib] Implement TypedReference:MakeTypedReference (). 2015-03-19 04:18:10 -04:00
Zoltan Varga 1361534ce0 Rename TypedReference test file to TypedReferenceTest.cs. 2015-03-19 04:15:35 -04:00
Marek Safar 561b80fb24 [corlib] Add TypedReference test 2015-03-19 09:08:02 +01:00
Zoltan Varga ec0d2d0688 [runtime] Extract mono-config-dirs.c into a separate automake convenience library so only that file depends on the MONO_BINDIR etc. defines given on the command line. This enables ccache to work on build done with different prefixes. 2015-03-19 03:22:04 -04:00
Zoltan Varga f699d17ff5 [runtime] Disable the locking of archives in libtool, it was a workaround around an old darwin bug which got fixed years ago: http://lists.gnu.org/archive/html/bug-libtool/2009-05/msg00062.html. 2015-03-19 03:20:01 -04:00
Zoltan Varga b1f0605dde [runtime] Add a new mono-config-dirs.c file which is the only one depending on the MONO_CFG_DIR etc. defines defined in metadata/Makefile.am. 2015-03-19 02:05:07 -04:00
Alex Rønne Petersen 954ddf4a88 [profiler] Fix finding methods in other domains than the current one.
In certain cross-domain scenarios, the method we're executing
is not necessarily emitted in the current domain. So we need
to scan all domains for it.
2015-03-19 01:34:08 +01:00
Alex Rønne Petersen 73bd556820 Add scripts/mono-symbolicate to .gitignore. 2015-03-19 01:33:43 +01:00
Joel Martinez 252e56b02c [mdoc] Updated csproj to target .NET 4.5 2015-03-18 15:32:38 -04:00
Stephen McConnel 49ecc710a7 Show thumbnail images in SWF.(Open,Save)FileDialog
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=28025.
2015-03-18 12:55:48 -05:00
João Matos 50b4bff820 Merge pull request #1639 from alexrp/profiler-mingw
[profiler] Don't build the profiler on Windows.
2015-03-18 16:27:28 +00:00
Alex Rønne Petersen 435c2c4467 [profiler] Don't build the profiler on Windows. 2015-03-18 17:25:27 +01:00
Marcos Henrich a769e74c53 [System] Fixed RemoveConnectionGroup concurrent issue.
CloseConnectionGroup can concurrently call RemoveConnectionGroup and remove a group that has added to removeList.
We now check that the group still exists before removing it.
Fixes #19823.
2015-03-18 14:47:42 +00:00
Marcos Henrich 086eff3d60 [System] ServicePoint.CheckAvailableForRecycling is now private. 2015-03-18 14:46:09 +00:00
Marcos Henrich 5740faf124 [System] Test ServicePoint.CloseConnectionGroup concurrent issues.
Covers #19823.
2015-03-18 14:34:26 +00:00
Marek Safar a96ca57f7f [corlib] Update mobile tests 2015-03-18 12:01:10 +01:00
Marek Safar 88a1275377 [corlib] Default Egypt calendar is gregorian. Fixes #27725 2015-03-18 12:01:10 +01:00
João Matos 940732839d Merge pull request #1637 from soimort/fix-build
Fix build on Linux and Windows
2015-03-18 09:26:14 +00:00
Mort Yao 376a9f2d88 [runtime] Fix build for Linux 2015-03-18 17:01:48 +08:00
Mort Yao 00493fa308 [runtime] Add missing semicolon in mono_rand_try_get_bytes () 2015-03-18 17:01:47 +08:00
Marek Safar 81016c43ec [corlib] Disable more remoting code for mobile 2015-03-18 09:58:58 +01:00
Marek Safar 33338af95e Revert "Fixes build"
This reverts commit 0f25e60f9c.
2015-03-18 09:58:24 +01:00
Marek Safar 0f25e60f9c Fixes build 2015-03-18 09:47:09 +01:00
Marek Safar 455dd3867c [System.Runtime.Serialization.Formatters.Soap] Updated to work with reference sources serialization 2015-03-18 09:19:35 +01:00
Zoltan Varga c338de5815 [gsharedvt] Make sure the gsharedvt method we use in class_type_info () is not partially shared. 2015-03-17 21:18:59 -04:00
Alex Rønne Petersen 796f6ccded Merge pull request #1636 from alexrp/profiler-stuff
[profiler] Redesign buffer flushing and method reporting.
2015-03-17 23:02:00 +01:00
Alex Rønne Petersen bcf59453f0 Merge pull request #1635 from alexrp/core-clr-properties
Implement CoreCLR security properties on reflection info types.
2015-03-17 23:01:50 +01:00
Zoltan Varga 6549f7ea7c [runtime] Revert part of 2e3ba21e80. 2015-03-17 17:20:13 -04:00
Atsushi Eno 51ba090596 [xlinq] add test from bug #18171 (partly). 2015-03-18 04:16:25 +08:00
Ludovic Henry 3033429e66 [threadpool] Add licensing header 2015-03-17 19:27:06 +00:00
Ludovic Henry 620c5f5e3d [threadpool] Integrate the microsoft ThreadPool into it's own System.Threading.Microsoft namespace
This will let us have both the Mono and the Microsoft ThreadPool at the same time.
To switch to the Microsoft one, set the MONO_THREADPOOL environment variable to "microsoft". It will default to the Mono one.

Support by the runtime is also implemented.
2015-03-17 19:05:04 +00:00
Ludovic Henry a4e986024f [runtime] Move random generator code out of icall, to utils so it can be used by the runtime 2015-03-17 19:03:19 +00:00
Ludovic Henry 8eda12decf [runtime] Add CPU usage utility function 2015-03-17 19:03:19 +00:00
Zoltan Varga bd22565c26 [jit] Avoid disabling direct calls to icalls on arm64+llvm. 2015-03-17 14:20:25 -04:00
Marek Safar be5a532ce0 [corlib] Bump corlib version for 8d097349b3 (icall added) 2015-03-17 19:18:27 +01:00
Marek Safar a4426f51b6 [System.Runtime.Remoting] Update internal TypeFilter levels 2015-03-17 19:18:27 +01:00
João Matos 8ac788afb3 [genproj] Re-generated the class library projects. 2015-03-17 18:15:58 +00:00
João Matos 7c4825231d [genproj] Remove System.Xml pre-processing file as it's not needed anymore.
We do not rely on jay for this anymore since the switch of System.Xml to reference sources.
2015-03-17 18:15:57 +00:00
João Matos dc1bb8c3d0 [genproj] Ignore temporary project generation inputs. 2015-03-17 18:15:57 +00:00
João Matos 13db9ed7b7 [genproj] Added support for mcs "/-getresourcestrings" switch. 2015-03-17 18:15:57 +00:00
João Matos f339f61965 [genproj] Remove non .NET 4.5 solutions from being generated. 2015-03-17 18:15:57 +00:00
Marek Safar 43065be098 [corlib] Fixes remoting response message arguments assignment 2015-03-17 17:42:11 +01:00
Marek Safar d09e8d10a5 [corlib] Keep only one remoting MessageDictionary, it's special cased in binary serialization 2015-03-17 17:03:42 +01:00
Alex Rønne Petersen ae58dce822 [profiler] Redesign buffer flushing and method reporting.
The main goal of this change is to ensure that all methods have a `TYPE_JIT`
event emitted in the stream before they are referenced in other events. Before
this change, `TYPE_JIT` events could arrive out of order or not be emitted at
all because of generic sharing.

We now use a separate thread for writing log buffers to the output file.
Whenever a method is referenced in a TLS log buffer, we add it to a TLS list of
methods. When we ship the TLS log buffer off to the writer thread, we also send
the TLS list of methods. The writer thread first goes over all the methods and,
if some of them haven't had a `TYPE_JIT` event emitted yet, emits them to a
temporary buffer which is flushed just before flushing the main log buffer.

This approach ensures that `TYPE_JIT` events will *always* come before the
events that reference them.

Bookkeeping of which methods have been emitted to the output stream is done in
a global, concurrent hash table. Before a thread adds a method to its TLS list
of methods, it checks if the method is in the hash table. If it is, we know
that the method has already been emitted to the output stream, so it isn't
added to the list. The writer thread is the only thread that updates the hash
table (which happens when it flushes the temporary method buffer). So,
eventually, all TLS method lists will end up being empty because all methods
have been emitted to the output stream.
2015-03-17 16:35:45 +01:00
Alex Rønne Petersen 481bd0d83d [profiler] Make perf syscall work on ARM64. 2015-03-17 16:35:45 +01:00
Alex Rønne Petersen 95d65503e6 [profiler] Clean up some unused declarations. 2015-03-17 16:35:45 +01:00
Alex Rønne Petersen 45045502b8 [mini] Expose mono_aot_get_method () as an API-unstable function.
This will be used by the profiler.
2015-03-17 16:35:45 +01:00
Alex Rønne Petersen b4ab5e85ac [mini] Expose an API-unstable mono_get_jit_info_from_method () function.
This will be used by the profiler.
2015-03-17 16:35:44 +01:00
Alex Rønne Petersen cdc74e07e2 [mcs] Ignore .dep_dirs-* files. 2015-03-17 16:35:44 +01:00
Alex Rønne Petersen 62e93bfda7 [configure] Add a --disable-perf-events flag to disable perf on Linux. 2015-03-17 16:35:44 +01:00
Alex Rønne Petersen 91a06cb652 [corlib] Implement security properties on FieldInfo/MethodInfo. 2015-03-17 16:32:04 +01:00
Alex Rønne Petersen 69ee842753 [coreclr] Add mono_security_core_clr_field_level () function. 2015-03-17 16:31:31 +01:00
Marcos Henrich 9ae88709db [System] Fixed SafeSocketHandle concurrency problem.
When ReleaseHandle was called by RegisterForBlockingSyscall's DangerousRelease the current thread would be in blocking_threads but there would be no blocking system call to interrupt.
2015-03-17 15:13:09 +00:00
Marcos Henrich 29dc0ae194 [runtime] Assert that thread_resume returns KERN_SUCCESS. 2015-03-17 15:13:09 +00:00
Marcos Henrich 288659611b [runtime] Fixed thread_abort_safely not interrupting accept.
For some reason accept can only be interrupted by thread_abort.
We do not want to use thread_abort by default because it may abort non-atomic operations at an arbitrary point.
The problem was fixed by calling thread_abort_safely, and make sure the target thread was interrupted by calling thread_abort afterwards.
In this change thread_abort is only called if thread_abort_safely returns KERN_SUCCESS, which *should* mean that the target thread has already left the kernel code by the time thread_abort is called.
2015-03-17 15:13:09 +00:00
Neale Ferguson e92937676c s390x-codegen.h : Fix instruction definition and add instruction format variant
mini-s390x.h : Enable profile coverage
suport-s390x.h : Add processor facility definitions
2015-03-17 10:35:21 -04:00
Alexander Kyte 9d6859ddf2 [corlib] Fixed change in 4b4ddb66b3 that prevented use of remoting fast path. 2015-03-17 10:24:47 -04:00
Marek Safar 14370f53dd [system.date] Fix DefaultValue expression serialization 2015-03-17 14:04:39 +01:00
Atsushi Eno 59267a16c4 [xlinq] add test from bug #14856. 2015-03-17 18:56:10 +08:00
Atsushi Eno ee9fd48289 [xml] add test from bug #2917. 2015-03-17 18:55:34 +08:00
Marek Safar b0e3d25ad0 [corlib] Always pass ProxyCheckCast check 2015-03-17 09:37:01 +01:00
Marek Safar 88f4e24f02 [corlib] Add missing public type 2015-03-17 09:36:39 +01:00
Marek Safar 8d097349b3 [corlib] Serialization from reference sources 2015-03-17 08:03:58 +01:00
Zoltan Varga 0605e2d596 [jit] Add exception checks after direct calls to icalls by inlining the wrapper. 2015-03-17 02:32:06 -04:00
Zoltan Varga c6576781c5 [jit] Disable direct icalls for now to fix the build. 2015-03-17 00:55:02 -04:00
Zoltan Varga ce80f5559e [jit] Split the CEE_CALLI conv into a separate switch case to simplify the logic in the CEE_CALL/CEE_CALLVIRT case. 2015-03-17 00:54:15 -04:00
Zoltan Varga 88fadaef9b [amd64] Fix aot support in throw_pending_exception (). 2015-03-17 00:05:46 -04:00
Zoltan Varga b0ad5d776d [runtime] Allocate objects outside the lock in mono_string_is_interned_lookup (). 2015-03-16 22:16:51 -04:00
Zoltan Varga d04e09ac0c Merge pull request #1633 from BrzVlad/fix-w32-pinvoke
[x86] Handle stack pop done by native stdcalls.
2015-03-16 21:34:41 -04:00
Zoltan Varga 0aeaa71f1d [jit] Add support for directly calling normal icalls. Enable it for a few perf-sensitive classes like Math. 2015-03-16 20:34:46 -04:00
Vlad Brezae bba332f502 [x86] Handle stack pop done by native stdcalls.
The problem was caused with the introduction of the pushless backend. We have to compensate for the arguments being popped by native stdcall callees, to keep param_area from shrinking. Fixes #27597
2015-03-16 14:59:32 -07:00
Zoltan Varga f45cb311c1 [aot] Enable direct calls to icalls in aot mode, disable them when the 'direct-calls' aot option is used. 2015-03-16 17:49:01 -04:00
Zoltan Varga 453e3cf5fe [aot] Remove obsolete 'iphone-abi' option. 2015-03-16 17:24:40 -04:00
Zoltan Varga 5d2973e535 [io-layer] Avoid the usage of atexit (), clean up handles normally. 2015-03-16 16:23:00 -04:00
Vlad Brezae 388e3efe0d [sgen] Write barrier nursery checks might be needed
For the case of non-concurrent collector we don't want to mark stores from the heap to the heap, since it would add sgen overhead. When aot compilling we don't know whether the GC will be concurrent or not, so we fallback to the write barrier method.
2015-03-16 12:22:05 -07:00
Vlad Brezae 149534c76c [aot] Add aot support for write barrier.
We emit two write barriers, for the case of the concurrent and non-concurrent collector in the mscorlib image. All calls to the write barrier are made through the plt, calls which are resolved according to the GC configuration at runtime.
2015-03-16 12:22:05 -07:00
Vlad Brezae 18a3d58565 [sgen] Differentiate the concurrent and nonconcurrent method wbarriers 2015-03-16 12:22:04 -07:00
Vlad Brezae f3141cbf45 [aot] Fix allocation over structure size. 2015-03-16 12:22:04 -07:00
Vlad Brezae c8b9d1e04f [jit] Handle pointers for aot separately from CEE_MONO_LDPTR 2015-03-16 12:22:03 -07:00
Vlad Brezae e2875c2180 [sgen] Remove option for unaligned nurseries. 2015-03-16 12:22:03 -07:00
Marek Safar d9dc2f64b0 [system] Update wrong test 2015-03-16 20:09:48 +01:00
Alexander Kyte 62277e8162 Added/modified tests for marshalling and remoting of referencesource StringBuilder implementation. 2015-03-16 11:42:57 -04:00
Alexander Kyte 14ec387555 [Runtime] Altered the marshalling logic for StringBuilders to handle referencesource version. 2015-03-16 11:42:57 -04:00
Alexander Kyte 9a7a39551e Revert "Revert "[corlib] StringBuilder from reference sourcers""
This reverts commit 772c45aaf9.

Conflicts:
	external/binary-reference-assemblies
	mcs/class/corlib/Makefile
	mcs/class/corlib/System.Text/StringBuilder.cs
	mcs/class/corlib/corlib.dll.sources
2015-03-16 11:42:56 -04:00
João Matos 29fc1bb5d6 [mini] Fixed the build.
Missed this one on https://github.com/mono/mono/commit/86155e72da0aa0cc1e546dd2dd5acee0db398c38.
2015-03-16 14:57:38 +00:00
João Matos a807f99a7d [runtime] Fixed thread async suspend on Windows.
Move the ResumeThread () calls out of the assert and check for 0 (which means that the thread was resumed) instead of using the Mach-specific KERN_SUCCESS on Windows.

Fixes the Windows/MSVC build.

Related to https://github.com/mono/mono/commit/296347f.
2015-03-16 13:54:43 +00:00
João Matos a1538d1687 [runtime] Added missing function mono_threads_core_interrupt on Windows. 2015-03-16 13:53:01 +00:00
João Matos 86155e72da [msvc] Renamed ResumeThread since it conflicts with a Windows function. 2015-03-16 13:50:38 +00:00
Andrey Akinshin 45d5332a0a Stopwatch: removed #if NET_4_0 for suppression of negative elapsed 2015-03-16 14:37:45 +02:00
Marcos Henrich 7b558417ac [runtime] Added function mono_process_get_times.
With the new function it is possible to retrieve other processes start, user and kernel times.
In mach start time is available without special privileges but user and kernel times still require privileges.
2015-03-16 11:44:28 +00:00
Marcos Henrich 4c600e1fc5 [runtime] Added function mono_100ns_datetime_from_timeval.
The added function is required to convert timeval to datetime ticks.
2015-03-16 11:44:28 +00:00
Marcos Henrich 6b2bf67ff9 [runtime] Added helper function sysctl_kinfo_proc.
Refactored mono_process_get_name sysctl code to use sysctl_kinfo_proc to retrieve the kinfo_proc data structure.
2015-03-16 11:44:28 +00:00
Marcos Henrich 5f8489c59a [System] Test StartTime of processes returned by GetProcesses.
Covers #26363.
2015-03-16 11:44:28 +00:00
Marek Safar f482b9bd9b [corlib] Attribute from reference sources. Fixes #27982 and similar 2015-03-16 11:01:37 +01:00
Zoltan Varga e31c6d80c6 [aot] Bump aot file format version. 2015-03-16 01:12:36 -04:00
Zoltan Varga 050520a485 [aot] Fix mono_aot_method_hash () to avoid depending on the name of the type arguments used to inflate classes. 2015-03-16 01:06:58 -04:00
Zoltan Varga 43318e0e16 Fix the cross compiler build. 2015-03-15 23:04:31 -04:00
Zoltan Varga de2bfdf78b Bump referencesource to pick up 7ce7271612320b265e3a4a42d96a779b218a9dce. 2015-03-15 22:46:54 -04:00
Miguel de Icaza addc8c1b85 Merge pull request #1617 from keneanung/OdbcCommandExceptionOnNoData
Add NoData as valid return state for Statements with params
2015-03-15 10:54:26 -04:00
Miguel de Icaza 30b99d3271 Merge pull request #1627 from mono/tooltask-fixes
[Microsoft.Build.Utilities] Make properties in ToolTask available in 4.0 xbuild
2015-03-15 10:52:07 -04:00
João Matos 77ee431aa9 Merge pull request #1628 from akoeplinger/resxresourcereader-order
[WinForms] Make ResXResourceReader enumerator return values in same order as resx
2015-03-15 09:16:45 +00:00
Zoltan Varga f2a67e6fc7 [jit] Add support for char/boolean to mini_type_get_underlying_type (). 2015-03-15 03:08:45 -04:00
Zoltan Varga c9a51b2dc6 [aot] Rename the find_extra_method... functions to find_aot_method... 2015-03-15 02:38:55 -04:00
Zoltan Varga 716bcd9e6d [jit] Fix the detection of whenever we are compiling a gsharedvt method in the presence of partial shared methods. 2015-03-15 02:17:40 -04:00
Zoltan Varga 3c0b6b8422 [runtime] Remove ldscript support, its no longer needed with explicit visibility declarations. 2015-03-14 22:08:03 -04:00
Alexander Köplinger 76a01d3500 [WinForms] Make ResXResourceReader enumerator return values in same order as resx
This fixes an issue when building dotnet/corefx and all the SR.cs files are modified
because Mono used a HashTable internally in ResXResourceReader and it returned the
elements in a different order than MS.NET.

Even though this isn't explicitly mentioned in the docs, the MS.NET implementation returns
the elements in the same order as they appear in the resx and we should do the same.
2015-03-15 02:28:56 +01:00
Zoltan Varga 5bd3e2bfc8 [jit] Set the names of the gparams used during generic sharing so it includes the type they are constrained to. 2015-03-14 16:16:46 -04:00
Zoltan Varga 7adfa541a0 Fix the build. 2015-03-14 15:12:49 -04:00
Alexander Köplinger 151383a64d [Microsoft.Build.Utilities] Make properties in ToolTask available in 4.0 xbuild
The properties were introduced with MSBuild 4.0 (e.g. https://msdn.microsoft.com/en-us/library/microsoft.build.utilities.tooltask.logstandarderroraserror(v=vs.100).aspx) and shouldn't be inside a XBUILD_12 ifdef.
2015-03-14 19:10:06 +01:00
Zoltan Varga e9aff0910f Fix the aot compiler. 2015-03-14 02:17:57 -04:00
Rodrigo Kumpera 54be6b1d53 [threading] Fix signal registration on posix. 2015-03-13 12:36:44 -07:00
Rolf Bjarne Kvinge d4490c9763 Fix spelling. 2015-03-13 18:29:55 +01:00
João Matos 5b985a4daa [aot] Wrap the commands we pass to Windows's system() in double quotes.
We need an extra set of quotes around the whole command to properly handle commands
with spaces since internally the command is called through "cmd /c.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=27899.
2015-03-13 17:14:40 +00:00
João Matos 6fc403d545 [aot] Escape the command executables with quotes to deal properly with spaces in paths. 2015-03-13 17:10:54 +00:00
João Matos 925d3844ba [aot] Ensure the LLVM tools path ends with a directory separator appropriate to the system. 2015-03-13 17:09:41 +00:00
Marek Safar 8b3440425d [system] Make httplistener to accept case insensitive protocols. Fixes #26858 2015-03-13 17:42:33 +01:00
Rolf Bjarne Kvinge cbdd18ef89 [mono-api-html] Render generic parameter constraints.
Makes changed constraints show up in diffs.
2015-03-13 16:44:55 +01:00
Marcos Henrich a4c453967e [System] Replaced static constructor with field initialisation. 2015-03-13 12:39:26 +00:00
João Matos 815e7befb3 Merge pull request #1606 from alexanderkyte/debug-finalizers
[Runtime] Added logging around finalizers
2015-03-13 09:42:22 +00:00
João Matos b61747cd90 Merge pull request #1618 from alexanderkyte/remoting-fix
[Runtime] Fixed remoting bug where too specific a type reflected.
2015-03-13 09:39:48 +00:00
Zoltan Varga 37dbebe114 [jit] Use mini_get_underlying_type () in a few places in the amd64 backend. 2015-03-13 02:41:34 -04:00
Zoltan Varga 75e58b9b5f [jit] Finish support for valuetype based sharing in JIT mode, not enabled yet. 2015-03-13 01:28:00 -04:00
Zoltan Varga 061019283b [jit] Add a new MONO_RGCTX_INFO_ELEMENT_KLASS info type and use it instead of MONO_RGCTX_INFO_KLASS on klass->element_class, the latter doesn't work with valuetype sharing. 2015-03-12 19:30:02 -04:00
Rodrigo Kumpera 777dbc17d5 [metadata] Handle denormalized value type encoding of builtins.
All primitive types have a short encoding format that avoid using
a typeref token.

It's possible to encode them in another, longer, form with ELEMENT_TYPE_VALUETYPE + a typeref token.

Up to now, this was never seen in the wild so we never supported it.

This patch allows long form encoding of primitives.
2015-03-12 18:50:22 -04:00
Rodrigo Kumpera 3af402a0d0 [threading] Fix a race condition between managed suspend/abort and GC STW.
STW and managed suspend share a lock to ensure there is only one active suspend initiator.

This originally caused a problem in the managed suspend path as it could be async suspended while it was
in the middle of the suspend protocol (check if top of stack is managed, install abort handlers, etc).

This was worked around by putting that inside a suspend critical section. The resulting code was horrible
as suspend boundaries became unstructured (yeah, pretty stupid idea on my end). Not only that but it had
a race condition.

If a thread doing managed suspend raced with a STW and lost, it would block on the global suspend lock to
finish. That thread would be blocked inside a critical section - the single thing you must not do inside one.

This could be reproduced by stressing mono/tests/sgen-new-threads-dont-join-stw.

The solution is to execute the managed suspend sequence in the same fashion as of a STW. IOW, take locks,
suspend, do stuff, maybe resume and drop locks.

The critical part is the "do stuff" one, which is different for abort and suspend, but everything else
is the same. So we wrap that into a callback and put the common parts in mono-threads. This gives
us structured locking and suspend boundaries.

This won't cause a GC to take longer to init as the critical section would block the  STW from progressing
anyways.
2015-03-12 18:50:22 -04:00
Mark Probst df1e884553 [runtime] Fix warnings. 2015-03-12 15:40:28 -07:00
Zoltan Varga 9fa5a88211 [jit] Throw the proper exception on integer overflow from div/rem if MONO_ARCH_NEED_DIV_CHECK is defined. 2015-03-12 18:19:40 -04:00
Zoltan Varga 63bd1dfcf7 [jit] Add another test for gsharedvt+vtype byref argument passing. 2015-03-12 16:54:54 -04:00
Miguel de Icaza e2f1f5cec6 Add documentation information about IRI parsing 2015-03-12 16:18:54 -04:00
Marcos Henrich 84d573e0b0 [corlib] Added exception to fail tests on non aborted system calls.
While running tests if a socket is closed while blocking system calls are pending an exception is thrown.
A socket should not be closed when a blocking system call is pending.
The purpose of the exception is to inform us when AbortRegisteredThreads is not working.
2015-03-12 18:23:56 +00:00
Marcos Henrich c3f906d975 [runtime] Check that thread_suspend returns KERN_SUCCESS.
mono_threads_core_abort_syscall no longer calls thread_abort_safely in case thread_suspend returns errors.
2015-03-12 18:23:56 +00:00
Marcos Henrich aee6b8f147 [runtime] Updated Socket_to_SOCKET to use SafeSocketHandle.
The type of field of Socket.socket was changed from IntPtr to SafeSocketHandle.
2015-03-12 18:23:55 +00:00
Rodrigo Kumpera afc0d2abe2 [aot] Better report errors when loading methods. 2015-03-12 14:09:48 -04:00
Rodrigo Kumpera 0f212a3fa4 [mono-error] When fetching the error message for native usage, include assembly, type and member fields after the message. 2015-03-12 14:08:14 -04:00
João Matos a678f96f78 [eglib] Fixed file being created without read/write permission on Windows.
This bug manifested itself as files being written to disk with 0 bytes.

Fixes the AOT compiler on Windows not working properly.

https://bugzilla.xamarin.com/show_bug.cgi?id=27900
2015-03-12 16:41:21 +00:00
Marek Safar ec4fed0076 [mcs] Don't crash after reporting missing type in type arguments of generic method run in probing mode. Fixes #27737 2015-03-12 17:24:46 +01:00
Marcos Henrich 8a3ae30450 [corlib] TimeZoneInfo.TryGetTransitionOffset overflow checks. 2015-03-12 13:13:41 +00:00
Marek Safar b736f37cc4 [system] Fixes mobile build 2015-03-12 13:24:36 +01:00
Marcos Henrich 504715b441 [corlib] Fixed DateTime overflow check in TimeZoneInfo. 2015-03-12 09:02:33 +00:00
Zoltan Varga e908e4a6be Revert "[runtime] Fix mono_class_instance_size () to work with dynamically created types."
This reverts commit 501f0aa645.

Revert this as it breaks some corlib tests.
2015-03-12 04:54:03 -04:00
Zoltan Varga 501f0aa645 [runtime] Fix mono_class_instance_size () to work with dynamically created types. 2015-03-11 21:39:25 -04:00
Mark Probst 55f1ac1bb5 [runtime] Remove unused ves_icall_type_is_subtype_of(). 2015-03-11 16:02:00 -07:00
Zoltan Varga f9eea170d1 [jit] Enable the gsharedvt testcase which now works. 2015-03-11 18:47:54 -04:00
Mark Probst adb9681393 Merge pull request #1621 from schani/fix-warnings
[runtime] Fix warnings.
2015-03-11 13:37:31 -07:00
Mark Probst 2e3ba21e80 [runtime] Fix warnings. 2015-03-11 13:28:38 -07:00
Rodrigo Kumpera e7aa80048e [io-layer] When checking if a file is a program check both read and execute permissions. Fixes #27565
The original behavior of only checking for read permission broke sudo on OSX which only have the execute permission set.
2015-03-11 12:27:20 -04:00
Rodrigo Kumpera 518dee1837 [threading] Split unwind state into sync and async.
Having a single unwind state means writes to it must be synchronized between sync and async suspend. We can't
have the state be broken as it could lead to bad unwinding or GC marking.

The original solution was to have an additional state in the self suspend path that signals it's writing to the
thread state and thus any async suspend must give up and let it finish. This ended up been overly complicated
as this requires two additional states instead.

By having a pair of unwind states both can write concurrently without the fear of clashing. This makes fetching the state
a little bit trickier but worth the trouble.

The simplified design has a much smaller state space, which is easier to reason about.
2015-03-11 12:26:37 -04:00
Rodrigo Kumpera fe784fbca9 [threading] Change request async suspend to return 3 states instead of one to account for async racing to the middle of a self suspend.
When begin async suspend lands in STATE_SUSPEND_IN_PROGRESS, the initiator don't need to perform an async suspend, it just needs to wait.

If a self suspend is promoted to an async suspend, it must be added to the pending ops set. This ensure that it will be waited otherwise
the suspend initiator might witness an unfinished self suspend and assert when fetching the thread state.

The alternative would be to change finish async suspend to account for the possibility of witnessing STATE_SUSPEND_PROMOTED_TO_ASYNC.

Solving this way requires less async suspends and doesn't increase the valid state space.
2015-03-11 12:26:37 -04:00
Rodrigo Kumpera 296347fc88 [threading] Rework suspend code to be based on a state machine and eliminate known races in the process.
The new suspend machinery is based around a single word state machine that is manipulated using CAS.

This solves the first set of problems with the current approach, the lack of atomicity and the impossibility of
doing race free manipulation of protected state. This is specially acute when doing a self suspend.
Suspend data must be atomically protected while we prepare to self suspend so a resume request won't race with the current
thread putting itself to sleep. This is a classical problem that calls for a mutex/conditional variable pair. Except that all
locks in the suspend path must be suspend safe. Wait, WHAT?

A Suspend Safe Lock is a primitive that is obstruction free in the face of the kernel suspending a thread either performing a
lock operation or waiting on a lock to become available. This, unfortunately, is not possible with pthread_mutex on OSX. The
only safe primitive are kernel semaphores, for which doesn't exist conditional variables for.

So back to locking and self-suspend. We need a lock because the existing thread state is not atomic but we can't use a
mutex/condvar pair so we're left with racy code. Yay! The fix is using CAS over a single variable.

Another change was the hardening of the suspend/resume code on posix targets. First we replace a semaphore wait with
sigsuspend for async suspend. This is needed since sem_wait is not async-signal safe (yet sem_post is). Second, we now
respect interruption requests by having a pair of suspend signals, one with SA_RESTART and one without.

Onto the design of the suspension system, a few concepts that are useful looking around.

* Self suspend: This is when the thread decides to suspend itself.

* Async suspend: This is when a thread decides to suspend another thread.

* Suspend Initiator: This the name of a thread that decided to suspend one or more other threads. This is important
since all suspending threads will notify it when they are suspended. There can be only one initiator in the system
at a given time.

* Suspension count: Number of resume calls before a thread is back to running state.

There are 7 states that can happen while a thread is runnable:

* Running: just running...

* (Async|Self) Suspended: Suspended, the difference comes into play when resuming.

* (Async|Self) Suspend Requested: Suspend requested, but not completed. See more below for the discussion on why the request state is needed.

* Suspend In Progress: Self suspend started saving its state thus async suspend should not modify it.
* Suspend Promoted to Async: Async tried to suspend a thread in the middle of a self suspend, it wants to be notified.

Now to the suspension protocol and how it happens on a high level view.

Suspension starts with a suspend request, which bumps the suspend count by one. This suspend request can be fulfilled either
by an async or self suspend action. This is confusing as there's only one initiator but any number of threads can be self suspending.

Async suspend then performs a platform specific action such as posix signals that forces a transition on the target. In the case
of self suspend, it depends on the thread polling its state and trigger the transition.

This works fine except that the suspend state is one huge struct with tons of fields. To control concurrent access to it we use a
single initiator in the case of async suspend and we put the thread in a transitional "saving my state" in the case of self suspend.

In the case of async suspend, the initiator must wait for all 1+ threads to notify back that they have suspended. Only after that
it's possible to know if the async suspend request actually worked or not (we might have hit a dying thread).

Together with this, there's an optional implementation of STW in sgen that can use this new machinery. To enable it set the
MONO_ENABLE_UNIFIED_SUSPEND env var for now while it gets more testing.
2015-03-11 12:26:36 -04:00
Marek Safar 0c5357521a [system] Fixes InvalidCastException in OpenReadAsyncCallback 2015-03-11 17:20:28 +01:00
Marcos Henrich 6173a3e162 [runtime] Replaced unsafe thread_abort calls. 2015-03-11 16:06:45 +00:00
Marek Safar a114dcdf75 [corlib] TypeDelegator from reference sources 2015-03-11 16:44:21 +01:00
Jo Shields 577482e336 [msvc] Change target MSVC release from v120 to v120_xp
They're basically the same thing, but v120 has DX10+ capabilities and v120_xp
is DX9 only. Since we're not building against DirectX, the difference is
purely academic - but changing the value to v120_xp means MSVC binaries run
on XP+, not Vista+
2015-03-11 15:23:27 +00:00
Marek Safar 115042a207 [runtime] Make read_enum_value endian aware 2015-03-11 15:52:16 +01:00
Marek Safar db7f9b7be7 [Microsoft.Build.Engine] Fix invocation flags not to contain both CreateInstance and Invoke 2015-03-11 13:33:38 +01:00
Marek Safar 7c260b6c87 [System.ComponentModel.DataAnnotations] Update test as validation attributes needs to be public 2015-03-11 13:25:41 +01:00
Jo Shields 1d33de4a70 [msvc] Refresh .def files 2015-03-11 12:06:16 +00:00
Jo Shields 7b452e2ba9 Bump winconfig.h to 4.1.0 2015-03-11 10:13:44 +00:00
Jo Shields c127ea46a3 Use MSVC2013 for *all* mono.sln dependants 2015-03-11 10:00:11 +00:00
Jo Shields 22fdb9dfb0 Add _WIN32_WINNT to Release definition, not just Debug 2015-03-11 09:48:59 +00:00
Marek Safar 8057adf2e8 [corlib] Fixes build, add missing file 2015-03-11 10:40:06 +01:00
Marek Safar 5ecee9a0c8 [corlib] Type from reference sources 2015-03-11 10:09:11 +01:00
Marek Safar a53e9778b3 [mcs] Check operator parameter types using common declaration type 2015-03-11 10:09:10 +01:00
Zoltan Varga c8ba3e9f48 [runtime] Make the size of the pseudo classes created by make_generic_param_class () the same as a valuetype with one field of the appropriate type. 2015-03-11 00:08:04 -04:00
Zoltan Varga 82fd40573c [jit] Reorganize the gshared code a bit to make it easier to add support for valuetype sharing. 2015-03-10 21:56:16 -04:00
Zoltan Varga ccaf2f6917 [jit] Handle type variables in mini_emit_stobj (). 2015-03-10 21:39:21 -04:00
Zoltan Varga 7a6cf0aceb [jit] Move some gshared related code to mini-generic-sharing.c. 2015-03-10 19:47:47 -04:00
Zoltan Varga f0ba602f11 [jit] Rename 'constrained_call' to 'constrained_class' to better reflect its type. 2015-03-10 19:43:57 -04:00
Zoltan Varga 17cb2cec62 Fix some bugs in 92ca06aa7d. Fixes #26989. 2015-03-10 17:29:14 -04:00
Zoltan Varga 14180ae433 [jit] Fix the handling of byref locals in mono_allocate_stack_slots2 (). 2015-03-10 17:29:14 -04:00
Mark Probst e28cc925ec [tests] Test case for #27147. 2015-03-10 13:55:00 -07:00
Mark Probst cd6e7ba894 [sgen] Fix a bug in 64 bit LOS cardtable scanning. Fixes #27147. 2015-03-10 12:24:30 -07:00
Alexander Köplinger ee307ef1e5 Fix the build broken in 40ba1978bc 2015-03-10 11:53:17 +01:00
Miguel de Icaza 40ba1978bc Merge pull request #977 from jasonleenaylor/bug-18558
Fix for Bug 18558
2015-03-10 14:40:33 -04:00
Marcos Henrich f220c03e04 Merge pull request #1579 from esdrubal/aotsp
Sequence points and symbolicate improvements
2015-03-10 16:33:32 +00:00
Marcos Henrich b7e8000915 Merge pull request #1612 from esdrubal/socketsh
Changed Socket to used SafeHandle instead of IntPtr.
2015-03-10 16:22:12 +00:00
Zoltan Varga 1a67a7820e Fix the build. 2015-03-10 01:28:57 -04:00
Zoltan Varga 8e4f5b9570 Fix a crash introduced by 15c813d8fd. 2015-03-10 00:36:45 -04:00
Zoltan Varga 27a8dc5fc9 [runtime] Add support for generic params with gshared constraints to mono_type_get_basic_type_from_generic (). 2015-03-09 22:07:44 -04:00
Zoltan Varga 15c813d8fd [runtime] Make the image->gsharedvt_types into an array. 2015-03-09 20:57:32 -04:00
Zoltan Varga 6e1386a78a [runtime] Handle gparams constrained to vtypes correctly in mono_class_array_element_size (). 2015-03-09 20:57:31 -04:00
Marek Safar 9df95ccd67 [system] Remove closed connection groups from service point manager. Fixes #25254 2015-03-10 00:26:13 +01:00
João Matos ea36fb88d5 Merge pull request #1620 from alexanderkyte/bug-27755
Fixed early termination of string parsing on non-space whitespace.
2015-03-09 20:39:41 +00:00
Marcos Henrich 5d9a63de3e [mono-symbolicate] make check now tests aot with and w/o .msym. 2015-03-09 19:17:21 +00:00
Marcos Henrich 9e1853076b [runtime] Added --aot option gen-seq-points-file.
.msym file is now only generated if option gen-seq-points-file is used.
2015-03-09 19:17:21 +00:00
Marcos Henrich 748bd496a0 [mono-symbolicate] Updated README to the same content as man page. 2015-03-09 19:17:20 +00:00
Marcos Henrich 06a984fc80 [mono-symbolicate] Added tool man page and script. 2015-03-09 19:17:19 +00:00
Marcos Henrich 05fd9e873c [mono-symbolicate] Replaced mcs --debug flag usage with -debug. 2015-03-09 19:17:19 +00:00
Marcos Henrich 3d96830ae0 [mono-symbolicate] Fixed wrong Directory.Exists check. 2015-03-09 19:17:18 +00:00
Marcos Henrich a9180782f3 [runtime] Updated comment with wrong corlib path. 2015-03-09 19:17:17 +00:00
Marcos Henrich 06377638be [runtime] emit_exception_debug_info no longer adds seq point flag on release. 2015-03-09 19:17:17 +00:00
Marcos Henrich f07bfe9fb3 [runtime] ves_icall_get_trace can now return a -1 IL offset.
This change was made so StackFrame dumps now show a native offset when the IL offset is unknown.
The native offset can be used by mono-symbolicate tool to retrieve an IL offset from a .msym file.
2015-03-09 19:17:16 +00:00
Marcos Henrich c47e3d5962 [mono-symbolicate] make check now also runs test with AOT. 2015-03-09 19:17:15 +00:00
Marcos Henrich f2b8e2a936 [mono-symbolicate] Tool is now using .msym files with AOT.
With AOT sequence points are stored in a .msym file.
As the sequence point data is not avaible at run time, AOT stack traces display a native offset.
mono-symbolicate tool is now able to retrieve an IL offset from a method name, native offset, and the data stored on the .msym file.
The IL offset can then be use to retrieve a filename and line from a .mdb file.
2015-03-09 19:17:15 +00:00
Marcos Henrich 707c481cd0 [corlib] Added icall System.Diagnostic.StackFrame.GetILOffsetFromFile.
This method is required by the tool mono-symbolicate.
2015-03-09 19:17:14 +00:00
Zoltan Varga 1acd65dc65 Disable SecurityFrame, the runtime code in declsec.c creates cross-domain references which cause GC crashes when running the System.Web testsuite. 2015-03-09 15:15:04 -04:00
Marcos Henrich dfaa57f513 [runtime] Moved some seq point code from mono/mini to mono/metadata.
Created files metadata/seq-points-data.c and .h.
Sequence points data structures were moved to metadata so we can perform icalls on them.
2015-03-09 19:03:35 +00:00
Marcos Henrich 345e2f50f0 [runtime] AOT now uses file to store release mode sequence points.
Sequence point data is now stored in a .msym file.
This change removes the sequence points memory overhead from assemblies to be deployed on devices.
2015-03-09 19:03:35 +00:00
Marcos Henrich 91553a5cd1 [runtime] Added SeqPointData used to write/load sequence points. 2015-03-09 19:03:35 +00:00
Marcos Henrich 19b513f9df [runtime] Improved seq_point_info_write/read has_debug_data encode. 2015-03-09 19:03:35 +00:00
Marcos Henrich 56383167fe [mono-symbolicate] Changed files to use new tool name. 2015-03-09 19:03:34 +00:00
Marcos Henrich 7c5b81f99b [symbolicate] Renamed symbolicate to mono-symbolicate.
Renamed the tool to a name that will not conflict with other installed tools.
2015-03-09 19:03:34 +00:00
Marcos Henrich d17b393e11 [runtime] Fixed Process.GetProcesses ().
Process.GetProcesses () was not returning any processes.
2015-03-09 17:40:31 +00:00
Alexander Kyte 4e6a94e2a4 [Remoting] Fixed remoting bug where too specific a type reflected. 2015-03-09 13:07:39 -04:00
Alexander Kyte c49d92bff9 [Remoting] Moved helper methods from CAD call class to parent class to enable remoting fix. 2015-03-09 13:07:27 -04:00
Alexander Kyte 2d0a5da8b4 Fixed early termination of string parsing on non-space whitespace. 2015-03-09 12:41:02 -04:00
João Matos 6397c8da1d Merge pull request #1622 from akoeplinger/fix-datetime-test
[corlib] Fix timezone dependent DateTimeOffset test
2015-03-09 14:23:56 +00:00
João Matos 05c587cb39 [runtime] Fixed Windows mono_threads_core_get_stack_bounds to work with cross-compiled targets. 2015-03-09 14:22:01 +00:00
Alexander Köplinger bb3bc6ddc9 [corlib] Fix timezone dependent DateTimeOffset test
Instead of trying to recreate the date with the current timezone, we should make the date assume UTC and compare against that.
2015-03-09 10:21:49 -04:00
Alexis Christoforides 22d5581e87 [DataContractJsonSerializer] Allow abstract base classes in lists. Fixes #26998
Abstract classes can still have subclasses with KnownType attributes, which are allowed in deserialization.

This used to work as the '__type' hint  was always honored no matter the type, and broke with https://github.com/mono/mono/commit/71e152accc727089faffa6b4fd6bf58cb62636cf which removed that behavior.
2015-03-09 01:23:27 -04:00
Alex Rønne Petersen 98f62a74f8 Merge pull request #1619 from akoeplinger/flaky-dataflow-test
[Dataflow] Disable flaky FaultExecutingConsume () test
2015-03-08 22:05:47 +01:00
Alexander Köplinger 2b5da76670 [Dataflow] Disable flaky FaultExecutingConsume () test
It fails randomly on Jenkins and my own CI. To reproduce, just wrap the body of the test in while(true) and run for a few minutes.
I tested on MS.NET as well and it fails the same way there, so it's not Mono's implementation of Dataflow.

Filed https://bugzilla.xamarin.com/show_bug.cgi?id=27757 for tracking.
2015-03-08 21:51:48 +01:00
Zoltan Varga 03f9477d60 [jit] Rename MonoGenericParam->serial to 'gshared_constraint', use it to calculate object sizes/layouts correctly if a generic param matches a non-reference type during gsharing. 2015-03-07 22:59:34 -05:00
Miguel de Icaza f1ad4d5bee [UnixRegistry] Fix leak (#25559), remove races.
There was a memory leak caused by not having a lookup mechanism for
the RegistryKey.  In addition, the entire code to dispose code was
never used (due to the leak), and it was wrong.

In addition, added locking to the "values" field, which currently was
racy.

No test cases, the repro is to run the above code for about 5 minutes.
2015-03-06 21:18:51 -05:00
João Matos 4f458a4ff7 Enable x86 cross compilation on Windows. 2015-03-06 18:15:37 +00:00
João Matos 8bdbe69fd7 Do not try to use the native GCC linker when targeting Android from Windows. 2015-03-06 17:42:36 +00:00
João Matos 635fe7a37d Fixed Windows system commands calls with non-ASCII paths.
This is a bit of an hack but it works for now... ideally we should be processing the Unicode command line flags passed by the CRT at startup instead of trying to convert the MBCS string to a wide string.
2015-03-06 17:42:36 +00:00
Sebastien Pouliot 9c38772f09 Remove the EXPORT ciphers and related code path
That was still useful in 2003/2004 but the technical and legal landscape
    changed a lot since then. Removing the old, limited key size, cipher
    suites also allow removed additional parts of the code that deals with
    them.
2015-03-06 10:35:27 -05:00
Sebastien Pouliot b371da6b2d Remove the client-side SSLv2 fallback.
There's almost no SSLv3 web site left so a v2 fallback is only extra
    code we do not need to carry forward.
2015-03-06 10:34:59 -05:00
Sebastien Pouliot 1509226c41 TLS protocol: add handshake state validation 2015-03-06 10:34:14 -05:00
Miguel de Icaza 48992d4b3f Merge pull request #1155 from steffen-kiess/json-string
Fix System.Json string handling and make order of JsonObject entries deterministic
2015-03-06 09:47:56 -05:00
Zoltan Varga 0a968edad3 [jit] Use mini_get_underlying_type () in one more place. 2015-03-05 17:59:42 -05:00
Zoltan Varga c89496c89f [jit] Add a make target for running the jit tests without the nunit output wrapper. 2015-03-05 17:53:55 -05:00
Zoltan Varga 29fce2eda9 [jit] Use mini_get_underlying_type () in a few more places. 2015-03-05 17:46:10 -05:00
Zoltan Varga 181093864f [runtime] Remove the usage of MONO_INTERNAL, use MONO_API to mark exported functions and -fvisibility=hidden to exclude everything else. 2015-03-05 17:06:29 -05:00
Zoltan Varga d7da3b09a1 [runtime] Remove the usage of MONO_INTERNAL, use MONO_API to mark exported functions and -fvisibility=hidden to exclude everything else. 2015-03-05 16:02:21 -05:00
Rodrigo Kumpera 64058140ee [loader] If probing for a pinvoke fails, log the error mono_dl_symbol gives us.
We used to swallow the error, which is unhelpful.

The reason for that might be because we probe multiple names before giving up but
even then, it's ok log all attempts. It will make troubleshooting easy, even if we
have to go through a lot more log entries.
2015-03-05 15:12:36 -05:00
Zoltan Varga 53406a1e0c [sdb] Avoid asserts on darwin when the thread deregistration code is ran from a pthread dtor. Fixes #27697. 2015-03-05 15:02:28 -05:00
Zoltan Varga f1b172fc2d [runtime] Fix byref out marshalling of arrays with a size parameter. Fixes #27614. 2015-03-05 14:24:50 -05:00
Sebastien Pouliot f2e21ed3fa [tests] IPInterfaceProperties DNS address does not currently work on iOS devices (since it read /etc/resolve.conf). Ignore it for XI until #27707 is fixed 2015-03-05 14:03:04 -05:00
Marek Safar 25a486ee92 [corlib] BaseType of by-ref types is null 2015-03-05 18:41:19 +01:00
Miguel de Icaza 64c50872d7 [System.ServiceModel.Web/WebMessageFormatter] Fix OperationContracts with void returns
WebMessageFormatter crashes when the OperationContracts had a void return type.

Fixes #20764, patch from <[email protected]>
2015-03-05 11:33:26 -05:00
keneanung aa3de31b70 Add NoData as valid return state for Statements with params
When using stements with parameters, the OdbcCommand would throw an exception
on ExecSQL when no row was returned. The commit adapts the change done in
5264613b6d for the case of unprepared statements
without parameters.
2015-03-05 17:08:04 +01:00
Marek Safar 65dba595ea [corlib] Enum from reference sources 2015-03-05 14:37:09 +01:00
Marek Safar 13c1275569 Merge pull request #1615 from akoeplinger/fix-consolelogger-race
[Microsoft.Build.Enginge] Fix race in ConsoleLogger
2015-03-05 07:42:38 +01:00
Marek Safar 518c3bcac5 Merge pull request #1614 from akoeplinger/fix-memorycache-tests
[System.Runtime.Caching] Make some MemoryCache tests more reliable
2015-03-05 07:41:19 +01:00
Alexander Köplinger aeffabc10f [Microsoft.Build.Enginge] Fix race in ConsoleLogger
This occasionally made the BasicManualParallelBuilds test fail on Jenkins.
2015-03-05 03:46:50 +01:00
Zoltan Varga ac75172a00 [build] Avoid redefining clean target in mcs/class/Makefile. 2015-03-04 20:09:22 -05:00
Zoltan Varga 54f7682968 [jit] Add a new mini_get_underlying_type () function which handles byref, enums, native types, and generic sharing. Use it in places where possible. 2015-03-04 20:03:30 -05:00
Alexander Köplinger e5cf24acde [System.Runtime.Caching] Make some MemoryCache tests more reliable
After MemoryCache was imported from referencesources, some tests started
failing occasionally. Cross-testing on MS.NET showed that you need to
access the cached item to make MemoryCache.GetCount() reliably return the
correct number after an item was expired from the cache.

Also removed __MonoTimerPeriod and __MonoEmulateOneCPU configuration variables,
they were used in Mono code before and don't make sense with the new code.
2015-03-04 13:46:04 -08:00
jason_naylor 60ef531176 Fix for the XMLSerializer bug 18558
* Find the type map element that is the most-specific to the
  object in question, not the first type it is an instance of

Change-Id: I1867e790bf9f377ce0ae02871f4561b760e27624
2015-03-04 10:25:37 -06:00
jason_naylor 6b74a2814f Test to reveal defect in XmlSerializer (Bug 18558)
Given the test data in this patch the wrong element name
is used when serializing TestSerializeSecondType

Change-Id: I8aff732dfd22f4f654fb42f2d3b987d7ce58d600
2015-03-04 10:25:12 -06:00
Atsushi Eno 6fdc2ecf07 Remove old System.Xml.Linq code. 2015-03-04 23:47:57 +08:00
Marek Safar 50db473790 [system.xml] Clean up build output 2015-03-04 13:45:25 +01:00
Atsushi Eno 9dc2beb577 bump referencesource, bring in the fix for bug #27258. 2015-03-04 20:28:13 +08:00
Marcos Henrich 120351d4f5 [System] Replaced while loop logic with an if.
The while loop is unnecessary because Interlocked.CompareExchange in this case already guarantees that blocking_threads is not null.
2015-03-04 12:22:40 +00:00
Atsushi Eno 7964743ae0 Merge pull request #1613 from atsushieno/import-system-xml-linq
Import System.Xml.Linq from referencesource.
2015-03-04 16:05:42 +08:00
Atsushi Eno 60bc3cd67f Merge branch 'master' into import-system-xml-linq 2015-03-04 12:59:51 +08:00
Atsushi Eno 51c8433b18 bump referencesource. 2015-03-04 12:58:42 +08:00
Atsushi Eno 854a2fba5f XLinq in referencesource depends on S.R.Serialization. 2015-03-04 11:44:16 +08:00
Atsushi Eno c90c434b8d Merge branch 'master' into import-system-xml-linq 2015-03-04 11:44:07 +08:00
Miguel de Icaza 23625eff75 [Registry] Revert 826060172f until I fix the regression 2015-03-03 21:59:07 -05:00
Zoltan Varga d651e3d670 Fix Microsoft.Build tests which got broken by some newline changes in ef380e3712. 2015-03-03 19:11:36 -05:00
Zoltan Varga eb2bd2c1a8 Fix make dist. 2015-03-03 17:48:08 -05:00
Miguel de Icaza 1b7f975ba1 Style consistency with the rest of Mono's code 2015-03-03 17:26:23 -05:00
Zoltan Varga 34cdab89ff [build] Delete class/lib/$(PROFILE) on clean. 2015-03-03 16:55:31 -05:00
Zoltan Varga f88248ee17 [jit] Really enable partial generic sharing. 2015-03-03 16:46:37 -05:00
Alexander Köplinger 588046144a appveyor.yml: switch away from unstable image and simplify script
The unstable image seemed to cause problems recently.
We should just use the default image and fetch Cygwin ourselves.

Also added caching of the Cygwin files and simplified the script a bit.
2015-03-03 22:35:36 +01:00
Miguel de Icaza 826060172f [UnixRegistry] Fix leak (#25559), remove races.
There was a memory leak caused by not having a lookup mechanism for
the RegistryKey.  In addition, the entire code to dispose code was
never used (due to the leak), and it was wrong.

In addition, added locking to the "values" field, which currently was
racy.

No test cases, the repro is to run the above code for about 5 minutes.
2015-03-03 16:19:37 -05:00
Zoltan Varga ef380e3712 Rename Managed.Windows.Forms to System.Windows.Forms for consistency. 2015-03-03 15:59:16 -05:00
Zoltan Varga 837b034d76 [jit] Enable partial generic sharing when not using AOT as an experiment. 2015-03-03 15:27:11 -05:00
Atsushi Eno a314eac67e Remove old System.Xml sources. bye bye. 2015-03-04 03:31:00 +08:00
Alexander Kyte 06163ca774 [Runtime] Added logging around finalizers 2015-03-03 14:17:14 -05:00
Atsushi Eno cfa8bc07f6 import System.Xml.Linq from referencesource. 2015-03-04 02:40:49 +08:00
Marek Safar ce10d3b2be [corlib] Peek to attribute import from reference souces 2015-03-03 17:50:58 +01:00
Marek Safar 74793c47ab [corlib] Apply activation attributes for IsContextful types only 2015-03-03 17:50:58 +01:00
João Matos b91712816c Support multiple options when processing the AOT flag "ld-flags". 2015-03-03 16:29:08 +00:00
Marcos Henrich d26501a4d9 [runtime] Implemented mach and windows mono_threads_core_abort_syscall.
call_cancel_blocking_socket_operation relies on mono_threads_core_abort_syscall which will now work on mach and windows.
2015-03-03 16:07:44 +00:00
Marcos Henrich 7f5126dfaa [System] Moved blocking system calls logic to SafeSocketHandle.
All the blocking system calls are now registered.
SafeSocketHandle.ReleaseHandle now aborts system calls before closing the socket.
2015-03-03 15:33:51 +00:00
Atsushi Eno 8e3da5fe7c Update expected error message to match System.Xml referencesource. 2015-03-03 22:43:22 +08:00
João Matos ef2db766e2 Merge pull request #1611 from mono/akoeplinger-patch-1
Readme: add badges for armel/armhf and split off community supported archs
2015-03-03 14:40:32 +00:00
Alexander Köplinger 8ac85a3121 Readme: add badges for armel/armhf and split off community supported archs 2015-03-03 15:06:18 +01:00
Marek Safar a1487060c0 [corlib] Activator from reference sources 2015-03-03 14:28:34 +01:00
Atsushi Eno e9ef998703 Merge pull request #1608 from atsushieno/import-system-xml-4
Import large chunk of System.Xml sources from referencesource.
2015-03-03 20:04:43 +08:00
Zoltan Varga 1a679a64fc [aot] Fix thumb support with separate llvm modules. 2015-03-02 22:37:43 -05:00
Zoltan Varga bc849e04bc [arm] Fix support for backward branches in mono_arm_get_thumb_plt_entry (). 2015-03-02 22:37:20 -05:00
Zoltan Varga ec67acc7ae Disable bug-Xamarin-5278.exe for now to make the build green again, it was broken by 5d26590e79. 2015-03-02 20:39:01 -05:00
Zoltan Varga 65c4728162 Revert some accidental changes in c00a4c8003. 2015-03-02 20:20:53 -05:00
Zoltan Varga c00a4c8003 [runtime] Fix the non-loaded llvm build. 2015-03-02 20:16:15 -05:00
Rodrigo Kumpera 49d81f6c73 Merge pull request #1610 from madewokherd/decimalbuild
Rename decimal functions to not conflict with win32 versions.
2015-03-02 14:26:09 -06:00
Vincent Povirk 8ea6384117 Rename decimal functions to not conflict with win32 versions. 2015-03-02 14:19:09 -06:00
Atsushi Eno e7da0c1319 Merge branch 'master' into import-system-xml-4 2015-03-03 03:46:39 +08:00
Zoltan Varga 13685c2326 [build] Add the assemblies in LIB_REFS to LIB_MCS_FLAGS automatically to reduce duplication. 2015-03-02 14:03:56 -05:00
João Matos fa5e78a8d7 Merge pull request #1609 from iainx/build-cov-for-osx
[COV] Set the correct link flags for OS X
2015-03-02 16:08:40 +00:00
Iain 07654fb2ea [COV] Set the correct link flags for OS X
Cov needs to be linked using the flat namespace on OS X, the same way that proflog is linked or else it won't do anything.
2015-03-02 15:51:10 +00:00
Marcos Henrich 5194d5689e [System] Socket.socket is now a SafeSocketHandle. 2015-03-02 14:32:53 +00:00
Marcos Henrich ecf83bcb93 [System] Added SafeHandle overloads for Socket icalls.
Using a SafeHandle overload avoids handle reuse.
2015-03-02 14:32:52 +00:00
Marcos Henrich fe767bf2c7 [System] Added SafeSocketHandle.cs.
Added an implementation of SafeHandle that will be used by System.Net.Sockets.Socket to store socket handles.
2015-03-02 14:32:50 +00:00
Atsushi Eno 510710e423 take out ThisAssembly from SR.cs, conflicts with the one in Sys.Data. 2015-03-02 21:32:07 +08:00
Marek Safar 31afb2659c [mcs] Handle string constants inside interpolated string expression. Fixes #27533 2015-03-02 14:19:37 +01:00
Jo Shields 2175d73ac6 Add net_4_5_parallel_dirs to SUBDIRS, so it's included in "make dist" 2015-03-02 12:58:52 +00:00
Atsushi Eno 2fc5471e11 fix build; I only updated Consts.cs, not Consts.cs.in... 2015-03-02 19:35:32 +08:00
Atsushi Eno 751ecd3e5b [xml] take out some types in Dummy.cs to better source files. 2015-03-02 19:12:39 +08:00
Atsushi Eno 20cfe2e4c1 XML error messages has changed again now that they are from referencesource. 2015-03-02 19:11:54 +08:00
Marek Safar e17e4f170e [mcs] Add cloning to string interpolation expressions. Fixes #27525 2015-03-02 10:16:48 +01:00
Atsushi Eno 4bdf5defdd Add referencesource's [InternalsVisiblTo] attributes in System.Xml.dll. 2015-03-02 11:36:45 +08:00
Atsushi Eno 331e521fdc [xml] Fix dropped lines in Makefile during merge. 2015-03-02 11:36:45 +08:00
Atsushi Eno 55d49237d0 Fix mobile build wrt. Res classes. 2015-03-02 11:36:44 +08:00
Atsushi Eno c646ba01a3 Add referencesource-based message strings to the build.
It should be using RESOURCE_STRINGS, but mcs doesn't support its special
option for string resources for multiple files.

The resource .cs files are generated by genresstringcs.sh, but System.Xml.txt
contains some bogus characters that prevents source generation, so after
the tool has generated the sources, I manually fixed them.
It won't matter once mcs supports the option for multiple files anyways.
2015-03-02 11:36:44 +08:00
Atsushi Eno 0763126f4b [xml] update message resources for referencesource. 2015-03-02 11:36:43 +08:00
Atsushi Eno 4e2bd09616 Update all mcs errors expected messages for referencesource changes. 2015-03-02 11:36:43 +08:00
Atsushi Eno b91781b08f Fix regression in mcs/tools/mdoc by giving referencesource-based message.
(The error message is actually created by ourselves.)
2015-03-02 11:36:43 +08:00
Atsushi Eno 91657324d6 [mdoc/Test] add missing DTD.
With referencesource, the XmlReader now requires the DTD in SYSTEM
declaration to exist. So just add the DTD.
2015-03-02 11:36:43 +08:00
Atsushi Eno 47e8337395 [msbuild] fixing referencesource import "regression".
It is about insignificant whitespace handling difference.
2015-03-02 11:36:42 +08:00
Atsushi Eno cae1f99ef8 [Xml] another human readable exception message. 2015-03-02 11:36:42 +08:00
Atsushi Eno 82b6e115cc [Xml] fix regression in winforms tests.
ResXResourceReaderTest checks that the argument file is in the error
message. We only have stub messages so far, hence it "regressed".
2015-03-02 11:36:42 +08:00
Atsushi Eno b40dd06602 [WCF] fix mobile builds. Mono.Xml.XPath is gone. 2015-03-02 11:36:42 +08:00
Atsushi Eno 94f667b1f3 [Xml] add mobile XslCompiledTransform implementation.
XslCompiledTransform doesn't work without CodeDom and dynamic code
generation. This "implementation" just dispatches everything to XslTransform.
2015-03-02 11:36:42 +08:00
Atsushi Eno 281e3c0a11 [Xml] Removed XslCompiledTransform and co. Now monodroid builds.
It will be added as mere alias of XslTransform as mono used to do.
2015-03-02 11:36:41 +08:00
Atsushi Eno e7b1d9d96e [Sys.Xml] first onging mobile build work. It does NOT build for mobiles now.
Removed Configuration dependencies and codegenerator parts in XmlSerializer
as well as switching CodeIdentifier implementation to old mono stuff
as referencesource totally depends on CodeDom (mono doesn't).
2015-03-02 11:36:41 +08:00
Atsushi Eno 8d2cf588c9 [Xaml] fix EOL handling in tests. referencesource emits LF. 2015-03-02 11:36:41 +08:00
Atsushi Eno 6d3edb6643 [Sys.Xml] give understandable message and arguments for Xml_WrongToken. 2015-03-02 11:36:41 +08:00
Atsushi Eno 77c316c520 [XLinq] fix some "regressions" caused by referencesource switch.
EOLs are platform dependent on referencesource.

Turn NotDotNet into Ignore (as we're also importing buggy implementation).
2015-03-02 11:36:40 +08:00
Atsushi Eno 848916fb2b [S.R.Serialization] explicitly add MS serialization schema if it's not in the set. 2015-03-02 11:36:40 +08:00
Atsushi Eno 3c4c9e5759 [Sys.Xml] swap xmlns:xsd and xmlns:xsi in serialized xml to remove "regression".
The order of those namespaces are insignificant, and the latest
combination of mono corlib (partly referencesource-d) and sys.xml
(referencesource except for XmlSerializer) caused this implementation
glitch.
2015-03-02 11:36:40 +08:00
Atsushi Eno 27d469af0d [Sys.Data] fix wrong test in XmlDataDocument.
This doesn't match .NET behavior.
(Found by referencesource import, verified w/ .NET 4.5.)
2015-03-02 11:36:40 +08:00
Atsushi Eno 81e07b6e1a [Sys.Data] Fix tests regarding XmlTextWriter EOL handling.
MS referencesource changed XmlTextWriter behavior regarding EOL so that
now it preserves CRLF as is, instead of replacing them with
XmlWriterSettings.NewLineChars (mono implementation behavior).

There are some tests that depend on old behavior. The entire points of
those XmlDataDocument tests are not about checking EOLs, so just replace
the test XML file to not contain CRLF.
2015-03-02 11:36:39 +08:00
Atsushi Eno ff9d202ceb [Sys.Data] fix DOM event order related issue caused by referencesource.
There is implementation mismatch in XmlDocument event order regarding
Load(). Take this code:

	string xml = "<root><child>1</child></root>";

	var doc = new XmlDocument ();
	doc.NodeInserted += (o, e) =>
		Console.WriteLine (e.Node.NodeType + e.Node.LocalName);
	doc.LoadXml (xml);

This is mono output before referencesource:

	Text#text
	Elementchild
	Elementroot

This is with referencesource:

	Elementchild
	Text#text
	Elementroot

So, there are event order differences in our two implementations.

Now, XmlDataDocument depends on those XmlDocument events to fill DataRow
values. It worked fine with pre-referencesource System.Xml model, but
with referencesource it skipped to fill data row values.

This change makes sure to fill data row values from text node which are
added _after_ the parent node is added to the document.
2015-03-02 11:36:39 +08:00
Atsushi Eno fd25cd14ca [System.Data] fix another NRE that was exposed by referencesource. 2015-03-02 11:36:39 +08:00
Atsushi Eno e8fa9b5229 [System.Data] MS implementation doesn't expect CRLF on *nix. Use Env.NewLine. 2015-03-02 11:36:39 +08:00
Atsushi Eno a5ea493bdd [System.Data] MS implementation does NOT expect CRLF in the output on *nix. 2015-03-02 11:36:39 +08:00
Atsushi Eno eb71b01513 [System.Data] fix NRE that was exposed by referencesource. 2015-03-02 11:36:38 +08:00
Atsushi Eno e7d2a05791 update dummy messages to somewhat understandable values. 2015-03-02 11:36:38 +08:00
Atsushi Eno 4990b4c47b First step to import referencesource System.Xml.
It is not simply replacement because we have to workaround dynamic codegen
for Xamarin.iOS.

Also there were several tests failing with MS implementation (e.g. for
W3C DOM conformance), so we had to disable them.

There is one regression that rather needs to be fixed in Reflection.Emit.

Also, some WCF tests fail with this implementation. They need to be
investigated, reviewed and appropriately fixed.
2015-03-02 11:36:38 +08:00
Zoltan Varga b862ff8acc [jit] Rename mini-llvm.h to mini-llvm-loaded.c and make it a non-header file. 2015-03-01 22:15:09 -05:00
Zoltan Varga e71fdeef4c [runtime] Fix the loadable llvm build. 2015-03-01 18:36:26 -05:00
João Matos b8467ef0dd Merge pull request #1514 from directhex/master
Workaround for X509Certificate.RSA throwing an unhandled exception
2015-03-01 20:36:42 +00:00
Zoltan Varga 2d8af16663 [jit] Move aot method loading to mono_jit_compile_method_with_opt (). 2015-03-01 00:47:02 -05:00
Zoltan Varga 880fb9c3eb [jit] Remove some dead code/includes. 2015-03-01 00:17:38 -05:00
Zoltan Varga 83e2223403 [runtime] Split mini.c into two files: mini.c contains the JIT code, while mini-runtime.c contains the runtime code, i.e. startup/shutdown, threading, tls, etc. 2015-03-01 00:03:07 -05:00
Zoltan Varga f6ea703e09 Fix a warning. 2015-02-28 22:56:31 -05:00
Zoltan Varga ac637b0fa1 [build] Avoid changing System.Xml.Linq references to System.XML.Linq during parallel build dependency calculation. 2015-02-28 20:56:52 -05:00
Zoltan Varga 0b4533dd59 [jit] Remove some dead code. 2015-02-28 17:01:28 -05:00
Zoltan Varga 4cd6718bf6 Merge pull request #1607 from davidmoore1/bug-27529
Bug 27529 Tool Tip appears behind menu
2015-02-28 16:19:26 -05:00
David Moore f3ff59749f Bug 27529 Tool Tip appears behind menu
In certain cases, hovering over a ToolStripMenuItem
that has a tool tip defined will result in the tool
tip appearing behind, and hidden by, the context
menu containing the item.  The change is to cause
the tool tip to be pushed to the front when it is
displayed.
2015-02-28 11:00:05 -05:00
Jo Shields d53ed1c8f8 Workaround for X509Certificate.RSA throwing an unhandled exception in ASN1 parsing of certificates with ECC public keys only. 2015-02-28 12:48:49 +00:00
Zoltan Varga 3ceb869495 [bcl] Enable parallel build for parts of the 4.5 class libs/tools. 2015-02-27 19:46:29 -05:00
Zoltan Varga d5fcd29868 [llvm] Increase the size of a parameter array which was too small for some arm64 calling conventions. 2015-02-27 13:33:30 -05:00
Marek Safar c47a456d29 [Microsoft.Build.Engine] Update missing method exception type 2015-02-27 19:08:33 +01:00
Marek Safar 001c0d17eb [corlib] Throw correct exception for missing properties called via InvokeMember 2015-02-27 18:59:43 +01:00
João Matos 5927ede215 Added "ld-flags" to pass extra linker flags to the AOT linker pipeline. 2015-02-27 17:26:23 +00:00
Rodrigo Kumpera ec8a06433f Remove explicit support for 2.0, it will now use 4.5 2015-02-27 11:07:27 -05:00
Marek Safar 4f23050db1 [mcs] Better error reporting for wrong unexpected escaped characters. Fixes #27441 2015-02-27 16:57:35 +01:00
Zoltan Varga c947640d2a Merge pull request #1605 from iainx/cov-install-coverage-filter
Check the coverage hash exists before accessing it
2015-02-27 10:41:07 -05:00
iain holmes 7ce0c7c9bb Check the coverage hash exists before accessing it
If a profiler has not installed a coverage filter, or the coverage filter has returned FALSE, then calls to mono_profiler_coverage_get trigger a assertion failed warning in g_hash_table_lookup.
2015-02-27 15:28:31 +00:00
Zoltan Varga f4e7da7e0c Merge pull request #1604 from iainx/cov-install-coverage-filter
[cov] Install a coverage filter
2015-02-27 10:25:02 -05:00
Marek Safar 9b4e5bb49b [corlib] Implement Activator invocation on params constructor with conversion from object 2015-02-27 14:43:25 +01:00
Zoltan Varga 8b43cc0761 Merge pull request #1603 from iainx/coverage-null-protect
Check for valid coverage info before dereferencing it.
2015-02-27 08:07:48 -05:00
iain holmes 5e9bbbc27e Check for valid coverage info before dereferencing it.
If a profiler had requested MONO_PROFILE_COVERAGE events and not installed a
coverage filter, then the coverage info is NULL and a crash quickly followed
2015-02-27 12:35:40 +00:00
Marek Safar 2ec7528ec5 Bump reference sources to fix #27492 2015-02-27 13:13:01 +01:00
Marek Safar 23603fe1bd [corlib] Add DefaultDllImportSearchPathsAttribute 2015-02-27 13:02:35 +01:00
Marek Safar 5d26590e79 [corlib] Binder from reference sources 2015-02-27 12:06:17 +01:00
Marek Safar 739afc39be [build] Use resource strings for library builds only 2015-02-27 11:35:05 +01:00
iain holmes e91693fbb8 [cov] Install a coverage filter 2015-02-27 10:13:54 +00:00
Zoltan Varga 2656bf0cc7 [build] Fix a bug in 37983f7fc3. 2015-02-26 23:30:35 -05:00
Zoltan Varga 37983f7fc3 [build] Add dependency information for class libraries using a LIB_REFS variable which lists the assemblies a given assembly depends on to build. 2015-02-26 22:27:27 -05:00
Zoltan Varga 5cf4cbde3a [bcl] Remove some net 1.0 stuff from Makefiles. 2015-02-26 18:06:29 -05:00
Zoltan Varga c38f5406a7 Merge pull request #1602 from cdettmering/master
Fixing ToolStripManager.RevertMerge
2015-02-26 17:54:40 -05:00
Chad Dettmering 9fe0952221 Fixed up formatting to comply with Mono coding guidelines 2015-02-26 17:47:03 -05:00
Chad Dettmering 2550e73081 Changed System.Windows.Forms.ToolStripManager.RevertMerge to return
false when given a null argument instead of throwing an exception.
According to the msdn here:
https://msdn.microsoft.com/en-us/library/b4e35dwy%28v=vs.110%29.aspx
this method should never throw an exception. This was also confirmed
with the official Microsoft runtime.

This change is released under the MIT license.
2015-02-26 17:31:49 -05:00
Zoltan Varga 4c9cd80099 [jit] Disable direct calls to icalls when using llvm, llvm can't handle direct calls to 64 bit addresses (tests/jit-float.exe fails). 2015-02-26 15:18:56 -05:00
Rolf Bjarne Kvinge 6fe661159c Ignore a few decimal tests on mobile, according to #27269
https://bugzilla.xamarin.com/show_bug.cgi?id=27269
2015-02-26 20:01:06 +01:00
Zoltan Varga d32a4bd512 [runtime] Use mono_set_pending_exception () in some places in icalls. Avoid using it for throwing exceptions returned by mono_thread_execute_interruption (), since that seems to cause problems. 2015-02-26 13:08:34 -05:00
Zoltan Varga 690183aa08 [runtime] Disable the "bridge-implementation=tarjan,major=marksweep-conc|ms-conc-tarjan-bridge" sgen tests which currently fail. 2015-02-26 12:57:14 -05:00
Rolf Bjarne Kvinge d79c519b39 Don't use _NSGetEnviron on arm64. 2015-02-26 13:55:30 +01:00
Rolf Bjarne Kvinge 1dbe593001 Restrict IOKit usage to desktop OSX.
IOKit is a private framework in iOS, so it can't be used (and
no headers are provided, so it doesn't even compile).
2015-02-26 13:49:59 +01:00
João Matos 4b6173d11f Fixed compilation on Linux targets without linux/serial.h.
/Users/builder/data/lanes/monodroid-mavericks-master/7de6731a/source/mono/support/serial.c:25:26: fatal error: linux/serial.h: No such file or directory
 #include <linux/serial.h>

The header is only available on Android NDK API level >= 21.
2015-02-26 12:09:17 +00:00
Zoltan Varga c9b2e3e4c2 Merge pull request #1599 from StephenMcConnel/bug-26887-A
Prevent right click from triggering ToolStrip.OnItemClicked
2015-02-25 19:49:27 -05:00
Rodrigo Kumpera abd5c65999 [sgen-bridge] Fix all the bridges after the change to have descriptor loading happen outside of scanning.
This changes all bridges to use the _safe variant of sgen_obj_get_descriptor. Bridge processing happens in
the post-scan world, before objects get untagged.
2015-02-25 18:16:23 -05:00
Stephen McConnel 0c95513a0e Prevent right click from triggering ToolStrip.OnItemClicked
This addresses https://bugzilla.xamarin.com/show_bug.cgi?id=26887
(along with a previous fix).
2015-02-25 17:00:30 -06:00
Rodrigo Kumpera e02337995e Fix my last commit to properly include the tarjan test suite. 2015-02-25 17:54:51 -05:00
Rodrigo Kumpera 1d57482131 Add the tarjan bridge to the test matrix. 2015-02-25 17:50:46 -05:00
Rodrigo Kumpera 68dcdcaac6 [sgen] Fix the sgen bridge test suite. Oh my. 2015-02-25 17:43:42 -05:00
Rodrigo Kumpera 132d9511ff Merge pull request #1598 from mono/revert-1593-new_suspend
Revert "This introduces the new suspend machinery. Right now the unified...
2015-02-25 16:39:59 -06:00
Rodrigo Kumpera 43a734f579 Revert "This introduces the new suspend machinery. Right now the unified STW is disabled for sgen." 2015-02-25 17:39:26 -05:00
Atsushi Eno 03ff64f6e1 bump referencesource. 2015-02-26 05:16:13 +08:00
Rodrigo Kumpera 5786bd0ce9 Merge pull request #1597 from akoeplinger/remove-ef
Remove EntityFramework from class libs
2015-02-25 15:01:28 -06:00
Zoltan Varga 0bab8ed6a0 [runtime] Remove definitions of MONO_SHARED_DIR from scripts, its not needed anymore. 2015-02-25 15:45:22 -05:00
Alexander Köplinger c1bbee0b95 Remove EntityFramework from class libs
We currently ship a horribly outdated version of EF. This is unnecessary since EF is on NuGet and has an active set of users using it on Unix.

Miguel gave his +1 on the mailing list already.
2015-02-25 21:24:52 +01:00
Rodrigo Kumpera 9e79098001 Merge pull request #1593 from kumpera/new_suspend
This introduces the new suspend machinery. Right now the unified STW is disabled for sgen.
2015-02-25 13:53:36 -06:00
Zoltan Varga f30e78bcab [jit] Make the opcode emulation jit icalls callable without a wrapper in some cases. 2015-02-25 14:48:50 -05:00
Miguel de Icaza ccaf0cc44c [SslClientStream] Prevent crashes when a connection is closed
When a socket has been closed as part of the negotiation, the
SendAlert method would crash when trying to reuse the socket.

Add try/catch around this to prevent this.

Fixes #19334
2015-02-25 12:01:15 -05:00
Miguel de Icaza 2f953191fc Merge pull request #1584 from zevane/patch-2
Limit the lock to the writing operation
2015-02-25 10:32:00 -05:00
Miguel de Icaza 5b2d5b4bf4 [Serial] Add support for high baud rates to MacOS 2015-02-25 10:27:43 -05:00
Miguel de Icaza 87357b51e9 [serial,signal] Add support for Linux arbitrary baud rates + drop Apple legacy poll support
This patch brings support for arbitrary baud rates in Linux, from patch:

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

Which has been MIT licensed (see mono-devel-list).

In addition, while testing the patch, discovered that we are using
fakepoll.h on MacOS which was there to support Tiger-era broken poll
implementations.

The details about the lack of poll support come from this document
that is now only available on web.archive.org:

http://web.archive.org/web/20030604064847/http://developer.apple.com/technotes/tn2002/tn2071.html

And the original Mono bug that reported the problem in 2008, followed
by the fixes is reported and discussed here:

https://bugzilla.novell.com/show_bug.cgi?id=384227

The source of the problem, confirmed by an Apple employee at the time
(form the bug) is that poll sometimes results in returning POLLHUP
when a POLLIN was expected:

http://curl.haxx.se/mail/lib-2005-05/0122.html

This web site tracks the behavior of poll (POLLHUP and POLLIN) across
Posix implementations when you reach an end of file:

http://www.greenend.org.uk/rjk/tech/poll.html
2015-02-25 10:20:44 -05:00
Marek Safar 0b7afa989d [system.net.http] Add another workaround for incompatible mono Uri handling. Fixes #27386 2015-02-25 12:28:47 +01:00
Marek Safar 6ee0adb342 [System.Net.Http] Change relative uri test to not require internet access 2015-02-25 08:45:03 +01:00
Atsushi Eno 06334e4f24 remove replaced and unused Encoding code. 2015-02-25 15:20:23 +08:00
Atsushi Eno 8d24d4dc74 Merge pull request #1590 from atsushieno/import-diagnostics-trace
Import System.Diagnostics.Trace from referencesource
2015-02-25 15:14:53 +08:00
Atsushi Eno c4929cbf9c remove replaced System.Diagnostics.Trace family code. 2015-02-25 15:13:27 +08:00
Zoltan Varga 93a5401ee0 Revert "[runtime] Use mono_set_pending_exception () in some places in icalls."
This reverts commit d0d0d29320.

Revert this as it caused too many test failures.
2015-02-24 18:20:41 -05:00
Atsushi Eno 4add6e6c44 [xml] add missing CONFIGURATION_DEP 2015-02-25 07:18:34 +08:00
Zoltan Varga 281c3842d3 [runtime] Declare ICALL_EXPORT as MONO_API so it works with -fvisibility=hidden. 2015-02-24 18:07:26 -05:00
Zoltan Varga 47ef0fd121 Fix a warning. 2015-02-24 18:07:26 -05:00
Zoltan Varga 623f54afed [runtime] Remove some dead definitions. 2015-02-24 18:07:26 -05:00
Marek Safar 48daad9728 [Mono.XBuild.Tasks] Fixes versioning with newer than 4.0 special msbuild profiles 2015-02-25 00:04:51 +01:00
Rodrigo Kumpera b0d6f33857 bump master version of mono. 2015-02-24 17:28:10 -05:00
Rodrigo Kumpera 59c82ade25 [threading] Rework suspend code to be based on a state machine and eliminate known races in the process.
The new suspend machinery is based around a single word state machine that is manipulated using CAS.

This solves the first set of problems with the current approach, the lack of atomicity and the impossibility of
doing race free manipulation of protected state. This is specially acute when doing a self suspend.
Suspend data must be atomically protected while we prepare to self suspend so a resume request won't race with the current
thread putting itself to sleep. This is a classical problem that calls for a mutex/conditional variable pair. Except that all
locks in the suspend path must be suspend safe. Wait, WHAT?

A Suspend Safe Lock is a primitive that is obstruction free in the face of the kernel suspending a thread either performing a
lock operation or waiting on a lock to become available. This, unfortunately, is not possible with pthread_mutex on OSX. The
only safe primitive are kernel semaphores, for which doesn't exist conditional variables for.

So back to locking and self-suspend. We need a lock because the existing thread state is not atomic but we can't use a
mutex/condvar pair so we're left with racy code. Yay! The fix is using CAS over a single variable.

Another change was the hardening of the suspend/resume code on posix targets. First we replace a semaphore wait with
sigsuspend for async suspend. This is needed since sem_wait is not async-signal safe (yet sem_post is). Second, we now
respect interruption requests by having a pair of suspend signals, one with SA_RESTART and one without.

Onto the design of the suspension system, a few concepts that are useful looking around.

* Self suspend: This is when the thread decides to suspend itself.

* Async suspend: This is when a thread decides to suspend another thread.

* Suspend Initiator: This the name of a thread that decided to suspend one or more other threads. This is important
since all suspending threads will notify it when they are suspended. There can be only one initiator in the system
at a given time.

* Suspension count: Number of resume calls before a thread is back to running state.

There are 7 states that can happen while a thread is runnable:

* Running: just running...

* (Async|Self) Suspended: Suspended, the difference comes into play when resuming.

* (Async|Self) Suspend Requested: Suspend requested, but not completed. See more below for the discussion on why the request state is needed.

* Suspend In Progress: Self suspend started saving its state thus async suspend should not modify it.
* Suspend Promoted to Async: Async tried to suspend a thread in the middle of a self suspend, it wants to be notified.

Now to the suspension protocol and how it happens on a high level view.

Suspension starts with a suspend request, which bumps the suspend count by one. This suspend request can be fulfilled either
by an async or self suspend action. This is confusing as there's only one initiator but any number of threads can be self suspending.

Async suspend then performs a platform specific action such as posix signals that forces a transition on the target. In the case
of self suspend, it depends on the thread polling its state and trigger the transition.

This works fine except that the suspend state is one huge struct with tons of fields. To control concurrent access to it we use a
single initiator in the case of async suspend and we put the thread in a transitional "saving my state" in the case of self suspend.

In the case of async suspend, the initiator must wait for all 1+ threads to notify back that they have suspended. Only after that
it's possible to know if the async suspend request actually worked or not (we might have hit a dying thread).

Together with this, there's an optional implementation of STW in sgen that can use this new machinery. To enable it set the
MONO_ENABLE_UNIFIED_SUSPEND env var for now while it gets more testing.
2015-02-24 17:14:28 -05:00
Zoltan Varga d0d0d29320 [runtime] Use mono_set_pending_exception () in some places in icalls. 2015-02-24 16:42:13 -05:00
Rodrigo Kumpera 0b3822a9e1 Merge pull request #1591 from akoeplinger/remove-npgsql
Remove Npgsql from class libs
2015-02-24 14:41:16 -06:00
Alexis Christoforides 2df1c787bf [Decimal] Fix C89 compliance in decimal-ms.c 2015-02-24 12:21:24 -08:00
Marek Safar 665a55d4f8 [facades] Add missing System.ServiceModel.Primitives forwarders to MT profile. Fixes #27338 2015-02-24 20:29:34 +01:00
Marek Safar 2984695832 [corlib] Use HGlobalUnmanagedMemoryStream directly from MonoTouch timezoneinfo 2015-02-24 20:15:56 +01:00
Alexander Köplinger 762bc0bbe6 Remove Npgsql from class libs
This has been requested by the maintainers of Npgsql a few times already (https://bugzilla.xamarin.com/show_bug.cgi?id=23119) and we should do it for Mono 4.0.
Miguel gave his +1 on the mailing list already.
2015-02-24 20:12:40 +01:00
João Matos b528a79db5 [runtime] Upgraded Jay MSVC project to VS 2013. 2015-02-24 18:46:11 +00:00
João Matos 220afd9d49 [runtime] Fixed the MSVC build.
Even though this seems like it's just moving the files around in the project, for some reason it makes a difference to VS.
2015-02-24 18:46:04 +00:00
Rodrigo Kumpera 46c30d31f8 [sgen] Introduce SgenThreadInfo::suspend_done.
This variable must be set to all threads that have been properly suspended. This is
an initial step to simplify suspend state and use explicitly named variables instead
of hiding state in stopped_ip / stopped_domain.
2015-02-24 13:33:49 -05:00
Rodrigo Kumpera 6bd7be2081 Add suspend done everywhere else. 2015-02-24 13:33:49 -05:00
Atsushi Eno 525c47a7f3 Bring back DefaultTraceListener because it already works better for mono. 2015-02-25 01:23:35 +08:00
Atsushi Eno d6bd25591b import System.Diagnostics.Trace etc. from referencesource. 2015-02-25 00:54:38 +08:00
Atsushi Eno c34def6299 bump referencesource to include System.Diagnostics changes. 2015-02-25 00:04:49 +08:00
Marek Safar 6f14f86357 [system.net.http] Accept header with multiple values. Fixes #27352 2015-02-24 16:55:01 +01:00
Rodrigo Kumpera e9836b3511 Merge pull request #1587 from kumpera/cleanup_threading
This is a small cleanup of the threading API.
2015-02-24 09:02:24 -06:00
Marek Safar f35b4f0996 [corlib] BinaryWriter/BinaryReader from reference sources 2015-02-24 10:33:45 +01:00
Marek Safar 6a415e894c [corlib] UnmanagedMemoryStream from reference sources 2015-02-24 10:28:35 +01:00
Atsushi Eno 9f5a54b33e bump referencesource (more BIGENDIAN fixes for UnicodeEncoding). 2015-02-24 12:56:17 +08:00
Zoltan Varga cd4cb57572 [runtime] Fix the non-msvc build. 2015-02-23 20:41:30 -05:00
Zoltan Varga 3d984f7feb [runtime] Mark mono_set_pending_exception () as a cold function, so calling code is generated out-of-line. 2015-02-23 20:05:40 -05:00
Zoltan Varga 40e8a35f27 [jit] Use mono_set_pending_exception () instead of throwing exceptions in JIT icalls. 2015-02-23 20:05:05 -05:00
Rodrigo Kumpera 7b6bb72285 [threading] Don't suspend a thread running out of its thread bounds. 2015-02-23 17:41:28 -05:00
Rodrigo Kumpera b093d2384f [threading] compute thread boulds on thread registration. 2015-02-23 17:41:27 -05:00
Zoltan Varga aa4768dafb [runtime] Disable some dyncall/gsharedvt fullaot tests on amd64. 2015-02-23 16:52:36 -05:00
Zoltan Varga 3eeb285c9a [bcl] Fix Console support on ios, the TextWriter class from the reference sources called TextWriter:Write(char), so stdout was never flushed. 2015-02-23 16:08:39 -05:00
Rodrigo Kumpera 4e1dca9d5e [threading] When checking if a thread is in a critical region, ask the GC too.
MonoThreads was previously ignoring sgen's in_critical_region, which could lead
to a thread suspended inside a gc critical region leading to the GC not been able
to STW.
2015-02-23 15:54:04 -05:00
Rodrigo Kumpera 8a133f2d7e [threading] Introduce mono_thread_info_is_live and move all thread state testing to inside MonoThread. 2015-02-23 15:47:17 -05:00
Zoltan Varga d20fb1aa2e [jit] Make mono_thread_interruption_checkpoint () return the exception which needs to be thrown and throw it from the managed method/wrapper which called it. 2015-02-23 14:19:20 -05:00
Marek Safar e3e6f308fd [system] Bymp reference sources to get correct category names 2015-02-23 19:24:17 +01:00
Marek Safar 602287a0da Bump reference sources for stream api update 2015-02-23 18:14:45 +01:00
Ludovic Henry a81a3ce4a1 [mdoc] Update few failing tests 2015-02-23 11:27:22 -05:00
Marek Safar a5f6ff93ed [mdoc] Update few failing tests 2015-02-23 17:15:44 +01:00
Marek Safar 04c5ac7f7e [system.core] Switch to dynamic visitor from reference sources and remove unused files 2015-02-23 17:03:43 +01:00
Marek Safar 31b143fdc1 [build] 3.10 bump for bootstrap was too much 2015-02-23 13:40:31 +01:00
Atsushi Eno 45d731a8bc bump referencesource (fix encoding endianness). 2015-02-23 20:24:59 +08:00
João Matos 82dbc244da Merge pull request #1586 from vkargov/master
[runtime] Prioritize loading a profiler library from the installation dir.
2015-02-23 11:11:52 +00:00
Marek Safar e220c8f7cb [build] Bump bootstrap mono requirement to 3.10 which does not have problems with flow-analysis in external/referencesource/mscorlib/system/text/asciiencoding.cs 2015-02-23 11:29:42 +01:00
Marek Safar d2978f3833 Merge pull request #1580 from akoeplinger/msbuild-3B-escape
[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces
2015-02-23 10:42:27 +01:00
Marek Safar 8408ce4b5d Merge pull request #1585 from akoeplinger/msbuild-makerelative
[Microsoft.Build.Engine] Implement MakeRelative() predefined property function
2015-02-23 07:36:11 +01:00
Vladimir Kargov e3cfac464b [runtime] Prioritize loading a profiler library from the installation dir over standard libarary paths. 2015-02-23 07:02:20 +03:00
Ludovic Henry 6e9c5ab5b3 [Linq] Replace implementation by Microsoft reference sources 2015-02-22 23:00:42 -05:00
Zoltan Varga 674a2849b4 [aot] Fix thumb support when using separate llvm modules. 2015-02-22 00:31:41 -05:00
Zoltan Varga d8b896bb7c [runtime] Add a --disable-visibility-hidden flag to disable the usage of -fvisibility=hidden for now. 2015-02-21 18:41:00 -05:00
Zoltan Varga 4249eba7f2 [runtime] Export a few more symbols. 2015-02-21 18:32:10 -05:00
zevane 4751c10f9c Limit the lock to the writing operation
I initially discarded this change, because locking BaseSet (name, sec), didn't prevent the threads from trying to add the same key. That said, following the code, the point at which it actually fails is in NameObjectCollectionBase.BaseAdd, lines 331 and 332. The threads were arriving the second line at the same time:

   if (_entriesTable[name] == null)
          _entriesTable.Add(name, entry);

In brief, it's safe to call BaseSet twice with the same key, so it's safe to lock only the call to BaseSet
2015-02-20 20:04:01 +01:00
Alexander Köplinger 51297ed7ab [Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces 2015-02-19 00:19:31 +01:00
Alexander Köplinger 2850b1274c [Microsoft.Build.Tasks] Added tests for escaped semicolon and space 2015-02-18 22:41:48 +01:00
Alexander Köplinger e70880d895 [Microsoft.Build.Tasks] Fix bug in test method
The if check was inverted, so the actual test code didn't run.
2015-02-18 09:44:32 +01:00
Matthew Leibowitz e3719ebcfc [system] WebSocket continuation frame incorrectly handles the message type opcode
When a frame marked with OPCODE 0, it is a continuation frame. This frame does not carry the message type and should be derived from the previous frame.
2014-10-15 14:14:07 +02:00
Marc-Andre Ferland 79f621ee7d Added null check in constructor.
Avoid throwing NRE later while using the class.
2014-10-04 06:42:31 -04:00
David Straw 5b6c684d26 Fix for bug 22307 - Intermittent IndexOutOfRangeException on closing connection 2014-08-22 11:50:08 -06:00
Martin Potter 30c0309f15 Lower-case the host in Uri.TryCreate to match behavior of constructors
On Microsoft's implementation of the Uri class, the contructors and TryCreate method both lower-case the host. This commit fixes the issue where the constructors lower-cased the host but the TryCreate method did not.
2014-08-21 06:43:52 -07:00
Andrey Akinshin dbc021772a Suppression of negative Elapsed in Stopwatch
There was a bug (https://connect.microsoft.com/VisualStudio/feedbackdetail/view/94083/stopwatch-returns-negative-elapsed-time) in the old Microsoft .NET versions: the Stopwatch.Elapsed property could return negative value for a small time period. It was be fixed in .NET 4.0, but it can be still reproduced by the current Mono version.
For example, this can be reproduced during dynamic processor frequency scaling (see http://en.wikipedia.org/wiki/SpeedStep).
2014-08-19 15:55:50 +07:00
Steffen Kieß d65e93b74f Use SortedDictionary in System.Json.JsonObject
Currently JsonObject uses a Dictionary and JsonValue does not sort the keys
in SaveInternal(). As iterating over a Dictionary returns the values in
random order, this causes the JSON string to be non-deterministic.
Switching to SortedDictionary makes sure that the same object always will
produce the same JSON string.
The keys are sorted using StringComparer.Ordinal to produce the same order
in all locales.
2014-07-11 16:13:41 +02:00
Steffen Kieß 1a021c1e79 Fix handling of strings in System.Json
- Escape control characters, as required by JSON spec
- Escape invalid surrogate pairs
- Escape characters invalid in JavaScript strings
- Escape "</" for HTML script tags
- Fix serialization of chars
- Remove unused variable in JavaScriptReader.cs
- Add tests
2014-07-11 15:46:25 +02:00
Etienne CHAMPETIER a8ee7c2326 [FIX] correctly handle custom onclick attribute when autopostback = true for checkbox
onclick is in common_attrs not in Attributes, so we can't use BuildScriptAttribute

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-04-01 11:43:19 +02:00
Etienne CHAMPETIER 8fdf3ae11c [Fix] ReusableHashAlgorithm doesn't set the Key of the ValidationAlgorithm
Without this patch you can't use "WebResource.axd" ressources
in a cluster (each mono instance will get a different link for the same ressource)

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-04-01 11:42:09 +02:00
Mark Lintner 8ad18569c5 removed a hello world from the code. 2013-09-19 21:49:04 -07:00
Mark Lintner 9cb08ed0a8 undid some unecessary formatting 2013-09-19 21:43:04 -07:00
Mark Lintner b2dcf4fdab This adds a unit test and a more robust method for determining the servicecontract to be returned from ContractDescription.GetContract and to more accurately determine exceptional conditions. 2013-09-19 18:58:20 -07:00
Mark Lintner dd25ba0629 These changes fix 14335. When in getcontractinternal various things can confuse the host processing of ContractInterfaces. I only identified and fixed a couple so far and they fix problems with multiple inheritance of contracts and deep hierarchies. It is looking to verify that all of the contract interfaces it has in the list inherit from the root interface. However when IA and IB inherit from the IRoot. It will iterate nxn times and with multiple inehritance it will eventuall get a 1A and verify that it inherits from iroot it gois along until it verifies that A inherits from the root then finds it cannot verify IA becuase because it is checking to see if IB inherits from it. It doesnt because both of them are peers and inheit from IRoot. This threw an exception. I fixes that and a couple of related bugs.
Please enter the commit message for your changes. Lines starting
2013-09-15 10:27:04 -07:00
Jonathan Gagnon 05d7064c1c GetIdElement must look for "ID" and "id". Fixes #4938 2013-07-12 14:48:55 -04:00
David Straw 14b42141c0 Handle multiple concurrent calls to BeginTryReceiveRequest 2012-09-17 11:39:30 -06:00
22951 changed files with 4128408 additions and 1155805 deletions

No files matched your search

-1
View File
@@ -9,7 +9,6 @@ configure.ac crlf=input
*.il crlf
.gitattributes crlf
ChangeLog crlf
*akefile* crlf
*.sources crlf
+4 -3
View File
@@ -23,7 +23,6 @@
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
@@ -44,6 +43,8 @@ Ankh.NoLoad
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*
*.orig
*.rej
# NuGet packages
!.nuget/*
@@ -122,7 +123,7 @@ docs/perlmod*
compile
mono.h
mono-*.tar.*
mono.spec
mono-core.spec
tmpinst-dir.stamp
msvc/scripts/inputs/
extensions-config.h
+6 -10
View File
@@ -10,9 +10,6 @@
[submodule "external/debian-snapshot"]
path = external/debian-snapshot
url = git://github.com/directhex/mono-snapshot.git
[submodule "external/entityframework"]
path = external/entityframework
url = git://github.com/mono/entityframework.git
[submodule "external/rx"]
path = external/rx
url = git://github.com/mono/rx.git
@@ -20,16 +17,15 @@
[submodule "external/ikvm"]
path = external/ikvm
url = git://github.com/mono/ikvm-fork.git
[submodule "external/Lucene.Net"]
path = external/Lucene.Net
url = git://github.com/mono/lucene.net.git
[submodule "external/ikdasm"]
path = external/ikdasm
url = git://github.com/mono/ikdasm.git
[submodule "external/referencesource"]
path = external/referencesource
url = git://github.com/mono/referencesource
branch = mono
[submodule "external/reference-assemblies"]
path = external/binary-reference-assemblies
url = git://github.com/mono/reference-assemblies.git
[submodule "external/Lucene.Net.Light"]
path = external/Lucene.Net.Light
url = git://github.com/mono/Lucene.Net.Light.git
[submodule "external/nunit-lite"]
path = external/nunit-lite
url = git://github.com/mono/NUnitLite.git
-3
View File
@@ -1,3 +0,0 @@
Miguel de Icaza ([email protected])
Paolo Molaro ([email protected])
Dietmar Maurer ([email protected])
+6 -17
View File
@@ -21,29 +21,18 @@ investigate bugs, regressions and problems.
License
=======
The Mono project uses the MIT X11, GNU LGPL version 2 and the Apache
License 2.0. We also imported some Microsoft code licensed under the
open source Microsoft Public License.
The Mono runtime, compilers, and tools and most of the class libraries
are licensed under the MIT license. But include some bits of code
licensed under different licenses. The exact list is [available here] (https://github.com/mono/mono/blob/master/LICENSE).
Different parts of Mono use different licenses. The actual details of
which licenses are used for which parts are detailed on the LICENSE
file in this directory.
When contributing code, make sure that your contribution falls under
the appropriate license. For example, contributions to code licensed
under MIT/X11 code, should be MIT/X11 code.
CLA
=======
The runtime (`mono/...`) is a special case. The code is dual-licensed
by Xamarin under both the GNU LGPL v2 license and is also available
under commercial terms. For the runtime, you should either sign an
agreement that grants Xamarin the rights to relicense your code under
other licenses other than the LGPL v2 or your contribution must be
made as an MIT/X11 license which grants us the same rights, but
involves no paperwork. For the latter case, please specify on your
commit(s) that you are licensing the changes under MIT/X11.
For other parts of the project that are dual-licensed, please state
on your commit(s) what license you are contributing the changes under.
Contributions are now taken under the [.NET Foundation CLA] (https://cla2.dotnetfoundation.org/).
Testing
=======
+1 -501
View File
@@ -1,501 +1 @@
The Mono runtime is licensed under the terms of the GNU
Library General Public License, version 2.
The eglib directory is licensed under the terms of the MIT
X11 license and is a drop-in replacement for Mono's use of
glib 2.0 (which was LGPL).
The Boehm licensing information is in the libgc directory
The SGen Garbage Collector is under the terms of the MIT X11
license
The class libraries under mono/mcs are unless otherwise stated
under the MIT X11 license.
Open source Microsoft code is licensed under the original terms
which is either MS-PL for older components, or dual licensed
MS-PL/Apache2 licensed.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
See LICENSE file in the project root for full license information.
-5719
View File
File diff suppressed because it is too large. Load diff
+1406 -102
View File
File diff suppressed because it is too large. Load diff
+14 -23
View File
@@ -5,23 +5,15 @@ AM_CFLAGS = $(WERROR_CFLAGS)
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
if CROSS_COMPILING
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
else
if ONLY_MONOTOUCH
SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
else
if ONLY_XAMMAC
SUBDIRS = $(libgc_dir) eglib/src mono runtime
else
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
endif
endif
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
endif
all: update_submodules
@@ -33,15 +25,14 @@ update_submodules:
.PHONY: update_submodules
EXTRA_DIST= \
README.md \
LICENSE \
autogen.sh \
build-mingw32.sh \
mkinstalldirs \
mono-uninstalled.pc.in \
winconfig.h \
mono-core.spec \
external
README.md \
LICENSE \
autogen.sh \
mkinstalldirs \
mono-uninstalled.pc.in \
winconfig.h \
code_of_conduct.md \
external
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
@@ -52,7 +43,7 @@ dist-hook:
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
rm -rf `find $(top_distdir)/external -path '*\.git'`
rm -f `find $(top_distdir)/external -path '*\.exe'`
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/v4\.0*'`
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
# Disable this for now because it is very slow and causes wrench to timeout:
@@ -66,7 +57,7 @@ DISTCLEANFILES= mono-uninstalled.pc
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
monolite_url = http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-$(mono_corlib_version)-latest.tar.gz
monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
.PHONY: get-monolite-latest
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
+1 -6
View File
@@ -1,8 +1,3 @@
Release notes for Mono are hosted on the web, please see:
http://www.go-mono.com/archive/VERSION
Where version is the version of this Mono package, for example:
http://www.go-mono.com/archive/1.1.9
http://www.mono-project.com/docs/about-mono/releases/
+44
View File
@@ -0,0 +1,44 @@
Microsoft Patent Promise for Mono
Microsoft Corporation and its affiliates (“Microsoft”) promise not to
assert any Applicable Patents against you for making, using, selling,
offering for sale, importing, or distributing Mono.
If you file, maintain, or voluntarily participate in any claim in a
lawsuit alleging direct or contributory patent infringement by Mono,
or inducement of patent infringement by Mono, then your rights under
this promise will automatically terminate.
This promise is not an assurance that (i) any Applicable Patents are
valid or enforceable or (ii) Mono does not infringe patents or other
intellectual property rights of any third party. No rights except
those expressly stated in this promise are granted, waived or received
by Microsoft, whether by implication, exhaustion, estoppel or
otherwise. This is a personal promise directly from Microsoft to you,
and you agree as a condition of benefitting from it that no Microsoft
rights are received from suppliers, distributors, or otherwise in
connection with this promise.
Definitions:
“Mono” means those portions of the software development technology, as
originally distributed by Xamarin, Inc. or the .NET Foundation under
the name “Mono,” that implement .NET Framework Functionality, provided
that such portions at a minimum implement all of the required parts of
the mandatory provisions of Standard ECMA-335 – Common Language
Infrastructure (CLI).
“.NET Framework Functionality” means any functionality in Microsoft’s
.NET Framework as described in Microsoft’s API documentation on
Microsoft’s MSDN website, including the functionality in
Windowsbase.dll, but excluding all other functionality in the Windows
Presentation Foundation component of .NET Framework.
“Applicable Patents” are those patent claims, currently owned by
Microsoft and acquired in the future, that are necessarily infringed
by Mono. For clarity, Applicable Patents do not include any patent
claims that are infringed (x) by any underlying or enabling technology
that may be used, combined, or distributed in connection with Mono
(such as hardware, operating systems, or applications that run on
Mono), (y) only as a consequence of modification of Mono, or (z) only
by the combination of Mono with third party code.
+127 -42
View File
@@ -1,5 +1,11 @@
Mono is a software platform designed to allow developers to easily create cross platform applications.
It is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
Mono is a software platform designed to allow developers to easily
create cross platform applications. It is an open source
implementation of Microsoft's .NET Framework based on the ECMA
standards for C# and the Common Language Runtime.
The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.org/)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1. [Compilation and Installation](#compilation-and-installation)
2. [Using Mono](#using-mono)
@@ -7,23 +13,34 @@ It is an open source implementation of Microsoft's .NET Framework based on the E
4. [Contributing to Mono](#contributing-to-mono)
5. [Reporting bugs](#reporting-bugs)
6. [Configuration Options](#configuration-options)
7. [Working with Submodules](#working-with-submodules)
**Build Status**
| debian-amd64 | debian-i386 | debian-ppc64el | centos-s390x | windows-amd64 |
|:-----------------------:|:----------------------:|:-------------------------:|:-----------------------:|:-------------------------:|
| [![debian-amd64][1]][2] | [![debian-i386][3]][4] | [![debian-ppc64el][5]][6] | [![centos-s390x][7]][8] | [![windows-amd64][9]][10] |
Officially supported architectures:
| debian-amd64 | debian-i386 | debian-armel | debian-armhf | windows-amd64 |
|-------------------------|------------------------|-------------------------|-------------------------|---------------------------|
| [![debian-amd64][1]][2] | [![debian-i386][3]][4] | [![debian-armel][5]][6] | [![debian-armhf][7]][8] | [![windows-amd64][9]][10] |
Community supported architectures:
| centos-s390x |
|---------------------------|
| [![centos-s390x][11]][12] |
[1]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon
[2]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/
[3]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/badge/icon
[4]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/
[5]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=debian-ppc64el/badge/icon
[6]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=debian-ppc64el/
[7]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=centos-s390x/badge/icon
[8]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=centos-s390x/
[5]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/badge/icon
[6]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/
[7]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/badge/icon
[8]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/
[9]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
[10]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
[11]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
[12]: https://jenkins.mono-project.com/job/z/label=centos-s390x
Compilation and Installation
============================
@@ -55,7 +72,7 @@ which contains just enough to run the 'mcs' compiler. You do this with:
This will download and place the files appropriately so that you can then
just run:
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
make
The build will then use the files downloaded by `make get-monolite-latest`.
@@ -65,8 +82,7 @@ Testing and Installation
You can run the mono and mcs test suites with the command: `make check`.
Expect to find a few test suite failures. As a sanity check, you
can compare the failures you got with [https://wrench.mono-project.com/Wrench/](https://wrench.mono-project.com/Wrench/)
and [http://jenkins.mono-project.com/](http://jenkins.mono-project.com/).
can compare the failures you got with [https://jenkins.mono-project.com/](https://jenkins.mono-project.com/).
You can now install mono with: `make install`
@@ -90,6 +106,8 @@ See the man pages for mono(1), mcs(1) and monodis(1) for further details.
Directory Roadmap
=================
* `acceptance-tests/` - Optional third party test suites used to validate Mono against a wider range of test cases.
* `data/` - Configuration files installed as part of the Mono runtime.
* `docs/` - Technical documents about the Mono runtime.
@@ -130,60 +148,63 @@ runtime as an embedded library.
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
* `../olive/` - Incubation code from [Olive](https://github.com/mono/olive).
* If the directory ../olive is present (as an
independent checkout) from the Mono module, that
directory is automatically configured to share the
same prefix than this module gets.
Contributing to Mono
====================
Before submitting changes to Mono, please review the [contribution guidelines](http://www.mono-project.com/community/contributing/).
Please pay particular attention to the [Important Rules](http://www.mono-project.com/community/contributing/#important-rules) section.
Before submitting changes to Mono, please review the [contribution
guidelines](http://www.mono-project.com/community/contributing/).
Please pay particular attention to the [Important
Rules](http://www.mono-project.com/community/contributing/#important-rules)
section.
Reporting bugs
==============
To submit bug reports, please use [Xamarin's Bugzilla](https://bugzilla.xamarin.com/)
To submit bug reports, please use [Xamarin's
Bugzilla](https://bugzilla.xamarin.com/)
Please use the search facility to ensure the same bug hasn't already
been submitted and follow our [guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
been submitted and follow our
[guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
on how to make a good bug report.
Configuration Options
=====================
The following are the configuration options that someone
building Mono might want to use:
The following are the configuration options that someone building Mono
might want to use:
* `--with-sgen=yes,no` - Generational GC support: Used to enable or disable the
compilation of a Mono runtime with the SGen garbage collector.
* `--with-sgen=yes,no` - Generational GC support: Used to enable or
disable the compilation of a Mono runtime with the SGen garbage
collector.
* On platforms that support it, after building Mono, you will have
both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm, while
`mono-sgen` uses the Simple Generational GC.
both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm,
while `mono-sgen` uses the Simple Generational GC.
* `--with-gc=[included, boehm, none]` - Selects the default Boehm garbage
collector engine to use.
* `--with-gc=[included, boehm, none]` - Selects the default Boehm
garbage collector engine to use.
* *included*: (*slighty modified Boehm GC*)
This is the default value for the Boehm GC, and it's
the most feature complete, it will allow Mono
to use typed allocations and support the debugger.
* *included*: (*slightly modified Boehm GC*) This is the default
value for the Boehm GC, and it's the most feature complete, it will
allow Mono to use typed allocations and support the debugger.
* *boehm*:
This is used to use a system-install Boehm GC,
it is useful to test new features available in
Boehm GC, but we do not recommend that people
use this, as it disables a few features.
* *boehm*: This is used to use a system-install Boehm GC, it is
useful to test new features available in Boehm GC, but we do not
recommend that people use this, as it disables a few features.
* *none*:
Disables the inclusion of a garbage collector.
* This defaults to `included`.
* `--with-cooperative-gc`
* If you pass this flag the Mono runtime is configured to only use
the cooperative mode of the garbage collector. If you do not pass
this flag, then you can control at runtime the use of the
cooperative GC mode by setting the `MONO_ENABLE_COOP` flag.
* `--with-tls=__thread,pthread`
* Controls how Mono should access thread local storage,
@@ -409,8 +430,10 @@ cycle.
multiple CPUs to do its work. This helps performance
on multi-CPU machines as the work is divided across CPUS.
* This option is not currently the default as we have
not done much testing with Mono.
* This option is not currently the default on OSX
as it runs into issues there.
* This option only applies to the Boehm GC.
* `--enable-dtrace`
@@ -436,3 +459,65 @@ http://code.google.com/p/nativeclient/
* Currently this is used with Mono's AOT engine as
Native Client does not support JIT engines yet.
Working With Submodules
=======================
Mono references several external git submodules, for example
a fork of Microsoft's reference source code that has been altered
to be suitable for use with the Mono runtime.
This section describes how to use it.
An initial clone should be done recursively so all submodules will also be
cloned in a single pass:
$ git clone --recursive git@github.com:mono/mono
Once cloned, submodules can be updated to pull down the latest changes.
This can also be done after an initial non-recursive clone:
$ git submodule update --init --recursive
To pull external changes into a submodule:
$ cd <submodule>
$ git pull origin <branch>
$ cd <top-level>
$ git add <submodule>
$ git commit
By default, submodules are detached because they point to a specific commit.
Use `git checkout` to move back to a branch before making changes:
$ cd <submodule>
$ git checkout <branch>
# work as normal; the submodule is a normal repo
$ git commit/push new changes to the repo (submodule)
$ cd <top-level>
$ git add <submodule> # this will record the new commits to the submodule
$ git commit
To switch the repo of a submodule (this should not be a common or normal thing
to do at all), first edit `.gitmodules` to point to the new location, then:
$ git submodule sync -- <path of the submodule>
$ git submodule update --recursive
$ git checkout <desired new hash or branch>
The desired output diff is a change in `.gitmodules` to reflect the
change in the remote URL, and a change in /<submodule> where you see
the desired change in the commit hash.
License
=======
See the LICENSE file for licensing information, and the PATENTS.TXT
file for information about Microsoft's patent grant.
Mono Trademark Use Policy
=======
The use of trademarks and logos for Mono can be found [here] (http://www.dotnetfoundation.org/legal/mono-tm).
-120
View File
@@ -1,120 +0,0 @@
README.vsnet Last updated: 2006-02-01
SVN includes a Visual Studio .NET 2005 solution, mono.sln, and some
projects files to build most of the unmanaged parts in Mono.
The "mono.sln" solution file contains the VC projects files for:
* Embedded Samples
* test-invoke.vcproj
* test-metadata.vcproj
* teste.vcproj
* Libraries
* libgc.vcproj
* libmono.vcproj
* Tools
* genmdesc.vcproj
* monoburg.vcproj
* monodiet.vcproj
* monodis.vcproj
* monograph.vcproj
* pedump.vcproj
* mono.vcproj
REQUIREMENTS
* A working (i.e. where you could succesfully build mono) cygwin
(http://www.cygwin.com/) setup! This is required to:
* generate some files (via monoburg and genmdesc);
* build the class libraries; and
* test for regressions.
* Visual Studio .NET 2005. Previous Visual Studio versions may work or
requires, hopefully minimal, changes.
* VSDependencies.zip must be decompressed under the /mono/ directory
(otherwise you will need to edit all the projects files). This file can
be downloaded from http://www.go-mono.com/archive/VSDependencies.zip
LOCAL CHANGES
Sadly solution/projects files aren't easy to move from computers to
computers (well unless everyone follow the same naming convention) so
you'll likely have to changes some options in order to compile the
solution.
* each executed assembly (i.e. the EXE) must be able to find a
working mscorlib.dll (and all the other required assemblies).
This can be done in different ways. My preference is to use the
project "properties pages" in the "Configuration Properties
\Debugging\Environment" options and set MONO_PATH to the class
libraries directory build by cygwin (local) or on Linux
(remote).
e.g. MONO_PATH=z:\svn\mcs\class\lib\default\
allows me to use the class libs build under Linux, while
MONO_PATH=C:\cygwin\opt\mono\lib\mono\1.0
use the one built from cygwin (after a make install)
Some useful informations to adapt the solution/project files...
* My cygwin root dir is: c:\cygwin\
* My username is: poupou
* My mono install prefix is: /opt/mono
BUILDING
Once everything is installed (and edited) you can right-click on the
"mono" solution (in the "Solution Explorer"), select "Clean
Solution" (for the first time) then "Build Solution".
KNOWN ISSUES
[1] Most, BUT NOT ALL, the regressions tests pass under this build. The
failures seems limited to some mathematical differences and to code
relying on the stack walking functions. The hacks to replace the GCC
functions (__builtin_frame_address and __builtin_return_address) are
incomplete;
[2] The solution doesn't provide complete (i.e. from scratch) build. It
requires a working cygwin environment to create some files (e.g. via
genmdesc, monoburg). This isn't so bad as without cygwin you wouldn't be
able to test Mono properly (see REQUIREMENTS);
[3] Only the Debug target is configured properly (that would be easy to
fix, but would require turning off some optimizations like omitting
stack frames). Anyway there are other issues [1] to fix before switching
to Release and IMHO the _biggest_ advantage to VS.NET is it's debugger/
debugging tools;
[4] The C compiler emits _lots_ of warning during compilation. Some
warnings have been turned off for some projects (there was so much that
it slowed down compilation). You can bring them back (or hide more of
them) using the project "properties pages" windows, "Configuration
Properties\C/C++\Advanced\Disable Specific Warnings";
[5] Visual Studio 2005 should have all the latest header files required,
but if not (or if you're using an older version of VS) then install MS
Platform SDK (Windows Server 2003 is the latest) to ensure you have the
latest Windows header files. You can download it from:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
[6] Not everyone has VS.NET so it is possible you may have to add some
(new) files to the build from time to time. See "more informations" for
reporting those changes.
[7] Probably a lot more I didn't discover... or has changed since.
MORE INFORMATION
Please email <[email protected]> if you have any problem
and/or if there's something wrong/missing in the instructions.
An online version of this file is available at
http://www.mono-project.com/Compiling_Mono_VSNET
+6
View File
@@ -0,0 +1,6 @@
Makefile.in
Makefile
*.exe
*.dll
*.mdb
coreclr-testlist.txt
@@ -0,0 +1,14 @@
using System;
using System.IO;
using System.Reflection;
namespace System.Runtime.Loader
{
public static class AssemblyExtensions
{
public static Type[] GetTypes(this Assembly assembly)
{
return assembly.GetTypes ();
}
}
}
@@ -0,0 +1,41 @@
using System;
using System.IO;
using System.Reflection;
namespace System.Runtime.Loader
{
public abstract class AssemblyLoadContext
{
protected abstract Assembly Load(AssemblyName assemblyName);
protected Assembly LoadFromAssemblyPath(string assemblyPath)
{
if (assemblyPath == null)
throw new ArgumentNullException("assemblyPath");
if (!Path.IsPathRooted(assemblyPath))
throw new ArgumentException("Gimme an absolute path " + assemblyPath + " XXX " + Path.GetPathRoot(assemblyPath), "assemblyPath");
return Assembly.LoadFrom (assemblyPath);
}
public Assembly LoadFromAssemblyName(AssemblyName assemblyName)
{
// AssemblyName is mutable. Cache the expected name before anybody gets a chance to modify it.
string requestedSimpleName = assemblyName.Name;
Assembly assembly = Load(assemblyName);
if (assembly == null)
throw new FileLoadException("File not found", requestedSimpleName);
return assembly;
}
public static AssemblyName GetAssemblyName(string assemblyPath)
{
if (!File.Exists (assemblyPath))
throw new Exception ("file not found");
return new AssemblyName (Path.GetFileName (assemblyPath));
}
}
}
+23
View File
@@ -0,0 +1,23 @@
ACCEPTANCE_TESTS_PATH=external
ROSLYN_PATH=$(ACCEPTANCE_TESTS_PATH)/roslyn
CORECLR_PATH=$(ACCEPTANCE_TESTS_PATH)/coreclr
MSTESTSUITE_PATH=$(ACCEPTANCE_TESTS_PATH)/ms-test-suite
CLEANFILES = *.dll *.exe *.mdb
EXTRA_DIST=README.md SUBMODULES.json versions.mk versions.py roslyn.mk coreclr.mk ms-test-suite.mk
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
with_mono_path = MONO_PATH=$(CLASS)
RUNTIME = $(with_mono_path) $(abs_top_builddir)/runtime/mono-wrapper --debug
MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe
ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
include versions.mk
include roslyn.mk
include coreclr.mk
include ms-test-suite.mk
check-full: check-roslyn check-coreclr check-ms-test-suite
clean-local: clean-local-coreclr
+35
View File
@@ -0,0 +1,35 @@
Acceptance tests
================
This directory contains acceptance tests, which are third party test suites and frameworks that are used to validate Mono against a wider range of test cases that go beyond the Mono unit tests that run as part of CI.
In order to make checking out those test suites optional we don't use traditional git submodules, but instead clone them on demand when needed. The custom submodule repositories are checked out into the acceptance-tests/external/ directory.
## Usage
Running all test suites is possible via "make check-full". There are also targets for running individual test suites, see below.
Some of the test suites require an installed Mono (i.e. they don't work with the in-tree build), those will ask you to pass in the PREFIX variable pointing to the installation directory when invoking make. Note that this directory needs to be writable as we overwrite some files there as part of testing.
## Individual test suites and targets
* `make check-ms-test-suite` - Runs tests that were shared with Xamarin, those are not available publically and will be skipped when the repository is not accessible.
* `make check-roslyn` - Runs the Roslyn test suite.
* `make check-coreclr` - Runs the CoreCLR test suite.
* `make coreclr-runtest-coremanglib` - Runs only the CoreMangLib portion of the CoreCLR tests, those tests mostly target the BCL behavior.
* `make coreclr-runtest-basic` - Runs only the CoreCLR tests that target runtime behavior and stability.
* `make coreclr-compile-tests` - Convenience target that precompiles all the test cases in parallel.
* `make coreclr-gcstress` - Runs the CoreCLR GC stress tests.
## Updating submodules
The SUBMODULES.json file stores information about the submodules, and make targets are used to check out submodules, check their versions, and update the submodule information:
* `make validate-<module>` - Checks whenever `<module>` is checked out and matches the version in the info file.
* `make reset-<module>` - Clones `<module>` if neccesary and checks out the revision specified in the info file.
* `make bump-<module>` - Updates the revision stored in the info file for `<module>`.
* `make bump-current-<module>` - Updates the revision stored in the info file for `<module>` to the current revision.
* `make commit-bump-<module>` - Same as `make bump-<module>`, but commits the change.
* `make commit-bump-current-<module>` - Same as `make bump-current-<module>`, but commits the change.
Example: when making a change in the CoreCLR submodule (like disabling something on Mono), you'd commit the change there and then run `make bump-current-coreclr` or `make commit-bump-current-coreclr` to update the version in SUBMODULES.json.
+26
View File
@@ -0,0 +1,26 @@
[
{
"name": "roslyn",
"url": "git://github.com/dotnet/roslyn.git",
"rev": "322bd5b2bbf07df6a67de35cbcb2365484412f70",
"remote-branch": "origin/master",
"branch": "master",
"directory": "roslyn"
},
{
"name": "coreclr",
"url": "git://github.com/mono/coreclr.git",
"rev": "b05c242a59eab1c4ea2803960c8065167308546d",
"remote-branch": "origin/mono",
"branch": "mono",
"directory": "coreclr"
},
{
"name": "ms-test-suite",
"url": "[email protected]:xamarin/ms-test-suite.git",
"rev": "4a95604fdf2c0523e68eaad64a17d22eebb051b3",
"remote-branch": "origin/master",
"branch": "master",
"directory": "ms-test-suite"
}
]
File diff suppressed because it is too large. Load diff
+2
View File
@@ -0,0 +1,2 @@
*
!.gitignore
+10
View File
@@ -0,0 +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 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
+24
View File
@@ -0,0 +1,24 @@
check-roslyn:
@$(MAKE) validate-roslyn RESET_VERSIONS=1
@if [ -z $$PREFIX ]; then echo "You need to set PREFIX to the prefix of the Mono installation that should be used for testing Roslyn." && exit 1; fi
sed -i -e 's/\\4.5-api"/\\4.5"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
export MSBuildExtensionsPath=$$PREFIX/lib/mono/xbuild; \
MONO_DOTNET_PORTABLE_DIR=$$PREFIX/lib/mono/xbuild-frameworks/.NETPortable/; \
MONO_NUGET_TARGETS_DIR=$$PREFIX/lib/mono/xbuild/Microsoft/NuGet/; \
MONO_PORTABLE_TARGETS_DIR=$$PREFIX/lib/mono/xbuild/Microsoft/Portable/v5.0; \
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v5.0" ]; then \
mkdir -p $$MONO_DOTNET_PORTABLE_DIR; \
mkdir -p $$MONO_NUGET_TARGETS_DIR; \
mkdir -p $$MONO_PORTABLE_TARGETS_DIR; \
curl -SL "http://download.mono-project.com/third-party/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
unzip -o /tmp/RoslynBuildDependencies.zip -d /tmp/RoslynBuildDependencies; \
cp -r /tmp/RoslynBuildDependencies/PortableReferenceAssemblies/* $$MONO_DOTNET_PORTABLE_DIR; \
cp /tmp/RoslynBuildDependencies/NuGetTargets/* $$MONO_NUGET_TARGETS_DIR; \
cp /tmp/RoslynBuildDependencies/PortableTargets/* $$MONO_PORTABLE_TARGETS_DIR; \
fi; \
cd $(ROSLYN_PATH); \
sed -i -e 'N; s/bootstrapArg=".*\n.*"/bootstrapArg=""/g' cibuild.sh; \
sed -i -e 's#-xml Binaries/\$$BUILD_CONFIGURATION/xUnitResults/#-nunit $(abs_top_builddir)/acceptance-tests/TestResult-#g' cibuild.sh; \
./cibuild.sh --mono-path $$PREFIX/bin || EXIT_CODE=1; \
sed -i -e 's/\\4.5"/\\4.5-api"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
exit $$EXIT_CODE
+159
View File
@@ -0,0 +1,159 @@
.PHONY: validate-versions reset-versions
CONFIG=SUBMODULES.json
# usage $(call ValidateVersionTemplate (name,MAKEFILE VAR,repo name))
# usage $(call ValidateVersionTemplate (mono,MONO,mono))
define ValidateVersionTemplate
#$(eval REPOSITORY_$(2):=$(shell test -z $(3) && echo $(1) || echo "$(3)"))
#$(eval DIRECTORY_$(2):=$(shell python versions.py get-dir $(1)))
#$(eval DIRECTORY_$(2):=$(shell test -z $(DIRECTORY_$(2)) && echo $(1) || echo $(DIRECTORY_$(2))))
#$(eval MODULE_$(2):=$(shell python versions.py get-url $(1)))
#$(eval NEEDED_$(2)_VERSION:=$(shell python versions.py get-rev $(1)))
#$(eval $(2)_BRANCH_AND_REMOTE:=$(shell python versions.py get-remote-branch $(1)))
#$(eval $(2)_VERSION:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git rev-parse HEAD ))
#$(eval NEEDED_$(2)_BRANCH:=$(word 2, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
#$(eval NEEDED_$(2)_REMOTE:=$(word 1, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
#$(eval $(2)_BRANCH:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git symbolic-ref --short HEAD 2>/dev/null))
validate-$(1)::
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
if test ! -d $($(2)_PATH); then \
if test x$$(RESET_VERSIONS) != "x"; then \
$(MAKE) reset-$(1) || exit 1; \
else \
echo "Your $(1) checkout is missing, please run 'make reset-$(1)'"; \
touch .validate-versions-failure; \
fi; \
else \
if test "x$($(2)_VERSION)" != "x$(NEEDED_$(2)_VERSION)" ; then \
if test x$$(RESET_VERSIONS) != "x"; then \
$(MAKE) reset-$(1) || exit 1; \
else \
echo "Your $(1) version is out of date, please run 'make reset-$(1)' (found $($(2)_VERSION), expected $(NEEDED_$(2)_VERSION))"; \
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
touch .validate-versions-failure; \
fi; \
elif test "x$($(2)_BRANCH)" != "x$(NEEDED_$(2)_BRANCH)" ; then \
if test x$$(RESET_VERSIONS) != "x"; then \
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
$(MAKE) reset-$(1) || exit 1; \
else \
echo "Your $(1) branch is out of date, please run 'make reset-$(1)' (found $($(2)_BRANCH), expected $(NEEDED_$(2)_BRANCH))"; \
touch .validate-versions-failure; \
fi; \
fi; \
fi; \
fi
test-$(1)::
@echo $(1)
@echo " REPOSITORY_$(2)=$(REPOSITORY_$(2))"
@echo " DIRECTORY_$(2)=$(DIRECTORY_$(2))"
@echo " MODULE_$(2)=$(MODULE_$(2))"
@echo " NEEDED_$(2)_VERSION=$(NEEDED_$(2)_VERSION)"
@echo " $(2)_VERSION=$($(2)_VERSION)"
@echo " $(2)_BRANCH_AND_REMOTE=$($(2)_BRANCH_AND_REMOTE)"
@echo " NEEDED_$(2)_BRANCH=$(NEEDED_$(2)_BRANCH)"
@echo " NEEDED_$(2)_REMOTE=$(NEEDED_$(2)_REMOTE)"
@echo " $(2)_BRANCH=$($(2)_BRANCH)"
@echo " $(2)_PATH=$($(2)_PATH) => $(abspath $($(2)_PATH))"
reset-$(1)::
@if test -d $($(2)_PATH); then \
if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE) >/dev/null 2>&1) ; then \
echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
fi; \
else \
echo "*** git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2))" && (cd `dirname $($(2)_PATH)` && git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2)) || exit 1 ); \
fi
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
echo "*** [$(1)] git checkout -f" $(NEEDED_$(2)_BRANCH) && (cd $($(2)_PATH) ; git checkout -f $(NEEDED_$(2)_BRANCH) || git checkout -f -b $($(2)_BRANCH_AND_REMOTE)); \
echo "*** [$(1)] git reset --hard $(NEEDED_$(2)_VERSION)" && (cd $($(2)_PATH) && git reset --hard $(NEEDED_$(2)_VERSION)); \
fi
@echo "*** [$(1)] git submodule update --init --recursive" && (cd $($(2)_PATH) && git submodule update --init --recursive)
print-$(1)::
@printf "*** %-16s %-45s %s (%s)\n" "$(DIRECTORY_$(2))" "$(MODULE_$(2))" "$(NEEDED_$(2)_VERSION)" "$(NEEDED_$(2)_BRANCH)"
.PHONY: validate-$(1) reset-$(1) print-$(1)
reset-versions:: reset-$(1)
validate-versions:: Validate-$(1)
print-versions:: print-$(1)
endef
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
reset-versions::
validate-versions::
@if test -e .validate-versions-failure; then \
rm .validate-versions-failure; \
echo One or more modules needs update; \
exit 1; \
else \
echo All dependent modules up to date; \
fi
reset:
@$(MAKE) validate-versions RESET_VERSIONS=1
__bump-version-%:
@if [ "$(REV)" = "" ]; then echo "Usage: make bump-version-$* REV=<ref>"; exit 1; fi
python versions.py set-rev $* $(REV)
@if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to pick up $(REV)." | git commit -F - $(CONFIG); fi
__bump-branch-%:
@if [ "$(BRANCH)" = "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
@if [ "$(REMOTE_BRANCH)" == "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
python versions.py set-branch $* $(BRANCH)
python versions.py set-remote-branch $* $(REMOTE_BRANCH)
@if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to switch to $(BRANCH) $(REMOTE BRANCH)." | git commit -F - $(CONFIG); fi
__bump-current-version-%:
REV=$(shell cd $(ACCEPTANCE_TESTS_PATH)/$* && git log -1 --pretty=format:%H); \
python versions.py set-rev $* $$REV; \
if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to pick up $$REV:" | git commit -F - $(CONFIG); fi
# Bump the given submodule to the revision given by the REV make variable
# If COMMIT is 1, commit the change
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-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-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-roslyn:
$(MAKE) bump-roslyn COMMIT=1
commit-bump-coreclr:
$(MAKE) bump-coreclr COMMIT=1
commit-bump-ms-test-suite:
$(MAKE) bump-ms-test-suite COMMIT=1
commit-bump-current-roslyn:
$(MAKE) bump-current-roslyn COMMIT=1
commit-bump-current-coreclr:
$(MAKE) bump-current-coreclr COMMIT=1
commit-bump-current-ms-test-suite:
$(MAKE) bump-current-ms-test-suite COMMIT=1
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env python
import sys
import json
def find_module(submodules, name):
for item in submodules:
if item["name"] == name:
return item
print("Not found")
sys.exit(1)
if len(sys.argv) < 2:
print("Usage: versions.py <command>")
sys.exit(1)
CONFIG_FILE = "SUBMODULES.json"
command = sys.argv[1]
submodules = json.load(open(CONFIG_FILE))
if command == "get-rev":
mod = find_module(submodules, sys.argv[2])
print(mod["rev"])
elif command == "get-url":
mod = find_module(submodules, sys.argv[2])
print(mod["url"])
elif command == "get-dir":
mod = find_module(submodules, sys.argv[2])
print(mod["directory"])
elif command == "get-remote-branch":
mod = find_module(submodules, sys.argv[2])
print(mod["remote-branch"])
elif command == "set-rev":
mod = find_module(submodules, sys.argv[2])
mod["rev"] = sys.argv[3]
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
elif command == "set-branch":
mod = find_module(submodules, sys.argv[2])
mod["branch"] = sys.argv[3]
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
elif command == "set-remote-branch":
mod = find_module(submodules, sys.argv[2])
mod["remote-branch"] = sys.argv[3]
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
elif command == "cat":
print(json.dumps(submodules, indent = 2))
else:
print("Unknown command "" + command + "".")
sys.exit(1)
+28 -54
View File
@@ -4,54 +4,41 @@
# For further details see http://www.appveyor.com
#
# Use 'unstable' Appveyor build worker image as Appveyor have added Cygwin to this for us
os: Unstable
#
# Custom environment variables
#
environment:
global:
CYG_ROOT: C:/cygwin
CYG_ROOT: C:\cygwin
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_CACHE: C:/cygwin/var/cache/setup
NSIS_ROOT: C:\nsis
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:
- 'echo Building Mono for Windows'
- 'echo System architecture: %PLATFORM%'
- 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
- 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
- 'git config --global core.autocrlf input'
- git config --global core.autocrlf input
#
# Install needed build dependencies
#
install:
# NOTE: Already installed on current Appveyor unstable image
# - 'echo Retrieving Cygwin'
# - 'appveyor DownloadFile http://cygwin.com/setup-x86.exe -FileName %CYGROOT%/setup-x86.exe'
- 'echo Setting up Cygwin dependencies'
- '%CYG_ROOT%\setup-x86.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P autoconf -P automake -P bison -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl > NUL'
- 'echo Check Cygwin setup'
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
- 'echo Done setting up Cygwin'
- 'echo Retrieving NSIS'
- 'appveyor DownloadFile "http://sunet.dl.sourceforge.net/project/nsis/NSIS 2/2.46/nsis-2.46-setup.exe" -FileName nsissetup.exe'
- 'echo Setting up NSIS'
- 'nsissetup.exe /S /D=%NSIS_ROOT%'
- 'echo Done setting up NSIS'
#
# NOTE: msbuild doesn't work at present so use Cygwin to build
#
#build:
# project: C:\projects\mono\msvc\mono.sln
# verbosity: detailed
- 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
#
@@ -59,29 +46,16 @@ install:
#
# 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.
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
#
build_script:
- cmd: 'echo Cygwin root is: %CYG_ROOT%'
- cmd: 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
- cmd: 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
- cmd: 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
- cmd: 'echo Autogen running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; NOCONFIGURE=1 ./autogen.sh --prefix=/usr/local --with-preview=yes"'
- cmd: 'echo Configure running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./configure --host=i686-pc-mingw32"'
- cmd: 'echo Pulling monolite latest...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
- cmd: 'echo Make running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make"'
- cmd: 'echo Installing...'
- cmd: 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
- cmd: '%CYG_ROOT%/bin/bash --login -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"'
# - cmd: 'echo Building package...'
# - cmd: 'cd %APPVEYOR_BUILD_FOLDER%'
# - cmd: '%NSIS_ROOT%\makensis /DMILESTONE=%APPVEYOR_REPO_BRANCH% /DSOURCE_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER\install\*.* /DBUILDNUM=%APPVEYOR_BUILD_VERSION% monowiz.win32.nsi'
# - cmd: 'Building distribution...'
# - cmd: '%CYG_ROOT%/bin/bash -lc "export CYGWIN=winsymlinks:native; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make dist"'
- '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
+8 -8
View File
@@ -30,18 +30,18 @@ fi
DIE=1
}
if [ -z "$LIBTOOL" ]; then
LIBTOOL=`which glibtool 2>/dev/null`
if [ ! -x "$LIBTOOL" ]; then
LIBTOOL=`which libtool`
if [ -z "$LIBTOOLIZE" ]; then
LIBTOOLIZE=`which glibtoolize 2>/dev/null`
if [ ! -x "$LIBTOOLIZE" ]; then
LIBTOOLIZE=`which libtoolize`
fi
fi
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "**Error**: You must have \`libtoolize' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.2.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
@@ -98,7 +98,7 @@ esac
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
${LIBTOOL}ize --force --copy
$LIBTOOLIZE --force --copy
fi
fi
-227
View File
@@ -1,227 +0,0 @@
#!/bin/bash -e
CURDIR="`pwd`"
MINGW=i386-mingw32msvc
CROSS_DIR=/opt/cross/$MINGW
EXTRA_CROSS_DIR=
INSTALL_DESTDIR="$CURDIR/mono-win32"
PROFILES="default net_2_0 net_3_5 net_4_0 net_4_5 moonlight"
TEMPORARY_PKG_CONFIG_DIR=/tmp/$RANDOM-pkg-config-$RANDOM
ORIGINAL_PATH="$PATH"
export CPPFLAGS_FOR_EGLIB CFLAGS_FOR_EGLIB CPPFLAGS_FOR_LIBGC CFLAGS_FOR_LIBGC
function cleanup ()
{
if [ -d "$TEMPORARY_PKG_CONFIG_DIR" ]; then
rm -rf "$TEMPORARY_PKG_CONFIG_DIR"
fi
}
function check_pkg_config_dir ()
{
local DIR="$1"
local DIR_PREFIX="$2"
if [ ! -d "$DIR" ]; then
return
fi
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$DIR"/*.pc; do
if [ -f $pc ]; then
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$DIR_PREFIX;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
fi;
done
if [ -z "$CROSS_PKG_CONFIG_DIR" ]; then
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
}
function show_build_info ()
{
cat <<EOF
Installation prefix: $MONO_PREFIX
CPPFLAGS: ${CPPFLAGS:=not set}
LDFLAGS: ${LDFLAGS:=not set}
MONO_PATH: ${MONO_PATH:=not set}
EOF
}
function setup ()
{
local pcname
CROSS_BIN_DIR="$CROSS_DIR/bin"
CROSS_DLL_DIR="$CROSS_DIR/bin"
PATH=$CROSS_BIN_DIR:$PATH
MONO_VERSION=`grep AC_INIT configure.ac | cut -d ',' -f 2|tr -d '\[ \]'`
if [ -d ./.git ]; then
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2|tr -d '\)'|tr -d '\('`"
MONO_RELEASE="$MONO_VERSION-$MONO_GIT_BRANCH-$MONO_GIT_COMMIT"
else
MONO_RELEASE="$MONO_VERSION"
fi
MONO_PREFIX="$MONO_PREFIX/mono-$MONO_RELEASE"
NOCONFIGURE=yes
export NOCONFIGURE
check_pkg_config_dir "$CROSS_DIR/lib/pkgconfig" "$CROSS_DIR"
if [ -n "$EXTRA_CROSS_DIR" -a -d "$EXTRA_CROSS_DIR" ]; then
if [ -d "$EXTRA_CROSS_DIR/bin" ]; then
PATH="$EXTRA_CROSS_DIR/bin":$PATH
fi
check_pkg_config_dir "$EXTRA_CROSS_DIR/lib/pkgconfig" "$EXTRA_CROSS_DIR"
if [ -d "$EXTRA_CROSS_DIR/include" ]; then
if [ -z "$CPPFLAGS" ]; then
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\""
else
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\" $CFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/lib" ]; then
if [ -z "$LDFLAGS" ]; then
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\""
else
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\" $LDFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/share/aclocal" ]; then
if [ -z "$MONO_PATH" ]; then
MONO_PATH="\"$EXTRA_CROSS_DIR\""
else
MONO_PATH="\"$EXTRA_CROSS_DIR\":$MONO_PATH"
fi
fi
fi
export PATH MONO_PATH CPPFLAGS
show_build_info
}
function build ()
{
if [ -f ./Makefile ]; then
make distclean
fi
if [ -d ./autom4te.cache ]; then
rm -rf ./autom4te.cache
fi
if [ -f ./config.status ]; then
for f in `find -name config.status -type f`; do
rm $f
done
fi
./autogen.sh
BUILD="`./config.guess`"
if [ ! -d "$CURDIR/build-cross-windows" ]; then
mkdir "$CURDIR/build-cross-windows"
fi
cd "$CURDIR/build-cross-windows"
rm -rf *
../configure --prefix=$MONO_PREFIX --with-crosspkgdir=$CROSS_PKG_CONFIG_DIR --build=$BUILD --target=$MINGW --host=$MINGW --enable-parallel-mark --program-transform-name="" --with-tls=none --disable-mcs-build --disable-embed-check --enable-win32-dllmain=yes --with-libgc-threads=win32 --with-profile4=yes
make
cd "$CURDIR"
if [ ! -d "$CURDIR/build-cross-windows-mcs" ]; then
mkdir "$CURDIR/build-cross-windows-mcs"
fi
rm -rf autom4te.cache
unset PATH
PATH="$ORIGINAL_PATH"
export PATH
cd "$CURDIR/build-cross-windows-mcs"
rm -rf *
../configure --prefix=$MONO_PREFIX --enable-parallel-mark
make
}
function doinstall ()
{
if [ -d "$INSTALL_DIR" ]; then
rm -rf "$INSTALL_DIR"
fi
cd "$CURDIR/build-cross-windows"
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
if test -d $CURDIR/mcs; then
mcsdir=$CURDIR/mcs
else
mcsdir=$CURDIR/../mcs
fi
cd "$mcsdir/mcs"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
done
cd "$mcsdir/class"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
done
cd "$mcsdir/tools"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
done
cd "$CURDIR/mono-win32"
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
}
function usage ()
{
cat <<EOF
Usage: build-mingw32.sh [OPTIONS]
where OPTIONS are:
-d DIR Sets the location of directory where MINGW is installed [$CROSS_DIR]
-e DIR Sets the location of directory where additional cross develoment packages are installed [${EXTRA_CROSS_DIR:=none}]
-m MINGW Sets the MINGW target name to be passed to configure [$MINGW]
-p PREFIX Prefix at which Mono is to be installed. Build will append the 'mono-X.Y' string to that path
EOF
exit 1
}
trap cleanup 0
pushd . > /dev/null
while getopts "d:m:e:p:" opt; do
case "$opt" in
d) CROSS_DIR="$OPTARG" ;;
m) MINGW="$OPTARG" ;;
e) EXTRA_CROSS_DIR="$OPTARG" ;;
p) MONO_PREFIX="$OPTARG" ;;
*) usage ;;
esac
done
setup
build
doinstall
show_build_info
popd > /dev/null
+50
View File
@@ -0,0 +1,50 @@
# Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at miguel@xamarin.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
+370 -291
View File
File diff suppressed because it is too large. Load diff
-6
View File
@@ -1,6 +0,0 @@
2008-03-23 Dean Brettle <[email protected]>
* Compat.browser: added. Provides browser definitions with
compatible IDs.
-15
View File
@@ -1,15 +0,0 @@
2010-05-17 Zoltan Varga <[email protected]>
* mono-2.pc.in (Libs): Remove glib dependencies.
2010-05-07 Zoltan Varga <[email protected]>
* mono-2.pc (Requires): Remove glib dependencies.
2010-04-02 Jb Evain <[email protected]>
* dotnet35.pc.in: add System.Data.Services.dll.
2010-03-08 Rodrigo Kumpera <[email protected]>
* mono.supp: Add hazard pointers supressions.
+3 -2
View File
@@ -5,7 +5,7 @@ monolldbdir = $(libdir)/mono/lldb
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README ChangeLog \
browscap.ini mono.supp mono.d README \
mono.pc.in mono-2.pc.in monosgen-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\
@@ -14,7 +14,8 @@ EXTRA_DIST = \
net_1_1/machine.config \
gdb/mono-gdb.py \
gdb/gdb-python.diff \
lldb/mono.py
lldb/mono.py \
lldb/monobt.py
pkgconfigdir = $(libdir)/pkgconfig
+1 -1
View File
@@ -10,7 +10,7 @@
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
<dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
-66
View File
@@ -1,66 +0,0 @@
2009-10-09 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoSupport.run_hook): Set MONO_XDEBUG to 'gdb' to activate
the GDB support mode in the runtime.
2009-04-14 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoClassPrinter.to_string): Add a MonoClass* pretty
printer.
2009-04-12 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoMethodPrinter.to_string): Add a MonoMethod* pretty
printer.
2009-04-10 Zoltan Varga <[email protected]>
* mono-gdb.py: Update to the latest archer api.
2009-04-07 Zoltan Varga <[email protected]>
* mono-gdb.py (ObjectPrinter.__init__): Update to latest archer api.
2009-04-06 Zoltan Varga <[email protected]>
* test-xdb.py: New file, tester script for xdb.
* mono-gdb.py (stringify_class_name): Handle classes without a namespace
correctly.
* mono-gdb.py: Update after the changes to dwarfwriter.c.
2009-04-05 Zoltan Varga <[email protected]>
* mono-gdb.py: Handle superclasses in the pretty printer.
2009-03-27 Zoltan Varga <[email protected]>
* mono-gdb.py (StringPrinter.to_string): Fix support for non-ascii characters.
2009-03-20 Zoltan Varga <[email protected]>
* mono-gdb.py: Update for the latest python API on the archer branch.
2009-02-03 Zoltan Varga <[email protected]>
* mono-gdb.py: Remove the --64 argument to as, it is not needed.
* mono-gdb.py (stringify_class_name): Helper function to print base types
using their short name. Also add a prototype implementation of registering
the hooks from python code instead of needing the mono-gdbinit file.
* gdb-python.diff: Changes against the gdb archer branch at
http://sourceware.org/gdb/wiki/PythonGdb to fix some problems/add functionality.
2009-02-03 Geoff Norton <[email protected]>
* mono-gdbinit: Hook into backtrace as hook-stop seems to crash gdb
* mono-gdb.py: Find the gdbinit name from the executable name instead of
hardcoding mono
2009-01-29 Zoltan Varga <[email protected]>
* mono-gdb.py mono-gdbinit: Support files to help debugging mono/mono apps
using a python enabled gdb.
+14 -14
View File
@@ -53,7 +53,7 @@ def stringify_class_name(ns, name):
if ns == "":
return name
else:
return "%s.%s".format (ns, name)
return "{}.{}".format (ns, name)
class ArrayPrinter:
"Print a C# array"
@@ -66,7 +66,7 @@ class ArrayPrinter:
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "%s [%d]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
class ObjectPrinter:
"Print a C# object"
@@ -96,7 +96,7 @@ class ObjectPrinter:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("%s".format (field.name))))
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
@@ -109,7 +109,7 @@ class ObjectPrinter:
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
gdb_type = gdb.lookup_type ("struct %s_%s".format (class_ns.replace (".", "_"), class_name))
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
return self._iterator(obj.cast (gdb_type))
except:
print (sys.exc_info ()[0])
@@ -129,12 +129,12 @@ class ObjectPrinter:
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct %s.%s".format (class_ns, class_name))
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "%s.%s".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
#return obj.cast (gdb_type)
return "%s.%s".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
return class_name
except:
print (sys.exc_info ()[0])
@@ -154,9 +154,9 @@ class MonoMethodPrinter:
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s:%s ()\"".format (class_name, val ["name"].string ())
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"%s\"".format (gdb.parse_and_eval ("mono_method_full_name (%s, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
@@ -169,9 +169,9 @@ class MonoClassPrinter:
return "0x0"
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s\"".format (class_name)
return "\"{}\"".format (class_name)
# This returns more info but requires calling into the inferior
#return "\"%s\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def lookup_pretty_printer(val):
t = str (val.type)
@@ -217,9 +217,9 @@ class MonoSupport(object):
new_size = os.stat ("xdb.s").st_size
if new_size > self.s_size:
sofile = "xdb.so"
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o".format (sofile))
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o {} xdb.o".format (sofile))
# FIXME: This prints messages which couldn't be turned off
gdb.execute ("add-symbol-file %s 0".format (sofile))
gdb.execute ("add-symbol-file {} 0".format (sofile))
self.s_size = new_size
class RunHook (gdb.Command):
@@ -245,4 +245,4 @@ exec_file = gdb.current_objfile ().filename
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
exec_file = os.readlink (exec_file)
exec_dir = os.path.dirname (exec_file)
gdb.execute ("source %s/%s-gdbinit".format (exec_dir, os.path.basename (exec_file)))
gdb.execute ("source {}/{}-gdbinit".format (exec_dir, os.path.basename (exec_file)))
-80
View File
@@ -1,80 +0,0 @@
2010-06-28 Zoltan Varga <[email protected]>
* mono-gdb.py: Add pretty printers for more runtime data structures.
2009-10-13 Zoltan Varga <[email protected]>
* mono-gdb.py: Add an 'xdb' command to flush the debugging info.
2009-10-12 Zoltan Varga <[email protected]>
* mono-gdb.py: Update this to gdb 7.0.
* mono-gdbinit: Removed, no longer needed.
2009-10-09 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoSupport.run_hook): Set MONO_XDEBUG to 'gdb' to activate
the GDB support mode in the runtime.
2009-04-14 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoClassPrinter.to_string): Add a MonoClass* pretty
printer.
2009-04-12 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoMethodPrinter.to_string): Add a MonoMethod* pretty
printer.
2009-04-10 Zoltan Varga <[email protected]>
* mono-gdb.py: Update to the latest archer api.
2009-04-07 Zoltan Varga <[email protected]>
* mono-gdb.py (ObjectPrinter.__init__): Update to latest archer api.
2009-04-06 Zoltan Varga <[email protected]>
* test-xdb.py: New file, tester script for xdb.
* mono-gdb.py (stringify_class_name): Handle classes without a namespace
correctly.
* mono-gdb.py: Update after the changes to dwarfwriter.c.
2009-04-05 Zoltan Varga <[email protected]>
* mono-gdb.py: Handle superclasses in the pretty printer.
2009-03-27 Zoltan Varga <[email protected]>
* mono-gdb.py (StringPrinter.to_string): Fix support for non-ascii characters.
2009-03-20 Zoltan Varga <[email protected]>
* mono-gdb.py: Update for the latest python API on the archer branch.
2009-02-03 Zoltan Varga <[email protected]>
* mono-gdb.py: Remove the --64 argument to as, it is not needed.
* mono-gdb.py (stringify_class_name): Helper function to print base types
using their short name. Also add a prototype implementation of registering
the hooks from python code instead of needing the mono-gdbinit file.
* gdb-python.diff: Changes against the gdb archer branch at
http://sourceware.org/gdb/wiki/PythonGdb to fix some problems/add functionality.
2009-02-03 Geoff Norton <[email protected]>
* mono-gdbinit: Hook into backtrace as hook-stop seems to crash gdb
* mono-gdb.py: Find the gdbinit name from the executable name instead of
hardcoding mono
2009-01-29 Zoltan Varga <[email protected]>
* mono-gdb.py mono-gdbinit: Support files to help debugging mono/mono apps
using a python enabled gdb.
+18 -18
View File
@@ -31,7 +31,7 @@ class StringPrinter:
while i < len:
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
if val >= 256:
c = "\u%X".format (val)
c = unichr (val)
else:
c = chr (val)
res.append (c)
@@ -48,7 +48,7 @@ def stringify_class_name(ns, name):
if ns == "":
return name
else:
return "%s.%s".format (ns, name)
return "{}.{}".format (ns, name)
class ArrayPrinter:
"Print a C# array"
@@ -61,7 +61,7 @@ class ArrayPrinter:
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "%s [%d]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
class ObjectPrinter:
"Print a C# object"
@@ -91,7 +91,7 @@ class ObjectPrinter:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("%s".format (field.name))))
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
@@ -105,7 +105,7 @@ class ObjectPrinter:
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
try:
gdb_type = gdb.lookup_type ("struct %s_%s".format (class_ns.replace (".", "_"), class_name))
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
return self._iterator(obj.cast (gdb_type))
except:
return {}.__iter__ ()
@@ -127,12 +127,12 @@ class ObjectPrinter:
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct %s.%s".format (class_ns, class_name))
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "%s.%s".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
#return obj.cast (gdb_type)
return "%s.%s".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
return class_name
except:
print (sys.exc_info ()[0])
@@ -152,9 +152,9 @@ class MonoMethodPrinter:
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s:%s ()\"".format (class_name, val ["name"].string ())
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"%s\"".format (gdb.parse_and_eval ("mono_method_full_name (%s, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
@@ -168,13 +168,13 @@ class MonoClassPrinter:
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
if klass ["generic_class"].cast (gdb.lookup_type ("guint64")) != 0:
class_name = "%s<%s>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
class_name = "{}<{}>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
if add_quotes:
return "\"%s\"".format (class_name)
return "\"{}\"".format (class_name)
else:
return class_name
# This returns more info but requires calling into the inferior
#return "\"%s\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def to_string(self):
try:
@@ -222,7 +222,7 @@ class MonoGenericClassPrinter:
method_inst_str = ""
if int(method_inst.cast (gdb.lookup_type ("guint64"))) != 0:
method_inst_str = str(method_inst)
return "%s, [%s], [%s]>".format (container_str, class_inst_str, method_inst_str)
return "{}, [{}], [{}]>".format (container_str, class_inst_str, method_inst_str)
def to_string(self):
try:
@@ -252,9 +252,9 @@ class MonoTypePrinter:
info = str(t ["data"]["generic_class"])
if info != "":
return "{%s, %s}".format (kind, info)
return "{{}, {}}".format (kind, info)
else:
return "{%s}".format (kind)
return "{{}}".format (kind)
except:
#print (sys.exc_info ()[0])
#print (sys.exc_info ()[1])
@@ -283,7 +283,7 @@ class MonoMethodRgctxPrinter:
if i > 0:
inst_str = inst_str + ", "
inst_str = inst_str + type_printer.to_string ()
return "MRGCTX[%s, [%s]]".format (klass_printer.to_string(), inst_str)
return "MRGCTX[{}, [{}]]".format (klass_printer.to_string(), inst_str)
class MonoVTablePrinter:
"Print a MonoVTable structure"
@@ -298,7 +298,7 @@ class MonoVTablePrinter:
klass = vtable ["klass"]
klass_printer = MonoClassPrinter (klass)
return "vtable(%s)".format (klass_printer.to_string ())
return "vtable({})".format (klass_printer.to_string ())
def lookup_pretty_printer(val):
t = str (val.type)
+56
View File
@@ -0,0 +1,56 @@
import lldb
def print_frames(thread, num_frames, current_thread):
# TODO: Make output header similar to bt.
print '%c thread #%i' % ('*' if current_thread else ' ', thread.idx)
if current_thread:
selected_frame = thread.GetSelectedFrame()
for frame in thread.frames[:+num_frames]:
pc = str(frame.addr)
fmt = ' %c %s'
var = frame
if pc[0] == '0':
try:
framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
var = 'frame #%i: %s%s' % (frame.idx, pc, framestr)
except:
pass
print fmt % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
def monobt(debugger, command, result, dict):
opts = {'all_bt': False, 'num_frames': None}
if command == 'all':
opts['all_bt'] = True
elif command.isdigit():
opts['num_frames'] = int(command)
elif command != '':
print 'error: monobt [<number>|all]'
return
target = debugger.GetSelectedTarget()
process = target.process
if not process.IsValid():
print 'error: invalid process'
return
if opts['all_bt']:
for thread in process.threads:
print_frames(thread, len(thread), process.selected_thread == thread)
print ''
else:
thread = process.selected_thread
num_frames = len(thread) if opts['num_frames'] is None else opts['num_frames']
print_frames(thread, num_frames, True)
return None
def __lldb_init_module (debugger, dict):
# This initializer is being run from LLDB in the embedded command interpreter
# Add any commands contained in this module to LLDB
debugger.HandleCommand('command script add -f monobt.monobt monobt')
print '"monobt" command installed'
-6
View File
@@ -1,6 +0,0 @@
2009-02-19 Rodrigo Kumpera <[email protected]>
* LockTracerDecoder.cs: Initial version of the lock tracers decoder.
+24 -2
View File
@@ -144,7 +144,8 @@ public enum Lock {
AssemblyBindingLock,
MarshalLock,
ClassesLock,
LoaderGlobalDataLock
LoaderGlobalDataLock,
ThreadsLock,
}
public class SimLock
@@ -242,7 +243,24 @@ public class SimLock
}
public override string ToString () {
return String.Format ("{0}", kind);
switch (kind) {
case Lock.LoaderLock:
case Lock.IcallLock:
case Lock.AssemblyBindingLock:
case Lock.MarshalLock:
case Lock.ClassesLock:
case Lock.LoaderGlobalDataLock:
case Lock.ThreadsLock:
return String.Format ("{0}", kind);
case Lock.ImageDataLock:
case Lock.DomainLock:
case Lock.DomainAssembliesLock:
case Lock.DomainJitCodeHashLock:
return String.Format ("{0}[{1}]", kind, id);
default:
return String.Format ("Unknown({0})[{1}]", kind, id);
}
}
}
@@ -311,6 +329,10 @@ public class Trace {
"add_record",
"mono_locks_lock_acquired",
"mono_locks_lock_released",
"mono_threads_lock",
"mono_threads_unlock",
"mono_domain_lock",
"mono_domain_unlock",
};
public Trace (string[] fields) {
+1 -1
View File
@@ -6,4 +6,4 @@ libdir=${exec_prefix}/lib
Name: Mono NUnit
Description: Mono's version of NUnit
Version: @VERSION@
Libs: -r:${libdir}/mono/2.0/nunit.core.dll -r:${libdir}/mono/2.0/nunit.core.interfaces.dll -r:${libdir}/mono/2.0/nunit.core.extensions.dll -r:${libdir}/mono/2.0/nunit.framework.dll -r:${libdir}/mono/2.0/nunit.framework.extensions.dll -r:${libdir}/mono/2.0/nunit.mocks.dll -r:${libdir}/mono/2.0/nunit.util.dll -r:${libdir}/mono/2.0/nunit-console-runner.dll
Libs: -r:${libdir}/mono/4.5/nunit.core.dll -r:${libdir}/mono/4.5/nunit.core.interfaces.dll -r:${libdir}/mono/4.5/nunit.core.extensions.dll -r:${libdir}/mono/4.5/nunit.framework.dll -r:${libdir}/mono/4.5/nunit.framework.extensions.dll -r:${libdir}/mono/4.5/nunit.mocks.dll -r:${libdir}/mono/4.5/nunit.util.dll -r:${libdir}/mono/4.5/nunit-console-runner.dll
+1 -24
View File
@@ -21,21 +21,8 @@ provider mono {
probe gc__requested (int generation, uintptr_t requested_size, int wait_to_finish);
probe gc__checkpoint__1 (int generation);
probe gc__checkpoint__2 (int generation);
probe gc__checkpoint__3 (int generation);
probe gc__checkpoint__4 (int generation);
probe gc__checkpoint__5 (int generation);
probe gc__checkpoint__6 (int generation);
probe gc__checkpoint__7 (int generation);
probe gc__checkpoint__8 (int generation);
probe gc__checkpoint__9 (int generation);
probe gc__concurrent__start__begin (int generation);
probe gc__concurrent__start__end (int generation, long long num_major_objects_marked);
probe gc__concurrent__update__finish__begin (int generation, long long num_major_objects_marked);
probe gc__concurrent__update__end (int generation, long long num_major_objects_marked);
probe gc__concurrent__finish__end (int generation, long long num_major_objects_marked);
probe gc__sweep__begin (int generation, int full_sweep);
probe gc__sweep__end (int generation, int full_sweep);
@@ -45,19 +32,12 @@ provider mono {
probe gc__world__restart__begin (int generation);
probe gc__world__restart__end (int generation);
probe gc__heap__alloc (uintptr_t addr, uintptr_t len);
probe gc__heap__free (uintptr_t addr, uintptr_t len);
probe gc__locked ();
probe gc__unlocked ();
probe gc__nursery__tlab__alloc (uintptr_t addr, uintptr_t len);
probe gc__nursery__obj__alloc (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__major__obj__alloc__large (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__major__obj__alloc__pinned (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__major__obj__alloc__degraded (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__major__obj__alloc__mature (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
/* Can be nursery->nursery, nursery->major or major->major */
probe gc__obj__moved (uintptr_t dest, uintptr_t src, int dest_gen, int src_gen, uintptr_t size, char *ns_name, char *class_name);
@@ -70,13 +50,10 @@ provider mono {
probe gc__finalize__enqueue (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name, int generation, int is_critical);
probe gc__finalize__invoke (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__weak__update (uintptr_t ref_addr, uintptr_t old_addr, uintptr_t new_addr, uintptr_t size, char *ns_name, char *class_name, int track);
probe gc__weak__update (uintptr_t ref_addr, uintptr_t new_addr, uintptr_t size, char *ns_name, char *class_name, int track);
probe gc__global__remset__add (uintptr_t ref_addr, uintptr_t obj_addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__obj__cemented (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
probe gc__internal__alloc (uintptr_t addr, uintptr_t size, int type);
probe gc__internal__dealloc (uintptr_t add, uintptr_t size, int type);
};
#pragma D attributes Evolving/Evolving/Common provider mono provider
-147
View File
@@ -1,147 +0,0 @@
2009-08-11 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: the 'Message Layout' can now handle
self-referencing types. Fixes bug #529353.
2009-08-05 Atsushi Enomoto <[email protected]>
* web.config: add WCF assemblies as references at compilation.
* machine.config: add some missing WCF sections (new in 3.5).
2009-05-28 Atsushi Enomoto <[email protected]>
* machine.config: fix WCF diagnostics section name.
2009-03-31 Marek Habersack <[email protected]>
* DefaultWsdlHelpGenerator.aspx: the link element in <head> must
be created using Response.Write, as the code expression in the
href attribute is otherwise treated verbatim. This is the same as
with .NET. Fixes bug #490497
2009-03-27 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: disable the test form
when only Soap is supported.
Bug #342073 fixed.
2009-01-23 Atsushi Enomoto <[email protected]>
* web.config : added .svc handler.
2009-01-07 Kornél Pál <[email protected]>
* DefaultWsdlHelpGenerator.aspx: Move <script> at the end of <head> that
will make Visual Studio recognize the web service disco reference.
Contributed under MIT/X11 license.
2008-12-03 Marek Habersack <[email protected]>
* machine.config: rename serviceModelHostingEnvironment to
serviceHostingEnvironment.
2008-11-20 Gonzalo Paniagua Javier <[email protected]>
* machine.config: in 2.0, there's no <connectionManagement> section
here. Bug #445991 fixed.
2008-11-14 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: use javascript instead of
HttpWebRequest to avoid a deadlock if the web service uses Session.
Bug #444343 fixed.
2008-10-09 Gonzalo Paniagua Javier <[email protected]>
* web.config: default values for httpRuntime are different in 2.0
2008-10-09 Marek Habersack <[email protected]>
* web.config: added the default monoSettings section which works around
an incompatibility between mcs and csc, mentioned in bug #433806
* machine.config: added definition of the monoSettings section to
the system.web group
2008-10-06 Marek Habersack <[email protected]>
* machine.config: added entries to ignore the mobileControls and
deviceFilters sections.
2008-09-02 Marek Habersack <[email protected]>
* web.config: removed System.Web.Extensions.dll from the assemblies
(reverting r112073) - it would break all the ASP.NET applications
which use System.Web.Extensions other than 3.5.0.0
2008-09-06 Daniel Morgan <[email protected]>
* machine.config: added Mono.Data.SybaseClient
to DbProviderFactories section.
2008-09-02 Atsushi Enomoto <[email protected]>
* web.config: added System.Web.Extensions.dll to assemblies.
2008-08-28 Zoltan Varga <[email protected]>
* machine.config: Fix syntax error.
2008-03-23 Dean Brettle <[email protected]>
* Makefile.am: added Browsers/Compat.browser
2008-02-29 Marek Habersack <[email protected]>
* machine.config: added an entry to ignore the browserCaps section.
2007-12-15 Marek Habersack <[email protected]>
* web.config: compilation/compilers are no longer necessary.
2007-12-08 Marek Habersack <[email protected]>
* machine.config: updated the LocalSqlServer connection string to
match MS.NET and added a new connection string, LocalSqliteServer,
to be used by default on Unix.
Updated the AspNetSqlMembershipProvider definition to match
MS.NET.
* settings.map: added
* Makefile.am: added settings.map
2007-10-17 Atsushi Enomoto <[email protected]>
* web.config, machine.config: moved webSerices section from former
to latter.
2007-09-05 Atsushi Enomoto <[email protected]>
* machine.config : added WCF sectionGroups.
2007-09-04 Marek Habersack <[email protected]>
* machine.config: added an entry to ignore the <system.webServer>
section. Fixes bug #82535
2007-07-03 Marek Habersack <[email protected]>
* DefaultWsdlHelpGenerator.aspx: make head server-side, for the
service generator to run on sites which use stylesheet themes
configured in web.config. Fixes bug #81994
2007-05-01 Marek Habersack <[email protected]>
* machine.config: added standard data provider factories, or
otherwise the SqlDataSource tests will fail.
2007-04-27 Atsushi Enomoto <[email protected]>
* DefaultWsdlHelpGenerator.aspx :
ProfileViolations could be null, when there is no Binding. So,
don't omit null check.
Stop your bad habit of missing ChangeLog. Former changes (as long
as logged) can be seen in ../../ChangeLog.
-9
View File
@@ -1,9 +0,0 @@
2009-08-06 Atsushi Enomoto <[email protected]>
* web.config: add WCF assemblies as references at compilation.
* machine.config: add some missing WCF sections (new in 3.5).
2009-07-24 Jb Evain <[email protected]>
* Initial import of the net_4_0 specific files.
+4 -1
View File
@@ -13,11 +13,14 @@
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.SystemDiagnosticsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="system.windows.forms" type="System.Windows.Forms.WindowsFormsSection, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.runtime.serialization" type="System.Runtime.Serialization.Configuration.SerializationSectionGroup, System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="dataContractSerializer" type="System.Runtime.Serialization.Configuration.DataContractSerializerSection, System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
-133
View File
@@ -1,133 +0,0 @@
2010-04-06 Andreia Gaita <[email protected]>
* Makefile.am: fix distcheck - several targets get built on the
srcdir, which has no write permissions on make distcheck, so make
sure permissions are set
2009-12-22 Jo Shields <[email protected]>
* HtmlAgilityPack/LICENSE: Include upstream license (Ms-PL) since the
file headers don't specify it
2009-12-22 Jo Shields <[email protected]>
* HtmlAgilityPack/*: Bundle HtmlAgilityPack 1.4~beta2 from
http://www.codeplex.com/htmlagilitypack in source form.
* AgilityPack.dll: Remove binary assembly, use source instead.
* docs.make Makefile.am README: Reflect above changes
2009-02-12 Zoltan Varga <[email protected]>
* Makefile.am (EXTRA_DIST): Remove removed files.
* README: Point to the documentation on the wiki.
* call-sites.txt: Remove this, its contents is in jit-trampolines.
* memory-management.txt thread-safety.txt aot-compiler.txt jit-regalloc
exception-handling.txt: Remove documents which are now on the wiki.
2009-02-11 Rodrigo Kumpera <[email protected]>
* thread-safety.txt: Improve the docs about image lock.
2009-02-11 Rodrigo Kumpera <[email protected]>
* thread-safety.txt: Document the new image lock.
2008-12-12 Mark Probst <[email protected]>
* mini-porting.txt: Added some details about function descriptors
and emulated opcodes.
2008-12-08 Jonathan Pryor <[email protected]>
* mono-file-formats.source, mono-tools.source: Place these under the
new "Commands and Files" node, and remove nay intermediate nodes.
2008-11-20 Jonathan Pryor <[email protected]>
* Makefile.am (sources_DATA): Add mono-file-formats.source,
mono-tools.source.
2008-11-20 Raja R Harinath <[email protected]>
Remove unnecessary rebuilds of the html directory
* docs.make (monoapi.zip): Make slightly more unforgiving, by
using '&&' instead of ';' to sequence commands.
(mono-tools.zip, mono-file-formats.zip): Likewise.
* Makefile.am (monoapi.zip, mono-tools.zip, mono-fileformats.zip):
Likewise.
(convert.exe): Don't depend on Makefile.am or docs.make.
2008-11-19 Raja R Harinath <[email protected]>
Fix srcdir != builddir, and add idiom for multi-output commands
* docs.make (monoapi.zip): Handle the case where 'monoapi.tree'
exists but 'monoapi.zip' doesn't. IOW, we should rebuild
monoapi.zip with 'rm monoapi.zip; make'.
(mono-tools.zip, mono-file-formats.zip): Likewise.
* Makefile.am (monoapi.zip, mono-tools.zip, mono-fileformats.zip):
Likewise.
(monoapi.tree): Don't use $< in an explicit rule.
(mono-tools.tree, mono-file-formats.tree): Likewise.
2008-11-18 Jonathan Pryor <[email protected]>
* Makefile.am (EXTRA_DIST): Add mono-file-formats{.config,.source} and
mono-tools{.config,.source} (fixes the build).
2008-11-18 Jonathan Pryor <[email protected]>
* docs.make, Makefile.am: Build mono-file-formats{.tree,.zip},
mono-tool{.tree,.zip} files.
* mono-file-formats.config, mono-tools.config: Alter paths to man
pages so that they're valid for building from mono/docs.
* monoapi.make: Rename to docs.make.
2008-11-01 Raja R Harinath <[email protected]>
* Makefile.am: Clean up for srcdir != builddir.
(deploy/.stamp): Compute location of 'mono-wrapper' and pass to exdoc.
* exdoc (mono-wrapper): Use $runtimedir to look for 'mono-wrapper'.
2008-10-31 Jonathan Pryor <[email protected]>
* check, Makefile.am (EXTRA_DIST): Rename to check-exports. This was
needed to fix `make distdir...`, because (1) with a file named
`check` which (2) was listed in $(EXTRA_DIST), while (3) `check` is
ALSO a .PHONY target, this caused make to look for the `check` file,
not find it due to (3), and then proceed to try to build convert.exe
from convert.cs...for reasons I don't care about. This obviously
can't work during `make distdir`, as mcs hasn't been built yet, thus
leading to pain, suffering, and a broken build.
2008-10-30 Jonathan Pryor <[email protected]>
* . (svn:ignore), deploy (svn:ignore): Ignore generated files.
* AgilityPack.dll, api-style.css, ChangeLog, check, check-coverage,
convert.cs, current-api, deploy, documented, exdoc, ignore,
mono-api-metadata.html, monoapi.source, produce-lists, public,
public-api, README, sources, toc.xml, TODO, wapi: Copy from
../mono/docscripts.
* exdoc: Use the in-tree mono program to run convert.exe.
* Makefile.am: Mention files to clean/distribute; extract
documentation (with exdoc) and then assemble documentation (with
monoapi.make's assemble target) for use by monodoc.
* monoapi.make: Added; Makefile to use mcs' buid/rules.make to compile
convert.cs and assemble documentation. (This is a separate file so
that we can include mcs' build/rules.make, which needs topdir set to
behave properly BUT must be $(mcs_topdir) from Makefile.am's
perspective.)
* monoapi.source: Add a /monodoc/node element for use with monodoc 2.2.
2006-11-19 Miguel de Icaza <[email protected]>
* exdoc: Move to use CSS instead of tables, this will break
GtkHTML rendering.
* ignore: Updated with more hidden APIs.
* Bunch of documentation work.
+7 -17
View File
@@ -14,16 +14,12 @@ ASSEMBLED_DOCS = \
EXTRA_DIST = \
abc-removal.txt \
api-style.css \
assembly-bundle \
check-exports \
check-coverage \
convert.cs \
current-api \
deploy \
docs.make \
documented \
embedded-api \
exceptions \
exdoc \
file-share-modes \
gc-issues \
@@ -35,35 +31,29 @@ EXTRA_DIST = \
jit-imt \
jit-thoughts \
jit-trampolines \
local-regalloc.txt \
magic.diff \
mini-doc.txt \
mono-api-metadata.html \
mono-file-formats.config\
mono-file-formats.source\
mono_handle_d \
mono-tools.config \
mono-tools.source \
monoapi.source \
new-regalloc \
object-layout \
opcode-decomp.txt \
precise-gc \
produce-lists \
public \
public-api \
README \
release-notes-1.0.html \
remoting \
ssapre.txt \
stack-alignment \
stack-overflow.txt \
threading \
toc.xml \
TODO \
tree-mover.txt \
unmanaged-calls
-include $(mcs_topdir)/build/config.make
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
dist-hook:
$(mkdir_p) $(distdir)/sources
$(mkdir_p) $(distdir)/svgs
@@ -99,14 +89,14 @@ mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/depl
deploy/.stamp: convert.exe Makefile.am
$(mkdir_p) html
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
MONO_PATH=../mcs/class/lib/net_4_5 perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
MONO_PATH=$(CLASS) perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
touch $@
extract: deploy/.stamp
convert.exe: convert.cs AgilityPack.dll
$(TOOL_MAKE) PROFILE=net_4_5 convert.exe
$(TOOL_MAKE) convert.exe
AgilityPack.dll:
$(TOOL_MAKE) PROFILE=net_4_5 AgilityPack.dll
$(TOOL_MAKE) AgilityPack.dll
+176 -36
View File
@@ -1,40 +1,180 @@
h3 {
font-size: 18px;
padding-bottom: 4pt;
border-bottom: 2px solid #dddddd;
}
.api {
border: 1px solid;
padding: 10pt;
margin: 10pt;
}
.mapi-docs {
line-height: 1.5;
padding-left: 2em;
padding-right: 2em;
}
.mapi-docs p {
max-width: 60em;
}
.mapi-docs .mapi-body {
max-width: 60em;
}
.mapi-docs code {
border: 1px solid rgba(214,214,214,1);
background-color: rgba(249,249,249,1);
padding: 0.1em 0.5em;
}
.mapi-description code {
font-family: "Consolas", "Courier", monospace;
border: 1px solid rgba(214,214,214,1);
background-color: rgba(249,249,249,1);
padding: 0.1em 0.2em;
}
.api-entry {
border-bottom: none;
font-size: 18px;
}
.mapi-header {
padding: 0 0 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
border: 1px solid rgba(233,233,233,1);
background-color: rgba(249,249,249,1);
}
.prototype {
border: 1px solid;
background-color: #f2f2f2;
padding: 5pt;
margin-top: 5pt;
margin-bottom: 5pt;
}
.mapi-code {
padding: 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
border: 1px solid rgba(233,233,233,1);
background-color: rgba(249,249,249,1);
}
.header {
border: 1px solid;
padding: 0 0 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
}
.mapi-code:first-line {
line-height: 0px;
}
.mapi-entry code {
border: none;
background-color: transparent;
}
.code {
border: 1px solid;
padding: 0 0 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
}
.mapi-parameters {
border-collapse: collapse;
border-spacing: 0;
empty-cells: hide;
border: 0;
margin: 5px 0 26px;
}
.mapi-parameters td {
border: 1px solid rgba(214,214,214,1);
border-left-style: none;
padding: 5px 25px 5px 10px;
}
.mapi-parameters tr>td:last-child {
border-right: 0;
}
.mapi-parameters td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px;
}
.mapi-parameters tr:last-child>td {
border-bottom: 0;
}
.mapi-parameters tr:first-child>td {
border-top: 0;
}
.mapi-parameters tr td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px;
}
.mapi {
left: -25px;
margin: 0;
padding: 13px 25px 0;
position: relative;
width: 100%;
}
.mapi-description {
background: rgba(249,249,249,1);
border-bottom: 1px solid rgba(233,233,233,1);
left: -25px;
margin: 0;
padding: 13px 25px 0;
position: relative;
width: 100%;
}
.mapi-entry {
background: transparent;
}
.mapi-docs {
}
.mapi-prototype {
border-left: 5px solid rgba(205,233,244,1);
padding: .5em;
margin-top: 5pt;
margin-bottom: 5pt;
font-family: "Consolas", "Courier", monospace;
display: block;
overflow: auto;
background-color: #f9f9f9;
}
.mapi-declaration {
margin-top: 21px;
}
.mapi-section {
font-size: smaller;
font-weight: bold;
margin-top: 21px;
line-height: 1.5;
}
.mapi-strike {
text-decoration: line-through;
}
.mapi-deprecated {
color: red;
}
.mapi-ptr-container {
background: white;
border-bottom: 1px solid rgba(233,233,233,1);
left: -25px;
padding-left: 25px;
padding-right: 25px;
padding-bottom: 13px;
position: relative;
width: 100%;
}
.mapi-ptr {
background: rgba(249,249,249,1);
border-left: 1px solid rgba(233,233,233,1);
border-top: 1px solid rgba(233,233,233,1);
height: 12px;
left: 37px;
top: -7px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
width: 12px;
}
.mapi-height-container {
left: -25px;
padding: 0 25px;
position: relative;
width: 100%;
}
-57
View File
@@ -1,57 +0,0 @@
HOWTO bundle assemblies inside the mono runtime.
Paolo Molaro ([email protected])
* Intent
Bundling assemblies inside the mono runtime may be useful for a number
of reasons:
* creating a standalone complete runtime that can be more easily
distributed
* having an application run against a known set of assemblies
that has been tested
Of course, there are drawbacks, too: if there has been fixes
to the assemblies, replacing them means recompiling the
runtime as well and if there are other mono apps, unless they
use the same mono binary, there will be less opportunities for
the operating system to optimize memory usage. So use this
feature only when really needed.
* Creating the Bundle
To bundle a set of assemblies, you need to create a file that
lists the assembly names and the relative files. Empty lines
and lines starting with # are ignored:
== cut cut ==
# Sample bundle template
mscorlib: /path/to/mscorlib/assembly.dll
myapp: /path/to/myapp.exe
== cut cut ==
Next you need to build the mono runtime using a special configure option:
./configure --with-bundle=/path/to/bundle/template
The path to the template should be an absolute path.
The script metadata/make-bundle.pl will take the specifie
assemblies and embed them inside the runtime where the loading
routines can find them before searching for them on disk.
* Open Issues
There are still two issues to solve:
* config files: sometimes they are needed but they are
not yet bundled inside the library ()
* building with the included libgc makes it not
possible to build a mono binary statically linked to
libmono: this needs to be fixed to make bundles
really useful.
-953
View File
@@ -1,953 +0,0 @@
dlfree
dlmalloc
dlmemalign
free_list_index_of
g_printerr
g_ptr_array_remove_fast
invoke_protected_memory_method
mini_debugger_init
mini_debugger_main
mini_debugger_set_attach_ok
mini_debug_running_inside_mdb
mini_emit_initobj
mini_emit_stobj
mono_add_internal_call
mono_aot_register_globals
mono_aot_register_module
mono_array_addr_with_size
mono_array_class_get
mono_array_clone
mono_array_element_size
mono_array_length
mono_array_new
mono_array_new_full
mono_array_new_specific
mono_assemblies_cleanup
mono_assembly_close
mono_assembly_get_image
mono_assembly_get_main
mono_assembly_get_object
mono_assembly_getrootdir
mono_assembly_load
mono_assembly_loaded
mono_assembly_loaded_full
mono_assembly_load_full
mono_assembly_name_free
mono_assembly_name_get_culture
mono_assembly_name_get_name
mono_assembly_name_get_pubkeytoken
mono_assembly_name_get_version
mono_assembly_name_new
mono_assembly_names_equal
mono_assembly_open
mono_bitset_alloc_size
mono_bitset_clear
mono_bitset_clear_all
mono_bitset_clone
mono_bitset_copyto
mono_bitset_count
mono_bitset_equal
mono_bitset_find_first
mono_bitset_find_first_unset
mono_bitset_find_last
mono_bitset_find_start
mono_bitset_foreach
mono_bitset_free
mono_bitset_intersection
mono_bitset_intersection_2
mono_bitset_invert
mono_bitset_mem_new
mono_bitset_new
mono_bitset_set
mono_bitset_set_all
mono_bitset_size
mono_bitset_sub
mono_bitset_test
mono_bitset_test_bulk
mono_bitset_union
mono_bounded_array_class_get
mono_breakpoint_clean_code
mono_check_corlib_version
mono_class_array_element_size
mono_class_data_size
mono_class_describe_statics
mono_class_enum_basetype
mono_class_from_generic_parameter
mono_class_from_mono_type
mono_class_from_name
mono_class_from_name_case
mono_class_from_typeref
mono_class_get
mono_class_get_byref_type
mono_class_get_element_class
mono_class_get_events
mono_class_get_event_token
mono_class_get_field
mono_class_get_field_from_name
mono_class_get_fields
mono_class_get_field_token
mono_class_get_flags
mono_class_get_full
mono_class_get_image
mono_class_get_interfaces
mono_class_get_method_from_name
mono_class_get_method_from_name_flags
mono_class_get_methods
mono_class_get_name
mono_class_get_namespace
mono_class_get_nested_types
mono_class_get_nesting_type
mono_class_get_parent
mono_class_get_properties
mono_class_get_property_from_name
mono_class_get_property_token
mono_class_get_rank
mono_class_get_type
mono_class_get_type_token
mono_class_inflate_generic_method
mono_class_inflate_generic_type
mono_class_init
mono_class_instance_size
mono_class_interface_offset
mono_class_is_assignable_from
mono_class_is_enum
mono_class_is_subclass_of
mono_class_is_valid_enum
mono_class_is_valuetype
mono_class_min_align
mono_class_name_from_token
mono_class_num_events
mono_class_num_fields
mono_class_num_methods
mono_class_num_properties
mono_class_value_size
mono_class_vtable
mono_cli_rva_image_map
mono_code_manager_commit
mono_code_manager_destroy
mono_code_manager_foreach
mono_code_manager_invalidate
mono_code_manager_new
mono_code_manager_new_dynamic
mono_code_manager_reserve
mono_code_manager_reserve_align
mono_code_manager_set_read_only
mono_code_manager_size
mono_compile_method
mono_config_for_assembly
mono_config_parse
mono_config_parse_memory
mono_config_string_for_assembly_file
mono_context_get
mono_context_get_desc
mono_context_set
mono_counters_cleanup
mono_counters_dump
mono_counters_enable
mono_counters_register
mono_custom_attrs_construct
mono_custom_attrs_free
mono_custom_attrs_from_assembly
mono_custom_attrs_from_class
mono_custom_attrs_from_event
mono_custom_attrs_from_field
mono_custom_attrs_from_index
mono_custom_attrs_from_method
mono_custom_attrs_from_param
mono_custom_attrs_from_property
mono_custom_attrs_get_attr
mono_custom_attrs_has_attr
mono_debug_add_method
_mono_debug_address_from_il_offset
mono_debug_close_image
mono_debug_close_mono_symbol_file
mono_debug_domain_create
mono_debug_domain_unload
mono_debug_find_method
mono_debug_free_source_location
mono_debugger_abort_runtime_invoke
mono_debugger_breakpoint_callback
mono_debugger_call_exception_handler
mono_debugger_check_breakpoints
mono_debugger_check_interruption
mono_debugger_check_runtime_version
mono_debugger_class_initialized
mono_debugger_event
mono_debugger_event_create_appdomain
mono_debugger_event_unload_appdomain
mono_debugger_extended_notification
mono_debugger_handle_exception
mono_debugger_insert_breakpoint
mono_debugger_insert_breakpoint_full
mono_debugger_insert_method_breakpoint
mono_debugger_lock
mono_debugger_method_has_breakpoint
MONO_DEBUGGER__notification_function
mono_debugger_register_class_init_callback
mono_debugger_remove_breakpoint
mono_debugger_remove_class_init_callback
mono_debugger_remove_method_breakpoint
mono_debugger_run_finally
mono_debugger_runtime_invoke
mono_debugger_thread_cleanup
mono_debugger_thread_created
_mono_debugger_throw_exception
mono_debugger_trampoline_compiled
_mono_debugger_unhandled_exception
mono_debugger_unlock
mono_debug_il_offset_from_address
mono_debug_list_add
mono_debug_list_remove
mono_debug_lookup_locals
mono_debug_lookup_method
mono_debug_lookup_method_addresses
mono_debug_lookup_source_location
mono_debug_open_image_from_memory
mono_debug_open_mono_symbols
mono_debug_print_stack_frame
mono_debug_print_vars
mono_debug_symfile_get_line_numbers
mono_debug_symfile_lookup_locals
mono_debug_symfile_lookup_location
mono_debug_symfile_lookup_method
mono_debug_using_mono_debugger
mono_declsec_flags_from_assembly
mono_declsec_flags_from_class
mono_declsec_flags_from_method
mono_declsec_get_assembly_action
mono_declsec_get_class_action
mono_declsec_get_demands
mono_declsec_get_inheritdemands_class
mono_declsec_get_inheritdemands_method
mono_declsec_get_linkdemands
mono_declsec_get_method_action
mono_digest_get_public_token
mono_disasm_code
mono_disasm_code_one
mono_dllmap_insert
mono_domain_assembly_open
mono_domain_create
mono_domain_create_appdomain
mono_domain_finalize
mono_domain_foreach
mono_domain_free
mono_domain_from_appdomain
mono_domain_get
mono_domain_get_by_id
mono_domain_get_id
mono_domain_has_type_resolve
mono_domain_is_unloading
mono_domain_owns_vtable_slot
mono_domain_set
mono_domain_set_internal
mono_domain_try_type_resolve
mono_domain_try_unload
mono_domain_unload
mono_emit_native_call
mono_environment_exitcode_get
mono_environment_exitcode_set
mono_error_cleanup
mono_error_get_error_code
mono_error_get_message
mono_error_init
mono_error_init_flags
mono_error_ok
mono_escape_uri_string
mono_event_get_add_method
mono_event_get_flags
mono_event_get_name
mono_event_get_object
mono_event_get_parent
mono_event_get_raise_method
mono_event_get_remove_method
mono_exception_from_name
mono_exception_from_name_domain
mono_exception_from_name_msg
mono_exception_from_name_two_strings
mono_exception_from_token
mono_exception_from_token_two_strings
mono_field_from_token
mono_field_full_name
mono_field_get_data
mono_field_get_flags
mono_field_get_name
mono_field_get_object
mono_field_get_offset
mono_field_get_parent
mono_field_get_type
mono_field_get_value
mono_field_get_value_object
mono_field_set_value
mono_field_static_get_value
mono_field_static_set_value
mono_file_map
mono_file_map_close
mono_file_map_fd
mono_file_map_open
mono_file_map_size
mono_file_unmap
mono_free
mono_free_bstr
mono_free_method
mono_free_verify_list
mono_gc_collect
mono_gc_collection_count
mono_gc_enable_events
mono_gc_get_generation
mono_gc_get_heap_size
mono_gc_get_used_size
mono_gchandle_free
mono_gchandle_get_target
mono_gchandle_new
mono_gchandle_new_weakref
mono_gc_invoke_finalizers
mono_gc_is_finalizer_thread
mono_gc_max_generation
mono_gc_out_of_memory
mono_gc_wbarrier_arrayref_copy
mono_gc_wbarrier_generic_nostore
mono_gc_wbarrier_generic_store
mono_gc_wbarrier_generic_store_atomic
mono_gc_wbarrier_object_copy
mono_gc_wbarrier_set_arrayref
mono_gc_wbarrier_set_field
mono_gc_wbarrier_value_copy
mono_get_array_class
mono_get_boolean_class
mono_get_byte_class
mono_get_char_class
mono_get_config_dir
mono_get_corlib
mono_get_dbnull_object
mono_get_delegate_invoke
mono_get_double_class
mono_get_enum_class
mono_get_exception_appdomain_unloaded
mono_get_exception_argument
mono_get_exception_argument_null
mono_get_exception_argument_out_of_range
mono_get_exception_arithmetic
mono_get_exception_array_type_mismatch
mono_get_exception_bad_image_format
mono_get_exception_bad_image_format2
mono_get_exception_cannot_unload_appdomain
mono_get_exception_class
mono_get_exception_divide_by_zero
mono_get_exception_execution_engine
mono_get_exception_field_access
mono_get_exception_file_not_found
mono_get_exception_file_not_found2
mono_get_exception_index_out_of_range
mono_get_exception_invalid_cast
mono_get_exception_invalid_operation
mono_get_exception_io
mono_get_exception_method_access
mono_get_exception_missing_field
mono_get_exception_missing_method
mono_get_exception_not_implemented
mono_get_exception_not_supported
mono_get_exception_null_reference
mono_get_exception_out_of_memory
mono_get_exception_overflow
mono_get_exception_reflection_type_load
mono_get_exception_security
mono_get_exception_serialization
mono_get_exception_stack_overflow
mono_get_exception_synchronization_lock
mono_get_exception_thread_abort
mono_get_exception_thread_interrupted
mono_get_exception_thread_state
mono_get_exception_type_initialization
mono_get_exception_type_load
mono_get_int16_class
mono_get_int32_class
mono_get_int64_class
mono_get_intptr_class
mono_get_machine_config
mono_get_method
mono_get_method_full
mono_get_object_class
mono_get_root_domain
mono_get_sbyte_class
mono_get_single_class
mono_get_string_class
mono_get_thread_class
mono_get_trampoline_func
mono_get_uint16_class
mono_get_uint32_class
mono_get_uint64_class
mono_get_uintptr_class
mono_get_void_class
mono_g_hash_table_destroy
mono_g_hash_table_find
mono_g_hash_table_foreach
mono_g_hash_table_foreach_remove
mono_g_hash_table_insert
mono_g_hash_table_lookup
mono_g_hash_table_lookup_extended
mono_g_hash_table_new
mono_g_hash_table_new_full
mono_g_hash_table_new_type
mono_g_hash_table_remove
mono_g_hash_table_replace
mono_g_hash_table_size
mono_guid_to_string
mono_hazard_pointer_get
mono_image_addref
mono_image_close
mono_image_ensure_section
mono_image_ensure_section_idx
mono_image_fixup_vtable
mono_image_get_assembly
mono_image_get_entry_point
mono_image_get_filename
mono_image_get_guid
mono_image_get_name
mono_image_get_public_key
mono_image_get_resource
mono_image_get_strong_name
mono_image_get_table_info
mono_image_get_table_rows
mono_image_has_authenticode_entry
mono_image_is_dynamic
mono_image_loaded
mono_image_loaded_by_guid
mono_image_loaded_by_guid_full
mono_image_loaded_full
mono_image_load_file_for_image
mono_image_lookup_resource
mono_image_open
mono_image_open_from_data
mono_image_open_from_data_full
mono_image_open_from_data_with_name
mono_image_open_full
mono_image_rva_map
mono_images_cleanup
mono_image_strerror
mono_image_strong_name_position
mono_init
mono_init_from_assembly
mono_init_version
mono_install_assembly_load_hook
mono_install_assembly_postload_refonly_search_hook
mono_install_assembly_postload_search_hook
mono_install_assembly_preload_hook
mono_install_assembly_refonly_preload_hook
mono_install_assembly_refonly_search_hook
mono_install_assembly_search_hook
mono_install_runtime_cleanup
mono_install_threadpool_item_hooks
mono_install_threadpool_thread_hooks
mono_inst_name
mono_is_debugger_attached
mono_jit_cleanup
mono_jit_exec
mono_jit_info_get_code_size
mono_jit_info_get_code_start
mono_jit_info_get_method
mono_jit_info_table_find
mono_jit_init
mono_jit_init_version
mono_jit_parse_options
mono_jit_set_aot_only
mono_jit_set_trace_options
mono_ldstr
mono_ldtoken
mono_llvm_build_aligned_load
mono_llvm_build_alloca
mono_llvm_build_load
mono_llvm_create_ee
mono_llvm_dispose_ee
mono_llvm_dump_value
mono_llvm_optimize_method
mono_llvm_replace_uses_of
mono_load_remote_field
mono_load_remote_field_new
mono_local_deadce
mono_locks_dump
mono_lookup_internal_call
mono_lookup_pinvoke_call
mono_main
mono_marshal_string_to_utf16
mono_md5_final
mono_md5_get_digest
mono_md5_get_digest_from_file
mono_md5_init
mono_md5_update
mono_mempool_alloc
mono_mempool_alloc0
mono_mempool_contains_addr
mono_mempool_destroy
mono_mempool_empty
mono_mempool_get_allocated
mono_mempool_invalidate
mono_mempool_new
mono_mempool_new_size
mono_mempool_stats
mono_mempool_strdup
mono_metadata_blob_heap
mono_metadata_cleanup
mono_metadata_compute_size
mono_metadata_custom_attrs_from_index
mono_metadata_declsec_from_index
mono_metadata_decode_blob_size
mono_metadata_decode_row
mono_metadata_decode_row_col
mono_metadata_decode_signed_value
mono_metadata_decode_table_row
mono_metadata_decode_table_row_col
mono_metadata_decode_value
mono_metadata_encode_value
mono_metadata_events_from_typedef
mono_metadata_field_info
mono_metadata_field_info_with_mempool
mono_metadata_free_array
mono_metadata_free_inflated_signature
mono_metadata_free_marshal_spec
mono_metadata_free_method_signature
mono_metadata_free_mh
mono_metadata_free_type
mono_metadata_generic_class_is_valuetype
mono_metadata_get_constant_index
mono_metadata_get_inflated_signature
mono_metadata_get_marshal_info
mono_metadata_guid_heap
mono_metadata_implmap_from_method
mono_metadata_interfaces_from_typedef
mono_metadata_load_generic_params
mono_metadata_locate
mono_metadata_locate_token
mono_metadata_methods_from_event
mono_metadata_methods_from_property
mono_metadata_nested_in_typedef
mono_metadata_nesting_typedef
mono_metadata_packing_from_typedef
mono_metadata_parse_array
mono_metadata_parse_custom_mod
mono_metadata_parse_field_type
mono_metadata_parse_marshal_spec
mono_metadata_parse_method_signature
mono_metadata_parse_method_signature_full
mono_metadata_parse_mh
mono_metadata_parse_mh_full
mono_metadata_parse_param
mono_metadata_parse_signature
mono_metadata_parse_type
mono_metadata_parse_typedef_or_ref
mono_metadata_parse_type_full
mono_metadata_properties_from_typedef
mono_metadata_signature_alloc
mono_metadata_signature_dup
mono_metadata_signature_equal
mono_metadata_string_heap
mono_metadata_token_from_dor
mono_metadata_translate_token_index
mono_metadata_typedef_from_field
mono_metadata_typedef_from_method
mono_metadata_type_equal
mono_metadata_type_hash
mono_metadata_user_string
mono_method_body_get_object
mono_method_can_access_field
mono_method_can_access_method
mono_method_desc_free
mono_method_desc_from_method
mono_method_desc_full_match
mono_method_desc_match
mono_method_desc_new
mono_method_desc_search_in_class
mono_method_desc_search_in_image
mono_method_full_name
mono_method_get_class
mono_method_get_flags
mono_method_get_generic_container
mono_method_get_header
mono_method_get_index
mono_method_get_last_managed
mono_method_get_marshal_info
mono_method_get_name
mono_method_get_object
mono_method_get_param_names
mono_method_get_param_token
mono_method_get_signature
mono_method_get_signature_full
mono_method_get_token
mono_method_get_unmanaged_thunk
mono_method_has_marshal_info
mono_method_header_get_clauses
mono_method_header_get_code
mono_method_header_get_locals
mono_method_header_get_num_clauses
mono_method_signature
mono_method_verify
mono_mlist_alloc
mono_mlist_append
mono_mlist_get_data
mono_mlist_last
mono_mlist_length
mono_mlist_next
mono_mlist_prepend
mono_mlist_remove_item
mono_mlist_set_data
mono_mlist_set_next
mono_module_file_get_object
mono_module_get_object
mono_monitor_enter
mono_monitor_exit
mono_monitor_try_enter
mono_mprotect
mono_object_castclass_mbyref
mono_object_clone
mono_object_describe
mono_object_describe_fields
mono_object_get_class
mono_object_get_domain
mono_object_get_size
mono_object_get_virtual_method
mono_object_is_alive
mono_object_isinst
mono_object_isinst_mbyref
mono_object_new
mono_object_new_alloc_specific
mono_object_new_fast
mono_object_new_from_token
mono_object_new_specific
mono_object_unbox
mono_opcode_name
mono_opcode_value
mono_op_to_op_imm_noemul
mono_pagesize
mono_param_get_objects
mono_parse_default_optimizations
mono_path_canonicalize
mono_path_resolve_symlinks
mono_pe_file_open
mono_perfcounters_init
mono_personality
mono_pmip
mono_print_method_from_ip
mono_print_thread_dump
mono_print_thread_dump_from_ctx
mono_print_unhandled_exception
mono_profiler_coverage_get
mono_profiler_get_events
mono_profiler_install
mono_profiler_install_allocation
mono_profiler_install_appdomain
mono_profiler_install_assembly
mono_profiler_install_class
mono_profiler_install_code_buffer_new
mono_profiler_install_code_chunk_destroy
mono_profiler_install_code_chunk_new
mono_profiler_install_coverage_filter
mono_profiler_install_enter_leave
mono_profiler_install_exception
mono_profiler_install_gc
mono_profiler_install_gc_moves
mono_profiler_install_iomap
mono_profiler_install_jit_compile
mono_profiler_install_jit_end
mono_profiler_install_method_free
mono_profiler_install_method_invoke
mono_profiler_install_module
mono_profiler_install_monitor
mono_profiler_install_runtime_initialized
mono_profiler_install_statistical
mono_profiler_install_statistical_call_chain
mono_profiler_install_thread
mono_profiler_install_transition
mono_profiler_load
mono_profiler_set_events
mono_property_get_flags
mono_property_get_get_method
mono_property_get_name
mono_property_get_object
mono_property_get_parent
mono_property_get_set_method
mono_property_get_value
mono_property_hash_destroy
mono_property_hash_insert
mono_property_hash_lookup
mono_property_hash_new
mono_property_hash_remove_object
mono_property_set_value
mono_ptr_class_get
mono_raise_exception
mono_reflection_free_type_info
mono_reflection_get_custom_attrs
mono_reflection_get_custom_attrs_blob
mono_reflection_get_custom_attrs_by_type
mono_reflection_get_custom_attrs_data
mono_reflection_get_custom_attrs_info
mono_reflection_get_token
mono_reflection_get_type
mono_reflection_parse_type
mono_reflection_type_from_name
mono_register_bundled_assemblies
mono_register_machine_config
mono_replace_ins
mono_runtime_class_init
mono_runtime_cleanup
mono_runtime_delegate_invoke
mono_runtime_exec_main
mono_runtime_exec_managed_code
mono_runtime_get_main_args
mono_runtime_init
mono_runtime_invoke
mono_runtime_invoke_array
mono_runtime_is_shutting_down
mono_runtime_object_init
mono_runtime_quit
mono_runtime_run_main
mono_security_core_clr_require_elevated_permissions
mono_security_enable_core_clr
mono_security_set_core_clr_platform_callback
mono_sem_post
mono_sem_timedwait
mono_sem_wait
mono_set_break_policy
mono_set_defaults
mono_set_dirs
mono_set_is_debugger_attached
mono_set_signal_chaining
mono_sha1_final
mono_sha1_get_digest
mono_sha1_get_digest_from_file
mono_sha1_init
mono_sha1_update
mono_signature_explicit_this
mono_signature_get_call_conv
mono_signature_get_desc
mono_signature_get_param_count
mono_signature_get_params
mono_signature_get_return_type
mono_signature_hash
mono_signature_is_instance
mono_signature_vararg_start
mono_signbit_double
mono_signbit_float
mono_stack_walk
mono_stack_walk_no_il
mono_store_remote_field
mono_store_remote_field_new
mono_string_chars
mono_string_equal
mono_string_from_bstr
mono_string_from_utf16
mono_string_hash
mono_stringify_assembly_name
mono_string_intern
mono_string_is_interned
mono_string_length
mono_string_new
mono_string_new_len
mono_string_new_size
mono_string_new_utf16
mono_string_new_wrapper
mono_string_to_utf16
mono_string_to_utf8
mono_table_info_get_rows
mono_thread_attach
mono_thread_cleanup
mono_thread_create
mono_thread_current
mono_thread_detach
mono_thread_exit
mono_thread_get_main
mono_thread_get_undeniable_exception
mono_thread_hazardous_free_or_queue
mono_thread_hazardous_try_free_all
mono_thread_manage
mono_thread_new_init
mono_thread_set_main
mono_thread_set_manage_callback
mono_threads_get_default_stacksize
mono_threads_install_cleanup
mono_threads_request_thread_dump
mono_threads_set_default_stacksize
mono_thread_stop
mono_trace_set_level_string
mono_trace_set_mask_string
mono_type_create_from_typespec
mono_type_full_name
mono_type_generic_inst_is_valuetype
mono_type_get_array_type
mono_type_get_class
mono_type_get_desc
mono_type_get_modifiers
mono_type_get_name
mono_type_get_object
mono_type_get_ptr_type
mono_type_get_signature
mono_type_get_type
mono_type_get_underlying_type
mono_type_is_byref
mono_type_is_pointer
mono_type_is_reference
mono_type_is_struct
mono_type_is_valid_enum_basetype
mono_type_is_void
mono_type_size
mono_type_stack_size
mono_type_to_unmanaged
mono_unhandled_exception
mono_unicode_from_external
mono_unicode_to_external
mono_upgrade_remote_class_wrapper
mono_utf8_from_external
mono_utf8_validate_and_len
mono_utf8_validate_and_len_with_bounds
mono_valloc
mono_value_box
mono_value_copy
mono_value_copy_array
mono_value_describe_fields
mono_verify_corlib
mono_vfree
mono_vtable_get_static_field_data
mono_walk_stack
mono_win32_compat_CopyMemory
mono_win32_compat_FillMemory
mono_win32_compat_MoveMemory
mono_win32_compat_ZeroMemory
_ZN20MonoJITMemoryManager11AllocateGOTEv
_ZN20MonoJITMemoryManager12allocateStubEPKN4llvm11GlobalValueEjj
_ZN20MonoJITMemoryManager13allocateSpaceEij
_ZN20MonoJITMemoryManager13SetDlsymTableEPv
_ZN20MonoJITMemoryManager14allocateGlobalEjj
_ZN20MonoJITMemoryManager15endFunctionBodyEPKN4llvm8FunctionEPhS4_
_ZN20MonoJITMemoryManager17endExceptionTableEPKN4llvm8FunctionEPhS4_S4_
_ZN20MonoJITMemoryManager17setMemoryWritableEv
_ZN20MonoJITMemoryManager17startFunctionBodyEPKN4llvm8FunctionERj
_ZN20MonoJITMemoryManager19setMemoryExecutableEv
_ZN20MonoJITMemoryManager19startExceptionTableEPKN4llvm8FunctionERj
_ZN20MonoJITMemoryManager24deallocateMemForFunctionEPKN4llvm8FunctionE
_ZN20MonoJITMemoryManagerC1Ev
_ZN20MonoJITMemoryManagerC2Ev
_ZN20MonoJITMemoryManagerD0Ev
_ZN20MonoJITMemoryManagerD1Ev
_ZN20MonoJITMemoryManagerD2Ev
CloseHandle
closesocket
CopyFile
CreateDirectory
CreateEvent
CreateFile
CreateMutex
CreatePipe
CreateProcess
CreateProcessWithLogonW
CreateSemaphore
CreateThread
DeleteCriticalSection
DeleteFile
DuplicateHandle
EnumProcesses
EnumProcessModules
errno_to_WSA
ExitThread
FileTimeToSystemTime
FindClose
FindFirstFile
FindNextFile
FlushFileBuffers
FormatMessage
GetCurrentDirectory
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetDiskFreeSpaceEx
GetDriveType
GetExitCodeProcess
GetExitCodeThread
GetFileAttributes
GetFileAttributesEx
GetFileSize
GetFileTime
GetFileType
GetFileVersionInfo
GetFileVersionInfoSize
GetLastError
GetLogicalDriveStrings
GetModuleBaseName
GetModuleFileNameEx
GetModuleInformation
GetPriorityClass
GetProcessId
GetProcessTimes
GetProcessWorkingSetSize
GetStdHandle
GetSystemInfo
GetTempPath
GetThreadContext
GetTickCount
ImpersonateLoggedOnUser
InitializeCriticalSection
InitializeCriticalSectionAndSpinCount
ioctlsocket
LockFile
mono_once
mono_pthread_key_for_tls
MoveFile
OpenEvent
OpenMutex
OpenProcess
OpenSemaphore
OpenThread
PulseEvent
QueryPerformanceCounter
QueryPerformanceFrequency
QueueUserAPC
ReadFile
ReleaseMutex
ReleaseSemaphore
RemoveDirectory
ReplaceFile
ResetEvent
ResumeThread
RevertToSelf
SetCriticalSectionSpinCount
SetCurrentDirectory
SetEndOfFile
SetEvent
SetFileAttributes
SetFilePointer
SetFileTime
SetLastError
SetPriorityClass
SetProcessWorkingSetSize
ShellExecuteEx
SignalObjectAndWait
Sleep
SleepEx
SuspendThread
TerminateProcess
TlsAlloc
TlsFree
TlsGetValue
TlsSetValue
TransmitFile
TryEnterCriticalSection
UnlockFile
VerLanguageName
VerQueryValue
WaitForInputIdle
WaitForMultipleObjects
WaitForMultipleObjectsEx
WaitForSingleObject
WaitForSingleObjectEx
wapi_clear_interruption
wapi_current_thread_desc
wapi_interrupt_thread
wapi_self_interrupt
wapi_thread_clear_wait_handle
wapi_thread_set_wait_handle
WriteFile
WSACleanup
WSAGetLastError
WSAIoctl
WSARecv
WSASend
WSASetLastError
WSAStartup
+2 -2
View File
@@ -13,10 +13,10 @@ ASSEMBLED_DOCS = \
monoapi.tree monoapi.zip
convert.exe: $(srcdir)/convert.cs AgilityPack.dll
$(CSCOMPILE) -out:$@ $< -r:AgilityPack.dll
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
AgilityPack.dll:
$(CSCOMPILE) -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
monoapi.zip: monoapi.tree
@test -f $@ || { rm -f $< && $(MAKE) $<; }
-1023
View File
File diff suppressed because it is too large. Load diff
-37
View File
@@ -71,40 +71,3 @@ unwinding code.
catch handler: catch hanlders are always called from the stack unwinding
code. The exception object is passed in a local variable (cfg->exvar).
gcc support for Exceptions
==========================
gcc supports exceptions in files compiled with the -fexception option. gcc
generates DWARF exceptions tables in that case, so it is possible to unwind the
stack. The method to read those exception tables is contained in libgcc.a, and
in newer versions of glibc (glibc 2.2.5 for example), and it is called
__frame_state_for(). Another usable glibc function is backtrace_symbols() which
returns the function name corresponding to a code address.
We dynamically check if those features are available using g_module_symbol(),
and we use them only when available. If not available we use the LMF as
fallback.
Using gcc exception information prevents us from saving the LMF at each native
call, so this is a way to speed up native calls. This is especially valuable
for internal calls, because we can make sure that all internal calls are
compiled with -fexceptions (we compile the whole mono runtime with that
option).
All native function are able to call function without exception tables, and so
we are unable to restore all caller saved registers if an exception is raised
in such function. Well, its possible if the previous function already saves all
registers. So we only omit the the LMF if a function has an exception table
able to restore all caller saved registers.
One problem is that gcc almost never saves all caller saved registers, because
it is just unnecessary in normal situations. But there is a trick forcing gcc
to save all register, we just need to call __builtin_unwind_init() at the
beginning of a function. That way gcc generates code to save all caller saved
register on the stack.
+98 -72
View File
@@ -7,6 +7,10 @@ if ($ARGV[0] eq "-h"){
shift @ARGV;
shift @ARGV;
}
open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css");
while (<FILE>){
$css = $css . $_;
}
if ($ARGV[0] eq "-t"){
$dir = $ARGV[1];
@@ -49,109 +53,114 @@ if ($html){
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$name</title>
<style type="text/css">
h3 {
font-size: 18px;
padding-bottom: 4pt;
border-bottom: 2px solid #dddddd;
}
.api {
border: 1px solid;
padding: 10pt;
margin: 10pt;
}
.api-entry {
border-bottom: none;
font-size: 18px;
}
.prototype {
border: 1px solid;
background-color: #f2f2f2;
padding: 5pt;
margin-top: 5pt;
margin-bottom: 5pt;
}
.header {
border: 1px solid;
padding: 0 0 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
}
.code {
border: 1px solid;
padding: 0 0 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
}
<title>$name</title>
<style type="text/css">
$css
</style>
</head>
<body>
<div class="mapi-docs">
EOF
@a = split (/\n/, $files_content[$f]);
$strikeextra = "";
$api_shown = 0;
for ($ai = 0; $ai < $#a; $ai++){
$line = $a[$ai];
($api,$caption) = $line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/;
if ($api ne ""){
if ($api_shown == 1){
print OUT "</div>";
print OUT "</div> <!-- class=mapi -->\n\n";
if ($deprecated{$api}){
$strike = "mapi-strike";
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $deprecated{$api};
} else {
$strike = "";
$strikeextra = "";
}
}
$api_shown = 1;
$proto = $prototype{$api};
if ($proto eq ""){
$proto = "Prototype: $api";
$proto = "$api";
}
print OUT<<EOF;
<a name="api:$api"></a>
<div class="api">
<div class="api-entry">$api</div>
print OUT<<EOF;
<a name="api:$api"></a>
<div class="mapi">
<div class="mapi-entry $strike"><code>$api$strikeextra</code></div>
<div class="mapi-height-container">
<div class="mapi-ptr-container"></div>
<div class="mapi-description">
<div class="mapi-ptr"></div>
<div class="prototype">$proto</div>
<p>
<div class="mapi-declaration mapi-section">Syntax</div>
<div class="mapi-prototype">$proto</div>
<p>
EOF
&opt_print ("Parameters", $arguments{$api}, 1);
&opt_print ("Returns", $returns{$api}, 1);
&opt_print ("Remarks", $bodies{$api}, 0);
print OUT "\n";
$ppars = $arguments{$api};
if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){
print OUT " <div class=\"mapi-section\">Parameters</div>\n";
print OUT " <table class=\"mapi-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
}
&opt_print ("Return value", $returns{$api}, 0);
&opt_print ("Description", $bodies{$api}, 0);
print OUT " </div><!--mapi-description-->\n </div><!--height container-->\n";
} else {
if ($line =~ /@API_IDX@/){
$apis_toc = &create_toc ($apis[$f]);
$line =~ s/\@API_IDX\@/$apis_toc/;
}
if ($line =~ /^<h/){
print OUT "</div>";
if ($line =~ /^<h4/){
print OUT "</div>\n";
$api_shown = 0;
}
if ($line =~ /`/){
}
print OUT "$line\n";
}
}
print OUT<<EOF;
</div>
</body>
</html>
EOF
close OUT;
system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name");
# clean up the mess that AgilityPack does, it CDATAs our CSS
open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name";
open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
$line = 0;
$doprint = 0;
while (<HACK>){
print HACKOUT $last if ($doprint);
$line++;
s/^\/\/<!\[CDATA\[//;
s/^\/\/\]\]>\/\///;
print HACKOUT $_;
# Remove the junk <span> wrapper generated by AgilityPack
if ($line==1){
s/<span>//;
}
if (/<style type/){
# Replace the CSS in the XHTML output with the original CSS
print HACKOUT $_;
print HACKOUT $css;
while (<HACK>){
last if (/<\/style>/);
}
}
$last = $_;
$doprint = 1;
}
if (!($last =~ /span/)){
print HACKOUT $last;
}
#system ("cp.exe $dir/html/$name $dir/deploy/$name");
}
}
@@ -168,17 +177,29 @@ sub process_doc {
$returns = "";
$body = "";
$functions[$fn++] = $func;
$deprecated = 0;
# Process arguments
while (<>){
if (/^ \*\*?\//){
$body =~ s/[@#](\w+)/<i>\1<\/i>/g;
$returns =~ s/[@#](\w+)/<i>\1<\/i>/g;
s/NULL/<code>NULL<\/code>/g;
s/TRUE/<code>TRUE<\/code>/g;
s/FALSE/<code>FALSE<\/code>/g;
if (/^ \*\*?\//){
$body =~ s/@(\w+)/<i>\1<\/i>/g;
$returns =~ s/@(\w+)/<i>\1<\/i>/g;
$args =~ s/@(\w+)/<i>\1<\/i>/g;
$body =~ s/#(\w+)/<code>\1<\/code>/g;
$returns =~ s/#(\w+)/<code>\1<\/code>/g;
$args =~ s/#(\w+)/<code>\1<\/code>/g;
$returns =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
$args =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
$body =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
$body =~ s/\n/ /;
$bodies{$func} = $body;
$arguments{$func} = $args;
$deprecated{$func} = $deprecated;
$returns{$func} = $returns;
$proto = "";
while (<>){
@@ -195,14 +216,20 @@ sub process_doc {
}
chop;
s/^\ \*//;
$_ = "\n<p>" if (/^\s+$/);
$_ = "<p>" if (/^\s*$/);
if ($inbody == 0){
if (/\s*(\w+):(.*)/){
$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
if ($1 eq "deprecated"){
$deprecated = $2;
} else {
#$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
$args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
}
} else {
$body = "\t$_\n";
$inbody = 1;
}
} elsif ($inbody == 1) {
@@ -246,6 +273,9 @@ sub create_toc {
chop;
$p = $prototype{$line};
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
if ($xname eq ""){
$xname = $line;
}
$rspace = " " x ($type_size - length ($ret));
$nspace = " " x ($name_size - length ($xname));
@@ -289,11 +319,7 @@ sub opt_print {
my ($caption, $opttext, $quote) = @_;
if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
print OUT "<b>$caption</b>\n";
if ($quote == 1){
print OUT "<blockquote>$opttext</blockquote>\n";
} else {
print OUT "<p>$opttext\n";
}
print OUT " <div class=\"mapi-section\">$caption</div>\n";
print OUT " <div>$opttext</div>\n";
}
}
-208
View File
@@ -1,208 +0,0 @@
* Proposal for the local register allocator
The local register allocator deals with allocating registers
for temporaries inside a single basic block, while the global
register allocator is concerned with method-wide allocation of
variables.
The global register allocator uses callee-saved register for it's
purpouse so that there is no need to save and restore these registers
at call sites.
There are a number of issues the local allocator needs to deal with:
*) some instructions expect operands in specific registers (for example
the shl instruction on x86, or the call instruction with thiscall
convention, or the equivalent call instructions on other architectures,
such as the need to put output registers in %oX on sparc)
*) some instructions deliver results only in specific registers (for example
the div instruction on x86, or the call instructionson on almost all
the architectures).
*) it needs to know what registers may be clobbered by an instruction
(such as in a method call)
*) it should avoid excessive reloads or stores to improve performance
While which specific instructions have limitations is architecture-dependent,
the problem shold be solved in an arch-independent way to reduce code duplication.
The register allocator will be 'driven' by the arch-dependent code, but it's
implementation should be arch-independent.
To improve the current local register allocator, we need to
keep more state in it than the current setup that only keeps busy/free info.
Possible state information is:
free: the resgister is free to use and it doesn't contain useful info
freeable: the register contains data loaded from a local (there is
also info about _which_ local it contains) as a result from previous
instructions (like, there was a store from the register to the local)
moveable: it contains live data that is needed in a following instruction, but
the contents may be moved to a different register
busy: the register contains live data and it is placed there because
the following instructions need it exactly in that register
allocated: the register is used by the global allocator
The local register allocator will have the following interfaces:
int get_register ();
Searches for a register in the free state. If it doesn't find it,
searches for a freeable register. Sets the status to moveable.
Looking for a 'free' register before a freeable one should allow for
removing a few redundant loads (though I'm still unsure if such
things should be delegated entirely to the peephole pass).
int get_register_force (int reg);
Returns 'reg' if it is free or freeable. If it is moveable, it moves it
to another free or freeable register.
Sets the status of 'reg' to busy.
void set_register_freeable (int reg);
Sets the status of 'reg' to freeable.
void set_register_free (int reg);
Sets the status of 'reg' to free.
void will_clobber (int reg);
Spills the register to the stack. Sets the status to freeable.
After the clobbering has occurred, set the status to free.
void register_unspill (int reg);
Un-spills register reg and sets the status to moveable.
FIXME: how is the 'local' information represented? Maybe a MonoInst* pointer.
Note: the register allocator will insert instructions in the basic block
during it's operation.
* Examples
Given the tree (on x86 the right argument to shl needs to be in ecx):
store (local1, shl (local1, call (some_arg)))
At the start of the basic block, the registers are set to the free state.
The sequence of instructions may be:
instruction register status -> [%eax %ecx %edx]
start free free free
eax = load local1 mov free free
/* call clobbers eax, ecx, edx */
spill eax free free free
call mov free free
/* now eax contains the right operand of the shl */
mov %eax -> %ecx free busy free
un-spill mov busy free
shl %cl, %eax mov free free
The resulting x86 code is:
mov $fffc(%ebp), %eax
mov %eax, $fff0(%ebp)
push some_arg
call func
mov %eax, %ecx
mov $fff0(%ebp), %eax
shl %cl, %eax
Note that since shl could operate directly on memory, we could have:
push some_arg
call func
mov %eax, %ecx
shl %cl, $fffc(%ebp)
The above example with loading the operand in a register is just to complicate
the example and show that the algorithm should be able to handle it.
Let's take another example with the this-call call convention (the first argument
is passed in %ecx).
In this case, will_clobber() will be called only on %eax and %edx, while %ecx
will be allocated with get_register_force ().
Note: when a register is allocated with get_register_force(), it should be set
to a different state as soon as possible.
store (local1, shl (local1, this-call (local1)))
instruction register status -> [%eax %ecx %edx]
start free free free
eax = load local1 mov free free
/* force load in %ecx */
ecx = load local1 mov busy free
spill eax free busy free
call mov free free
/* now eax contains the right operand of the shl */
mov %eax -> %ecx free busy free
un-spill mov busy free
shl %cl, %eax mov free free
What happens when a register that we need to allocate with get_register_force ()
contains an operand for the next instruction?
instruction register status -> [%eax %ecx %edx]
eax = load local0 mov free free
ecx = load local1 mov mov free
get_register_force (ecx) here.
We have two options:
mov %ecx, %edx
or:
spill %ecx
The first option is way better (and allows the peephole pass to
just load the value in %edx directly, instead of loading first to %ecx).
This doesn't work, though, if the instruction clobbers the %edx register
(like in a this-call). So, we first need to clobber the registers
(so the state of %ecx changes to freebale and there is no issue
with get_register_force ()).
What if an instruction both clobbers a register and requires it as
an operand? Lets' take the x86 idiv instruction as an example: it
requires the dividend in edx:eax and returns the result in eax,
with the modulus in edx.
store (local1, div (local1, local2))
instruction register status -> [%eax %ecx %edx]
eax = load local0 mov free free
will_clobber eax, edx free mov free
force mov %ecx, %eax busy free free
set %edx busy free busy
idiv mov free free
Note: edx is set to free after idiv, because the modulus is not needed
(if it was a rem, eax would have been freed).
If we load the divisor before will_clobber(), we'll have to spill
eax and reload it later. If we load it just after the idiv, there is no issue.
In any case, the algorithm should give the correct results and allow the operation.
Working recursively on the isntructions there shouldn't be huge issues
with this algorithm (though, of course, it's not optimal and it may
introduce excessive spills or register moves). The advantage over the current
local reg allocator is that:
1) the number of spills/moves would be smaller anyway
2) a separate peephole pass could be able to eliminate reg moves
3) we'll be able to remove the 'forced' spills we currently do with
the return value of method calls
* Issues
How to best integrate such a reg allocator with the burg stuff.
Think about a call os sparc with two arguments: they got into %o0 and %o1
and each of them sets the register as busy. But what if the values to put there
are themselves the result of a call? %o0 is no problem, but for all the
next argument n the above algorithm would spill all the 0...n-1 registers...
* Papers
More complex solutions to the local register allocator problem:
http://dimacs.rutgers.edu/TechnicalReports/abstracts/1997/97-33.html
Combining register allocation and instruction scheduling:
http://citeseer.nj.nec.com/motwani95combining.html
More on LRA euristics:
http://citeseer.nj.nec.com/liberatore97hardness.html
Linear-time optimal code scheduling for delayedload architectures
http://www.cs.wisc.edu/~fischer/cs701.f01/inst.sched.ps.gz
Precise Register Allocation for Irregular Architectures
http://citeseer.nj.nec.com/kong98precise.html
Allocate registers first to subtrees that need more of them.
http://www.upb.de/cs/ag-kastens/compii/folien/comment401-409.2.pdf
-98
View File
@@ -1,98 +0,0 @@
=pod
=head1 Internal design document for the mono_handle_d
This document is designed to hold the design of the mono_handle_d and
not as an api reference.
=head2 Primary goal and purpose
The mono_handle_d is a process which takes care of the (de)allocation
of scratch shared memory and handles (of files, threads, mutexes,
sockets etc. see L<WapiHandleType>) and refcounts of the
filehandles. It is designed to be run by a user and to be fast, thus
minimal error checking on input is done and will most likely crash if
given a faulty package. No effort has been, or should be, made to have
the daemon talking to machine of different endianness/size of int.
=head2 How to start the daemon
To start the daemon you either run the mono_handle_d executable or try
to attach to the shared memory segment via L<_wapi_shm_attach> which
will start a daemon if one does not exist.
=head1 Internal details
The daemon works by opening a socket and listening to clients. These
clients send packages over the socket complying to L<struct
WapiHandleRequest>.
=head2 Possible requests
=over
=item WapiHandleRequest_New
Find a handle in the shared memory segment that is free and allocate
it to the specified type. To destroy use
L</WapiHandleRequest_Close>. A L<WapiHandleResponse> with
.type=WapiHandleResponseType_New will be sent back with .u.new.handle
set to the handle that was allocated. .u.new.type is the type that was
requested.
=item WapiHandleRequestType_Open
Increase the ref count of an already created handle. A
L<WapiHandleResponse> with .type=WapiHandleResponseType_Open will be sent
back with .u.new.handle set to the handle, .u.new.type is set to the
type of handle this is.
=item WapiHandleRequestType_Close
Decrease the ref count of an already created handle. A
L<WapiHandleResponse> with .type=WapiHandleResponseType_Close will be
sent back with .u.close.destroy set to TRUE if ref count for this
client reached 0.
=item WapiHandleRequestType_Scratch
Allocate a shared memory area of size .u.scratch.length in bytes. A
L<WapiHandleResponse> with .type=WapiHandleResponseType_Scratch will be
sent back with .u.scratch.idx set to the index into the shared
memory's scratch area where to memory begins. (works just like
malloc(3))
=item WapiHandleRequestType_Scratch
Deallocate a shared memory area, this must have been allocated before
deallocating. A L<WapiHandleResponse> with
.type=WapiHandleResponseType_ScratchFree will be sent back (works just
like free(3))
=back
=head1 Why a daemon
From an email:
Dennis: I just have one question about the daemon... Why does it
exist? Isn't it better performancewise to just protect the shared area
with a mutex when allocation a new handle/shared mem segment or
changing refcnt? It will however be a less resilient to clients that
crash (the deamon cleans up ref'd handles if socket closes)
Dick: It's precisely because with a mutex the shared memory segment
can be left in a locked state. Also, it's not so easy to clean up
shared memory without it (you can't just mark it deleted when creating
it, because you can't attach any more readers to the same segment
after that). I did some minimal performance testing, and I don't
think the daemon is particularly slow.
=head1 Authors
Documentaion: Dennis Haney
Implementation: Dick Porter
=cut
-68
View File
@@ -1,68 +0,0 @@
We need to switch to a new register allocator.
The current one is split in a global and a local register allocator.
The global one can assign only callee-saves registers and happens
on the tree-based internal representation: it assigns local variables
to hardware registers.
The local one happens on the linear representation on a per basic
block basis and assigns hard registers to virtual registers (which
hold temporary values during expression executions) and it deals also
with the platform-specific issues (fixed registers, call conventions).
Moving to a different register will help solve some of the performance
issues introduced by the above split, make the register more easily
portable and solve some of the issues generated by dealing with trees.
The general design ideas are below.
The new allocator should have a global view of all the method, so it can be
able to assign variables also to some of the volatile registers if possible,
even across basic blocks (this would improve performance).
The allocator would be driven by per-arch declarative data, so porting
should be easier: an architecture needs to specify register classes,
call convention and instructions requirements (similar to the gcc code).
The allocator should operate on the linear representation, this way it's
easier and faster to track usages more correctly. We need to assign virtual
registers on a per-method basis instead of per basic block. We can assign
virtual registers to variables, too. Note that since we fix the stack offset
of local vars only after this step (which happens after the burg rules are run),
some of the burg rules that try to optimize the code won't apply anymore:
the peephole code may need to be enhanced to do the optimizations instead.
We need to handle floating point registers in the global allocator, too.
The new allocator also needs to keep track precisely of which registers
contain references or managed pointers to allow us to move to a precise GC.
It may be worth to use a single increasing set of integers for the virtual
registers, with the class of the register stored separately (unless the
current local allocator which keeps interger and fp registers separate).
Since this is a large task, we need to do it in steps as much as possible.
The first is to run the register allocator _after_ the burg rules: this
requires a rewrite of the liveness code, too, to use linear indexes instead
of basic-block/tree number combinations. This can be done by:
*) allocating virtual regs to all the locals that can be register allocated
*) running the burg rules (some may require adjustments): the local virtual
registers are assigned starting from global-virt-regs+1, instead of the current
hardware-regs+1, so we can tell apart global and local virt regs.
*) running the liveness/whatever code is needed to allocate the global registers
*) allocate the rest of the local variables to stack slots
*) continue with the current local allocator
This work could take 2-3 weeks.
The next step is to define the kind of declarative data an architecture needs
and assigning virtual regs to all the registers and making the allocator
assign from the volatile registers, too.
Note that some of the code that is currently emitted in the arch-specific
code, will need to be emitted as instructions that the reg allocator
can inspect: think of a method that returns the first argument which is
received in a register: the current code copies it to either a local slot or
to a global reg in the prolog an copies it back to the return register
int he basic block, but since neither the regallocator nor the peephole code
knows about the prolog code, the first store cannot be optimized away.
The gcc code has some example of how to specify register classes in a
declarative way.
-113
View File
@@ -1,113 +0,0 @@
* How to handle complex IL opcodes in an arch-independent way
Many IL opcodes are very simple: add, ldind etc.
Such opcodes can be implemented with a single cpu instruction
in most architectures (on some, a group of IL instructions
can be converted to a single cpu op).
There are many IL opcodes, though, that are more complex, but
can be expressed as a series of trees or a single tree of
simple operations. Such simple operations are architecture-independent.
It makes sense to decompose such complex IL instructions in their
simpler equivalent so that we gain in several ways:
*) porting effort is easier, because only the simple instructions
need to be implemented in arch-specific code
*) we could apply BURG rules to the trees and do pattern matching
on them to optimize the expressions according to the host cpu
The issue is: where do we do such conversion from coarse opcodes to
simple expressions?
* Doing the conversion in method_to_ir ()
Some of these conversions can certainly be done in method_to_ir (),
but it's not always easy to decide which are better done there and
which in a different pass.
For example, let's take ldlen: in the mono implementation, ldlen
can be simply implemented with a load from a fixed position in the
array object:
len = [reg + maxlen_offset]
However, ldlen carries also semantics information: the result is the
length of the array, and since in the CLR arrays are of fixed size,
this information can be useful to later do bounds check removal.
If we convert this opcode in method_to_ir () we lost some useful
information for further optimizations.
In some other ways, decomposing an opcode in method_to_ir() may
allow for better optimizations later on (need to come up with an
example here ...).
* Doing the conversion in inssel.brg
Some conversion may be done inside the burg rules: this has the
disadvantage that the instruction selector is not run again on
the resulting expression tree and we could miss some optimization
(this is what effectively happens with the coarse opcodes in the old
jit). This may also interfere with an efficient local register allocator.
It may be possible to add an extension in monoburg that allows a rule
such as:
recheck: LDLEN (reg) {
create an expression tree representing LDLEN
and return it
}
When the monoburg label process gets back a recheck, it will run
the labeling again on the resulting expression tree.
If this is possible at all (and in an efficient way) is a
question for dietmar:-)
It should be noted, though, that this may not always work, since
some complex IL opcodes may require a series of expression trees
and handling such cases in monoburg could become quite hairy.
For example, think of opcode that need to do multiple actions on the
same object: this basically means a DUP...
On the other end, if a complex opcode needs a DUP, monoburg doesn't
actually need to create trees if it emits the instructions in
the correct sequence and maintains the right values in the registers
(usually the values that need a DUP are not changed...). How
this integrates with the current register allocator is not clear, since
that assigns registers based on the rule, but the instructions emitted
by the rules may be different (this already happens with the current JIT
where a MULT is replaced with lea etc...).
* Doing it in a separate pass.
Doing the conversion in a separate pass over the instructions
is another alternative. This can be done right after method_to_ir ()
or after the SSA pass (since the IR after the SSA pass should look
almost like the IR we get back from method_to_ir ()).
This has the following advantages:
*) monoburg will handle only the simple opcodes (makes porting easier)
*) the instruction selection will be run on all the additional trees
*) it's easier to support coarse opcodes that produce multiple expression
trees (and apply the monoburg selector on all of them)
*) the SSA optimizer will see the original opcodes and will be able to use
the semantic info associated with them
The disadvantage is that this is a separate pass on the code and
it takes time (how much has not been measured yet, though).
With this approach, we may also be able to have C implementations
of some of the opcodes: this pass would insert a function call to
the C implementation (for example in the cases when first porting
to a new arch and implemenating some stuff may be too hard in asm).
* Extended basic blocks
IL code needs a lot of checks, bounds checks, overflow checks,
type checks and so on. This potentially increases by a lot
the number of basic blocks in a control flow graph. However,
all such blocks end up with a throw opcode that gives control to the
exception handling mechanism.
After method_to_ir () a MonoBasicBlock can be considered a sort
of extended basic block where the additional exits don't point
to basic blocks in the same procedure (at least when the method
doesn't have exception tables).
We need to make sure the passes following method_to_ir () can cope
with such kinds of extended basic blocks (especially the passes
that we need to apply to all the methods: as a start, we could
skip SSA optimizations for methods with exception clauses...)
-79
View File
@@ -1,79 +0,0 @@
mono_array_clone
mono_array_clone_in_domain
mono_array_full_copy
mono_array_new
mono_array_new_full
mono_array_new_specific
mono_async_result_new
mono_class_get_allocation_ftn
mono_class_vtable
mono_compile_method
mono_delegate_ctor
mono_field_get_value
mono_field_get_value_object
mono_field_set_value
mono_field_static_get_value
mono_field_static_set_value
mono_get_constant_value_from_blob
mono_get_delegate_invoke
mono_install_compile_method
mono_install_free_method
mono_install_handler
mono_install_remoting_trampoline
mono_install_runtime_invoke
mono_install_trampoline
mono_ldstr
mono_load_remote_field
mono_load_remote_field_new
mono_message_init
mono_message_invoke
mono_method_call_message_new
mono_method_return_message_restore
mono_object_castclass_mbyref
mono_object_clone
mono_object_get_class
mono_object_get_domain
mono_object_get_virtual_method
mono_object_isinst
mono_object_isinst_mbyref
mono_object_new
mono_object_new_alloc_specific
mono_object_new_fast
mono_object_new_from_token
mono_object_new_specific
mono_object_unbox
mono_print_unhandled_exception
mono_property_get_value
mono_property_set_value
mono_raise_exception
mono_release_type_locks
mono_remote_class
mono_remote_class_vtable
mono_remoting_invoke
mono_runtime_class_init
mono_runtime_delegate_invoke
mono_runtime_exec_main
mono_runtime_exec_managed_code
mono_runtime_free_method
mono_runtime_get_main_args
mono_runtime_invoke
mono_runtime_invoke_array
mono_runtime_object_init
mono_runtime_run_main
mono_store_remote_field
mono_store_remote_field_new
mono_string_from_utf16
mono_string_intern
mono_string_is_interned
mono_string_new
mono_string_new_len
mono_string_new_size
mono_string_new_utf16
mono_string_new_wrapper
mono_string_to_utf16
mono_string_to_utf8
mono_type_initialization_init
mono_unhandled_exception
mono_upgrade_remote_class
mono_value_box
mono_wait_handle_new
-829
View File
@@ -1,829 +0,0 @@
dlfree
dlmalloc
dlmemalign
free_list_index_of
g_printerr
g_ptr_array_remove_fast
invoke_protected_memory_method
mini_debugger_init
mini_debugger_main
mini_debugger_set_attach_ok
mini_debug_running_inside_mdb
mini_emit_initobj
mini_emit_stobj
mono_add_internal_call
mono_aot_register_globals
mono_aot_register_module
mono_array_addr_with_size
mono_array_class_get
mono_array_clone
mono_array_element_size
mono_array_length
mono_array_new
mono_array_new_full
mono_array_new_specific
mono_assemblies_cleanup
mono_assembly_close
mono_assembly_get_image
mono_assembly_get_main
mono_assembly_get_object
mono_assembly_getrootdir
mono_assembly_load
mono_assembly_loaded
mono_assembly_loaded_full
mono_assembly_load_full
mono_assembly_name_free
mono_assembly_name_get_culture
mono_assembly_name_get_name
mono_assembly_name_get_pubkeytoken
mono_assembly_name_get_version
mono_assembly_name_new
mono_assembly_names_equal
mono_assembly_open
mono_bitset_alloc_size
mono_bitset_clear
mono_bitset_clear_all
mono_bitset_clone
mono_bitset_copyto
mono_bitset_count
mono_bitset_equal
mono_bitset_find_first
mono_bitset_find_first_unset
mono_bitset_find_last
mono_bitset_find_start
mono_bitset_foreach
mono_bitset_free
mono_bitset_intersection
mono_bitset_intersection_2
mono_bitset_invert
mono_bitset_mem_new
mono_bitset_new
mono_bitset_set
mono_bitset_set_all
mono_bitset_size
mono_bitset_sub
mono_bitset_test
mono_bitset_test_bulk
mono_bitset_union
mono_bounded_array_class_get
mono_breakpoint_clean_code
mono_check_corlib_version
mono_class_array_element_size
mono_class_data_size
mono_class_describe_statics
mono_class_enum_basetype
mono_class_from_generic_parameter
mono_class_from_mono_type
mono_class_from_name
mono_class_from_name_case
mono_class_from_typeref
mono_class_get
mono_class_get_byref_type
mono_class_get_element_class
mono_class_get_events
mono_class_get_event_token
mono_class_get_field
mono_class_get_field_from_name
mono_class_get_fields
mono_class_get_field_token
mono_class_get_flags
mono_class_get_full
mono_class_get_image
mono_class_get_interfaces
mono_class_get_method_from_name
mono_class_get_method_from_name_flags
mono_class_get_methods
mono_class_get_name
mono_class_get_namespace
mono_class_get_nested_types
mono_class_get_nesting_type
mono_class_get_parent
mono_class_get_properties
mono_class_get_property_from_name
mono_class_get_property_token
mono_class_get_rank
mono_class_get_type
mono_class_get_type_token
mono_class_inflate_generic_method
mono_class_inflate_generic_type
mono_class_init
mono_class_instance_size
mono_class_interface_offset
mono_class_is_assignable_from
mono_class_is_enum
mono_class_is_subclass_of
mono_class_is_valid_enum
mono_class_is_valuetype
mono_class_min_align
mono_class_name_from_token
mono_class_num_events
mono_class_num_fields
mono_class_num_methods
mono_class_num_properties
mono_class_value_size
mono_class_vtable
mono_cli_rva_image_map
mono_code_manager_commit
mono_code_manager_destroy
mono_code_manager_foreach
mono_code_manager_invalidate
mono_code_manager_new
mono_code_manager_new_dynamic
mono_code_manager_reserve
mono_code_manager_reserve_align
mono_code_manager_set_read_only
mono_code_manager_size
mono_compile_method
mono_config_for_assembly
mono_config_parse
mono_config_parse_memory
mono_config_string_for_assembly_file
mono_context_get
mono_context_get_desc
mono_context_set
mono_counters_cleanup
mono_counters_dump
mono_counters_enable
mono_counters_register
mono_custom_attrs_construct
mono_custom_attrs_free
mono_custom_attrs_from_assembly
mono_custom_attrs_from_class
mono_custom_attrs_from_event
mono_custom_attrs_from_field
mono_custom_attrs_from_index
mono_custom_attrs_from_method
mono_custom_attrs_from_param
mono_custom_attrs_from_property
mono_custom_attrs_get_attr
mono_custom_attrs_has_attr
mono_debug_add_method
_mono_debug_address_from_il_offset
mono_debug_close_image
mono_debug_close_mono_symbol_file
mono_debug_domain_create
mono_debug_domain_unload
mono_debug_find_method
mono_debug_free_source_location
mono_debugger_abort_runtime_invoke
mono_debugger_breakpoint_callback
mono_debugger_call_exception_handler
mono_debugger_check_breakpoints
mono_debugger_check_interruption
mono_debugger_check_runtime_version
mono_debugger_class_initialized
mono_debugger_event
mono_debugger_event_create_appdomain
mono_debugger_event_unload_appdomain
mono_debugger_extended_notification
mono_debugger_handle_exception
mono_debugger_insert_breakpoint
mono_debugger_insert_breakpoint_full
mono_debugger_insert_method_breakpoint
mono_debugger_lock
mono_debugger_method_has_breakpoint
MONO_DEBUGGER__notification_function
mono_debugger_register_class_init_callback
mono_debugger_remove_breakpoint
mono_debugger_remove_class_init_callback
mono_debugger_remove_method_breakpoint
mono_debugger_run_finally
mono_debugger_runtime_invoke
mono_debugger_thread_cleanup
mono_debugger_thread_created
_mono_debugger_throw_exception
mono_debugger_trampoline_compiled
_mono_debugger_unhandled_exception
mono_debugger_unlock
mono_debug_il_offset_from_address
mono_debug_list_add
mono_debug_list_remove
mono_debug_lookup_locals
mono_debug_lookup_method
mono_debug_lookup_method_addresses
mono_debug_lookup_source_location
mono_debug_open_image_from_memory
mono_debug_open_mono_symbols
mono_debug_print_stack_frame
mono_debug_print_vars
mono_debug_symfile_get_line_numbers
mono_debug_symfile_lookup_locals
mono_debug_symfile_lookup_location
mono_debug_symfile_lookup_method
mono_debug_using_mono_debugger
mono_declsec_flags_from_assembly
mono_declsec_flags_from_class
mono_declsec_flags_from_method
mono_declsec_get_assembly_action
mono_declsec_get_class_action
mono_declsec_get_demands
mono_declsec_get_inheritdemands_class
mono_declsec_get_inheritdemands_method
mono_declsec_get_linkdemands
mono_declsec_get_method_action
mono_digest_get_public_token
mono_disasm_code
mono_disasm_code_one
mono_dllmap_insert
mono_domain_assembly_open
mono_domain_create
mono_domain_create_appdomain
mono_domain_finalize
mono_domain_foreach
mono_domain_free
mono_domain_from_appdomain
mono_domain_get
mono_domain_get_by_id
mono_domain_get_id
mono_domain_has_type_resolve
mono_domain_is_unloading
mono_domain_owns_vtable_slot
mono_domain_set
mono_domain_set_internal
mono_domain_try_type_resolve
mono_domain_try_unload
mono_domain_unload
mono_emit_native_call
mono_environment_exitcode_get
mono_environment_exitcode_set
mono_error_cleanup
mono_error_get_error_code
mono_error_get_message
mono_error_init
mono_error_init_flags
mono_error_ok
mono_escape_uri_string
mono_event_get_add_method
mono_event_get_flags
mono_event_get_name
mono_event_get_object
mono_event_get_parent
mono_event_get_raise_method
mono_event_get_remove_method
mono_exception_from_name
mono_exception_from_name_domain
mono_exception_from_name_msg
mono_exception_from_name_two_strings
mono_exception_from_token
mono_exception_from_token_two_strings
mono_field_from_token
mono_field_full_name
mono_field_get_data
mono_field_get_flags
mono_field_get_name
mono_field_get_object
mono_field_get_offset
mono_field_get_parent
mono_field_get_type
mono_field_get_value
mono_field_get_value_object
mono_field_set_value
mono_field_static_get_value
mono_field_static_set_value
mono_file_map
mono_file_map_close
mono_file_map_fd
mono_file_map_open
mono_file_map_size
mono_file_unmap
mono_free
mono_free_bstr
mono_free_method
mono_free_verify_list
mono_gc_collect
mono_gc_collection_count
mono_gc_enable_events
mono_gc_get_generation
mono_gc_get_heap_size
mono_gc_get_used_size
mono_gchandle_free
mono_gchandle_get_target
mono_gchandle_new
mono_gchandle_new_weakref
mono_gc_invoke_finalizers
mono_gc_is_finalizer_thread
mono_gc_max_generation
mono_gc_out_of_memory
mono_gc_wbarrier_arrayref_copy
mono_gc_wbarrier_generic_nostore
mono_gc_wbarrier_generic_store
mono_gc_wbarrier_generic_store_atomic
mono_gc_wbarrier_object_copy
mono_gc_wbarrier_set_arrayref
mono_gc_wbarrier_set_field
mono_gc_wbarrier_value_copy
mono_get_array_class
mono_get_boolean_class
mono_get_byte_class
mono_get_char_class
mono_get_config_dir
mono_get_corlib
mono_get_dbnull_object
mono_get_delegate_invoke
mono_get_double_class
mono_get_enum_class
mono_get_exception_appdomain_unloaded
mono_get_exception_argument
mono_get_exception_argument_null
mono_get_exception_argument_out_of_range
mono_get_exception_arithmetic
mono_get_exception_array_type_mismatch
mono_get_exception_bad_image_format
mono_get_exception_bad_image_format2
mono_get_exception_cannot_unload_appdomain
mono_get_exception_class
mono_get_exception_divide_by_zero
mono_get_exception_execution_engine
mono_get_exception_field_access
mono_get_exception_file_not_found
mono_get_exception_file_not_found2
mono_get_exception_index_out_of_range
mono_get_exception_invalid_cast
mono_get_exception_invalid_operation
mono_get_exception_io
mono_get_exception_method_access
mono_get_exception_missing_field
mono_get_exception_missing_method
mono_get_exception_not_implemented
mono_get_exception_not_supported
mono_get_exception_null_reference
mono_get_exception_out_of_memory
mono_get_exception_overflow
mono_get_exception_reflection_type_load
mono_get_exception_security
mono_get_exception_serialization
mono_get_exception_stack_overflow
mono_get_exception_synchronization_lock
mono_get_exception_thread_abort
mono_get_exception_thread_interrupted
mono_get_exception_thread_state
mono_get_exception_type_initialization
mono_get_exception_type_load
mono_get_int16_class
mono_get_int32_class
mono_get_int64_class
mono_get_intptr_class
mono_get_machine_config
mono_get_method
mono_get_method_full
mono_get_object_class
mono_get_root_domain
mono_get_sbyte_class
mono_get_single_class
mono_get_string_class
mono_get_thread_class
mono_get_trampoline_func
mono_get_uint16_class
mono_get_uint32_class
mono_get_uint64_class
mono_get_uintptr_class
mono_get_void_class
mono_g_hash_table_destroy
mono_g_hash_table_find
mono_g_hash_table_foreach
mono_g_hash_table_foreach_remove
mono_g_hash_table_insert
mono_g_hash_table_lookup
mono_g_hash_table_lookup_extended
mono_g_hash_table_new
mono_g_hash_table_new_full
mono_g_hash_table_new_type
mono_g_hash_table_remove
mono_g_hash_table_replace
mono_g_hash_table_size
mono_guid_to_string
mono_hazard_pointer_get
mono_image_addref
mono_image_close
mono_image_ensure_section
mono_image_ensure_section_idx
mono_image_fixup_vtable
mono_image_get_assembly
mono_image_get_entry_point
mono_image_get_filename
mono_image_get_guid
mono_image_get_name
mono_image_get_public_key
mono_image_get_resource
mono_image_get_strong_name
mono_image_get_table_info
mono_image_get_table_rows
mono_image_has_authenticode_entry
mono_image_is_dynamic
mono_image_loaded
mono_image_loaded_by_guid
mono_image_loaded_by_guid_full
mono_image_loaded_full
mono_image_load_file_for_image
mono_image_lookup_resource
mono_image_open
mono_image_open_from_data
mono_image_open_from_data_full
mono_image_open_from_data_with_name
mono_image_open_full
mono_image_rva_map
mono_images_cleanup
mono_image_strerror
mono_image_strong_name_position
mono_init
mono_init_from_assembly
mono_init_version
mono_install_assembly_load_hook
mono_install_assembly_postload_refonly_search_hook
mono_install_assembly_postload_search_hook
mono_install_assembly_preload_hook
mono_install_assembly_refonly_preload_hook
mono_install_assembly_refonly_search_hook
mono_install_assembly_search_hook
mono_install_runtime_cleanup
mono_install_threadpool_item_hooks
mono_install_threadpool_thread_hooks
mono_inst_name
mono_is_debugger_attached
mono_jit_cleanup
mono_jit_exec
mono_jit_info_get_code_size
mono_jit_info_get_code_start
mono_jit_info_get_method
mono_jit_info_table_find
mono_jit_init
mono_jit_init_version
mono_jit_parse_options
mono_jit_set_aot_only
mono_jit_set_trace_options
mono_ldstr
mono_ldtoken
mono_llvm_build_aligned_load
mono_llvm_build_alloca
mono_llvm_build_load
mono_llvm_create_ee
mono_llvm_dispose_ee
mono_llvm_dump_value
mono_llvm_optimize_method
mono_llvm_replace_uses_of
mono_load_remote_field
mono_load_remote_field_new
mono_local_deadce
mono_locks_dump
mono_lookup_internal_call
mono_lookup_pinvoke_call
mono_main
mono_marshal_string_to_utf16
mono_md5_final
mono_md5_get_digest
mono_md5_get_digest_from_file
mono_md5_init
mono_md5_update
mono_mempool_alloc
mono_mempool_alloc0
mono_mempool_contains_addr
mono_mempool_destroy
mono_mempool_empty
mono_mempool_get_allocated
mono_mempool_invalidate
mono_mempool_new
mono_mempool_new_size
mono_mempool_stats
mono_mempool_strdup
mono_metadata_blob_heap
mono_metadata_cleanup
mono_metadata_compute_size
mono_metadata_custom_attrs_from_index
mono_metadata_declsec_from_index
mono_metadata_decode_blob_size
mono_metadata_decode_row
mono_metadata_decode_row_col
mono_metadata_decode_signed_value
mono_metadata_decode_table_row
mono_metadata_decode_table_row_col
mono_metadata_decode_value
mono_metadata_encode_value
mono_metadata_events_from_typedef
mono_metadata_field_info
mono_metadata_field_info_with_mempool
mono_metadata_free_array
mono_metadata_free_inflated_signature
mono_metadata_free_marshal_spec
mono_metadata_free_method_signature
mono_metadata_free_mh
mono_metadata_free_type
mono_metadata_generic_class_is_valuetype
mono_metadata_get_constant_index
mono_metadata_get_inflated_signature
mono_metadata_get_marshal_info
mono_metadata_guid_heap
mono_metadata_implmap_from_method
mono_metadata_interfaces_from_typedef
mono_metadata_load_generic_params
mono_metadata_locate
mono_metadata_locate_token
mono_metadata_methods_from_event
mono_metadata_methods_from_property
mono_metadata_nested_in_typedef
mono_metadata_nesting_typedef
mono_metadata_packing_from_typedef
mono_metadata_parse_array
mono_metadata_parse_custom_mod
mono_metadata_parse_field_type
mono_metadata_parse_marshal_spec
mono_metadata_parse_method_signature
mono_metadata_parse_method_signature_full
mono_metadata_parse_mh
mono_metadata_parse_mh_full
mono_metadata_parse_param
mono_metadata_parse_signature
mono_metadata_parse_type
mono_metadata_parse_typedef_or_ref
mono_metadata_parse_type_full
mono_metadata_properties_from_typedef
mono_metadata_signature_alloc
mono_metadata_signature_dup
mono_metadata_signature_equal
mono_metadata_string_heap
mono_metadata_token_from_dor
mono_metadata_translate_token_index
mono_metadata_typedef_from_field
mono_metadata_typedef_from_method
mono_metadata_type_equal
mono_metadata_type_hash
mono_metadata_user_string
mono_method_body_get_object
mono_method_can_access_field
mono_method_can_access_method
mono_method_desc_free
mono_method_desc_from_method
mono_method_desc_full_match
mono_method_desc_match
mono_method_desc_new
mono_method_desc_search_in_class
mono_method_desc_search_in_image
mono_method_full_name
mono_method_get_class
mono_method_get_flags
mono_method_get_generic_container
mono_method_get_header
mono_method_get_index
mono_method_get_last_managed
mono_method_get_marshal_info
mono_method_get_name
mono_method_get_object
mono_method_get_param_names
mono_method_get_param_token
mono_method_get_signature
mono_method_get_signature_full
mono_method_get_token
mono_method_get_unmanaged_thunk
mono_method_has_marshal_info
mono_method_header_get_clauses
mono_method_header_get_code
mono_method_header_get_locals
mono_method_header_get_num_clauses
mono_method_signature
mono_method_verify
mono_mlist_alloc
mono_mlist_append
mono_mlist_get_data
mono_mlist_last
mono_mlist_length
mono_mlist_next
mono_mlist_prepend
mono_mlist_remove_item
mono_mlist_set_data
mono_mlist_set_next
mono_module_file_get_object
mono_module_get_object
mono_monitor_enter
mono_monitor_exit
mono_monitor_try_enter
mono_mprotect
mono_object_castclass_mbyref
mono_object_clone
mono_object_describe
mono_object_describe_fields
mono_object_get_class
mono_object_get_domain
mono_object_get_size
mono_object_get_virtual_method
mono_object_is_alive
mono_object_isinst
mono_object_isinst_mbyref
mono_object_new
mono_object_new_alloc_specific
mono_object_new_fast
mono_object_new_from_token
mono_object_new_specific
mono_object_unbox
mono_opcode_name
mono_opcode_value
mono_op_to_op_imm_noemul
mono_pagesize
mono_param_get_objects
mono_parse_default_optimizations
mono_path_canonicalize
mono_path_resolve_symlinks
mono_pe_file_open
mono_perfcounters_init
mono_personality
mono_pmip
mono_print_method_from_ip
mono_print_thread_dump
mono_print_thread_dump_from_ctx
mono_print_unhandled_exception
mono_profiler_coverage_get
mono_profiler_get_events
mono_profiler_install
mono_profiler_install_allocation
mono_profiler_install_appdomain
mono_profiler_install_assembly
mono_profiler_install_class
mono_profiler_install_code_buffer_new
mono_profiler_install_code_chunk_destroy
mono_profiler_install_code_chunk_new
mono_profiler_install_coverage_filter
mono_profiler_install_enter_leave
mono_profiler_install_exception
mono_profiler_install_gc
mono_profiler_install_gc_moves
mono_profiler_install_iomap
mono_profiler_install_jit_compile
mono_profiler_install_jit_end
mono_profiler_install_method_free
mono_profiler_install_method_invoke
mono_profiler_install_module
mono_profiler_install_monitor
mono_profiler_install_runtime_initialized
mono_profiler_install_statistical
mono_profiler_install_statistical_call_chain
mono_profiler_install_thread
mono_profiler_install_transition
mono_profiler_load
mono_profiler_set_events
mono_property_get_flags
mono_property_get_get_method
mono_property_get_name
mono_property_get_object
mono_property_get_parent
mono_property_get_set_method
mono_property_get_value
mono_property_hash_destroy
mono_property_hash_insert
mono_property_hash_lookup
mono_property_hash_new
mono_property_hash_remove_object
mono_property_set_value
mono_ptr_class_get
mono_raise_exception
mono_reflection_free_type_info
mono_reflection_get_custom_attrs
mono_reflection_get_custom_attrs_blob
mono_reflection_get_custom_attrs_by_type
mono_reflection_get_custom_attrs_data
mono_reflection_get_custom_attrs_info
mono_reflection_get_token
mono_reflection_get_type
mono_reflection_parse_type
mono_reflection_type_from_name
mono_register_bundled_assemblies
mono_register_machine_config
mono_replace_ins
mono_runtime_class_init
mono_runtime_cleanup
mono_runtime_delegate_invoke
mono_runtime_exec_main
mono_runtime_exec_managed_code
mono_runtime_get_main_args
mono_runtime_init
mono_runtime_invoke
mono_runtime_invoke_array
mono_runtime_is_shutting_down
mono_runtime_object_init
mono_runtime_quit
mono_runtime_run_main
mono_security_core_clr_require_elevated_permissions
mono_security_enable_core_clr
mono_security_set_core_clr_platform_callback
mono_sem_post
mono_sem_timedwait
mono_sem_wait
mono_set_break_policy
mono_set_defaults
mono_set_dirs
mono_set_is_debugger_attached
mono_set_signal_chaining
mono_sha1_final
mono_sha1_get_digest
mono_sha1_get_digest_from_file
mono_sha1_init
mono_sha1_update
mono_signature_explicit_this
mono_signature_get_call_conv
mono_signature_get_desc
mono_signature_get_param_count
mono_signature_get_params
mono_signature_get_return_type
mono_signature_hash
mono_signature_is_instance
mono_signature_vararg_start
mono_signbit_double
mono_signbit_float
mono_stack_walk
mono_stack_walk_no_il
mono_store_remote_field
mono_store_remote_field_new
mono_string_chars
mono_string_equal
mono_string_from_bstr
mono_string_from_utf16
mono_string_hash
mono_stringify_assembly_name
mono_string_intern
mono_string_is_interned
mono_string_length
mono_string_new
mono_string_new_len
mono_string_new_size
mono_string_new_utf16
mono_string_new_wrapper
mono_string_to_utf16
mono_string_to_utf8
mono_table_info_get_rows
mono_thread_attach
mono_thread_cleanup
mono_thread_create
mono_thread_current
mono_thread_detach
mono_thread_exit
mono_thread_get_main
mono_thread_get_undeniable_exception
mono_thread_hazardous_free_or_queue
mono_thread_hazardous_try_free_all
mono_thread_manage
mono_thread_new_init
mono_thread_set_main
mono_thread_set_manage_callback
mono_threads_get_default_stacksize
mono_threads_install_cleanup
mono_threads_request_thread_dump
mono_threads_set_default_stacksize
mono_thread_stop
mono_trace_set_level_string
mono_trace_set_mask_string
mono_type_create_from_typespec
mono_type_full_name
mono_type_generic_inst_is_valuetype
mono_type_get_array_type
mono_type_get_class
mono_type_get_desc
mono_type_get_modifiers
mono_type_get_name
mono_type_get_object
mono_type_get_ptr_type
mono_type_get_signature
mono_type_get_type
mono_type_get_underlying_type
mono_type_is_byref
mono_type_is_pointer
mono_type_is_reference
mono_type_is_struct
mono_type_is_valid_enum_basetype
mono_type_is_void
mono_type_size
mono_type_stack_size
mono_type_to_unmanaged
mono_unhandled_exception
mono_unicode_from_external
mono_unicode_to_external
mono_upgrade_remote_class_wrapper
mono_utf8_from_external
mono_utf8_validate_and_len
mono_utf8_validate_and_len_with_bounds
mono_valloc
mono_value_box
mono_value_copy
mono_value_copy_array
mono_value_describe_fields
mono_verify_corlib
mono_vfree
mono_vtable_get_static_field_data
mono_walk_stack
mono_win32_compat_CopyMemory
mono_win32_compat_FillMemory
mono_win32_compat_MoveMemory
mono_win32_compat_ZeroMemory
_ZN20MonoJITMemoryManager11AllocateGOTEv
_ZN20MonoJITMemoryManager12allocateStubEPKN4llvm11GlobalValueEjj
_ZN20MonoJITMemoryManager13allocateSpaceEij
_ZN20MonoJITMemoryManager13SetDlsymTableEPv
_ZN20MonoJITMemoryManager14allocateGlobalEjj
_ZN20MonoJITMemoryManager15endFunctionBodyEPKN4llvm8FunctionEPhS4_
_ZN20MonoJITMemoryManager17endExceptionTableEPKN4llvm8FunctionEPhS4_S4_
_ZN20MonoJITMemoryManager17setMemoryWritableEv
_ZN20MonoJITMemoryManager17startFunctionBodyEPKN4llvm8FunctionERj
_ZN20MonoJITMemoryManager19setMemoryExecutableEv
_ZN20MonoJITMemoryManager19startExceptionTableEPKN4llvm8FunctionERj
_ZN20MonoJITMemoryManager24deallocateMemForFunctionEPKN4llvm8FunctionE
_ZN20MonoJITMemoryManagerC1Ev
_ZN20MonoJITMemoryManagerC2Ev
_ZN20MonoJITMemoryManagerD0Ev
_ZN20MonoJITMemoryManagerD1Ev
_ZN20MonoJITMemoryManagerD2Ev
-49
View File
@@ -1,49 +0,0 @@
With this change, we bundle Reactive Extensions from Microsoft.
Steps to do:
- Until we add submodule, check out Rx sources from http://rx.codeplex.com:
$ cd external
$ git clone git://github.com/atsushieno/rx.git
$ cd rx
$ git checkout rx-oss-v1.0
$ cd ../..
Note that the original repo at rx.codeplex.com will *fail* on Linux!
codeplex.codeplex.com/workitem/26133
Also note that rx.codeplex.com is huge and takes very long time to checkout.
- expand rx-mono-changes-3.tar.bz2
$ tar jxvf rx-mono-changes-3.tar.bz2
- Apply changes to mcs/class/Makefile:
$ cd mcs/class
$ patch -i add-rx-libs.patch -p3
$ cd ../..
Then it should be done.
Note that this does not include Mono.Reactive.Testing into the build yet -
this library depends on nunit.framework.dll but it wouldn't be built before
this assembly is built. This needs to be resolved.
** Current Status
- We don't have Microsoft.Reactive.Testing.dll. Instead, I created an
alternative Mono.Reactive.Testing.dll which *mostly* uses MS sources for
that assembly but uses NUnit.Framework instead.
To make it happen, I added a small script that automatically replaces
MSTest dependency parts with that for NUnit (replacer.sh under rx tree).
(We'll also have to rename namespaces and have more source changes, but
so far it is to get things runnable.)
- To check the build sanity, I imported unit tests (as explained above)
and it is supposed to run by "make run-test" in Mono.Reactive.Testing
directory (the tests were all in one place in MS tests, so I made it
in Mono.Reactive.Testing directory instead).
-16
View File
@@ -1,16 +0,0 @@
<h1>Mono 1.0 Release Notes</h1>
<h2>What does Mono Include</h2>
<h2>Missing functionality</h2>
<p>COM support.
<p>EnterpriseServices are non-existant.
<p>Windows.Forms is only available as a preview, it is not
completed nor stable.
<h3>Assembly: System.Drawing</h3>
<p>System.Drawing.Printing is not supported.
+66 -7
View File
@@ -1,33 +1,75 @@
<h2>Assemblies</h2>
<p>Code in .NET and Mono is distributed in assemblies, there
are shipped typically in files with the extension .exe or
.dll, and they are files that extend
the <a href="https://en.wikipedia.org/wiki/Portable_Executable">Portable
Executable</a> file format to include the Common Intermediate
Language metadata and portable code.
<p>Assemblies are typically loaded either from a given file
path, or using an <a href="#assembly-name">Assembly Name</a>
to load them from the Global Assembly Cache.
<p>The Mono Assembly API contains method for dealing with
<a href="#assembly-name">assembly
names</a>, <a href="cil_assembly_load">loading assemblies</a>,
<a href="#working">accessing assembly
components</a>, <a href="#modules">modules</a> and
some <a href="#advanced">advanced</a> features.
<p>Assemblies contain one or
more images, the actual vessels for your code.
The <a href="mono-api-image.html">Image API</a> documents the
functions that operate on <code>MonoImage *</code>.
<h3>Synopsis</h3>
<div class="header">
<div class="mapi-header">
#include &lt;metadata/assembly.h&gt;
typedef struct _MonoImage MonoImage;
typedef struct _MonoAssembly MonoAssembly;
@API_IDX@
</div>
<a name="cil_assembly_load"/>
<a name="cil_assembly_load"/></a>
<h3>Assembly Loading</h3>
<h4><a name="api:mono_assembly_open">mono_assembly_open</a></h4>
<h4><a name="api:mono_assembly_close">mono_assembly_close</a></h4>
<h4><a name="api:mono_assembly_get_object">mono_assembly_get_object</a></h4>
<h4><a name="api:mono_assembly_load">mono_assembly_load</a></h4>
<h4><a name="api:mono_assembly_load_full">mono_assembly_load_full</a></h4>
<h4><a name="api:mono_assembly_loaded">mono_assembly_loaded</a></h4>
<h4><a name="api:mono_assembly_get_object">mono_assembly_get_object</a></h4>
<h4><a name="api:mono_assembly_load_from">mono_assembly_load_from</a></h4>
<h4><a name="api:mono_assembly_load_from_full">mono_assembly_load_from_full</a></h4>
<h4><a name="api:mono_assembly_load_with_partial_name">mono_assembly_load_with_partial_name</a></h4>
<h4><a name="api:mono_assembly_open">mono_assembly_open</a></h4>
<h4><a name="api:mono_assembly_open_full">mono_assembly_open_full</a></h4>
<h4><a name="api:mono_set_assemblies_path">mono_set_assemblies_path</a></h4>
<h4><a name="api:mono_set_rootdir">mono_set_rootdir</a></h4>
<a name="working"/>
<h3>Working with Assemblies</h3>
<h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</a></h4>
<h4><a name="api:mono_assembly_foreach">mono_assembly_foreach</a></h4>
<h4><a name="api:mono_assembly_get_image">mono_assembly_get_image</a></h4>
<h4><a name="api:mono_assembly_get_main">mono_assembly_get_main</a></h4>
<h4><a name="api:mono_assembly_get_name">mono_assembly_get_name</a></h4>
<h4><a name="api:mono_assembly_getrootdir">mono_assembly_getrootdir</a></h4>
<h4><a name="api:mono_assembly_get_assemblyref">mono_assembly_get_assemblyref</a></h4>
<h4><a name="api:mono_assembly_loaded_full">mono_assembly_loaded_full</a></h4>
<h4><a name="api:mono_assembly_load_reference">mono_assembly_load_reference</a></h4>
<h4><a name="api:mono_assembly_load_references">mono_assembly_load_references</a></h4>
<h4><a name="api:mono_assembly_load_module">mono_assembly_load_module</a></h4>
<h4><a name="api:mono_assembly_invoke_load_hook">mono_assembly_invoke_load_hook</a></h4>
<h4><a name="api:mono_assembly_invoke_search_hook">mono_assembly_invoke_search_hook</a></h4>
<h4><a name="api:mono_assembly_set_main">mono_assembly_set_main</a></h4>
<h4><a name="api:mono_assembly_setrootdir">mono_assembly_setrootdir</a></h4>
<h4><a name="api:mono_register_config_for_assembly">mono_register_config_for_assembly</a></h4>
<h4><a name="api:mono_register_symfile_for_assembly">mono_register_symfile_for_assembly</a></h4>
<a name="assembly-name"></a>
<h3>Assembly Names</h3>
<p>The MonoAssemblyName contains the full identity of an
@@ -38,10 +80,16 @@ typedef struct _MonoAssembly MonoAssembly;
href="http://www.mono-project.com/monodoc/T:System.Reflection.AssemblyName">System.Reflection.AssemblyName</a>
managed type.
<h4><a name="api:mono_assembly_name_new">mono_assembly_name_new</a></h4>
<h4><a name="api:mono_assembly_name_get_name">mono_assembly_name_get_name</a></h4>
<h4><a name="api:mono_assembly_name_get_culture">mono_assembly_name_get_culture</a></h4>
<h4><a name="api:mono_assembly_name_get_version">mono_assembly_name_get_version</a></h4>
<h4><a name="api:mono_assembly_name_get_pubkeytoken">mono_assembly_name_get_pubkeytoken</a></h4>
<h4><a name="api:mono_assembly_name_free">mono_assembly_name_free</a></h4>
<h4><a name="api:mono_stringify_assembly_name">mono_stringify_assembly_name</a></h4>
<h4><a name="api:mono_assembly_names_equal">mono_assembly_names_equal</a></h4>
<a href="modules"/>
<h3>Modules</h3>
<p>An assembly is made up of one or more modules.
@@ -49,3 +97,14 @@ typedef struct _MonoAssembly MonoAssembly;
<h4><a name="api:mono_module_file_get_object">mono_module_file_get_object</a></h4>
<h4><a name="api:mono_module_get_object">mono_module_get_object</a></h4>
<a href="advanced"/>
<h3>Advanced</h3>
<h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a></h4>
<h4><a name="api:mono_install_assembly_search_hook">mono_install_assembly_search_hook</a></h4>
<h4><a name="api:mono_install_assembly_refonly_search_hook">mono_install_assembly_refonly_search_hook</a></h4>
<h4><a name="api:mono_install_assembly_preload_hook">mono_install_assembly_preload_hook</a></h4>
<h4><a name="api:mono_install_assembly_refonly_preload_hook">mono_install_assembly_refonly_preload_hook</a></h4>
<h4><a name="api:mono_install_assembly_postload_search_hook">mono_install_assembly_postload_search_hook</a></h4>
<h4><a name="api:mono_install_assembly_postload_refonly_search_hook">mono_install_assembly_postload_refonly_search_hook</a></h4>
+71 -15
View File
@@ -1,52 +1,108 @@
<h2>Class Operations</h2>
<p>The operations on <code>MonoClass*</code> allow you to
query a number of properties of a .NET class from the C API.
<p>This page contains information
for <a href="#class-getting">how to obtain a MonoClass*</a>,
how to <a href="#class-work">probe for different
features of a MonoClass*</a> and APIs
to <a href="#class-members">access class members</a> and
<a href="#class-fields">access fields</a>. To access
methods, see the <a href="mono-api-methods.html">method
documentation API</a>.
<a name="class-getting"></a>
<h3>Getting a MonoClass</h3>
<p>You typically would obtain a <code>MonoClass*</code>
pointer by using a combination of the <code>MonoImage*</code>
where the type is located, the namespace and name using the
<code><a href="api:mono_class_from_name">mono_class_from_name</a></code>
or
the <code><a href="api:mono_class_from_name_case">mono_class_from_name_case</a></code>
APIs or by using
the <code><a href="api:mono_class_from_typeref">mono_class_from_typeref</a></code>
or <code><a href="api:mono_class_from_typeref">mono_class_from_typeref_checked</a></code>
methods.
<p>For low-level access, you can get the <code>MonoClass
*</code> from an image and an ECMA type token relative to
the <code>MonoImage*</code> by using <a href="api:mono_class_get">mono_class_get</a>.
<h4><a name="api:mono_class_get">mono_class_get</a></h4>
<h4><a name="api:mono_class_from_mono_type">mono_class_from_mono_type</a></h4>
<h4><a name="api:mono_class_from_name">mono_class_from_name</a></h4>
<h4><a name="api:mono_class_from_name_case">mono_class_from_name_case</a></h4>
<h4><a name="api:mono_class_from_typeref">mono_class_from_typeref</a></h4>
<h4><a name="api:mono_class_from_typeref_checked">mono_class_from_typeref_checked</a></h4>
<h4><a name="api:mono_class_from_generic_parameter">mono_class_from_generic_parameter</a></h4>
<h3>Working with a MonoClass</h3>
<h4><a name="api:mono_class_array_element_size">mono_class_array_element_size</a></h4>
<h4><a name="api:mono_class_data_size">mono_class_data_size</a></h4>
<h4><a name="api:mono_class_enum_basetype">mono_class_enum_basetype</a></h4>
<h4><a name="api:mono_class_from_generic_parameter">mono_class_from_generic_parameter</a></h4>
<h4><a name="api:mono_class_from_mono_type">mono_class_from_mono_type</a></h4>
<h4><a name="api:mono_class_from_name_case">mono_class_from_name_case</a></h4>
<h4><a name="api:mono_class_from_name">mono_class_from_name</a></h4>
<h4><a name="api:mono_class_from_typeref">mono_class_from_typeref</a></h4>
<h4><a name="api:mono_class_get_byref_type">mono_class_get_byref_type</a></h4>
<h4><a name="api:mono_class_get_element_class">mono_class_get_element_class</a></h4>
<h4><a name="api:mono_class_get_events">mono_class_get_events</a></h4>
<h4><a name="api:mono_class_get_event_token">mono_class_get_event_token</a></h4>
<h4><a name="api:mono_class_get_field_from_name">mono_class_get_field_from_name</a></h4>
<h4><a name="api:mono_class_get_field">mono_class_get_field</a></h4>
<h4><a name="api:mono_class_get_fields">mono_class_get_fields</a></h4>
<h4><a name="api:mono_class_get_field_token">mono_class_get_field_token</a></h4>
<h4><a name="api:mono_class_get_flags">mono_class_get_flags</a></h4>
<h4><a name="api:mono_class_get_full">mono_class_get_full</a></h4>
<h4><a name="api:mono_class_get_image">mono_class_get_image</a></h4>
<h4><a name="api:mono_class_get_interfaces">mono_class_get_interfaces</a></h4>
<h4><a name="api:mono_class_get_method_from_name">mono_class_get_method_from_name</a></h4>
<h4><a name="api:mono_class_get_methods">mono_class_get_methods</a></h4>
<h4><a name="api:mono_class_get">mono_class_get</a></h4>
<h4><a name="api:mono_class_get_name">mono_class_get_name</a></h4>
<h4><a name="api:mono_class_get_namespace">mono_class_get_namespace</a></h4>
<h4><a name="api:mono_class_get_nested_types">mono_class_get_nested_types</a></h4>
<h4><a name="api:mono_class_get_nesting_type">mono_class_get_nesting_type</a></h4>
<h4><a name="api:mono_class_get_parent">mono_class_get_parent</a></h4>
<h4><a name="api:mono_class_get_properties">mono_class_get_properties</a></h4>
<h4><a name="api:mono_class_get_property_from_name">mono_class_get_property_from_name</a></h4>
<h4><a name="api:mono_class_get_property_token">mono_class_get_property_token</a></h4>
<h4><a name="api:mono_class_get_rank">mono_class_get_rank</a></h4>
<h4><a name="api:mono_class_get_type">mono_class_get_type</a></h4>
<h4><a name="api:mono_class_get_type_token">mono_class_get_type_token</a></h4>
<h4><a name="api:mono_class_implements_interface">mono_class_implements_interface</a></h4>
<h4><a name="api:mono_class_inflate_generic_method">mono_class_inflate_generic_method</a></h4>
<h4><a name="api:mono_class_inflate_generic_type">mono_class_inflate_generic_type</a></h4>
<h4><a name="api:mono_class_init">mono_class_init</a></h4>
<h4><a name="api:mono_class_instance_size">mono_class_instance_size</a></h4>
<h4><a name="api:mono_class_is_assignable_from">mono_class_is_assignable_from</a></h4>
<h4><a name="api:mono_class_is_delegate">mono_class_is_delegate</a></h4>
<h4><a name="api:mono_class_is_enum">mono_class_is_enum</a></h4>
<h4><a name="api:mono_class_is_subclass_of">mono_class_is_subclass_of</a></h4>
<h4><a name="api:mono_class_is_valuetype">mono_class_is_valuetype</a></h4>
<h4><a name="api:mono_class_min_align">mono_class_min_align</a></h4>
<h4><a name="api:mono_class_name_from_token">mono_class_name_from_token</a></h4>
<h4><a name="api:mono_class_num_events">mono_class_num_events</a></h4>
<h4><a name="api:mono_class_num_fields">mono_class_num_fields</a></h4>
<h4><a name="api:mono_class_num_methods">mono_class_num_methods</a></h4>
<h4><a name="api:mono_class_num_properties">mono_class_num_properties</a></h4>
<h4><a name="api:mono_class_value_size">mono_class_value_size</a></h4>
<h4><a name="api:mono_class_vtable">mono_class_vtable</a></h4>
<a name="class-members"></a>
<h3>Getting Class Members</h3>
<h4><a name="api:mono_class_get_fields">mono_class_get_fields</a></h4>
<h4><a name="api:mono_class_get_field_from_name">mono_class_get_field_from_name</a></h4>
<h4><a name="api:mono_class_get_methods">mono_class_get_methods</a></h4>
<h4><a name="api:mono_class_get_method_from_name">mono_class_get_method_from_name</a></h4>
<h4><a name="api:mono_class_get_method_from_name_flags">mono_class_get_method_from_name_flags</a></h4>
<h4><a name="api:mono_class_name_from_token">mono_class_name_from_token</a></h4>
<h4><a name="api:mono_class_get_nested_types">mono_class_get_nested_types</a></h4>
<h4><a name="api:mono_class_get_properties">mono_class_get_properties</a></h4>
<h4><a name="api:mono_class_get_property_from_name">mono_class_get_property_from_name</a></h4>
<h4><a name="api:mono_class_get_events">mono_class_get_events</a></h4>
<a name="class-fields"></a>
<h3>Fields</h3>
<h4><a name="api:mono_field_get_data">mono_field_get_data</a></h4>
<h4><a name="api:mono_field_get_offset">mono_field_get_offset</a></h4>
<h4><a name="api:mono_field_full_name">mono_field_full_name</a></h4>
<h3>Method Accessibility</h3>
<h4><a name="api:mono_method_can_access_field">mono_method_can_access_field</a></h4>
<h4><a name="api:mono_method_can_access_method">mono_method_can_access_method</a></h4>
<p>
-10
View File
@@ -1,10 +0,0 @@
<h3>Code manager</h3>
<h4><a name="api:mono_code_manager_commit">mono_code_manager_commit</a></h4>
<h4><a name="api:mono_code_manager_destroy">mono_code_manager_destroy</a></h4>
<h4><a name="api:mono_code_manager_foreach">mono_code_manager_foreach</a></h4>
<h4><a name="api:mono_code_manager_invalidate">mono_code_manager_invalidate</a></h4>
<h4><a name="api:mono_code_manager_new_dynamic">mono_code_manager_new_dynamic</a></h4>
<h4><a name="api:mono_code_manager_new">mono_code_manager_new</a></h4>
<h4><a name="api:mono_code_manager_reserve">mono_code_manager_reserve</a></h4>
+30 -15
View File
@@ -1,23 +1,38 @@
<h4><a name="api:mono_debug_il_offset_from_address">mono_debug_il_offset_from_address</a></h4>
<h4><a name="api:mono_debug_add_method">mono_debug_add_method</a></h4>
<h4><a name="api:mono_debug_close_mono_symbol_file">mono_debug_close_mono_symbol_file</a></h4>
<h4><a name="api:mono_debug_find_method">mono_debug_find_method</a></h4>
<h4><a name="api:mono_debug_using_mono_debugger">mono_debug_using_mono_debugger</a></h4>
<h3>Mono Debugger Interface</h3>
<p>These are methods that are invoked by the debugger at
runtime.
<h4><a name="api:mono_debugger_breakpoint_callback">mono_debugger_breakpoint_callback</a></h4>
<h4><a name="api:mono_debugger_check_runtime_version">mono_debugger_check_runtime_version</a></h4>
<h4><a name="api:mono_debugger_event">mono_debugger_event</a></h4>
<h4><a name="api:mono_debugger_handle_exception">mono_debugger_handle_exception</a></h4>
<h4><a name="api:mono_debugger_insert_breakpoint_full">mono_debugger_insert_breakpoint_full</a></h4>
<h4><a name="api:mono_debugger_insert_breakpoint">mono_debugger_insert_breakpoint</a></h4>
<h4><a name="api:mono_debugger_lock">mono_debugger_lock</a></h4>
<h4><a name="api:mono_debugger_method_has_breakpoint">mono_debugger_method_has_breakpoint</a></h4>
<h4><a name="api:mono_debugger_remove_breakpoint">mono_debugger_remove_breakpoint</a></h4>
<h4><a name="api:mono_debugger_runtime_invoke">mono_debugger_runtime_invoke</a></h4>
<h4><a name="api:mono_debugger_unlock">mono_debugger_unlock</a></h4>
<h4><a name="api:mono_debugger_run_finally">mono_debugger_run_finally</a></h4>
<h3>Debugging Symbols</h3>
<h4><a name="api:mono_debug_open_mono_symbols">mono_debug_open_mono_symbols</a></h4>
<h4><a name="api:mono_debug_symfile_free_location">mono_debug_symfile_free_location</a></h4>
<h4><a name="api:mono_debug_symfile_is_loaded">mono_debug_symfile_is_loaded</a></h4>
<h4><a name="api:mono_debug_symfile_lookup_locals">mono_debug_symfile_lookup_locals</a></h4>
<h4><a name="api:mono_debug_symfile_lookup_location">mono_debug_symfile_lookup_location</a></h4>
<h4><a name="api:mono_debug_symfile_lookup_method">mono_debug_symfile_lookup_method</a></h4>
<h3>Internal Debugging </h3>
<h4><a name="api:mono_debug_add_delegate_trampoline">mono_debug_add_delegate_trampoline</a></h4>
<h4><a name="api:mono_debug_close_image">mono_debug_close_image</a></h4>
<h4><a name="api:mono_debug_domain_create">mono_debug_domain_create</a></h4>
<h4><a name="api:mono_debug_domain_unload">mono_debug_domain_unload</a></h4>
<h4><a name="api:mono_debug_enabled">mono_debug_enabled</a></h4>
<h4><a name="api:mono_debug_free_method_jit_info">mono_debug_free_method_jit_info</a></h4>
<h4><a name="api:mono_debug_free_source_location">mono_debug_free_source_location</a></h4>
<h4><a name="api:mono_debug_lookup_locals">mono_debug_lookup_locals</a></h4>
<h4><a name="api:mono_debug_lookup_method">mono_debug_lookup_method</a></h4>
<h4><a name="api:mono_debug_lookup_method_addresses">mono_debug_lookup_method_addresses</a></h4>
<h4><a name="api:mono_debug_lookup_source_location">mono_debug_lookup_source_location</a></h4>
<h4><a name="api:mono_debug_open_image_from_memory">mono_debug_open_image_from_memory</a></h4>
<h4><a name="api:mono_debug_print_stack_frame">mono_debug_print_stack_frame</a></h4>
<h4><a name="api:mono_debug_remove_method">mono_debug_remove_method</a></h4>
<h4><a name="api:mono_debug_il_offset_from_address">mono_debug_il_offset_from_address</a></h4>
<h4><a name="api:mono_debug_add_method">mono_debug_add_method</a></h4>
<h4><a name="api:mono_debug_close_mono_symbol_file">mono_debug_close_mono_symbol_file</a></h4>
<h4><a name="api:mono_debug_find_method">mono_debug_find_method</a></h4>
-19
View File
@@ -1,19 +0,0 @@
<h1>Decimal Support</h1>
<p>You can use the mono_decimal functions to access and
manipulate <tt>System.Decimal</tt> types from C.
<h4><a name="api:mono_decimal2double">mono_decimal2double</a></h4>
<h4><a name="api:mono_decimal2Int64">mono_decimal2Int64</a></h4>
<h4><a name="api:mono_decimal2string">mono_decimal2string</a></h4>
<h4><a name="api:mono_decimal2UInt64">mono_decimal2UInt64</a></h4>
<h4><a name="api:mono_decimalCompare">mono_decimalCompare</a></h4>
<h4><a name="api:mono_decimalDiv">mono_decimalDiv</a></h4>
<h4><a name="api:mono_decimalFloorAndTrunc">mono_decimalFloorAndTrunc</a></h4>
<h4><a name="api:mono_decimalIncr">mono_decimalIncr</a></h4>
<h4><a name="api:mono_decimalIntDiv">mono_decimalIntDiv</a></h4>
<h4><a name="api:mono_decimalMult">mono_decimalMult</a></h4>
<h4><a name="api:mono_decimalRound">mono_decimalRound</a></h4>
<h4><a name="api:mono_decimalSetExponent">mono_decimalSetExponent</a></h4>
<h4><a name="api:mono_double2decimal">mono_double2decimal</a></h4>
<h4><a name="api:mono_string2decimal">mono_string2decimal</a></h4>
+12 -3
View File
@@ -2,7 +2,7 @@
<h3>Synopsis</h3>
<div class="header">
<div class="mapi-header">
#include &lt;metadata/appdomain.h&gt;
/* Managed AppDomain */
@@ -34,21 +34,30 @@ typedef struct _MonoAppContext MonoAppContext
<h4><a name="api:mono_domain_assembly_open">mono_domain_assembly_open</a></h4>
<h4><a name="api:mono_domain_create">mono_domain_create</a></h4>
<h4><a name="api:mono_domain_create_appdomain">mono_domain_create_appdomain</a></h4>
<h4><a name="api:mono_domain_finalize">mono_domain_finalize</a></h4>
<h4><a name="api:mono_domain_foreach">mono_domain_foreach</a></h4>
<h4><a name="api:mono_domain_free">mono_domain_free</a></h4>
<h4><a name="api:mono_domain_from_appdomain">mono_domain_from_appdomain</a></h4>
<h4><a name="api:mono_domain_get_by_id">mono_domain_get_by_id</a></h4>
<h4><a name="api:mono_domain_get_friendly_name">mono_domain_get_friendly_name</a></h4>
<h4><a name="api:mono_domain_get_id">mono_domain_get_id</a></h4>
<h4><a name="api:mono_domain_get">mono_domain_get</a></h4>
<h4><a name="api:mono_domain_has_type_resolve">mono_domain_has_type_resolve</a></h4>
<h4><a name="api:mono_domain_is_unloading">mono_domain_is_unloading</a></h4>
<h4><a name="api:mono_domain_owns_vtable_slot">mono_domain_owns_vtable_slot</a></h4>
<h4><a name="api:mono_domain_set_config">mono_domain_set_config</a></h4>
<h4><a name="api:mono_domain_set_internal">mono_domain_set_internal</a></h4>
<h4><a name="api:mono_domain_set">mono_domain_set</a></h4>
<h4><a name="api:mono_domain_try_type_resolve">mono_domain_try_type_resolve</a></h4>
<h4><a name="api:mono_domain_owns_vtable_slot">mono_domain_owns_vtable_slot</a></h4>
<h4><a name="api:mono_domain_try_unload">mono_domain_try_unload</a></h4>
<h4><a name="api:mono_domain_unload">mono_domain_unload</a></h4>
<h3>Contexts</h3>
<h4><a name="api:mono_context_init">mono_context_init</a></h4>
<h4><a name="api:mono_context_get">mono_context_get</a></h4>
<h4><a name="api:mono_context_get_domain_id">mono_context_get_domain_id</a></h4>
<h4><a name="api:mono_context_get_id">mono_context_get_id</a></h4>
<h4><a name="api:mono_context_set">mono_context_set</a></h4>
<h4><a name="api:mono_context_get_desc">mono_context_get_desc</a></h4>
+1 -1
View File
@@ -1,4 +1,4 @@
<h2>Dynamic Code Generation</h2>
<h2>Internal: Dynamic Code Generation</h2>
<p>The dynamic code generation interface inside the Mono
runtime is similar to the API exposed by
+34 -14
View File
@@ -1,5 +1,18 @@
<h2>Embedding Mono</h2>
<p>The Mono runtime can be embedded into C and C++
applications. Your C/C++ code can invoke managed code
running in the Mono/.NET world and you can also surface your
internal application APIs to Mono and .NET.
<p>For an overview of how to embed Mono into your application
and the strategies that you can use to embed Mono, check the
Mono
website's <a href="http://www.mono-project.com/docs/advanced/embedding/">Embedding
Mono</a> page.
<p>This page is the companion API reference for the above guide.
<p>The simplest way of embedding Mono is illustrated here:
<pre>
int main (int argc, char *argv)
@@ -48,13 +61,14 @@ getMessage ()
</pre>
<h4><a name="api:mono_jit_init">mono_jit_init</a></h4>
<h4><a name="api:mono_jit_parse_options">mono_jit_parse_options</a></h4>
<h4><a name="api:mono_jit_exec">mono_jit_exec</a></h4>
<h4><a name="api:mono_set_dirs">mono_set_dirs</a></h4>
<h4><a name="api:mono_main">mono_main</a></h4>
<h4><a name="api:mono_parse_default_optimizations">mono_parse_default_optimizations</a></h4>
<h4><a name="api:mono_runtime_set_main_args">mono_runtime_set_main_args</a></h4>
<h4><a name="api:mono_jit_cleanup">mono_jit_cleanup</a></h4>
<h4><a name="api:mono_set_defaults">mono_set_defaults</a></h4>
<h4><a name="api:mono_jit_set_trace_options">mono_jit_set_trace_options</a></h4>
<h3>Internal Calls</h3>
@@ -141,19 +155,16 @@ getMessage ()
<p>The following APIs expose this functionality:
<h4><a name="api:mono_config_cleanup">mono_config_cleanup</a></h4>
<h4><a name="api:mono_config_is_server_mode">mono_config_is_server_mode</a></h4>
<h4><a name="api:mono_config_parse">mono_config_parse</a></h4>
<h4><a name="api:mono_config_parse_memory">mono_config_parse_memory</a></h4>
<h4><a name="api:mono_config_set_server_mode">mono_config_set_server_mode</a></h4>
<h4><a name="api:mono_config_string_for_assembly_file">mono_config_string_for_assembly_file</a></h4>
<h4><a name="api:mono_get_config_dir">mono_get_config_dir</a></h4>
<h3>Function Pointers</h3>
<p>To wrap a function pointer into something that the Mono
runtime can consume, you should use the mono_create_ftnptr.
This is only important if you plan on running on the IA64
architecture. Otherwise you can just use the function
pointer address.
<h4><a name="api:mono_create_ftnptr">mono_create_ftnptr</a></h4>
<h4><a name="api:mono_get_machine_config">mono_get_machine_config</a></h4>
<h4><a name="api:mono_register_machine_config">mono_register_machine_config</a></h4>
<h4><a name="api:mono_set_config_dir">mono_set_config_dir</a></h4>
<h3>Advanced Execution Setups</h3>
@@ -163,6 +174,15 @@ getMessage ()
<h4><a name="api:mono_runtime_exec_managed_code">mono_runtime_exec_managed_code</a></h4>
<h4><a name="api:mono_runtime_exec_main">mono_runtime_exec_main</a></h4>
<h4><a name="api:mono_init_from_assembly">mono_init_from_assembly</a></h4>
<h4><a name="api:mono_init">mono_init</a></h4>
<h4><a name="api:mono_init_from_assembly">mono_init_from_assembly</a></h4>
<h4><a name="api:mono_init_version">mono_init_version</a></h4>
<h4><a name="api:mono_jit_exec">mono_jit_exec</a></h4>
<h4><a name="api:mono_jit_set_aot_mode">mono_jit_set_aot_mode</a></h4>
<h4><a name="api:mono_set_break_policy">mono_set_break_policy</a></h4>
<h4><a name="api:mono_get_runtime_build_info">mono_get_runtime_build_info</a></h4>
<h3>Signal Chaining</h3>
<h4><a name="api:mono_set_signal_chaining">mono_set_signal_chaining</a></h4>
<h4><a name="api:mono_set_crash_chaining">mono_set_crash_chaining</a></h4>
+28 -4
View File
@@ -1,16 +1,32 @@
<h2>Exception Handling</h2>
<div class="header">
@API_IDX@
</div>
<p>Mono's exception handling contains methods
to <a href="#creating">create `MonoException*` objects</a>
that can be <a href="api:mono_raise_exception">raised</a>.
<p>Alternatively, you can obtain an exception that you can
raise from some of the most <a href="#common">common</a>
exceptions in the .NET Runtime.
<h3>Raising and Catching exceptions</h3>
<p>If you plan on running your code in Mono's Cooperative mode
for the Garbage Collector (for example, if you are using pure
Bitcode code generation), it you should avoid raising an
exception from any method that is not the entry point to the
internal call.
<p>It is recommended that if you need to raise an error
condition from nested parts of your code, surface this error
to the topmost method that is surfaced as an internal call and
raise the exception there.
<h4><a name="api:mono_raise_exception">mono_raise_exception</a></h4>
<h4><a name="api:mono_unhandled_exception">mono_unhandled_exception</a></h4>
<h4><a name="api:mono_print_unhandled_exception">mono_print_unhandled_exception</a></h4>
<a name="creating"/>
<h3>Exception Types: General API</h3>
<h4><a name="api:mono_exception_from_name_domain">mono_exception_from_name_domain</a></h4>
@@ -18,6 +34,7 @@
<h4><a name="api:mono_exception_from_name_msg">mono_exception_from_name_msg</a></h4>
<h4><a name="api:mono_exception_from_name_two_strings">mono_exception_from_name_two_strings</a></h4>
<a name="common"/>
<h3>Obtaining Common Exceptions</h3>
<p>There are a number of common exceptions that are used by
@@ -56,3 +73,10 @@
<h4><a name="api:mono_get_exception_missing_field">mono_get_exception_missing_field</a></h4>
<h4><a name="api:mono_get_exception_not_supported">mono_get_exception_not_supported</a></h4>
<h4><a name="api:mono_get_exception_reflection_type_load">mono_get_exception_reflection_type_load</a></h4>
<h4><a name="api:mono_exception_from_token_two_strings">mono_exception_from_token_two_strings</a></h4>
<h4><a name="api:mono_get_exception_bad_image_format2">mono_get_exception_bad_image_format2</a></h4>
<h4><a name="api:mono_get_exception_field_access">mono_get_exception_field_access</a></h4>
<h4><a name="api:mono_get_exception_method_access">mono_get_exception_method_access</a></h4>
<h4><a name="api:mono_get_exception_out_of_memory">mono_get_exception_out_of_memory</a></h4>
<h4><a name="api:mono_get_exception_runtime_wrapped">mono_get_exception_runtime_wrapped</a></h4>
<h4><a name="api:mono_get_exception_thread_interrupted">mono_get_exception_thread_interrupted</a></h4>
+110 -1
View File
@@ -4,9 +4,118 @@
<p>The public interface of the Mono GC is fairly limited, and
its the only one that embedders should be using:
<h3>Garbage Collector</h3>
<h4><a name="api:mono_gc_collect">mono_gc_collect</a></h4>
<h4><a name="api:mono_gc_collection_count">mono_gc_collection_count</a></h4>
<h4><a name="api:mono_gc_max_generation">mono_gc_max_generation</a></h4>
<h4><a name="api:mono_gc_get_generation">mono_gc_get_generation</a></h4>
<h4><a name="api:mono_gc_get_heap_size">mono_gc_get_heap_size</a></h4>
<h4><a name="api:mono_gc_get_used_size">mono_gc_get_used_size</a></h4>
<h4><a name="api:mono_gc_walk_heap">mono_gc_walk_heap</a></h4>
<h3>Reference Queues</h3>
<h4><a name="api:mono_gc_reference_queue_add">mono_gc_reference_queue_add</a></h4>
<h4><a name="api:mono_gc_reference_queue_free">mono_gc_reference_queue_free</a></h4>
<h4><a name="api:mono_gc_reference_queue_new">mono_gc_reference_queue_new</a></h4>
<h3>SGen Bridge</h3>
<p>The bridge is a mechanism for SGen to let clients override
the death of some unreachable objects. We use it in monodroid
to do garbage collection across the Mono and Java heaps.
<p>The client can designate some objects as "bridged", which
means that they participate in the bridge processing step once
SGen considers them unreachable, i.e., dead. Bridged objects
must be registered for finalization.
<p>When SGen is done marking, it puts together a list of all
dead bridged objects and then does a strongly connected
component analysis over their object graph. That graph will
usually contain non-bridged objects, too.
<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.
<p>In monodroid each bridged object has a corresponding Java
mirror object. In the bridge callback it reifies the Mono
object graph in the Java heap so that the full, combined
object graph is now instantiated on the Java side. Then it
triggers a Java GC, waits for it to finish, and checks which
of the Java mirror objects are still alive. For those it sets
the `is_alive` flag and returns from the callback.
<p>The SCC analysis is done while the world is stopped, but
the callback is made with the world running again. Weak links
to bridged objects and other objects reachable from them are
kept until the callback returns, at which point all links to
bridged objects that don't have `is_alive` set are nulled.
Note that weak links to non-bridged objects reachable from
bridged objects are not nulled. This might be considered a
bug.
<div class="mapi-header">
enum {
SGEN_BRIDGE_VERSION = 4
};
typedef enum {
/* Instances of this class should be scanned when computing the transitive dependency among bridges. E.g. List of object*/
GC_BRIDGE_TRANSPARENT_CLASS,
/* Instances of this class should not be scanned when computing the transitive dependency among bridges. E.g. String*/
GC_BRIDGE_OPAQUE_CLASS,
/* Instances of this class should be bridged and have their dependency computed. */
GC_BRIDGE_TRANSPARENT_BRIDGE_CLASS,
/* Instances of this class should be bridged but no dependencies should not be calculated. */
GC_BRIDGE_OPAQUE_BRIDGE_CLASS,
} MonoGCBridgeObjectKind;
typedef struct {
mono_bool is_alive; /* to be set by the cross reference callback */
int num_objs;
MonoObject *objs [MONO_ZERO_LEN_ARRAY];
} MonoGCBridgeSCC;
typedef struct {
int src_scc_index;
int dst_scc_index;
} MonoGCBridgeXRef;
typedef struct {
int bridge_version;
/*
* Tells the runtime which classes to even consider when looking for
* bridged objects. If subclasses are to be considered as well, the
* subclass check must be done in the callback.
*/
MonoGCBridgeObjectKind (*bridge_class_kind) (MonoClass *klass);
/*
* This is only called on objects for whose classes
* `bridge_class_kind()` returned `XXX_BRIDGE_CLASS`.
*/
mono_bool (*is_bridge_object) (MonoObject *object);
void (*cross_references) (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs, MonoGCBridgeXRef *xrefs);
} MonoGCBridgeCallbacks;
</div>
<h4><a name="api:mono_gc_register_bridge_callbacks">mono_gc_register_bridge_callbacks</a></h4>
<h4><a name="api:mono_gc_wait_for_bridge_processing">mono_gc_wait_for_bridge_processing</a></h4>
<h3>Write Barriers</h3>
<h4><a name="api:mono_gc_wbarrier_arrayref_copy">mono_gc_wbarrier_arrayref_copy</a></h4>
<h4><a name="api:mono_gc_wbarrier_generic_nostore">mono_gc_wbarrier_generic_nostore</a></h4>
<h4><a name="api:mono_gc_wbarrier_generic_store">mono_gc_wbarrier_generic_store</a></h4>
<h4><a name="api:mono_gc_wbarrier_generic_store_atomic">mono_gc_wbarrier_generic_store_atomic</a></h4>
<h4><a name="api:mono_gc_wbarrier_object_copy">mono_gc_wbarrier_object_copy</a></h4>
<h4><a name="api:mono_gc_wbarrier_set_arrayref">mono_gc_wbarrier_set_arrayref</a></h4>
<h4><a name="api:mono_gc_wbarrier_set_field">mono_gc_wbarrier_set_field</a></h4>
<h4><a name="api:mono_gc_wbarrier_value_copy">mono_gc_wbarrier_value_copy</a></h4>
+26 -25
View File
@@ -2,7 +2,7 @@
<h3>Synopsys</h3>
<div class="header">
<div class="mapi-header">
@API_IDX@
</div>
@@ -31,7 +31,8 @@
<tt>mono_gchandle_get_target</tt>.
<p>For example, consider the following C code:
<div class="code">
<div class="mapi-code">
static MonoObject* o = NULL;
</div>
@@ -41,22 +42,22 @@ static MonoObject* o = NULL;
it from being collected, you need to acquire a GC handle for
it.
<div class="code">
guint32 handle = mono_gchandle_new (my_object, TRUE);
<div class="mapi-code">
guint32 handle = mono_gchandle_new (my_object, TRUE);
</div>
<p>TRUE means the object will be pinned, so it won't move in
memory when we'll use a moving GC. You can access the
MonoObject* referenced by a handle with:
<div class="code">
MonoObject* obj = mono_gchandle_get_target (handle);
<div class="mapi-code">
MonoObject* obj = mono_gchandle_get_target (handle);
</div>
<p>When you don't need the handle anymore you need to call:
<div class="code">
mono_gchandle_free (handle);
<div class="mapi-code">
mono_gchandle_free (handle);
</div>
<p>Note that if you assign a new object to the C var, you need
@@ -65,27 +66,27 @@ static MonoObject* o = NULL;
<p>So code that looked like this:
<div class="code">
static MonoObject* o = NULL;
...
o = mono_object_new (...);
/* use o */
...
/* when done to allow the GC to collect o */
o = NULL;
<div class="mapi-code">
static MonoObject* obj = NULL;
...
obj = mono_object_new (...);
// use obj
...
// when done to allow the GC to collect obj
obj = NULL;
</div>
<p>should now be changed to:
<div class="code">
static guint32 o_handle;
...
MonoObject *o = mono_object_new (...);
o_handle = mono_gchandle_new (o, TRUE);
/* use o or mono_gchandle_get_target (o_handle) */
...
/* when done to allow the GC to collect o */
mono_gchandle_free (o_handle);
<div class="mapi-code">
static guint32 o_handle;
...
MonoObject *obj = mono_object_new (...);
o_handle = mono_gchandle_new (obj, TRUE);
// use o or mono_gchandle_get_target (o_handle)
...
// when done to allow the GC to collect obj
mono_gchandle_free (o_handle);
</div>
<h4><a name="api:mono_gchandle_new">mono_gchandle_new</a></h4>
+13 -2
View File
@@ -6,7 +6,7 @@
<h3>Synopsis</h3>
<div class="header">
<div class="mapi-header">
#include &lt;metadata/image.h&gt;
typedef struct _MonoImage MonoImage;
@@ -25,9 +25,9 @@ typedef enum {
<p>Images are the actual elements in the runtime that contain
the actual code being executed.
<a name="cil_image_open"/>
<h3>Opening and closing MonoImages</h3>
<h4><a name="api:mono_load_image">mono_load_image</a></h4>
<h4><a name="api:mono_image_open">mono_image_open</a></h4>
<h4><a name="api:mono_image_open_full">mono_image_open_full</a></h4>
<h4><a name="api:mono_image_open_from_data">mono_image_open_from_data</a></h4>
@@ -35,6 +35,8 @@ typedef enum {
<h4><a name="api:mono_image_close">mono_image_close</a></h4>
<h4><a name="api:mono_image_addref">mono_image_addref</a></h4>
<h4><a name="api:mono_image_load_file_for_image">mono_image_load_file_for_image</a></h4>
<h4><a name="api:mono_image_open_from_data_with_name">mono_image_open_from_data_with_name</a></h4>
<h4><a name="api:mono_image_load_module">mono_image_load_module</a></h4>
<h3>Image Information</h3>
@@ -51,6 +53,7 @@ typedef enum {
<h4><a name="api:mono_image_loaded">mono_image_loaded</a></h4>
<h4><a name="api:mono_image_lookup_resource">mono_image_lookup_resource</a></h4>
<h4><a name="api:mono_image_strerror">mono_image_strerror</a></h4>
<h4><a name="api:mono_get_method_constrained">mono_get_method_constrained</a></h4>
<h3>Public Keys, Strong Names and Certificates</h3>
@@ -64,3 +67,11 @@ typedef enum {
<h4><a name="api:mono_image_rva_map">mono_image_rva_map</a></h4>
<h4><a name="api:mono_image_ensure_section_idx">mono_image_ensure_section_idx</a></h4>
<h4><a name="api:mono_image_ensure_section">mono_image_ensure_section</a></h4>
<h4><a name="api:mono_image_init">mono_image_init</a></h4>
<h4><a name="api:mono_images_init">mono_images_init</a></h4>
<h4><a name="api:mono_images_cleanup">mono_images_cleanup</a></h4>
<h4><a name="api:mono_image_add_to_name_cache">mono_image_add_to_name_cache</a></h4>
<h4><a name="api:mono_image_fixup_vtable">mono_image_fixup_vtable</a></h4>
<h4><a name="api:mono_image_loaded_by_guid_full">mono_image_loaded_by_guid_full</a></h4>
<h4><a name="api:mono_image_loaded_full">mono_image_loaded_full</a></h4>
<h4><a name="api:mono_lookup_icall_symbol">mono_lookup_icall_symbol</a></h4>
+23 -3
View File
@@ -4,6 +4,29 @@
inside Mono that developers extending or altering Mono might
want to use.
<h2>Strings</h2>
<h3>Other Encodings</h3>
<p>These routines are used when coping with strings that come
from Mono's environment, and might be encoded in one or more
of the external encodings.
<p>For example, some file systems might historically contain a
mix of file names with both old and new encodings, typically
UTF8 for new files, and the old files would be encoded in an 8
bit character set (ISO-8859-1 for example).
<p>These routines try a number of encodings, those specified
in the <tt>MONO_ENCODINGS</tt> environment variable and return
unicode strings that can be used internally.
<p>See the mono(1) man page for more details.
<h4><a name="api:mono_unicode_from_external">mono_unicode_from_external</a></h4>
<h4><a name="api:mono_unicode_to_external">mono_unicode_to_external</a></h4>
<h4><a name="api:mono_utf8_from_external">mono_utf8_from_external</a></h4>
<h2>Marshalling functions</h2>
<h4><a name="api:mono_marshal_alloc">mono_marshal_alloc</a></h4>
@@ -93,12 +116,9 @@
<h4><a name="api:mono_gc_disable">mono_gc_disable</a></h4>
<h4><a name="api:mono_gc_enable">mono_gc_enable</a></h4>
<h4><a name="api:mono_gc_is_finalizer_thread">mono_gc_is_finalizer_thread</a></h4>
<h4><a name="api:mono_gc_out_of_memory">mono_gc_out_of_memory</a></h4>
<h4><a name="api:mono_gc_start_world">mono_gc_start_world</a></h4>
<h4><a name="api:mono_gc_stop_world">mono_gc_stop_world</a></h4>
<h4><a name="api:mono_gc_alloc_fixed">mono_gc_alloc_fixed</a></h4>
<h4><a name="api:mono_gc_enable_events">mono_gc_enable_events</a></h4>
<h4><a name="api:mono_gc_free_fixed">mono_gc_free_fixed</a></h4>
<h4><a name="api:mono_gc_make_descr_from_bitmap">mono_gc_make_descr_from_bitmap</a></h4>
+26 -4
View File
@@ -1,9 +1,26 @@
<h2>Synopsis</h2>
<div class="header">
<p>These functions are used to get some runtime information
from the Just in Time compiler and also to control some
aspects of the initialization and shutdown of the runtime.
<div class="mapi-header">
typedef struct _MonoJitInfo MonoJitInfo;
@API_IDX@
</div>
<h3>Just-in-Time Compiled Method Information</h3>
<p>Use the `MonoJitInfo` API to get data about a JITed
method. These APIs are typically used by profiler modules
added to Mono.
<h4><a name="api:mono_jit_info_table_find">mono_jit_info_table_find</a></h4>
<h4><a name="api:mono_jit_info_get_code_size">mono_jit_info_get_code_size</a></h4>
<h4><a name="api:mono_jit_info_get_code_start">mono_jit_info_get_code_start</a></h4>
<h4><a name="api:mono_jit_info_get_method">mono_jit_info_get_method</a></h4>
<h3>Useful Debugging Functions</h3>
<p>These functions are useful when running the Mono VM inside
@@ -14,7 +31,12 @@
<h4><a name="api:mono_print_thread_dump">mono_print_thread_dump</a></h4>
<h4><a name="api:mono_threads_request_thread_dump">mono_threads_request_thread_dump</a></h4>
<h3>Helper Tools For Native Ports</h3>
<h4><a name="api:mono_inst_name">mono_inst_name</a></h4>
<h3>Advanced</h3></h4>
<h4><a name="api:mono_assemblies_init">mono_assemblies_init</a></h4>
<h4><a name="api:mono_assemblies_cleanup">mono_assemblies_cleanup</a></h4>
<h4><a name="api:mono_environment_exitcode_get">mono_environment_exitcode_get</a></h4>
<h4><a name="api:mono_environment_exitcode_set">mono_environment_exitcode_set</a></h4>
<h4><a name="api:mono_install_runtime_cleanup">mono_install_runtime_cleanup</a></h4>
<h4><a name="api:mono_runtime_set_shutting_down">mono_runtime_set_shutting_down</a></h4>
<h4><a name="api:mono_security_set_core_clr_platform_callback">mono_security_set_core_clr_platform_callback</a></h4>
+122 -1
View File
@@ -1,4 +1,125 @@
<h1>Notification Interface</h1>
<h2>Internal Runtime Utility Functions</h2>
<h3>SHA1 Signatures</h3>
<h4><a name="api:mono_sha1_init">mono_sha1_init</a></h4>
<h4><a name="api:mono_sha1_update">mono_sha1_update</a></h4>
<h4><a name="api:mono_sha1_get_digest_from_file">mono_sha1_get_digest_from_file</a></h4>
<h4><a name="api:mono_sha1_get_digest">mono_sha1_get_digest</a></h4>
<h4><a name="api:mono_sha1_final">mono_sha1_final</a></h4>
<h3>MD5 Signatures</h3>
<h4><a name="api:mono_md5_init">mono_md5_init</a></h4>
<h4><a name="api:mono_md5_update">mono_md5_update</a></h4>
<h4><a name="api:mono_md5_get_digest_from_file">mono_md5_get_digest_from_file</a></h4>
<h4><a name="api:mono_md5_get_digest">mono_md5_get_digest</a></h4>
<h4><a name="api:mono_md5_final">mono_md5_final</a></h4>
<h4><a name="api:mono_digest_get_public_token">mono_digest_get_public_token</a></h4>
<h3>Hashtables</h3>
<p><tt>GHashTable</tt> is used when you need to store object
references into a hashtable, objects stored in a
<tt>MonoGHashTable</tt> are properly tracked by the garbage
collector.
<p>The <tt>MonoGHashTable</tt> data type has the same API as
the GLIB.
<h4><a name="api:mono_g_hash_table_destroy">mono_g_hash_table_destroy</a></h4>
<h4><a name="api:mono_g_hash_table_foreach">mono_g_hash_table_foreach</a></h4>
<h4><a name="api:mono_g_hash_table_foreach_remove">mono_g_hash_table_foreach_remove</a></h4>
<h4><a name="api:mono_g_hash_table_foreach_steal">mono_g_hash_table_foreach_steal</a></h4>
<h4><a name="api:mono_g_hash_table_insert">mono_g_hash_table_insert</a></h4>
<h4><a name="api:mono_g_hash_table_lookup">mono_g_hash_table_lookup</a></h4>
<h4><a name="api:mono_g_hash_table_lookup_extended">mono_g_hash_table_lookup_extended</a></h4>
<h4><a name="api:mono_g_hash_table_new">mono_g_hash_table_new</a></h4>
<h4><a name="api:mono_g_hash_table_new_full">mono_g_hash_table_new_full</a></h4>
<h4><a name="api:mono_g_hash_table_remap">mono_g_hash_table_remap</a></h4>
<h4><a name="api:mono_g_hash_table_remove">mono_g_hash_table_remove</a></h4>
<h4><a name="api:mono_g_hash_table_replace">mono_g_hash_table_replace</a></h4>
<h4><a name="api:mono_g_hash_table_size">mono_g_hash_table_size</a></h4>
<h4><a name="api:mono_g_hash_table_steal">mono_g_hash_table_steal</a></h4>
<h3>Memory Pools</h3>
<p>Memory pools are a convenient way of tracking memory
allocations that are used for one specific task, they are also
faster than using the standard memory allocation procedures,
as they are designed to be used only by a single thread at a
time.
<p><tt>MonoMemPool</tt> objects are not thread safe, which
means that you should not share the objects across multiple
threads without providing proper locking around it (unlike
<tt>malloc</tt> and <tt>free</tt> which are thread safe).
<p>When a <tt>MonoMemPool</tt> is released with
<tt>mono_mempool_destroy</tt> all of the of the memory
allocated from that memory pool with
<tt>mono_mempool_alloc</tt> and <tt>mono_mempool_alloc0</tt>
is released.
<h4><a name="api:mono_mempool_new">mono_mempool_new</a></h4>
<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
<h4><a name="api:mono_mempool_alloc0">mono_mempool_alloc0</a></h4>
<h4><a name="api:mono_mempool_empty">mono_mempool_empty</a></h4>
<h4><a name="api:mono_mempool_invalidate">mono_mempool_invalidate</a></h4>
<h4><a name="api:mono_mempool_stats">mono_mempool_stats</a></h4>
<h4><a name="api:mono_mempool_contains_addr">mono_mempool_contains_addr</a></h4>
<h3>Bitsets</h3>
<p>MonoBitsets are a set of routines used to manipulate sets
of bits.
<h4><a name="api:mono_bitset_alloc_size">mono_bitset_alloc_size</a></h4>
<h4><a name="api:mono_bitset_clear">mono_bitset_clear</a></h4>
<h4><a name="api:mono_bitset_clear_all">mono_bitset_clear_all</a></h4>
<h4><a name="api:mono_bitset_clone">mono_bitset_clone</a></h4>
<h4><a name="api:mono_bitset_copyto">mono_bitset_copyto</a></h4>
<h4><a name="api:mono_bitset_count">mono_bitset_count</a></h4>
<h4><a name="api:mono_bitset_equal">mono_bitset_equal</a></h4>
<h4><a name="api:mono_bitset_find_first">mono_bitset_find_first</a></h4>
<h4><a name="api:mono_bitset_find_last">mono_bitset_find_last</a></h4>
<h4><a name="api:mono_bitset_find_start">mono_bitset_find_start</a></h4>
<h4><a name="api:mono_bitset_foreach">mono_bitset_foreach</a></h4>
<h4><a name="api:mono_bitset_free">mono_bitset_free</a></h4>
<h4><a name="api:mono_bitset_intersection">mono_bitset_intersection</a></h4>
<h4><a name="api:mono_bitset_invert">mono_bitset_invert</a></h4>
<h4><a name="api:mono_bitset_mem_new">mono_bitset_mem_new</a></h4>
<h4><a name="api:mono_bitset_new">mono_bitset_new</a></h4>
<h4><a name="api:mono_bitset_set">mono_bitset_set</a></h4>
<h4><a name="api:mono_bitset_set_all">mono_bitset_set_all</a></h4>
<h4><a name="api:mono_bitset_size">mono_bitset_size</a></h4>
<h4><a name="api:mono_bitset_sub">mono_bitset_sub</a></h4>
<h4><a name="api:mono_bitset_test">mono_bitset_test</a></h4>
<h4><a name="api:mono_bitset_test_bulk">mono_bitset_test_bulk</a></h4>
<h4><a name="api:mono_bitset_union">mono_bitset_union</a></h4>
<h4><a name="api:mono_bitset_find_first_unset">mono_bitset_find_first_unset</a></h4>
<h4><a name="api:mono_bitset_intersection_2">mono_bitset_intersection_2</a></h4>
<h3>JIT utilities</h3>
<h4><a name="api:mono_signbit_double">mono_signbit_double</a></h4>
<h4><a name="api:mono_signbit_float">mono_signbit_float</a></h4>
<h3>Function Pointers</h3>
<p>To wrap a function pointer into something that the Mono
runtime can consume, you should use the mono_create_ftnptr.
This is only important if you plan on running on the IA64
architecture. Otherwise you can just use the function
pointer address.
<h4><a name="api:mono_create_ftnptr">mono_create_ftnptr</a></h4>
<h2>Notification Interface</h2>
<p>This is an internal profiler interface. In general, users
would not be using this interface, but would be using the
-6
View File
@@ -1,6 +0,0 @@
<h4><a name="api:mono_delegate_free_ftnptr">mono_delegate_free_ftnptr</a></h4>
<h4><a name="api:mono_delegate_to_ftnptr">mono_delegate_to_ftnptr</a></h4>
<h4><a name="api:mono_ftnptr_to_delegate">mono_ftnptr_to_delegate</a></h4>
<h4><a name="api:mono_marshal_string_to_utf16">mono_marshal_string_to_utf16</a></h4>
+7 -7
View File
@@ -617,7 +617,6 @@ MONO_TYPESPEC_SIZE
<h4><a name="api:mono_image_get_table_info">mono_image_get_table_info</a></h4>
<h4><a name="api:mono_image_get_table_rows">mono_image_get_table_rows</a></h4>
<h4><a name="api:mono_metadata_get_table">mono_metadata_get_table</a></h4>
<h4><a name="api:mono_metadata_decode_row_col">mono_metadata_decode_row_col</a></h4>
<h4><a name="api:mono_metadata_decode_row">mono_metadata_decode_row</a></h4>
<h4><a name="api:mono_metadata_compute_size">mono_metadata_compute_size</a></h4>
@@ -631,9 +630,10 @@ MONO_TYPESPEC_SIZE
<p>This is the low-level API for accessing the metadata
images.
<h4><a name="api:mono_cli_rva_image_map">mono_cli_rva_image_map</a></h4>
<h4><a name="api:mono_pe_file_open">mono_pe_file_open</a></h4>
<h4><a name="api:mono_metadata_events_from_typedef">mono_metadata_events_from_typedef</a></h4>
<h4><a name="api:mono_metadata_decode_table_row">mono_metadata_decode_table_row</a></h4>
<h4><a name="api:mono_metadata_decode_table_row_col">mono_metadata_decode_table_row_col</a></h4>
<h4><a name="api:mono_metadata_field_info">mono_metadata_field_info</a></h4>
<h4><a name="api:mono_metadata_free_array">mono_metadata_free_array</a></h4>
<h4><a name="api:mono_metadata_free_marshal_spec">mono_metadata_free_marshal_spec</a></h4>
@@ -652,6 +652,7 @@ MONO_TYPESPEC_SIZE
<h4><a name="api:mono_metadata_packing_from_typedef">mono_metadata_packing_from_typedef</a></h4>
<h4><a name="api:mono_metadata_properties_from_typedef">mono_metadata_properties_from_typedef</a></h4>
<h4><a name="api:mono_metadata_token_from_dor">mono_metadata_token_from_dor</a></h4>
<h4><a name="api:mono_metadata_translate_token_index">mono_metadata_translate_token_index</a></h4>
<h4><a name="api:mono_metadata_typedef_from_field">mono_metadata_typedef_from_field</a></h4>
<h4><a name="api:mono_metadata_typedef_from_method">mono_metadata_typedef_from_method</a></h4>
<h4><a name="api:mono_metadata_type_equal">mono_metadata_type_equal</a></h4>
@@ -661,24 +662,23 @@ MONO_TYPESPEC_SIZE
<h3>Retrieving Objects from Tokens</h3>
<h4><a name="api:mono_metadata_parse_array">mono_metadata_parse_array</a></h4>
<h4><a name="api:mono_metadata_parse_custom_mod">mono_metadata_parse_custom_mod</a></h4>
<h4><a name="api:mono_metadata_parse_field_type">mono_metadata_parse_field_type</a></h4>
<h4><a name="api:mono_metadata_parse_marshal_spec">mono_metadata_parse_marshal_spec</a></h4>
<h4><a name="api:mono_metadata_parse_method_signature_full">mono_metadata_parse_method_signature_full</a></h4>
<h4><a name="api:mono_metadata_parse_method_signature">mono_metadata_parse_method_signature</a></h4>
<h4><a name="api:mono_metadata_parse_mh_full">mono_metadata_parse_mh_full</a></h4>
<h4><a name="api:mono_metadata_parse_mh">mono_metadata_parse_mh</a></h4>
<h4><a name="api:mono_metadata_parse_param">mono_metadata_parse_param</a></h4>
<h4><a name="api:mono_metadata_parse_ret_type">mono_metadata_parse_ret_type</a></h4>
<h4><a name="api:mono_metadata_parse_signature">mono_metadata_parse_signature</a></h4>
<h4><a name="api:mono_metadata_parse_typedef_or_ref">mono_metadata_parse_typedef_or_ref</a></h4>
<h4><a name="api:mono_metadata_parse_type_full">mono_metadata_parse_type_full</a></h4>
<h4><a name="api:mono_metadata_parse_type">mono_metadata_parse_type</a></h4>
<h2>Generics Support</h2>
<h4><a name="api:mono_metadata_generic_class_equal">mono_metadata_generic_class_equal</a></h4>
<h4><a name="api:mono_metadata_generic_class_hash">mono_metadata_generic_class_hash</a></h4>
<h4><a name="api:mono_metadata_generic_class_is_valuetype">mono_metadata_generic_class_is_valuetype</a></h4>
<h4><a name="api:mono_metadata_inflate_generic_inst">mono_metadata_inflate_generic_inst</a></h4>
<h4><a name="api:mono_metadata_load_generic_params">mono_metadata_load_generic_params</a></h4>
<h2>Tokens</h2>
+159 -24
View File
@@ -1,5 +1,159 @@
<h3>Methods</h3>
<h2>Methods</h2>
<p>Methods are represented by the <code>MonoMethod*</code>
instances. Various APIs surface these instances, but usually
you will use the <a href="#method-desc">method description</a>
API to get a handle to a Mono Method. You can <a href="method-invoking">invoke</a> those methods from C,
or you can probe <a href="method-working">probe various properties</a> of a method, and in particular
its <a href="method-signature">method signature</a> or get
some <a href="method-header">low-level information</a> about them.
<p>The following code snippet from the Mono runtime shows you
how to create a managed <code>System.Version</code> instance
with four integers by looking up the constructor in the
managed implementation of System.Version, creating an instance
of the object, and then invoking the constructor on it.
<div class="mapi-header">
MonoObject*
create_version (MonoDomain *domain, guint32 major, guint32 minor, guint32 build, guint32 revision)
{
MonoClass *System_Version;
MonoMethod *create_version;
MonoError error;
MonoObject *result;
gpointer args [4];
System_Version = mono_class_from_name (mono_defaults.corlib, "System", "Version");
// Create a method description that we use to search for the
// constructor method
MonoMethodDesc *desc = mono_method_desc_new (":.ctor(int,int,int,int)", FALSE);
create_version = mono_method_desc_search_in_class (desc, System_Version);
mono_method_desc_free (desc);
// Setup the parameters to pass.
args [0] = &major;
args [1] = &minor;
args [2] = &build;
args [3] = &revision;
// Create the object instance
result = mono_object_new_checked (domain, System_Version, &error);
// Raise an exception in case of an error
mono_error_raise_exception (&error);
// Otherwise, invoke the constructor
mono_runtime_invoke (create_version, result, args, NULL);
// Return ther esult
return result;
}
</div>
<a name="method-desc"></a>
<h3>Method Descriptions</h3>
<p>Methods are represented by the <code>MonoMethod*</code>
instances. To simplify the process of getting
a <code>MonoMethod*</code>, you use Method Descriptors, which
are C-strings that describe the method that you are looking
for, and then you perform a search in either
a <a href="mono-api-type.html">type</a>, or a
loaded <a href="mono-api-image.html">image</a>.
<p>To describe a method, you use the Method Description API.
Method descriptions are used to locate a method in the
executing program. They can either be fully specified, that
is, they would include the namespace, class, method name and
all of its arguments or they omit the namespace and arguments
and even use wildcard matches for the class name and method names.
<p>You use the fully specified version to identify a
particular method, or you can use the partial version to find
a method or a family of methods in the code.
<p>Method descriptions are typically created from a C string
representation, and take the following form:
<p><code>[namespace.]classname:methodname[(args...)]</code>
<p>Both classname and methodname can contain the '*' character
which can be used to match anything. Arguments are separated
by commas.
<p>You can use the type shortcuts to match the fully qualified
parameter types. The supported type shortcuts are:
<code>char</code>,
<code>bool</code>,
<code>byte</code>,
<code>sbyte</code>,
<code>uint16</code>,
<code>int16</code>,
<code>uint</code>,
<code>int</code>,
<code>ulong</code>,
<code>long</code>,
<code>uintptr</code>,
<code>intptr</code>,
<code>single</code>,
<code>double</code>,
<code>string</code> and
<code>object</code>.
<p>The type parameters can use the "&" and "*" type modifiers.
<p>Examples of method descriptions:
<ul>
<li>"Monitor:Exit": matches classes and methods called "Monitor.Exit"
<li>"Monitor:enter_with_atomic_var(object,bool&)":
matches a method in the class Monitor with two
specific type parameters.
<li>":.ctor(int,int,int,int)": matches constructors
that take four integers.
<li>"System.Globalization.CultureInfo:CreateCulture(string,bool)":
matches the CreateCultureMethod that takes a string
and a boolean on the System.Globalization.CultureInfo class.
</ul>
<p>You can
then <a href="api:mono_method_desc_search_in_image">search for
methods in MonoImages</a>
or <a href="api:mono_method_desc_search_in_class">search for
methods in classes</a>.
<h4><a name="api:mono_method_desc_new">mono_method_desc_new</a></h4>
<h4><a name="api:mono_method_desc_free">mono_method_desc_free</a></h4>
<h4><a name="api:mono_method_desc_from_method">mono_method_desc_from_method</a></h4>
<h4><a name="api:mono_method_desc_full_match">mono_method_desc_full_match</a></h4>
<h4><a name="api:mono_method_desc_match">mono_method_desc_match</a></h4>
<h4><a name="api:mono_method_desc_search_in_class">mono_method_desc_search_in_class</a></h4>
<h4><a name="api:mono_method_desc_search_in_image">mono_method_desc_search_in_image</a></h4>
<a name="method-working"></a>
<h3>Working with Methods</h3>
<h4><a name="api:mono_method_full_name">mono_method_full_name</a></h4>
<h4><a name="api:mono_method_get_class">mono_method_get_class</a></h4>
<h4><a name="api:mono_method_get_flags">mono_method_get_flags</a></h4>
<h4><a name="api:mono_method_get_last_managed">mono_method_get_last_managed</a></h4>
<h4><a name="api:mono_method_get_marshal_info">mono_method_get_marshal_info</a></h4>
<h4><a name="api:mono_method_get_name">mono_method_get_name</a></h4>
<h4><a name="api:mono_method_get_object">mono_method_get_object</a></h4>
<h4><a name="api:mono_method_get_param_names">mono_method_get_param_names</a></h4>
<h4><a name="api:mono_method_get_param_token">mono_method_get_param_token</a></h4>
<h4><a name="api:mono_method_get_signature">mono_method_get_signature</a></h4>
<h4><a name="api:mono_method_get_index">mono_method_get_index</a></h4>
<h4><a name="api:mono_method_get_signature_full">mono_method_get_signature_full</a></h4>
<h4><a name="api:mono_method_get_token">mono_method_get_token</a></h4>
<h4><a name="api:mono_method_get_unmanaged_thunk">mono_method_get_unmanaged_thunk</a></h4>
<h4><a name="api:mono_method_has_marshal_info">mono_method_has_marshal_info</a></h4>
<h4><a name="api:mono_method_verify">mono_method_verify</a></h4>
<a name="method-invoking"></a>
<h3>Invoking Methods</h3>
<h4><a name="api:mono_runtime_invoke">mono_runtime_invoke</a></h4>
@@ -8,7 +162,7 @@ If you want to invoke generic methods, you must call the method on the
"inflated" class, which you can obtain from the
<tt>mono_object_get_class()</tt>
<div class="code">
<div class="mapi-code">
MonoClass *clazz;
MonoMethod *method;
@@ -29,29 +183,8 @@ mono_runtime_invoke (method, obj, args, &amp;exception);
<h4><a name="api:mono_runtime_delegate_invoke">mono_runtime_delegate_invoke</a></h4>
<h4><a name="api:mono_method_body_get_object">mono_method_body_get_object</a></h4>
<h4><a name="api:mono_method_desc_free">mono_method_desc_free</a></h4>
<h4><a name="api:mono_method_desc_from_method">mono_method_desc_from_method</a></h4>
<h4><a name="api:mono_method_desc_full_match">mono_method_desc_full_match</a></h4>
<h4><a name="api:mono_method_desc_match">mono_method_desc_match</a></h4>
<h4><a name="api:mono_method_desc_new">mono_method_desc_new</a></h4>
<h4><a name="api:mono_method_desc_search_in_class">mono_method_desc_search_in_class</a></h4>
<h4><a name="api:mono_method_desc_search_in_image">mono_method_desc_search_in_image</a></h4>
<h4><a name="api:mono_method_full_name">mono_method_full_name</a></h4>
<h4><a name="api:mono_method_get_class">mono_method_get_class</a></h4>
<h4><a name="api:mono_method_get_flags">mono_method_get_flags</a></h4>
<h4><a name="api:mono_method_get_last_managed">mono_method_get_last_managed</a></h4>
<h4><a name="api:mono_method_get_marshal_info">mono_method_get_marshal_info</a></h4>
<h4><a name="api:mono_method_get_name">mono_method_get_name</a></h4>
<h4><a name="api:mono_method_get_object">mono_method_get_object</a></h4>
<h4><a name="api:mono_method_get_param_names">mono_method_get_param_names</a></h4>
<h4><a name="api:mono_method_get_param_token">mono_method_get_param_token</a></h4>
<h4><a name="api:mono_method_get_signature">mono_method_get_signature</a></h4>
<h4><a name="api:mono_method_get_index">mono_method_get_index</a></h4>
<h4><a name="api:mono_method_get_signature_full">mono_method_get_signature_full</a></h4>
<h4><a name="api:mono_method_get_token">mono_method_get_token</a></h4>
<h4><a name="api:mono_method_has_marshal_info">mono_method_has_marshal_info</a></h4>
<h4><a name="api:mono_method_verify">mono_method_verify</a></h4>
<a name="method-signature"></a>
<h3>Method Signatures</h3>
<h4><a name="api:mono_method_signature">mono_method_signature</a></h4>
@@ -63,11 +196,13 @@ mono_runtime_invoke (method, obj, args, &amp;exception);
<h4><a name="api:mono_signature_get_return_type">mono_signature_get_return_type</a></h4>
<h4><a name="api:mono_signature_hash">mono_signature_hash</a></h4>
<h4><a name="api:mono_signature_is_instance">mono_signature_is_instance</a></h4>
<h4><a name="api:mono_signature_param_is_out">mono_signature_param_is_out</a></h4>
<h4><a name="api:mono_signature_vararg_start">mono_signature_vararg_start</a></h4>
<h4><a name="api:mono_param_get_objects">mono_param_get_objects</a></h4>
<h4><a name="api:mono_get_method_full">mono_get_method_full</a></h4>
<h4><a name="api:mono_get_method">mono_get_method</a></h4>
<a name="method-header"></a>
<h3>Methods Header Operations</h3>
<h4><a name="api:mono_method_get_header">mono_method_get_header</a></h4>
+48 -25
View File
@@ -6,15 +6,17 @@
<p>The object API has methods for accessing <a
href="#fields">fields</a>, <a
href="#properties">properties</a>, <a
href="#properties">properties</a>, <a href="mono-api-methods.html">methods</a>, <a
href="#events">events</a>, <a href="#delegates">delegates</a>.
<p>There are some advanced uses that are useful to document
here dealing with <a href="#remote">remote fields</a>.
<h2>Synopsis</h2>
<div class="header">
<div class="mapi-header">
#include &lt;metadata/object.h&gt;
typedef struct MonoVTable MonoVTable;
@@ -43,7 +45,7 @@ typedef struct {
@API_IDX@
</div>
<p>MonoObject is the base definition for all managed objects
<p>`MonoObject` is the base definition for all managed objects
in the Mono runtime, it represents the <a
href="http://www.mono-project.com/monodoc/T:System.Object">System.Object</a>
managed type.
@@ -54,12 +56,11 @@ typedef struct {
following the pattern where the parent class is the first
field of a structure definition, for example:
<div class="code">
typedef struct {
MonoObject parent;
int my_new_field;
} MyNewObject
</div>
<div class="mapi-code">
typedef struct {
MonoObject parent;
int my_new_field;
} MyNewObject</div>
<a name="objects"></a>
<h2>Core Object Methods</h2>
@@ -69,7 +70,7 @@ typedef struct {
<p>For example, if you wanted to create an object of type
System.Version, you would use a piece of code like this:
<div class="code">
<div class="mapi-code">
MonoClass *version_class;
MonoObject *result;
@@ -79,7 +80,7 @@ version_class = mono_class_from_name (mono_get_corlib (),
/* Create an object of that class */
result = mono_object_new (mono_domain_get (), version_class);
</div>
</div>
<h4><a name="api:mono_object_new_alloc_specific">mono_object_new_alloc_specific</a></h4>
<h4><a name="api:mono_object_new_fast">mono_object_new_fast</a></h4>
@@ -93,8 +94,9 @@ result = mono_object_new (mono_domain_get (), version_class);
<h4><a name="api:mono_object_isinst">mono_object_isinst</a></h4>
<h4><a name="api:mono_object_unbox">mono_object_unbox</a></h4>
<h4><a name="api:mono_object_castclass_mbyref">mono_object_castclass_mbyref</a></h4>
<h4><a name="api:mono_object_is_alive">mono_object_is_alive</a></h4>
<h4><a name="api:mono_object_get_size">mono_object_get_size</a></h4>
<h4><a name="api:mono_object_hash">mono_object_hash</a></h4>
<h4><a name="api:mono_object_to_string">mono_object_to_string</a></h4>
<a name="valuetypes"></a>
<h2>Value Types</h2>
@@ -113,19 +115,17 @@ result = mono_object_new (mono_domain_get (), version_class);
elements of type <tt>System.Byte</tt>, and sets the values
0xca and 0xfe on it:
<pre class="code">
<pre class="mapi-code">
MonoArray *CreateByteArray (MonoDomain *domain)
{
MonoArray *data;
MonoArray *CreateByteArray (MonoDomain *domain)
{
MonoArray *data;
data = mono_array_new (domain, mono_get_byte_class (), 2);
mono_array_set (data, guint8, 0, 0xca);
mono_array_set (data, guint8, 0, 0xfe);
return data;
}
data = mono_array_new (domain, mono_get_byte_class (), 2);
mono_array_set (data, guint8, 0, 0xca);
mono_array_set (data, guint8, 0, 0xfe);
return data;
}
</pre>
<h3>Creating Arrays</h3>
@@ -138,12 +138,31 @@ result = mono_object_new (mono_domain_get (), version_class);
<h3>Using Arrays</h3>
<p>Arrays are represented by the `MonoArray` data type and are
instances of `MonoObject`. While you can use the `bounds`
and `max_length` fields of the type, the actual storage
(represented by `vector`) is not very useful. Instead you
should use one of the accesor methods described below to
fetch or set the values in the array.
<p>When setting values in an array, you should
use <a href="api:mono_array_set">mono_array_set</a> for
setting elements in an array that contains value types, and
<a
href="api:mono_array_setref">mono_array_setref</a> for arrays
that contain reference types.
<p>The <a href="api:mono_array_get">mono_array_get</a>,
<a href="api:mono_array_set">mono_array_set</a> and <a
href="api:mono_array_setref">mono_array_setref</a> are C
macros that wrap the underlying array access.
<h4><a name="api:mono_array_get">mono_array_get</a></h4>
<h4><a name="api:mono_array_length">mono_array_length</a></h4>
<h4><a name="api:mono_array_set">mono_array_set</a></h4>
<h4><a name="api:mono_array_setref">mono_array_setref</a></h4>
<h4><a name="api:mono_array_length">mono_array_length</a></h4>
<h4><a name="api:mono_array_addr">mono_array_addr</a></h4>
<h4><a name="api:mono_array_addr_with_size">mono_array_addr_with_size</a></h4>
<h4><a name="api:mono_array_get">mono_array_get</a></h4>
<h4><a name="api:mono_array_element_size">mono_array_element_size</a></h4>
<a name="fields"></a>
@@ -191,3 +210,7 @@ result = mono_object_new (mono_domain_get (), version_class);
<h4><a name="api:mono_store_remote_field">mono_store_remote_field</a></h4>
<h4><a name="api:mono_store_remote_field_new">mono_store_remote_field_new</a></h4>
<a name="delegates"></a>
<h2>Delegates</h2>
<h4><a name="api:mono_get_delegate_begin_invoke">mono_get_delegate_begin_invoke</a></h4>
<h4><a name="api:mono_get_delegate_end_invoke">mono_get_delegate_end_invoke</a></h4>
+7 -2
View File
@@ -1,11 +1,16 @@
<h2>Fetching Types, and Basic Reflection</h2>
<h4><a name="api:mono_reflection_get_custom_attrs_blob">mono_reflection_get_custom_attrs_blob</a></h4>
<h4><a name="api:mono_reflection_get_custom_attrs">mono_reflection_get_custom_attrs</a></h4>
<h4><a name="api:mono_custom_attrs_get_attr">mono_custom_attrs_get_attr</a></h4>
<h4><a name="api:mono_reflection_assembly_get_assembly">mono_reflection_assembly_get_assembly</a></h4>
<h4><a name="api:mono_reflection_free_type_info">mono_reflection_free_type_info</a></h4>
<h4><a name="api:mono_reflection_get_custom_attrs_blob">mono_reflection_get_custom_attrs_blob</a></h4>
<h4><a name="api:mono_reflection_get_custom_attrs_by_type">mono_reflection_get_custom_attrs_by_type</a></h4>
<h4><a name="api:mono_reflection_get_custom_attrs_data">mono_reflection_get_custom_attrs_data</a></h4>
<h4><a name="api:mono_reflection_get_custom_attrs">mono_reflection_get_custom_attrs</a></h4>
<h4><a name="api:mono_reflection_get_token">mono_reflection_get_token</a></h4>
<h4><a name="api:mono_reflection_get_type">mono_reflection_get_type</a></h4>
<h4><a name="api:mono_reflection_parse_type">mono_reflection_parse_type</a></h4>
<h4><a name="api:mono_reflection_type_get_type">mono_reflection_type_get_type</a></h4>
<h4><a name="api:mono_reflection_type_from_name">mono_reflection_type_from_name</a></h4>
<h4><a name="api:mono_reflection_get_custom_attrs_info">mono_reflection_get_custom_attrs_info</a></h4>
-2
View File
@@ -1,7 +1,5 @@
<h3>Security Manager</h3>
<h4><a name="api:mono_get_context_capture_method">mono_get_context_capture_method</a></h4>
<h3>Declarative Security</h3>
<h4><a name="api:mono_declsec_flags_from_assembly">mono_declsec_flags_from_assembly</a></h4>
+8 -24
View File
@@ -4,7 +4,7 @@
<h3>Synopsis</h3>
<div class="header">
<div class="mapi-header">
#include &lt;metadata/object.h&gt;
typedef struct {
@@ -17,10 +17,10 @@ typedef struct {
</div>
<p>All of the operations on strings are done on pointers to
MonoString objects, like this:
`MonoString` objects, like this:
<div class="code">
MonoString *hello = mono_string_new (mono_domain_get (), "hello, world");
<div class="mapi-code">
MonoString *hello = mono_string_new (mono_domain_get (), "hello, world");
</div>
<p>Strings are bound to a particular application domain, which
@@ -37,12 +37,16 @@ typedef struct {
<h4><a name="api:mono_string_new_len">mono_string_new_len</a></h4>
<h4><a name="api:mono_string_new_size">mono_string_new_size</a></h4>
<h4><a name="api:mono_string_new_utf16">mono_string_new_utf16</a></h4>
<h4><a name="api:mono_string_new_utf32">mono_string_new_utf32</a></h4>
<h4><a name="api:mono_string_from_utf16">mono_string_from_utf16</a></h4>
<h4><a name="api:mono_string_from_utf32">mono_string_from_utf32</a></h4>
<h3>Conversions</h3>
<h4><a name="api:mono_string_to_utf16">mono_string_to_utf16</a></h4>
<h4><a name="api:mono_string_to_utf8">mono_string_to_utf8</a></h4>
<h4><a name="api:mono_string_to_utf8_checked">mono_string_to_utf8_checked</a></h4>
<h4><a name="api:mono_string_to_utf32">mono_string_to_utf32</a></h4>
<h3>Methods</h3>
@@ -55,23 +59,3 @@ typedef struct {
<h4><a name="api:mono_string_length">mono_string_length</a></h4>
<h3>Other Encodings</h3>
<p>These routines are used when coping with strings that come
from Mono's environment, and might be encoded in one or more
of the external encodings.
<p>For example, some file systems might historically contain a
mix of file names with both old and new encodings, typically
UTF8 for new files, and the old files would be encoded in an 8
bit character set (ISO-8859-1 for example).
<p>These routines try a number of encodings, those specified
in the <tt>MONO_ENCODINGS</tt> environment variable and return
unicode strings that can be used internally.
<p>See the mono(1) man page for more details.
<h4><a name="api:mono_unicode_from_external">mono_unicode_from_external</a></h4>
<h4><a name="api:mono_unicode_to_external">mono_unicode_to_external</a></h4>
<h4><a name="api:mono_utf8_from_external">mono_utf8_from_external</a></h4>
+11 -2
View File
@@ -6,19 +6,28 @@
<h4><a name="api:mono_thread_current">mono_thread_current</a></h4>
<h4><a name="api:mono_thread_detach">mono_thread_detach</a></h4>
<h4><a name="api:mono_thread_exit">mono_thread_exit</a></h4>
<h4><a name="api:mono_thread_get_managed_id">mono_thread_get_managed_id</a></h4>
<h4><a name="api:mono_thread_get_name_utf8">mono_thread_get_name_utf8</a></h4>
<h4><a name="api:mono_thread_is_foreign">mono_thread_is_foreign</a></h4>
<h4><a name="api:mono_thread_manage">mono_thread_manage</a></h4>
<h4><a name="api:mono_thread_new_init">mono_thread_new_init</a></h4>
<h4><a name="api:mono_threads_get_default_stacksize">mono_threads_get_default_stacksize</a></h4>
<h4><a name="api:mono_threads_install_cleanup">mono_threads_install_cleanup</a></h4>
<h4><a name="api:mono_threads_set_default_stacksize">mono_threads_set_default_stacksize</a></h4>
<h4><a name="api:mono_thread_set_manage_callback">mono_thread_set_manage_callback</a></h4>
<h4><a name="api:mono_thread_stop">mono_thread_stop</a></h4>
<h4><a name="api:mono_thread_get_main">mono_thread_get_main</a></h4>
<h4><a name="api:mono_thread_set_main">mono_thread_set_main</a></h4>
<h4><a name="api:mono_pthread_key_for_tls">mono_pthread_key_for_tls</a></h4>
<h3>Monitors</h3>
<h4><a name="api:mono_monitor_enter">mono_monitor_enter</a></h4>
<h4><a name="api:mono_monitor_enter_v4">mono_monitor_enter_v4</a></h4>
<h4><a name="api:mono_monitor_exit">mono_monitor_exit</a></h4>
<h4><a name="api:mono_monitor_try_enter">mono_monitor_try_enter</a></h4>
<h3>Initialization and Shutdown</h3>
<h4><a name="api:mono_thread_cleanup">mono_thread_cleanup</a></h4>
<h4><a name="api:mono_thread_detach_if_exiting">mono_thread_detach_if_exiting</a></h4>
<h4><a name="api:mono_thread_init">mono_thread_init</a></h4>
+6 -2
View File
@@ -2,7 +2,7 @@
<h3>Synopsis</h3>
<div class="header">
<div class="mapi-header">
#include &lt;metadata/metadata.h&gt;
#include &lt;metadata/class.h&gt;
@@ -19,13 +19,17 @@ typedef struct _MonoType MonoType;
<h4><a name="api:mono_type_full_name">mono_type_full_name</a></h4>
<h4><a name="api:mono_type_get_array_type">mono_type_get_array_type</a></h4>
<h4><a name="api:mono_type_get_class">mono_type_get_class</a></h4>
<h4><a name="api:mono_type_get_desc">mono_type_get_desc</a></h4>
<h4><a name="api:mono_type_get_modifiers">mono_type_get_modifiers</a></h4>
<h4><a name="api:mono_type_get_name">mono_type_get_name</a></h4>
<h4><a name="api:mono_type_get_ptr_type">mono_type_get_ptr_type</a></h4>
<h4><a name="api:mono_type_get_signature">mono_type_get_signature</a></h4>
<h4><a name="api:mono_type_get_type">mono_type_get_type</a></h4>
<h4><a name="api:mono_type_get_underlying_type">mono_type_get_underlying_type</a></h4>
<h4><a name="api:mono_type_is_byref">mono_type_is_byref</a></h4>
<h4><a name="api:mono_type_is_pointer">mono_type_is_pointer</a></h4>
<h4><a name="api:mono_type_is_reference">mono_type_is_reference</a></h4>
<h4><a name="api:mono_type_is_struct">mono_type_is_struct</a></h4>
<h4><a name="api:mono_type_is_void">mono_type_is_void</a></h4>
<h4><a name="api:mono_type_size">mono_type_size</a></h4>
<h4><a name="api:mono_type_stack_size">mono_type_stack_size</a></h4>
<h4><a name="api:mono_type_to_unmanaged">mono_type_to_unmanaged</a></h4>
-9
View File
@@ -5,8 +5,6 @@
<h4><a name="api:mono_compile_method">mono_compile_method</a></h4>
<h4><a name="api:mono_config_for_assembly">mono_config_for_assembly</a></h4>
<h4><a name="api:mono_dllmap_insert">mono_dllmap_insert</a></h4>
<h4><a name="api:mono_environment_exitcode_get">mono_environment_exitcode_get</a></h4>
<h4><a name="api:mono_environment_exitcode_set">mono_environment_exitcode_set</a></h4>
<h4><a name="api:mono_free_method">mono_free_method</a></h4>
<h4><a name="api:mono_free_verify_list">mono_free_verify_list</a></h4>
<h4><a name="api:mono_get_config_dir">mono_get_config_dir</a></h4>
@@ -15,13 +13,8 @@
<h4><a name="api:mono_get_method_full">mono_get_method_full</a></h4>
<h4><a name="api:mono_get_method">mono_get_method</a></h4>
<h4><a name="api:mono_get_root_domain">mono_get_root_domain</a></h4>
<h4><a name="api:mono_init_from_assembly">mono_init_from_assembly</a></h4>
<h4><a name="api:mono_init">mono_init</a></h4>
<h4><a name="api:mono_init_version">mono_init_version</a></h4>
<h4><a name="api:mono_jit_exec">mono_jit_exec</a></h4>
<h4><a name="api:mono_lookup_internal_call">mono_lookup_internal_call</a></h4>
<h4><a name="api:mono_lookup_pinvoke_call">mono_lookup_pinvoke_call</a></h4>
<h4><a name="api:mono_main">mono_main</a></h4>
<h4><a name="api:mono_parse_default_optimizations">mono_parse_default_optimizations</a></h4>
<h4><a name="api:mono_ptr_class_get">mono_ptr_class_get</a></h4>
<h4><a name="api:mono_register_bundled_assemblies">mono_register_bundled_assemblies</a></h4>
@@ -34,6 +27,4 @@
<h4><a name="api:mono_runtime_quit">mono_runtime_quit</a></h4>
<h4><a name="api:mono_runtime_run_main">mono_runtime_run_main</a></h4>
<h4><a name="api:mono_table_info_get_rows">mono_table_info_get_rows</a></h4>
<h4><a name="api:mono_upgrade_remote_class_wrapper">mono_upgrade_remote_class_wrapper</a></h4>
<h4><a name="api:mono_verify_corlib">mono_verify_corlib</a></h4>
<h4><a name="api:mono_vtable_get_static_field_data">mono_vtable_get_static_field_data</a></h4>
+1 -108
View File
@@ -1,111 +1,5 @@
<h2>Utility Methods</h2>
<h3>Bitsets</h3>
<p>MonoBitsets are a set of routines used to manipulate sets
of bits.
<h4><a name="api:mono_bitset_alloc_size">mono_bitset_alloc_size</a></h4>
<h4><a name="api:mono_bitset_clear">mono_bitset_clear</a></h4>
<h4><a name="api:mono_bitset_clear_all">mono_bitset_clear_all</a></h4>
<h4><a name="api:mono_bitset_clone">mono_bitset_clone</a></h4>
<h4><a name="api:mono_bitset_copyto">mono_bitset_copyto</a></h4>
<h4><a name="api:mono_bitset_count">mono_bitset_count</a></h4>
<h4><a name="api:mono_bitset_equal">mono_bitset_equal</a></h4>
<h4><a name="api:mono_bitset_find_first">mono_bitset_find_first</a></h4>
<h4><a name="api:mono_bitset_find_last">mono_bitset_find_last</a></h4>
<h4><a name="api:mono_bitset_find_start">mono_bitset_find_start</a></h4>
<h4><a name="api:mono_bitset_foreach">mono_bitset_foreach</a></h4>
<h4><a name="api:mono_bitset_free">mono_bitset_free</a></h4>
<h4><a name="api:mono_bitset_intersection">mono_bitset_intersection</a></h4>
<h4><a name="api:mono_bitset_invert">mono_bitset_invert</a></h4>
<h4><a name="api:mono_bitset_mem_new">mono_bitset_mem_new</a></h4>
<h4><a name="api:mono_bitset_new">mono_bitset_new</a></h4>
<h4><a name="api:mono_bitset_set">mono_bitset_set</a></h4>
<h4><a name="api:mono_bitset_set_all">mono_bitset_set_all</a></h4>
<h4><a name="api:mono_bitset_size">mono_bitset_size</a></h4>
<h4><a name="api:mono_bitset_sub">mono_bitset_sub</a></h4>
<h4><a name="api:mono_bitset_test">mono_bitset_test</a></h4>
<h4><a name="api:mono_bitset_test_bulk">mono_bitset_test_bulk</a></h4>
<h4><a name="api:mono_bitset_union">mono_bitset_union</a></h4>
<h4><a name="api:mono_bitset_find_first_unset">mono_bitset_find_first_unset</a></h4>
<h4><a name="api:mono_bitset_intersection_2">mono_bitset_intersection_2</a></h4>
<h3>Hashtables</h3>
<p><tt>GHashTable</tt> is used when you need to store object
references into a hashtable, objects stored in a
<tt>MonoGHashTable</tt> are properly tracked by the garbage
collector.
<p>The <tt>MonoGHashTable</tt> data type has the same API as
the GLIB.
<h4><a name="api:mono_g_hash_table_destroy">mono_g_hash_table_destroy</a></h4>
<h4><a name="api:mono_g_hash_table_foreach">mono_g_hash_table_foreach</a></h4>
<h4><a name="api:mono_g_hash_table_foreach_remove">mono_g_hash_table_foreach_remove</a></h4>
<h4><a name="api:mono_g_hash_table_foreach_steal">mono_g_hash_table_foreach_steal</a></h4>
<h4><a name="api:mono_g_hash_table_insert">mono_g_hash_table_insert</a></h4>
<h4><a name="api:mono_g_hash_table_lookup">mono_g_hash_table_lookup</a></h4>
<h4><a name="api:mono_g_hash_table_lookup_extended">mono_g_hash_table_lookup_extended</a></h4>
<h4><a name="api:mono_g_hash_table_new">mono_g_hash_table_new</a></h4>
<h4><a name="api:mono_g_hash_table_new_full">mono_g_hash_table_new_full</a></h4>
<h4><a name="api:mono_g_hash_table_remap">mono_g_hash_table_remap</a></h4>
<h4><a name="api:mono_g_hash_table_remove">mono_g_hash_table_remove</a></h4>
<h4><a name="api:mono_g_hash_table_replace">mono_g_hash_table_replace</a></h4>
<h4><a name="api:mono_g_hash_table_size">mono_g_hash_table_size</a></h4>
<h4><a name="api:mono_g_hash_table_steal">mono_g_hash_table_steal</a></h4>
<h3>SHA1 Signatures</h3>
<h4><a name="api:mono_sha1_init">mono_sha1_init</a></h4>
<h4><a name="api:mono_sha1_update">mono_sha1_update</a></h4>
<h4><a name="api:mono_sha1_get_digest_from_file">mono_sha1_get_digest_from_file</a></h4>
<h4><a name="api:mono_sha1_get_digest">mono_sha1_get_digest</a></h4>
<h4><a name="api:mono_sha1_final">mono_sha1_final</a></h4>
<h3>MD5 Signatures</h3>
<h4><a name="api:mono_md5_init">mono_md5_init</a></h4>
<h4><a name="api:mono_md5_update">mono_md5_update</a></h4>
<h4><a name="api:mono_md5_get_digest_from_file">mono_md5_get_digest_from_file</a></h4>
<h4><a name="api:mono_md5_get_digest">mono_md5_get_digest</a></h4>
<h4><a name="api:mono_md5_final">mono_md5_final</a></h4>
<h4><a name="api:mono_digest_get_public_token">mono_digest_get_public_token</a></h4>
<h3>Memory Pools</h3>
<p>Memory pools are a convenient way of tracking memory
allocations that are used for one specific task, they are also
faster than using the standard memory allocation procedures,
as they are designed to be used only by a single thread at a
time.
<p><tt>MonoMemPool</tt> objects are not thread safe, which
means that you should not share the objects across multiple
threads without providing proper locking around it (unlike
<tt>malloc</tt> and <tt>free</tt> which are thread safe).
<p>When a <tt>MonoMemPool</tt> is released with
<tt>mono_mempool_destroy</tt> all of the of the memory
allocated from that memory pool with
<tt>mono_mempool_alloc</tt> and <tt>mono_mempool_alloc0</tt>
is released.
<h4><a name="api:mono_mempool_new">mono_mempool_new</a></h4>
<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
<h4><a name="api:mono_mempool_alloc0">mono_mempool_alloc0</a></h4>
<h4><a name="api:mono_mempool_empty">mono_mempool_empty</a></h4>
<h4><a name="api:mono_mempool_invalidate">mono_mempool_invalidate</a></h4>
<h4><a name="api:mono_mempool_stats">mono_mempool_stats</a></h4>
<h4><a name="api:mono_mempool_contains_addr">mono_mempool_contains_addr</a></h4>
<h3>JIT utilities</h3>
<h4><a name="api:mono_signbit_double">mono_signbit_double</a></h4>
<h4><a name="api:mono_signbit_float">mono_signbit_float</a></h4>
<h3>Disassembling Generated Code</h3>
@@ -116,11 +10,10 @@
<h3>Walking the Stack</h3>
<h4><a name="api:mono_walk_stack">mono_walk_stack</a></h4>
<h4><a name="api:mono_stack_walk_no_il">mono_stack_walk_no_il</a></h4>
<h4><a name="api:mono_stack_walk_async_safe">mono_stack_walk_async_safe</a></h4>
<h3>Others</h3>
<h4><a name="api:mono_escape_uri_string">mono_escape_uri_string</a></h4>
<h4><a name="api:mono_guid_to_string">mono_guid_to_string</a></h4>
-33
View File
@@ -1,33 +0,0 @@
Size and alignment requirements of stack values
===============================================
P ... System.IntPtr
I1 ... System.Int8
I2 ... System.Int16
I4 ... System.Int32
I8 ... System.Int64
F ... System.Single
D ... System.Double
LD ... native long double
-----------------------------------------------------------
ARCH | P | I1 | I2 | I4 | I8 | F | D | LD |
-----------------------------------------------------------
X86 | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 |12/4 |
-----------------------------------------------------------
X86/W32 | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 |12/4 |
-----------------------------------------------------------
ARM | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 | 8/4 |
-----------------------------------------------------------
M68K | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 |12/4 |
-----------------------------------------------------------
ALPHA | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 |
-----------------------------------------------------------
SPARC | 4/4 | 4/4 | 4/4 | 4/4 | 8/8 | 4/4 | 8/8 |16/8 |
-----------------------------------------------------------
SPARC64 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 |16/16|
-----------------------------------------------------------
MIPS | 4/4 | 4/4 | 4/4 | 4/4 | ?/? | 4/4 | 8/8 | 8/8 |
-----------------------------------------------------------
| | | | | | | | |
-----------------------------------------------------------
+18 -36
View File
@@ -12,6 +12,12 @@
<param name="Local" value="DoesNotExist"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Embedding Mono"/>
<param name="Local" value="deploy/mono-api-embedding.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Assemblies"/>
@@ -48,30 +54,12 @@
<param name="Local" value="deploy/mono-api-class.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Code Generation"/>
<param name="Local" value="deploy/mono-api-codegen.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Decimal Representation"/>
<param name="Local" value="deploy/mono-api-decimal.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Application Domains"/>
<param name="Local" value="deploy/mono-api-domains.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Dynamic Code Generation"/>
<param name="Local" value="deploy/mono-api-dynamic-codegen.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Exceptions"/>
@@ -90,24 +78,12 @@
<param name="Local" value="deploy/mono-api-gc.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Embedding Mono"/>
<param name="Local" value="deploy/mono-api-embedding.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Just in Time Compiler"/>
<param name="Local" value="deploy/mono-api-jit.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Marshalling"/>
<param name="Local" value="deploy/mono-api-marshal.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Metadata access"/>
@@ -140,12 +116,6 @@
</object>
</li>
-->
<li>
<object type="text/sitemap">
<param name="Name" value="JIT Counters"/>
<param name="Local" value="deploy/mono-api-counters.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Types"/>
@@ -182,12 +152,24 @@
<param name="Local" value="deploy/mono-api-utils.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="JIT Counters"/>
<param name="Local" value="deploy/mono-api-counters.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Unsorted"/>
<param name="Local" value="deploy/mono-api-unsorted.html"/>
</object>
</li>
<li>
<object type="text/sitemap">
<param name="Name" value="Internal: Dynamic Code Generation"/>
<param name="Local" value="deploy/mono-api-dynamic-codegen.html"/>
</object>
</li>
</ul>
</body>
</html>
-261
View File
@@ -1,261 +0,0 @@
Purpose
Especially when inlining is active, it can happen that temporary
variables add pressure to the register allocator, producing bad
code.
The idea is that some of these temporaries can be totally eliminated
my moving the MonoInst tree that defines them directly to the use
point in the code (so the name "tree mover").
Please note that this is *not* an optimization: it is mostly a
workaround to issues we have in the regalloc.
Actually, with the new linear IR this will not be possible at all
(there will be no more trees in the code!).
Anyway, this workaround turns out to be useful in the current state
of things...
-----------------------------------------------------------------------
Base logic
If a local is defined by a value which is a proper expression (a tree
of MonoInst, not just another local or a constant), and this definition
is used only once, the tree can be moved directly to the use location,
and the definition eliminated.
Of course, none of the variables used in the tree must be defined in
the code path between the definition and the use, and the tree must be
free of side effects.
We do not handle the cases when the tree is just a local or a constant
because they are handled by copyprop and consprop, respectively.
To make things simpler, we restrict the tree move to the case when:
- the definition and the use are in the same BB, and
- the use is followed by another definition in the same BB (it is not
possible that the 1st value is used again), or alternatively there
is no BB in the whole CFG that contains a use of this local before a
definition (so, again, there is no code path that can lead to a
subsequent use).
To handle this, we maintain an ACT array (Available Copy Tree, similar
to the ACP), where we store the "state" of every local.
Ideally, every local can be in the following state:
[E] Undefined (by a tree, it could be in the ACP but we don't care).
[D] Defined (by a tree), and waiting for a use.
[U] Used, with a tree definition available in the same BB, but still
without a definition following the use (always in the same BB).
Of course state [E] (empty) is the initial one.
Besides, there are two sort of "meta states", or flags:
[W] Still waiting for a use or definition in this BB (we have seen no
occurrence of the local yet).
[X] Used without being previously defined in the same BB (note that if
there is a definition that precedes the use in the same BB, even if
the definition is not a tree or is not available because of side
effects or because the tree value has changed the local is not in
state [X]).
Also note that state [X] is a sort of "global" condition, which if set
in one BB will stay valid for the whole CFG, even if the local will
otherwise change state. The idea of flagging a local as [X] is that if
there is a definition/use pair that reaches the end of a BB, it could
be that there is a CFG path that then leads to the BB flagging it as
[X] (which contains a use), so the tree cannot be moved.
So state [X] will always be set, and never examined in all the state
transitions we will describe.
In practice, we use flag [W] to set state [X]: if, when traversing a
BB, we find a use for a local in state [W], then that local is flagged
[X].
For each BB, we initialize all states to [E] and [W], and then we
traverse the code one inst at a time, and update the variable states
in the ACT in the following ways:
[Definition]
- Flag [W] is cleared.
- All "affected trees" are killed (go from state [D] to [E]).
The "affected trees" are the trees which contain (use) the defined
local, and the rationale is that the tree value changed, so the
tree is no longer available.
- If the local was in state [U], *that* tree move is marked "safe"
(because *this* definition makes us sure that the previous tree
cannot be used again in any way).
The idea is that "safe" moves can happen even if the local is
flagged [X], because the second definition "covers" the use.
The tree move is then saved in the "todo" list (and the affecting
nodes are cleared).
- If the local was defined by a tree, it goes to state [D], the tree
is recorded, and all the locals used in it are marked as "affecting
this tree" (of course these markers are lists, because each local
could affect more than one tree).
[IndirectDefinition]
- All potentially affected trees (in state [D]) are killed.
[Use]
- If the local is still [W], it is flagged [X] (the [W] goes away).
- If the local is in state [D], it goes to state [U].
The tree move must not yet be recorded in the "todo" list, it still
stays in the ACT slot belonging to this local.
Anyway, the "affecting" nodes are updated, because now a definition
of a local used in this tree will affect only "indirect" (or also
"propagated") moves, but not *this* move (see below).
- If the local is in state [U], then the tree cannot be moved (it is
used two times): the move is canceled, and the state goes [E].
- If the local is in state [E], the use is ignored.
[IndirectUse]
- All potentially affected trees (in state [D] or [U]) are killed.
[SideEffect]
- Tree is marked as "unmovable".
Then, at the end of the BB, for each ACT slot:
- If state is [U], the tree move is recorded in the "todo" list, but
flagged "unsafe".
- Anyway, state goes to [E], the [W] flag is set, and all "affecting"
lists are cleared (we get ready to traverse the next BB).
Finally, when all BBs has been scanned, we traverse the "todo" list,
moving all "safe" entries, and moving "unsafe" ones only if their ACT
slot is not flagged [X].
So far, so good.
But there are two issues that make things harder :-(
The first is the concept of "indirect tree move".
It can happen that a tree is scheduled for moving, and its destination
is a use that is located in a second tree, which could also be moved.
The main issue is that a definition of a variable of the 1st tree on
the path between the definition and the use of the 2nd one must prevent
the move.
But which move? The 1st or the 2nd?
Well, any of the two!
The point is, the 2nd move must be prevented *only* if the 1st one
happens: if it is aborted (for an [X] flag or any other reason), the
2nd move is OK, and vice versa...
We must handle this in the following way:
- The ACT must still remember if a slot is scheduled for moving in
this BB, and if it is, all the locals used in the tree.
We say that the slot is in state [M].
Note that [M] is (like [X] and [W]) a sort of "meta state": a local
is flagged [M] when it goes to state [U], and the flag is cleared
when the tree move is cancelled
- A tree that uses a local whose slot is in state [M] is also using all
the locals used by the tree in state [M], but the use is "indirect".
These use nodes are also included in the "affecting" lists.
- The definition of a variable used in an "indirect" way has the
effect of "linking" the two involved tree moves, saying that only one
of the two can happen in practice, but not both.
- When the 2nd tree is scheduled for moving, the 1st one is *still* in
state [M], because a third move could "carry it forward", and all the
*three* moves should be mutually exclusive (to be safe!).
The second tricky complication is the "tree forwarding" that can happen
when copyprop is involved.
It is conceptually similar to the "indirect tree move".
Only, the 2nd tree is not really a tree, it is just the local defined
in the 1st tree move.
It can happen that copyprop will propagate the definition.
We cannot make treeprop do the same job of copyprop, because copyprop
has less constraints, and is therefore more powerful in its scope.
The main issue is that treeprop cannot propagate a tree to *two* uses,
while copyprop is perfectly capable of propagating one definition to
two (or more) different places.
So we must let copyprop do its job otherwise we'll miss optimizations,
but we must also make it play safe with treeprop.
Let's clarify with an example:
a = v1 + v2; //a is defined by a tree, state [D], uses v2 and v2
b = a; //a is used, state [U] with move scheduled, and
//b is defined by a, ACP[b] is a, and b is in state [DC]
c = b + v3; // b is used, goes to state [U]
The real trouble is that copyprop happens *immediately*, while treeprop
is deferred to the end of the CFG traversal.
So, in the 3rd statement, the "b" is immediately turned into an "a" by
copyprop, regardless of what treeprop will do.
Anyway, if we are careful, this is not so bad.
First of all, we must "accept" the fact that in the 3rd statement the
"b" is in fact an "a", as treeprop must happen *after* copyprop.
The real problem is that "a" is used twice: in the 2nd and 3rd lines.
In our usual setup, the 2nd line would set it to [U], and the 3rd line
would kill the move (and set "a" to [E]).
I have tried to play tricks, and reason as of copyprop didn't happen,
but everything becomes really messy.
Instead, we should note that the 2nd line is very likely to be dead.
At least in this BB, copyprop will turn all "b"s into "a"s as long as
it can, and when it cannot, it will be because either "a" or "b" have
been redefined, which would be after the tree move anyway.
So, the reasoning gets different: let's pretend that "b" will be dead.
This will make the "a" use in the 2nd statement useless, so there we
can "reset" "a" to [D], but also take note that if "b" will end up
not being dead, the tree move associated to this [D] must be aborted.
We can detect this in the following way:
- Either "b" is used before being defined in this BB, or
- It will be flagged "unsafe".
Both things are very easy to check.
The only quirk is that the "affecting" lists must not be cleared when
a slot goes to state [U], because a "propagation" could put it back
to state [D] (where those lists are needed, because it can be killed
by a definition to a used slot).
-----------------------------------------------------------------------
Implementation notes
All the implementation runs inside the existing mono_local_cprop
function, and a separate memory pool is used to hold the temporary
data.
A struct, MonoTreeMover, contains the pointers to the pool, the ACT,
the list of scheduled moves and auxiliary things.
This struct is allocated if the tree move pass is requested, and is
then passed along to all the involved functions, which are therefore
aware of the tree mover state.
The ACT is an array of slots, obviously one per local.
Each slot is of type MonoTreeMoverActSlot, and contains the used and
affected locals, a pointer to the pending tree move and the "waiting"
and "unsafe" flags.
The "affecting" lists a built from "dependency nodes", of type
MonoTreeMoverDependencyNode.
Each of the nodes contains the used and affected local, and is in
two lists: the locals used by a slot, and the locals affected by a
slot (obviously a different one).
So, each node means: "variable x is used in tree t, so a definition
of x affects tree t".
The "affecting" lists are doubly linked, to allow for O(1) deletion.
The "used" lists are simply linked, but when they are mantained there
is always a pointer to the last element to allow for O(1) list moving.
When a used list is dismissed (which happens often, any time a node is
killed), its nodes are unlinked from their respective affecting lists
and are then put in a "free" list in the MonoTreeMover to be reused.
Each tree move is represented by a struct (MonoTreeMoverTreeMove),
which contains:
- the definition and use points,
- the "affected" moves (recall the concept of "indirect tree move"),
- the "must be dead" slots (recall "tree forwarding"). and
- a few utility flags.
The tree moves stays in the relevant ACT slot until it is ready to be
scheduled for moving, at which point it is put in a list in the
MonoTreeMover.
The tree moves structs are reused when they are killed, so there is
also a "free" list for them in the MonoTreeMover.
The tree mover code has been added to all the relevant functions that
participate in consprop and copyprop, particularly:
- mono_cprop_copy_values takes care of variable uses (transitions from
states [D] to [U] and [U] to [E] because of killing),
- mono_cprop_invalidate_values takes care of side effects (indirect
accesses, calls...),
- mono_local_cprop_bb sets up and cleans the traversals for each BB,
and for each MonoInst it takes care of variable definitions.
To each of them has been added a MonoTreeMover parameter, which is not
NULL if the tree mover is running.
After mono_local_cprop_bb has run for all BBs, the MonoTreeMover has
the list of all the pending moves, which must be walked to actually
perform the moves (when possible, because "unsafe" flags, "affected"
moves and "must be dead" slots can still have their effects, which
must be handled now because they are fully known only at the end of
the CFG traversal).
-1564
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -16,4 +16,4 @@ endif
endif
endif
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h
EXTRA_DIST = autogen.sh README NEWS AUTHORS winconfig.h
+8 -8
View File
@@ -30,18 +30,18 @@ fi
DIE=1
}
if [ -z "$LIBTOOL" ]; then
LIBTOOL=`which glibtool 2>/dev/null`
if [ ! -x "$LIBTOOL" ]; then
LIBTOOL=`which libtool`
if [ -z "$LIBTOOLIZE" ]; then
LIBTOOLIZE=`which glibtoolize 2>/dev/null`
if [ ! -x "$LIBTOOLIZE" ]; then
LIBTOOLIZE=`which libtoolize`
fi
fi
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "**Error**: You must have \`libtoolize' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.2.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
@@ -98,7 +98,7 @@ esac
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
${LIBTOOL}ize --force --copy
$LIBTOOLIZE --force --copy
fi
fi
+3 -1
View File
@@ -136,6 +136,7 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(fork execv execve)
#
# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
@@ -150,7 +151,7 @@ elif test x$target_ios = xno; then
AC_CHECK_FUNCS(strndup getpwuid_r)
fi
AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x )
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno )
AM_ICONV()
AC_SEARCH_LIBS(sqrtf, m)
@@ -181,6 +182,7 @@ fi
AC_SUBST(G_HAVE_ISO_VARARGS)
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h sys/resource.h)
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+="-liconv -lcharset"])])
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
AC_SUBST(HAVE_ALLOCA_H)
+1 -6
View File
@@ -1,4 +1,4 @@
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
noinst_LTLIBRARIES = libeglib.la
AM_CFLAGS = $(WERROR_CFLAGS)
@@ -59,8 +59,6 @@ libeglib_la_SOURCES = \
$(vasprintf_files)
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
libeglib_static_la_SOURCES=$(libeglib_la_SOURCES)
libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS)
AM_CPPFLAGS = -I$(srcdir)
@@ -72,9 +70,6 @@ libeglib_la_LIBADD = -llog
endif
endif
libeglib_static_la_LIBADD = $(libeglib_la_LIBADD) $(LIBICONV)
libeglib_static_la_LDFLAGS = -static
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
+1 -1
View File
@@ -36,7 +36,7 @@ typedef signed @GSIZE@ gssize;
#define G_HAVE_ISO_VARARGS
#endif
#if defined (__native_client__)
#if defined (__native_client__) || defined (HOST_WATCHOS)
#undef G_BREAKPOINT
#define G_BREAKPOINT()
#endif
+7
View File
@@ -49,3 +49,10 @@ g_byte_array_append (GByteArray *array,
{
return (GByteArray *)g_array_append_vals ((GArray *)array, data, len);
}
void
g_byte_array_set_size (GByteArray *array, gint length)
{
g_array_set_size ((GArray *)array, length);
}
+1 -1
View File
@@ -58,7 +58,7 @@ int mkstemp (char *tmp_template)
utf16_template = _wmktemp( utf16_template);
if (utf16_template && *utf16_template) {
/* FIXME: _O_TEMPORARY causes file to disappear on close causing a test to fail */
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_EXCL, _S_IREAD | _S_IWRITE);
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_RDWR | _O_EXCL, _S_IREAD | _S_IWRITE);
}
/* FIXME: this will crash if utf16_template == NULL */
Loaded 100 of 22951 files, more files were not shown because too many files have changed in this diff. Show more