David Curylo | 31 Jan 04:47 2015

IndexOutOfRangeException in UriTemplate.Match

I ran into a small problem with UriTemplate on mono vs. .NET.  The code below works on .NET, but raises an
IndexOutOfRangeException on mono:

var uriTemplate = new System.UriTemplate("/{mystuff}/*", true);
uriTemplate.Match(new Uri("http://server"), new Uri("http://server/mystuff/path?blah"));

The problem is here: https://github.com/mono/mono/blob/master/mcs/class/System.ServiceModel.Web/System/UriTemplate.cs#L324

The query parameters are split on ‘=‘ but nothing checks that there are two values in the resulting
array before trying to access the second element.

PR: https://github.com/mono/mono/pull/1542

Etienne Champetier | 30 Jan 17:38 2015

mono scl packages


I'm trying to compile scl rpm of mono, but it fails to generate the debug rpm,
which should not be generated (%global debug_package %{nil})
I'm building on a rhel 6.5.

Is there anyone that has succesfully build scl rpm of mono on this mailing list?
the idea is to be able to install multiple major version of one software in parallel.
to do it you install everything in /opt/<vendor>/<software><major version>/..., and when you want to use it you add this path in your PATH env (and maybe some other var)

Thanks in advance
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
zvonimir | 29 Jan 01:54 2015

NUnit versions that come with mono

Hi all,

So I am having trouble understanding (and upgrading) NUnit versions that
come with mono.

In particular, it seems that on openSUSE mono 3.8.0 comes with NUnit 2.4.8.
On the other hand, on Ubuntu mono 3.2.8 seems to come with NUnit 2.6.0.
I find this to be a bit bizarre since it seems that a higher version of mono
comes by default with a lower version if NUnit :). This causes portability
issues with respect to NUnit and So I would appreciate if somebody could
clarify these choices.

In addition, I would also like to know how I could update the default
version of NUnit. Is there a simple way of doing that?

Thanks a lot in advance!

View this message in context: http://mono.1490590.n4.nabble.com/NUnit-versions-that-come-with-mono-tp4665376.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
Jerry Maine | 28 Jan 19:59 2015

llvm and mini

I am wondering if mono could have (or already has) a feature that could use mini (the current jit) to quickly compiling code and then recompile certain critical pieces with llvm if warranted and want would it take to develop it if mono does not have it already.
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
Jo Shields | 27 Jan 22:15 2015

Visual Studio project files - update to 2013?

Dear all,

We're currently considering upgrading the Visual Studio project files
for the Mono runtime to require VS2013 as a minimum, rather than 2012.

This introduces two major features for us - it means C99 compatibility
so we can clean up the runtime to use standard C99 types throughout, and
2013 has a fully-featured gratis "community" edition which would allow
any Windows-based contributor to hack on the Mono runtime without
handing thousands of dollars over to Microsoft for Visual Studio Pro.

How does the rest of the list feel about it? I'm very much pro - I use
VS2013CE to build the new Windows packages of Mono.
David Nelson | 27 Jan 07:59 2015

Compiling and executing untrusted code from a managed application

I want to be able to compile and execute untrusted code at runtime
from within a managed (C#) application. I have accomplished this in
.NET by compiling the code to an assembly on disk, creating a new
AppDomain with a limited permission set, and loading the compiled
assembly into that domain. Unfortunately this does not work in Mono;
the limited permissions are not respected and the dangerous code runs

There is something called the Mono Sandbox, but it apparently has to
be enabled by the unmanaged host of the managed runtime. I am looking
for a solution that only involved managed code. The only thing I have
come up with so far is analyzing the compiled code with Mono.Cecil and
looking for anything dangerous.

Is there a more straightforward solution for this that I am missing?

Edward Ned Harvey (mono | 27 Jan 05:12 2015

What will happen if Dispose() hangs?

When I call SslStream.Dispose(), the thread simply hangs indefinitely.  (Well, I didn't wait forever; only a few minutes, which is longer than the underlying TcpClient timeout periods.)


Obviously this is a bug, but my question is - What if I simply ignore the problem, and don't call Dispose, and just drop reference to the SslStream?  Presumably the GC will call finalizer, which will then call Dispose().  Will the GC thread also hang?  Will it put mono into a bad state?  What could possibly go wrong?


Possibly related - I observed that when I set TcpClient read & write timeouts, they seem to have no effect.  Set to 60000 (60sec), wait a few minutes on a Read or Write (actually BeginRead/EndRead, or synchronous Write) and nothing happens.  Thread just blocks indefinitely or the end method is never called.

Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
Jonathan Purdy | 27 Jan 02:45 2015

Re. PR 1501: Mark hot functions in the runtime.

In this pull request[1] I add GCC/Clang’s “__attribute__((hot))” to various hot GC functions. This increases code size a small amount, and makes a very small improvement in performance—see the attached graph. I think actually marking some slow-path/error-handling functions as “__attribute__((cold))” would do more to improve branch prediction in cases where we haven’t marked things as “G_UNLIKELY”.

Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
Paul Knopf | 26 Jan 04:27 2015

Compiling mono with custom rpath/dynamic-linker

Can someone please guide my on compiling mono, pointing to a custom /lib directory for a side-by-side installation of the glibc libraries?

Does ./configure support setting --rpath and --dynamic-linker? If not, can someone please guide me where to add them in the make file?


Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
Philip Garrett | 24 Jan 23:40 2015

Custom messaging provider doesn't seem to work

Mono.Messaging allows you to specify a custom messaging provider in the MONO_MESSAGING_PROVIDER
appsetting. But it appears only to work with the RabbitMQ provider that’s packaged with Mono. Any value
other than the pre-approved provider class name (or its alias) makes MessagingProviderLocator throw an
exception in the static constructor. (1)

Is this intentional or is it a bug/missing feature? Would a patch to allow any custom IMessagingProvider be welcomed?


(1) https://github.com/mono/mono/blob/effa4c07ba850bedbe1ff54b2a5df281c058ebcb/mcs/class/Mono.Messaging/Mono.Messaging/MessagingProviderLocator.cs#L90
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
Greg Young | 24 Jan 19:54 2015

mono_signature_get_desc segfaults

  0 static char *
  1 get_method_name(MonoProfiler *profiler, MonoMethod *method) {
  2     MonoClass *klass = mono_method_get_class (method);
  3     if(klass == NULL) return NULL;
  4     char *signature = (char*) mono_signature_get_desc
(mono_method_signature (method), 0);
  5     if(signature == NULL) return NULL;
  6     const char *namespace = mono_class_get_namespace (klass);
  7     const char *klassname = mono_class_get_name (klass);
  8     const char *methodname = mono_method_get_class (method);
  9     //g_free (signature);
 10     char *name = g_strdup_printf ("%s.%s:%s (%s)",
 11                                  mono_class_get_namespace (klass),
 12                                  mono_class_get_name (klass),
 13                                  mono_method_get_name (method),
 14                                  signature);
 15     return name;
 16 }

I have been able to get it to happen rather reliably that I appear to
get back something that is a bad pointer from mono_signature_get_desc.
I am not seeing anything obviously wrong in how I am calling it but
will get a segv occasionally on the strdup_printf here. Not using the
signature makes issue go away but isnt much help:)

Am I missing something in how I should be calling get_desc? The
MonoMethod was handed to me by the runtime...




Studying for the Turing test