[Mono-dev] Regression with Linux update

the mad mole madmole at gmail.com
Wed May 23 01:01:14 UTC 2012


I wanted to post an update for the benefit of mono maintainers.  The kernel
team of our SOC vendor was able to get (at least some of) the try-catch
tests to pass (including the example below) by disabling the XI (execute
inhibit, similar to x86 NX) feature, which was recently added to their MIPS
core (doing some research, this appears to be part of MIPS' SmartMIPS ASE,
which also includes a bunch of crypto functions).

The speculation is that some of the jitted code is getting written to pages
mapped with just PROT_READ | PROT_WRITE permissions: with XI enabled the
page would need PROT_EXEC as well.  If anyone knows when this might be
addressed, posting to this list would be much appreciated.

TMM

On Tue, May 15, 2012 at 6:49 PM, the mad mole <madmole at gmail.com> wrote:

> I have been happily running mono 2.11.1 cross-compiled for MIPS with gcc
> 4.5.3-1.2.  Out of nearly 500 runtime tests, only
> async-exc-compilation.exe  and monitor.exe were failing (hangs).  Recenly
> our SOC vendor upgraded us from 2.6.37-2.2 to -2.8, which has caused a
> significant regression in functionality: 117 of the runtime tests now
> fail.  It appears the culprit in many of the failures is the use of
> try-catch.  The following simple program demonstrates the problem:
>
> using System;
> namespace trycatch
> {
>     class MainClass
>     {
>         public static void Main (string[] args)
>         {
>             int[] array = new int[5] {10, 20, 30, 40, 50};
>             try {
>                 Console.WriteLine("Entering first try clause:");
>             } catch {
>                 Console.WriteLine("Entering first catch clause");
>             }
>             try {
>                 Console.WriteLine("Entering second try clause:
> array[5]={0}", array[5]);
>             } catch {
>                 Console.WriteLine("Entering second catch clause");
>             }
>         }
>     }
> }
> Before, the expected behavior was seen:
>
> # mono trycatch.exe
> Entering first try clause:
> Entering second catch clause
> Now, raising the exception in the second try-catch block aborts the
> program:
>
> # mono trycatch.exe
> Entering first try clause:
> Stacktrace:
>
> Aborted
> Has anyone seen behavior like this?  Any ideas where to start looking?
>
> TMM
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120522/c4c73d71/attachment.html>


More information about the Mono-devel-list mailing list