Neale [Tue, 22 Dec 2015 20:45:56 +0000 (15:45 -0500)]
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, ¶m) == -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;
}
João Matos [Fri, 8 Jan 2016 18:00:49 +0000 (18:00 +0000)]
Merge pull request #2411 from rolfbjarne/parse-debug-optionsapi-doc
Document mini_parse_debug_option
Rolf Bjarne Kvinge [Fri, 8 Jan 2016 17:35:09 +0000 (18:35 +0100)]
[mini] Document mini_parse_debug_option.
Rolf Bjarne Kvinge [Fri, 8 Jan 2016 17:34:57 +0000 (18:34 +0100)]
[mini] Rename mini_parse_debug_option's argument to match the header file (and match better the usage).
Rolf Bjarne Kvinge [Fri, 8 Jan 2016 17:32:16 +0000 (18:32 +0100)]
[man/mono.1] Fix typo.
João Matos [Fri, 8 Jan 2016 15:26:25 +0000 (15:26 +0000)]
Merge pull request #2363 from eriklarko/master
SpecialFolder.CommonApplicationData support for El Capitan
João Matos [Fri, 8 Jan 2016 15:15:30 +0000 (15:15 +0000)]
Merge pull request #2410 from steffen-kiess/fix-monop
[monop] Fix NullReferenceException in monop
Steffen Kieß [Fri, 8 Jan 2016 15:04:03 +0000 (16:04 +0100)]
[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.
Zoltan Varga [Fri, 8 Jan 2016 15:02:33 +0000 (10:02 -0500)]
[llvmonly] Extract the runtime invoke code into a separate function.
João Matos [Fri, 8 Jan 2016 14:03:32 +0000 (14:03 +0000)]
Merge pull request #2390 from schani/feature-bisector
Automatic optimization bug bisector.
João Matos [Fri, 8 Jan 2016 13:39:22 +0000 (13:39 +0000)]
Merge pull request #2409 from rolfbjarne/parse-debug-options-api
[runtime] Add API to set debug options without going through MONO_DEBUG.
Zoltan Varga [Fri, 8 Jan 2016 12:34:47 +0000 (07:34 -0500)]
[aot] Print the number of different kinds of methods when printing stats.
Rolf Bjarne Kvinge [Fri, 8 Jan 2016 12:31:03 +0000 (13:31 +0100)]
[runtime] Add API to set debug options without going through MONO_DEBUG.
This is useful for embedders.
Zoltan Varga [Fri, 8 Jan 2016 12:12:52 +0000 (07:12 -0500)]
[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.
Zoltan Varga [Fri, 8 Jan 2016 11:13:28 +0000 (06:13 -0500)]
[llvmonly] Enable some tests which now work.
Zoltan Varga [Fri, 8 Jan 2016 11:09:28 +0000 (06:09 -0500)]
[llvmonly] Fix support for gsharedvt delegate invoke wrappers, they need to dynamically check whenever the called method uses a gsharedvt calling conv.
Zoltan Varga [Fri, 8 Jan 2016 11:08:47 +0000 (06:08 -0500)]
[amd64] Only use the gsharedvt calling conv for variable sized gsharedvt arguments.
Zoltan Varga [Fri, 8 Jan 2016 11:04:44 +0000 (06:04 -0500)]
[runtime] Set the wrapper info correctly for generic delegate-invoke wrappers.
João Matos [Fri, 8 Jan 2016 00:43:11 +0000 (00:43 +0000)]
Merge pull request #2406 from vkargov/master
Fix the format statements in mono-gdb.
Vladimir Kargov [Thu, 7 Jan 2016 23:37:14 +0000 (15:37 -0800)]
Fix the format statements in mono-gdb.
Zoltan Varga [Thu, 7 Jan 2016 20:59:50 +0000 (15:59 -0500)]
[ppdb] Fail fast when trying to load an .mdb file from memory.
Zoltan Varga [Thu, 7 Jan 2016 20:29:03 +0000 (15:29 -0500)]
[llvmonly] Share more signatures.
Zoltan Varga [Thu, 7 Jan 2016 18:08:26 +0000 (13:08 -0500)]
[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.
Zoltan Varga [Thu, 7 Jan 2016 17:39:53 +0000 (12:39 -0500)]
[llvmonly] Remove the old llvmonly runtime support code, its not needed anymore.
Jonathan Pryor [Thu, 7 Jan 2016 16:06:54 +0000 (11:06 -0500)]
Merge pull request #2333 from joelmartinez/docs-classic-fix
[mdoc] Added -api-style parameter.
Rolf Bjarne Kvinge [Thu, 7 Jan 2016 12:37:54 +0000 (13:37 +0100)]
Bump referencesource to get changes for multiple appdomain removal.
Rolf Bjarne Kvinge [Wed, 16 Dec 2015 18:20:33 +0000 (19:20 +0100)]
[corlib] Remove multiple appdomain support (AppDomain.CreateDomain, etc) from tvOS/watchOS.
Zoltan Varga [Thu, 7 Jan 2016 11:58:41 +0000 (06:58 -0500)]
[llvm] Fix support for aot data files.
Zoltan Varga [Thu, 7 Jan 2016 11:43:11 +0000 (06:43 -0500)]
[llvmonly] Remove some duplicate code.
Zoltan Varga [Wed, 6 Jan 2016 16:56:09 +0000 (11:56 -0500)]
[llvmonly] Share more signatures in the gsharedvt in/out wrappers.
Zoltan Varga [Wed, 6 Jan 2016 16:55:31 +0000 (11:55 -0500)]
[llvmonly] Fix a case where a non-virtual method was called using callvirt.
Joel Martinez [Fri, 11 Dec 2015 21:19:57 +0000 (16:19 -0500)]
[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.
Rolf Bjarne Kvinge [Wed, 6 Jan 2016 12:56:43 +0000 (13:56 +0100)]
[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.
Zoltan Varga [Wed, 6 Jan 2016 12:57:59 +0000 (07:57 -0500)]
[runtime] Fix the DISABLE_JIT build.
Zoltan Varga [Wed, 6 Jan 2016 12:51:12 +0000 (07:51 -0500)]
[llvmonly] Add support for runtime invokes with nullable arguments.
Alex Rønne Petersen [Wed, 6 Jan 2016 10:32:28 +0000 (11:32 +0100)]
Merge pull request #2174 from stukselbax/master
[WCF] WebHttpBinding must use http scheme in case when SecurityMode == WebHttpSecurityMode.TransportCredentialOnly
Zoltan Varga [Wed, 6 Jan 2016 09:56:06 +0000 (04:56 -0500)]
[llvmonly] Implement runtime invokes to gsharedvt methods.
Zoltan Varga [Wed, 6 Jan 2016 08:59:01 +0000 (03:59 -0500)]
[jit] Fix the handling of virtual generic methods on interfaces in the delegate virtual invoke optimization. Fixes #37436.
Martin Baulig [Tue, 5 Jan 2016 20:37:43 +0000 (15:37 -0500)]
Revert "[corlib] Fixed the mobile build in System.Security.Cryptography.X509Certificates."
This reverts commit
0ed6c0f5bf88090b71d2c132ae4e49e3b365f803.
Zoltan Varga [Tue, 5 Jan 2016 19:55:46 +0000 (14:55 -0500)]
[amd64] Enable LLVM for more parameter passing conventions.
Martin Baulig [Tue, 5 Jan 2016 18:31:19 +0000 (13:31 -0500)]
[bcl]: Fix 'mobile_static' build.
Zoltan Varga [Tue, 5 Jan 2016 17:30:03 +0000 (12:30 -0500)]
[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.
Martin Baulig [Tue, 5 Jan 2016 17:13:24 +0000 (12:13 -0500)]
Merge pull request #2401 from alexanderkyte/mobile_static_fixes
Minor mobile-static profile fixes
Aleksey Kliger (λgeek) [Tue, 5 Jan 2016 16:45:22 +0000 (11:45 -0500)]
Merge pull request #2385 from lambdageek/dev/checked-imageset-subset
[checked] ImageSet may reference corlib implicitly in another ImageSet.
Alexander Kyte [Tue, 5 Jan 2016 16:38:06 +0000 (11:38 -0500)]
[bcl] Fix Win32 network api exclusion on non-monodroid mobile
Alexander Kyte [Tue, 5 Jan 2016 16:36:32 +0000 (11:36 -0500)]
[bcl] Take mobile_static profile into account in preprocessor directive
Joao Matos [Tue, 5 Jan 2016 15:26:05 +0000 (15:26 +0000)]
[Mono.Security] Fixed bootstrap build.
Martin Baulig [Thu, 17 Dec 2015 23:13:13 +0000 (18:13 -0500)]
[System]: Cleanup the internal 'MonoTlsProviderFactory'.
Martin Baulig [Sat, 12 Dec 2015 17:50:14 +0000 (12:50 -0500)]
[System]: Include Mono.Security sources in XamMac profile to make it consistent with the other mobile profiles.
Martin Baulig [Sun, 13 Dec 2015 07:09:24 +0000 (02:09 -0500)]
[Mono.Security]: Add MonoTlsProviderFactory.GetMonoSslStream(SslStream).
Martin Baulig [Sun, 13 Dec 2015 05:20:23 +0000 (00:20 -0500)]
[Mono.Security]: Add 'IMonoSslStream.Provider' and 'GetConnectionInfo()'.
Martin Baulig [Sat, 12 Dec 2015 18:15:10 +0000 (13:15 -0500)]
Fix some compiler warnings in Mono.Security and System.
Martin Baulig [Sat, 12 Dec 2015 18:05:39 +0000 (13:05 -0500)]
[System]: Only use the 'MONO_SECURITY_ALIAS' conditional to determine whether or not to use 'extern alias MonoSecurity'.
Alexander Köplinger [Tue, 5 Jan 2016 15:35:07 +0000 (16:35 +0100)]
Merge pull request #2396 from akoeplinger/flaky-osx-socket-test
[System] Fix flaky AcceptBlockingStatus test that sometimes failed on OSX
Zoltan Varga [Tue, 5 Jan 2016 15:30:59 +0000 (10:30 -0500)]
Revert "[amd64] Remove some restrictions on passing/returning vtypes in registers."
This reverts commit
25105bd605a078ea399b8ae21cf151cba29c6e9b.
Revert this as it breaks tests.
Zoltan Varga [Tue, 5 Jan 2016 14:06:19 +0000 (09:06 -0500)]
[runtime] Fix the loaded llvm build.
Zoltan Varga [Tue, 5 Jan 2016 10:32:53 +0000 (05:32 -0500)]
[runtime] Allocate a parameter array in mono_jit_runtime_invoke () using g_alloca.
Zoltan Varga [Tue, 5 Jan 2016 10:30:45 +0000 (05:30 -0500)]
[amd64] Remove some restrictions on passing/returning vtypes in registers.
Zoltan Varga [Mon, 4 Jan 2016 20:58:47 +0000 (15:58 -0500)]
[jit] Disable the support for -O=shared, use it only for icall wrappers.
Zoltan Varga [Mon, 4 Jan 2016 19:38:37 +0000 (14:38 -0500)]
[llvmonly] Introduce a MonoFtnDesc structure to represent an address+argument pair, use this to explicitly mark functions returning function descriptors.
Zoltan Varga [Mon, 4 Jan 2016 19:08:06 +0000 (14:08 -0500)]
[llvmonly] Remove some jit icalls which are no longer used.
Zoltan Varga [Mon, 4 Jan 2016 19:01:44 +0000 (14:01 -0500)]
[llvmonly] Add an optimized implementation for generic virtual calls on interfaces.
Zoltan Varga [Mon, 4 Jan 2016 18:09:05 +0000 (13:09 -0500)]
[llvmonly] Clean up the optimized virtual call code a bit.
Marek Safar [Mon, 4 Jan 2016 17:44:17 +0000 (18:44 +0100)]
[System] Fixes Process::WaitForExit to honour EnableRaisingEvents setting
Zoltan Varga [Mon, 4 Jan 2016 16:40:10 +0000 (11:40 -0500)]
[llvmonly] Add an optimized implementation for generic virtual calls.
Alexander Köplinger [Mon, 4 Jan 2016 15:48:58 +0000 (16:48 +0100)]
[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.
Zoltan Varga [Mon, 4 Jan 2016 15:25:23 +0000 (10:25 -0500)]
[aot] Add another special case for wrappers+gshared methods.
Alexander Köplinger [Mon, 4 Jan 2016 15:11:04 +0000 (16:11 +0100)]
Merge pull request #2393 from akoeplinger/servicemodel-collection-modified
[System.ServiceModel] Fix "collection was modified" exception in tests
Marek Safar [Mon, 4 Jan 2016 14:01:26 +0000 (15:01 +0100)]
Bumpr reference source for mobile profile fixes
Marek Safar [Mon, 4 Jan 2016 13:23:18 +0000 (14:23 +0100)]
[mcs] Fixes typo
Marek Safar [Mon, 4 Jan 2016 08:31:05 +0000 (09:31 +0100)]
Merge pull request #2395 from akoeplinger/rijndael
[corlib] Remove RijndaelManaged test that makes no sense with referencesource impl
Alexander Köplinger [Sun, 3 Jan 2016 16:11:46 +0000 (17:11 +0100)]
[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
Alexander Köplinger [Sun, 3 Jan 2016 16:06:24 +0000 (17:06 +0100)]
[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.
Joao Matos [Sun, 3 Jan 2016 14:55:13 +0000 (14:55 +0000)]
[mini] Fixed non-JIT runtime support in generic sharing.
Joao Matos [Sun, 3 Jan 2016 00:13:31 +0000 (00:13 +0000)]
[corlib] Fixed the mobile build in System.Security.Cryptography.X509Certificates.
Zoltan Varga [Sun, 3 Jan 2016 10:43:07 +0000 (05:43 -0500)]
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.
Zoltan Varga [Sun, 3 Jan 2016 10:17:54 +0000 (05:17 -0500)]
[runtime] Pass the vtable to the vtable/imt trampoline creation functions so they can return a vtable specific value. Not yet used.
David Karlaš [Sun, 3 Jan 2016 06:18:04 +0000 (07:18 +0100)]
Merge pull request #2380 from alexanderkyte/pdb_fix_local_vars
[runtime] Fixed off-by-one bug in local variable counting for ppdb files.
Zoltan Varga [Sun, 3 Jan 2016 05:49:38 +0000 (00:49 -0500)]
[llvmonly] Optimize virtual calls by storing a function descriptor in vtable slots, and using an icall to initialize it if needed.
Zoltan Varga [Sat, 2 Jan 2016 04:28:23 +0000 (23:28 -0500)]
[runtime] Avoid a crash if a generic type definition is passed to RuntimeHelpers.RunClassConstructor (). Fixes #37313.
Zoltan Varga [Sat, 2 Jan 2016 04:03:48 +0000 (23:03 -0500)]
[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.
Zoltan Varga [Sat, 2 Jan 2016 03:04:53 +0000 (22:04 -0500)]
[llvm] Disable support for nested clauses, it still doesn't work. Fixes #37273.
Zoltan Varga [Sat, 2 Jan 2016 01:50:51 +0000 (20:50 -0500)]
[llvm] Add missing OP_LMUL_IMM opcode.
Zoltan Varga [Sat, 2 Jan 2016 01:13:15 +0000 (20:13 -0500)]
[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.
Alexander Köplinger [Fri, 1 Jan 2016 16:25:47 +0000 (17:25 +0100)]
Merge pull request #2392 from akoeplinger/web-wizard-sharing-violation
[System.Web] Fix WizardStepBase_Theme sharing violation error during test
Alexander Köplinger [Fri, 1 Jan 2016 14:02:43 +0000 (15:02 +0100)]
[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.
Alexander Köplinger [Fri, 1 Jan 2016 11:22:39 +0000 (12:22 +0100)]
Merge pull request #2391 from Utsav2/Utsav2-patch-1
Fix typo in AL man page
Utsav Shah [Fri, 1 Jan 2016 03:56:00 +0000 (22:56 -0500)]
Fix typo
Mark Probst [Sat, 5 Dec 2015 00:30:24 +0000 (19:30 -0500)]
Automatic optimization bug bisector.
Miguel de Icaza [Thu, 31 Dec 2015 04:13:02 +0000 (23:13 -0500)]
[man/mono.1] Add details on --aot=data-outfile option
Vlad Brezae [Tue, 29 Dec 2015 22:23:31 +0000 (00:23 +0200)]
Merge pull request #2386 from BrzVlad/fix-jit
[jit] Some jit fixes
Aleksey Kliger [Mon, 28 Dec 2015 16:49:14 +0000 (11:49 -0500)]
[checked] Imageset may reference corlib implicitly in another imageset.
Vlad Brezae [Sun, 13 Dec 2015 22:13:00 +0000 (00:13 +0200)]
[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.
Vlad Brezae [Fri, 11 Dec 2015 07:17:24 +0000 (09:17 +0200)]
[jit] Fix specs for some conv instructions
Vlad Brezae [Tue, 17 Nov 2015 09:44:03 +0000 (11:44 +0200)]
[jit] Fix signed division by power of 2 optimization.
Add more division tests.
Marek Safar [Thu, 24 Dec 2015 08:04:38 +0000 (09:04 +0100)]
Merge pull request #2383 from akoeplinger/authenticated-stream-referencesource
[System] Port AuthenticatedStream from referencesources
Zoltan Varga [Thu, 24 Dec 2015 05:40:46 +0000 (00:40 -0500)]
[runtime] Move the HAVE_MOVING_COLLECTOR define to config.h instead of the command line.
Zoltan Varga [Thu, 24 Dec 2015 04:45:28 +0000 (23:45 -0500)]
[runtime] Make libmono point to libmonosgen instead of libmonoboehm.
Zoltan Varga [Thu, 24 Dec 2015 02:16:03 +0000 (21:16 -0500)]
[runtime] Make the code in mini-llvm.c more C++ compatible.
Alexander Köplinger [Thu, 24 Dec 2015 01:01:51 +0000 (02:01 +0100)]
[System] Port AuthenticatedStream from referencesources