Mark Probst [Thu, 9 Jun 2016 20:15:23 +0000 (13:15 -0700)]
[utils] Fix internal allocator header size.
The header is always just a pointer.
Mark Probst [Thu, 9 Jun 2016 20:40:11 +0000 (13:40 -0700)]
[runtime] Counters for allocated virtual memory.
David Karlaš [Mon, 12 Sep 2016 12:58:54 +0000 (14:58 +0200)]
Merge pull request #3552 from DavidKarlas/getScopeChanges
[Debugger] GetLocals was throwing NullReferenceException(li.scopes_start) if ran against older runtime
David Karlaš [Mon, 12 Sep 2016 11:01:27 +0000 (13:01 +0200)]
[Debugger] GetLocals was throwing NullReferenceException(li.scopes_start) if ran against older runtime
Added logic to make sure user of API handles version checking when calling GetScope
Made properties in LocalScope class public
Emil Sandstø [Mon, 12 Sep 2016 10:19:00 +0000 (12:19 +0200)]
[threads] Correct the spin waiting in 'sleep_interruptable' (#3544)
After https://github.com/mono/mono/commit/
089c47f1c07bf250d76c36e04675569fc6f5b4ba#diff-e7e458b6256eaa730c145f14a666652aR1141
the code started to use nanoseconds instead of milliseconds. The problem was that this caused 'sleep_interruptable' to spin wait the last millisecond before the wait was over, https://bugzilla.xamarin.com/show_bug.cgi?id=44132.
Fix https://bugzilla.xamarin.com/show_bug.cgi?id=44132
Alex Rønne Petersen [Sun, 11 Sep 2016 14:19:41 +0000 (16:19 +0200)]
Merge pull request #3550 from alexrp/revert-tp-monitor
Revert "[threadpool-ms] Switch Monitor thread to a MonoThreadInfo (#3538)"
Alex Rønne Petersen [Sun, 11 Sep 2016 13:44:56 +0000 (15:44 +0200)]
Revert "[threadpool-ms] Switch Monitor thread to a MonoThreadInfo (#3538)"
This reverts commit
2f88b8eb5a6f0108288a878f515c53b72637a88b.
There is a subtle problem with turning the monitor thread into a simple
MonoThreadInfo: It creates worker threads via mono_thread_create_internal (),
which allocates the thread object from the GC. No thread can allocate from
the GC unless it's actually attached, which the worker thread is not when
created with just mono_threads_create ().
Zoltan Varga [Fri, 9 Sep 2016 22:50:50 +0000 (00:50 +0200)]
[runtime] Remove some dead code.
Ludovic Henry [Fri, 9 Sep 2016 21:41:34 +0000 (23:41 +0200)]
[threadpool-ms] Switch Monitor thread to a MonoThreadInfo (#3538)
Zoltan Varga [Fri, 9 Sep 2016 18:08:06 +0000 (20:08 +0200)]
Remove a debug printf.
Zoltan Varga [Fri, 9 Sep 2016 17:59:45 +0000 (19:59 +0200)]
Add missing file.
Zoltan Varga [Fri, 9 Sep 2016 17:58:59 +0000 (19:58 +0200)]
[sdb] Add a MethodMirror:GetScopes () method which returns scope information.
Ludovic Henry [Fri, 9 Sep 2016 14:23:34 +0000 (16:23 +0200)]
[threads] Add specific field to check size (#3542)
Ludovic Henry [Fri, 9 Sep 2016 10:09:18 +0000 (12:09 +0200)]
[threadpool-ms] Replace win32 semaphore by coop semaphore (#3519)
Ludovic Henry [Fri, 9 Sep 2016 09:38:30 +0000 (11:38 +0200)]
[mono-threads] Fix lifetime of MonoThreadInfo->handle (#3539)
This handle should have a total of maximum 3 copies:
- in MonoThreadInfo->handle
- in the return value of mono_threads_create_thread
- in MonoInternalThread->handle (if it's a managed thread)
Before, there would always be 2 references (in MonoThreadInfo->handle and another another for MonoInternalThread->handle), even if it would be referenced at one place only (MonoThreadInfo->handle), which would lead to a handle leak.
We also need to duplicate the returned handle, to avoid having a use-after-free of the handle (in case the thread exits before we access that handle)
Zoltan Varga [Fri, 9 Sep 2016 01:14:12 +0000 (03:14 +0200)]
[llvm] Disable llvm again for methods with large basic blocks in non-llvm-only mode, the workaround doesn't seem to work. Fixes #42395.
monojenkins [Fri, 9 Sep 2016 00:45:04 +0000 (01:45 +0100)]
Merge pull request #3540 from kumpera/abort-on-gerror
[logging] Fix g_error not aborting.
Once we enabled g_log redirection, we stopped aborting as the new handlers didn't behave like eglib.
Vlad Brezae [Thu, 8 Sep 2016 23:54:48 +0000 (02:54 +0300)]
Merge pull request #3528 from BrzVlad/fix-sgen-check-before-collections
[sgen] Fix sgen debug flags
Rodrigo Kumpera [Thu, 8 Sep 2016 22:58:08 +0000 (15:58 -0700)]
[logging] Fix g_error not aborting.
Ludovic Henry [Thu, 8 Sep 2016 15:17:28 +0000 (17:17 +0200)]
[threads] Factor common attach code in mono_thread_attach_internal (#3530)
* [threads] Allocate StartInfo in create_thread
* [threads] Put start_notify semaphore in StartInfo
* [threads] Factor common attach code in mono_thread_attach_internal
* [threads] Use same registered mechanism as mono-threads
Niklas Therning [Thu, 8 Sep 2016 14:31:59 +0000 (16:31 +0200)]
Merge pull request #3537 from ntherning/fix-failing-ThreadTest-tests-on-windows
Remove Assert.Fail() calls in ThreadTest when running on Windows
Niklas Therning [Thu, 8 Sep 2016 13:26:25 +0000 (15:26 +0200)]
Remove Assert.Fail() calls in ThreadTest when running on Windows
The tests that fail like this actually work just fine on Mono on Windows.
Added the NotDotNet category to the CurrentThread_Domains() test since it
fails on .NET.
Jonathan Chambers [Thu, 8 Sep 2016 12:28:59 +0000 (08:28 -0400)]
Avoid race condition between domain unload and threadpool. (#3491)
* Avoid race condition between domain unload and threadpool.
Previous logic only ensured that domain->threadpool_jobs was 0.
There was a race condition as follows:
* worker jobs are queued into ThreadPoolDomain outstanding_request's
* domain unload starts
* domain->threadpool_jobs is 0 so unload proceeds
* queued jobs are processed from the ThreadPoolDomain outstanding_request's
* the domain can be set/entered by worker threads since
mono_domain_set only fails for domains with state of MONO_APPDOMAIN_UNLOADED,
while our domain is in the MONO_APPDOMAIN_UNLOADING state
* jobs are now being unexpectedly run in domain that is being shutdown
* Fix a hang when unloading the domain.
This change applies the diff from ludovic-henry to correct the hang.
https://gist.github.com/ludovic-henry/
6c8a4bc8951091c0ef36df2e52d5e32e
Alexander Köplinger [Thu, 8 Sep 2016 05:23:40 +0000 (07:23 +0200)]
Merge pull request #3532 from alexrp/profiler-stress-tests
[acceptance-tests] Add profiler-stress suite.
Alex Rønne Petersen [Wed, 7 Sep 2016 23:57:07 +0000 (01:57 +0200)]
[acceptance-tests] Add profiler-stress suite.
Alex Rønne Petersen [Thu, 8 Sep 2016 01:18:40 +0000 (03:18 +0200)]
Merge pull request #3531 from alexrp/master
[profiler} Don't crash if a zero sampling frequency is given.
Alex Rønne Petersen [Thu, 8 Sep 2016 00:20:32 +0000 (02:20 +0200)]
[profiler} Don't crash if a zero sampling frequency is given.
Henric Müller [Wed, 7 Sep 2016 13:30:55 +0000 (15:30 +0200)]
Moving WSAGetLastError calls closer to socket operation (#3450)
* When doing async connect on windows, connect returns `WSAEINPROGRESS`
which needs to be returned to managed code for correct handling. However
on Windows, last error gets reset before `WSAGetLastError` is called.
This fix moves all `WSAGetLastError` calls up closer to the socket
operation to make sure correct error code is returned to the managed code.
* Making sure `TcpNoDelay` is set to false for IPv4 by default and
that `DualMode` is default for IPv6.
* Making sure option value is set to 0 before calling getsockopt
because on Windows, a `BOOL` option value (eg TcpNoDelay) is returned
as a one byte value and the other bytes are left untouched which resulted
in TcpNoDelay always seemed to be true.
* Fixed so `TF_REUSE_SOCKET` is set only if `reuse` parameter is set
when disconnecting a socket.
Niklas Therning [Wed, 7 Sep 2016 13:23:54 +0000 (15:23 +0200)]
Merge pull request #3511 from henricm/fix-no-socket-reuse
Not reusing sockets in dual mode tests
Ludovic Henry [Wed, 7 Sep 2016 12:28:46 +0000 (14:28 +0200)]
[threads] Remove CREATE_SUSPENDED (#3529)
* [threads] Remove use of CREATE_SUSPENDED for domain unload thread
* [threads] Remove use of CREATE_SUSPENDED for managed thread
* [threads] Remove CREATE_SUSPENDED
Alex Rønne Petersen [Wed, 7 Sep 2016 01:00:48 +0000 (03:00 +0200)]
Merge pull request #3526 from alexrp/master
[sgen] Don't consider managed write barriers to be critical methods.
Vlad Brezae [Tue, 6 Sep 2016 10:43:05 +0000 (13:43 +0300)]
[sgen] Make sure we don't sweep a block if we're not supposed to
If the sweeping mechanism has been triggered by a major collection, then the iteration will wait for the general sweeping to finish and also for the sweeping of all the blocks. If this isn't the case (we are doing a major collection) we will iterate over the current state of the heap, some objects being bound to die during the collection, and the callback must account for this.
It doesn't make much sense to explicitly attempt to iterate without trying to sweep blocks that can be swept.
Manu [Tue, 6 Sep 2016 22:28:16 +0000 (07:28 +0900)]
Rename local file into socket_fd (#3524)
This is to avoid hiding the static gint `file` and to better understand the code.
Ludovic Henry [Tue, 6 Sep 2016 22:18:23 +0000 (00:18 +0200)]
Merge pull request #3509 from ludovic-henry/iolayer-extract-threading
[mono-threads] Keep cleaning up mono-threads after iolayer extraction
Alex Rønne Petersen [Tue, 6 Sep 2016 18:51:13 +0000 (20:51 +0200)]
[sgen] Don't consider managed write barriers to be critical methods.
When we emit calls to them, we also emit an OP_DUMMY_USE instruction to keep
the object alive, so it is OK for the GC to interrupt write barriers now.
Vlad Brezae [Tue, 6 Sep 2016 17:01:28 +0000 (20:01 +0300)]
[sgen] Remove unused and potentially wrong case from major object iteration
We never enter this case since we never iterate over the major objects without requiring to sweep, while a sweep is running. Even if we would be in this case, we directly access the mark bits which can be cleared at the same time by another thread sweeping the block, so we could miss live objects.
Vlad Brezae [Tue, 6 Sep 2016 16:57:48 +0000 (19:57 +0300)]
[sgen] Fix mod union consistency check
We don't need a mod union to mark an object with concurrent mark&sweep.
Vlad Brezae [Tue, 6 Sep 2016 16:30:31 +0000 (19:30 +0300)]
[sgen] Don't do remset consistency checks during majors
It doesn't make sense to check the remset during a major since majors dont use the cardtable and we clear it at the start. So we will obviously have missing remsets. For the debugging concurrent case, we should use the mod union consistency checks instead.
Vlad Brezae [Tue, 6 Sep 2016 15:20:54 +0000 (18:20 +0300)]
[sgen] Don't verify the heap after a major
We would need to deal with scanning forwarded objects and dead objects which is not worth it. Only verify the heap at the start of a collection, as indicated by the name of the flag.
Vlad Brezae [Tue, 6 Sep 2016 13:43:54 +0000 (16:43 +0300)]
[sgen] Fix missing remsets with verify before collections
When verifying the heap we need to have the set of pinned objects otherwise we can observe missing remsets if suspended between the store and the write barrier. If we don't have the set of pinned objects, allow missing remsets.
Ludovic Henry [Mon, 5 Sep 2016 13:41:56 +0000 (15:41 +0200)]
[mono-threads] Have error in case we cannot set thread priority
Ludovic Henry [Wed, 10 Aug 2016 14:49:45 +0000 (16:49 +0200)]
[mono-threads] Fix win32 to posix priority conversion
Ludovic Henry [Fri, 15 Jul 2016 01:10:37 +0000 (03:10 +0200)]
[mono-threads] Store handle related data in MonoThreadInfo
Ludovic Henry [Fri, 15 Jul 2016 08:51:14 +0000 (10:51 +0200)]
[mono-threads] Assert that we do not try to signal the handle multiple times
Alexander Köplinger [Tue, 6 Sep 2016 13:17:30 +0000 (15:17 +0200)]
Merge pull request #3518 from akoeplinger/fix-fileiopermission
[corlib] Ensure FileIOPermission ctor is not called on mobile
Alexander Köplinger [Sun, 4 Sep 2016 14:42:11 +0000 (16:42 +0200)]
[corlib] Ensure FileIOPermission ctor is not called on mobile
After https://github.com/mono/mono/pull/3452 was merged, the LinkSdkRegressionTest.SecurityDeclaration
test in XI started failing:
```
[FAIL] LinkSdkRegressionTest.SecurityDeclaration : FileIOPermissionAccess
Expected: null
But was: <System.Security.Permissions.FileIOPermissionAccess>
at LinkSdk.LinkSdkRegressionTest.SecurityDeclaration () [0x00033] in /Users/builder/data/lanes/1411/
2a96404f/source/xamarin-macios/tests/linker-ios/link sdk/LinkSdkRegressionTest.cs:990
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/1411/
2a96404f/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
```
Due to the added call in the PR the linker preserved FileIOPermissionAccess enum,
which is apparently something we want to avoid.
Since according to https://github.com/mono/mono/pull/3452#discussion_r76384945 the only point of calling the
FileIOPermission is validating that the path doesn't contain invalid characters (mostly an issue on Windows),
I decided to just copy those checks as it's way cleaner.
Alexander Köplinger [Tue, 6 Sep 2016 10:24:39 +0000 (12:24 +0200)]
Merge pull request #3525 from henricm/fix-access-level-get-token
Using max level allowed when getting current token
Henric Müller [Tue, 6 Sep 2016 08:08:50 +0000 (10:08 +0200)]
Using max level allowed when getting current token
Reference source of WindowsIdentity is using `MAXIMUM_ALLOWED`
as desired level by default when getting current token.
Changing to same behaviour to enable duplicate and impersonation
to be made on the token retrieved by GetCurrentToken.
Miguel de Icaza [Tue, 6 Sep 2016 01:38:47 +0000 (21:38 -0400)]
[mcs/Makefile] make the 'btest' (bootstrap test) target work again
Zoltan Varga [Tue, 6 Sep 2016 00:21:38 +0000 (02:21 +0200)]
[jit] Unify the handling of 'error' and 'exc' in the llvm-only and non llvm-only runtime invoke code. Fixes #41961.
Joshua Peterson [Mon, 5 Sep 2016 21:43:55 +0000 (17:43 -0400)]
Better handle marshaling of packed types (#3508)
* This improves the marshaling for packed classes and class involved in an inheritance hierarchy.
* Similar changes were made in the Unity fork of mono across a number of commits.
* The tests here have been taken from the repo and converted to work as NUnit tests in Mono.
Zoltan Varga [Mon, 5 Sep 2016 21:01:38 +0000 (23:01 +0200)]
[jit] Emit a dummy call after calls to Type.GetType () in llvm-only mode to prevent clang from transforming the call to a tail call which would cause the stack walk done by GetType () to find the wrong frame. Fixes #41956.
Alexander Köplinger [Mon, 5 Sep 2016 16:17:22 +0000 (18:17 +0200)]
Merge pull request #3521 from ntherning/fix-failures-in-RegistryKeyTest-on-windows
Fix for failures in RegistryKeyTest on Windows
Alexander Köplinger [Mon, 5 Sep 2016 15:39:33 +0000 (17:39 +0200)]
Merge pull request #3520 from ntherning/fix-ModuleTest-too-long-temp-folder-path-on-windows
Prevent ModuleTest failures due to too long temp folder path on Windows
Niklas Therning [Mon, 5 Sep 2016 13:15:11 +0000 (15:15 +0200)]
Fix for failures in RegistryKeyTest on Windows
Refcatored Win32RegistryApi.SetValue() to accept uint/byte/etc values for
DWord registry values.
Added handling of ERROR_CHILD_MUST_BE_VOLATILE errors to GenerateException().
Centralized MarkedForDeletion error handling to GenerateException().
Fixed tests which create volatile subkeys in RegistryKeyTest which used the
same key names but didn't clean up properly.
Alexander Köplinger [Mon, 5 Sep 2016 11:42:57 +0000 (13:42 +0200)]
Merge pull request #3505 from ntherning/fix-resource-lookup-in-ResourceReaderTest-on-mono-on-windows
Lookup of test resource files in ResourceReaderTest fails on Windows
Niklas Therning [Mon, 5 Sep 2016 11:21:28 +0000 (13:21 +0200)]
Prevent ModuleTest failures due to too long temp folder path on Windows
On Windows the TearDown() cannot delete the temp folder since it contains
loaded assemblies. The next time the test is run it will create a temp folder
inside the previous folder. After a number of runs the temp folder path will
approach the ~260 max path supported on Windows and some of the methods will
start failing.
This patch changes the way the temp folder is created and reduces the depth in
the same way as AssemblyTest was patched to fix a similar issue in
b90617e7b7a9ecd501abc65d171d97163ce4ee3d.
Vlad Brezae [Mon, 5 Sep 2016 11:12:00 +0000 (14:12 +0300)]
[sgen] Remove unused parameter
We never do nursery collections as part of the concurrent finishing pause
Niklas Therning [Thu, 1 Sep 2016 14:34:49 +0000 (16:34 +0200)]
Lookup of test resource files in ResourceReaderTest fails on Windows
Removed the differing code paths in FixtureSetUp() when running on non-Windows
platforms vs when running Mono on Windows or on .NET. The path previously
taken only on non-Windows platforms has been verified to work as expected on
both Mono on Windows and on .NET.
Alexander Köplinger [Sun, 4 Sep 2016 18:11:36 +0000 (20:11 +0200)]
[Dataflow] Bump timeouts in TransformBlockTest.DeferredUsage
It failed a couple of times according to the babysitter logs with the following error:
```
MESSAGE:
Expected and actual are both <System.Int32[10]>
Values differ at index [1]
Expected: -1
But was: 0
```
Bump timeouts a little bit to see if this helps.
Alexander Köplinger [Sun, 4 Sep 2016 09:12:01 +0000 (11:12 +0200)]
Merge pull request #3514 from ntherning/more-reliable-g_get_home_dir-on-windows
Prefer SHGetKnownFolderPath() in g_get_home_dir() over HOMEDRIVE/HOMEPATH environment variables
Alex Rønne Petersen [Sat, 3 Sep 2016 20:14:16 +0000 (22:14 +0200)]
Merge pull request #3517 from alexrp/master
[man] Update mprof-report.1 to cover new profiler options.
Niklas Therning [Fri, 2 Sep 2016 19:52:57 +0000 (21:52 +0200)]
Prefer SHGetKnownFolderPath() in g_get_home_dir() over HOMEDRIVE/HOMEPATH
environment variables
Relying on the HOMEDRIVE/HOMEPATH environment variables is fragile as those
variables don't always have to be set. One such scenario is when running on a
Jenkins slave. When not set g_get_home_dir() in eglib would return NULL which
led to a crash in ves_icall_System_Environment_InternalGetHome().
This patch changes g_get_home_dir() to first try to call
SHGetKnownFolderPath() to get the current user's profile directory (i.e. home
dir). If that fails it falls back to the USERPROFILE environment variable. If
that isn't available the function will fallback to the original behavior and
try with HOMEDRIVE/HOMEPATH.
Alex Rønne Petersen [Sat, 3 Sep 2016 15:05:52 +0000 (17:05 +0200)]
[man] Update mprof-report.1 to cover new profiler options.
Also reformat some sections a bit.
Zoltan Varga [Sat, 3 Sep 2016 02:08:40 +0000 (04:08 +0200)]
[SRE] Move the resolving of user types to managed code, the runtime was not using write barriers. (#3515)
Zoltan Varga [Sat, 3 Sep 2016 00:59:20 +0000 (02:59 +0200)]
[runtime] Fix a C&P problem introduced by
d4052c556399c2ef72c79088c05a8ad6913647a6.
Zoltan Varga [Sat, 27 Aug 2016 22:27:47 +0000 (00:27 +0200)]
[SRE] Remove empty TypeBuilder:setup_generic_class () icall.
Zoltan Varga [Sat, 27 Aug 2016 22:24:31 +0000 (00:24 +0200)]
[runtime] Remove the stub of ves_icall_TypeBuilder_create_internal_class ().
Zoltan Varga [Fri, 2 Sep 2016 19:30:05 +0000 (21:30 +0200)]
[corlib] Fix the signature of a few SRE icalls, they already receive a TypeBuilder as the 'this' argument.
Aleksey Kliger (λgeek) [Fri, 2 Sep 2016 14:31:42 +0000 (10:31 -0400)]
Merge pull request #3446 from lambdageek/bug-42584
[loader] Check for ReferenceAssemblyAttribute when loading
Marek Safar [Fri, 2 Sep 2016 14:21:25 +0000 (16:21 +0200)]
[mcs] Adjust correctly newline counter inside pragma warning
Marek Safar [Fri, 2 Sep 2016 13:37:56 +0000 (15:37 +0200)]
[corlib] Add timeout to failing test
Marek Safar [Fri, 2 Sep 2016 13:01:32 +0000 (15:01 +0200)]
Merge pull request #3506 from ntherning/make-ZoneTest-succeed-on-mono-on-windows
Make Zone.CreateFromUrl() work with URLs like file://C:\foo\bar
Marek Safar [Fri, 2 Sep 2016 09:25:15 +0000 (11:25 +0200)]
Merge pull request #3452 from ntherning/fix-AppDomainSetupTest-on-windows
Validate AppDomainSetup.ApplicationBase path more like .NET does
Henric Müller [Fri, 2 Sep 2016 09:06:28 +0000 (11:06 +0200)]
Not reusing sockets in dual mode tests
Creating new sockets between each connect instead of
trying to reuse the client socket. The original tests
was not working in the MS .NET runtime and socket reuse
is not recommended to use unless in very special cases.
Marek Safar [Fri, 2 Sep 2016 09:01:17 +0000 (11:01 +0200)]
[System.Core] Allow TryConvert to return null for any reference types (not only object). Fixes #41509
Aleksey Kliger [Fri, 26 Aug 2016 18:10:25 +0000 (14:10 -0400)]
[runtime] Check for ReferenceAssemblyAttribute when loading for execution.
Aleksey Kliger [Thu, 25 Aug 2016 21:16:05 +0000 (17:16 -0400)]
[loader] Tests for RefereceAssemblyAttribute support
Aleksey Kliger [Tue, 23 Aug 2016 15:51:39 +0000 (11:51 -0400)]
[runtime] Add mono_assembly_get_reference_assembly_attribute
Checks whether the given assembly has the
System.Runtime.CompilerServices.ReferenceAssemblyAttribute applied.
Rodrigo Kumpera [Thu, 1 Sep 2016 21:49:32 +0000 (17:49 -0400)]
Merge pull request #3455 from kumpera/abort_cctor
[runtime] Don't abort .cctors. Fixes #43320
Ludovic Henry [Thu, 1 Sep 2016 19:22:51 +0000 (21:22 +0200)]
[mono-threads] Factor common platform create thread code (#3484)
Miguel de Icaza [Thu, 1 Sep 2016 16:58:48 +0000 (12:58 -0400)]
Bundle other options (#3501)
* [mkbundle] add support for baking environment variables, make endian-independent
* [runtime] Bundle support, implement missing stream processing
Alexander Köplinger [Thu, 1 Sep 2016 16:17:46 +0000 (18:17 +0200)]
Merge pull request #3498 from mattleibow/bug-41723
[Mono.Data.Sqlite] Added checks for entry point existence
Niklas Therning [Thu, 1 Sep 2016 14:43:50 +0000 (16:43 +0200)]
Make Zone.CreateFromUrl() work with URLs like file://C:\foo\bar
On Windows the test used URLs like `file://C:\tmp\foo` which the
Mono.Security.Uri class was incapable of parsing. System.Uri from
referencesource parses such URLs just fine. This patch fixes the Uri class to
be able to parse such URLs. It also changes the Zone class to not throw an
exception if the Zone.CreateFromUrl() method is passed an invalid URL. Instead
the zone is set to NoZone. This seems to be how Zone in .NET behaves.
Niklas Therning [Thu, 1 Sep 2016 14:41:58 +0000 (16:41 +0200)]
Merge pull request #3503 from ntherning/fix-MarshalTest.GetHINSTANCE-on-mono-windows
Ignore the MarshalTest.GetHINSTANCE() test on Mono on Windows
Niklas Therning [Thu, 1 Sep 2016 14:41:17 +0000 (16:41 +0200)]
Merge pull request #3504 from ntherning/fix-PropertyInfoTest.ConstantValue-fails-to-delete-locked-file-on-windows
PropertyInfoTest.ConstantValue() shouldn't fail if temp file cannot be deleted
Niklas Therning [Thu, 1 Sep 2016 14:30:40 +0000 (16:30 +0200)]
PropertyInfoTest.ConstantValue() shouldn't fail if temp file cannot be deleted
Happens when running this test on Windows. Just swallow the exception if the
File.Delete() fails.
Niklas Therning [Thu, 1 Sep 2016 14:25:01 +0000 (16:25 +0200)]
Ignore the MarshalTest.GetHINSTANCE() test on Mono on Windows
Won't work on Mono even when running on Windows.
Matthew Leibowitz [Thu, 1 Sep 2016 14:02:44 +0000 (16:02 +0200)]
[Mono.Data.Sqlite] Using the Version class to do the version comparison correctly
Miguel de Icaza [Thu, 1 Sep 2016 13:22:16 +0000 (09:22 -0400)]
Typo fix
Jo Shields [Thu, 1 Sep 2016 13:21:15 +0000 (14:21 +0100)]
Add a man page for cert-sync (#3424)
Zoltan Varga [Thu, 1 Sep 2016 11:34:00 +0000 (13:34 +0200)]
[runtime] Add a mono_threads_close_thread_handle () function and use it to close thread handles instead of CloseHandle (). (#3497)
Bernhard Urban [Thu, 1 Sep 2016 05:22:17 +0000 (07:22 +0200)]
Merge pull request #3492 from lewurm/fix-insert-insn
[mini] emit sequence point before branching off for tail call [was: respect seq points when adding instruction at end of block]
monojenkins [Thu, 1 Sep 2016 02:40:12 +0000 (03:40 +0100)]
Merge pull request #3499 from kumpera/fix_logging
[logging] Ensure glib logging redirection and remove unwanted new pub api functions.
Matthew Leibowitz [Thu, 1 Sep 2016 02:09:00 +0000 (04:09 +0200)]
[Mono.Data.Sqlite] Instead of try/catch and dlopen/dlsym, use a cross-platform, correct way of determining API features: version
Rodrigo Kumpera [Thu, 1 Sep 2016 00:49:48 +0000 (17:49 -0700)]
[threading] Update comments.
Rodrigo Kumpera [Wed, 31 Aug 2016 00:12:22 +0000 (17:12 -0700)]
[runtime] Introduce abort protected blocks. Use it within async invokes and unhandled exceptions.
There are a few places in the runtime that should not be aborted as it would render it unusable.
cctor execution was the initial trigger for this changeset, but then edge triggering of TAE turned out
to expose this issue on other places.
This patch introduces those regions and apply them to the following places:
ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke: Not delivering the completed CB
screws up any completion logic the user setup up.
mono_unhandled_exception: Protect delivery of the unhandled exception. Can't fail during it or we'll
effectively double fault and abort.
Rodrigo Kumpera [Thu, 25 Aug 2016 23:51:25 +0000 (16:51 -0700)]
[runtime] Add test for the interactions between thread abort and .cctors.
This covers bug #43320
Rodrigo Kumpera [Thu, 25 Aug 2016 23:39:50 +0000 (16:39 -0700)]
[runtime] Don't start aborting a thread if it's running any .cctor. Fixes #43320.
A thread abort must not start if the thread is running a .cctor.
OTOH, if the cctor self aborts, it should start.
Threads now track how many cctors they are running in the cctor_exec_depth variable.
The abort machinery (in async_abort_critical) checks that flag and bail from
starting the abort.
The cctor code (in mono_runtime_class_init_full) ensures that cctor_exec_depth is bumped
around execution of the cctor itself. Additionally, error handling was cleaned up as it was pretty
inconsistent.
Rodrigo Kumpera [Thu, 25 Aug 2016 23:37:36 +0000 (16:37 -0700)]
[runtime] Add mono_current_thread_has_handle_block_guard callback to the runtime EH callbacks.
This callback allows the runtime to query mini on whether there's a block guard in play.
It allows for the runtime to correctly decide when to start an abort.