[Mono-list] Remaining S/390 JIT issues

Neale.Ferguson@SoftwareAG-USA.com Neale.Ferguson@SoftwareAG-USA.com
Tue, 13 Jul 2004 13:46:59 -0400


This is a multi-part message in MIME format.

------_=_NextPart_001_01C46901.65E220D9
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

There's a couple of idiosycracies with S390. For example, in the =
exception8 test:

using System;

public class TryTest {
        public static void ThrowException() {
                throw new Exception();
        }

        public static int Main() {
                int state =3D 0;

                try {
                        ThrowException();
                        try {
                                Console.WriteLine("In try block");
                        } catch (Exception e) {
                                state =3D 1;
                                =
Console.WriteLine("------------------------");
                                Console.WriteLine(e);
                                =
Console.WriteLine("------------------------");
                        }
                } catch {
                        state =3D 2;
                }

                if (state !=3D 2)
                        return 1;

                Console.WriteLine("OK");
                return 0;
        }
}

The result of the ThrowException() is that the IP is pointing at the =
first instruction of the "try { Console.WriteLine ("In try Block");" =
block so that the test in mono_handle_exception()

if (ei->try_start <=3D MONO_CONTEXT_GET_IP (ctx) &&

would result in the wrong catch being used to field the exception.


-----Original Message-----
                     Hi,

  Great work ! You might want to try modifying the S390 port
to use the
arch-independent exception handling code in mini-exceptions.c.=20


------_=_NextPart_001_01C46901.65E220D9
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-2">
<TITLE></TITLE>

<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<P><FONT size=3D2><FONT color=3D#0000ff>There's a couple of =
idiosycracies with S390.=20
For example, in the exception8 test:</FONT><BR><BR><FONT=20
face=3D"Courier New">using System;<BR><BR>public class TryTest=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void=20
ThrowException()=20
{<BR>&nbsp;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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
} catch=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
state =3D=20
2;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;=20
if (state !=3D=20
2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
return=20
1;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Console.WriteLine("OK");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
return 0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR>}<BR></FONT><BR><FONT color=3D#0000ff>The result of the</FONT> =
<FONT=20
face=3D"Courier New">ThrowException()</FONT> <FONT color=3D#0000ff>is =
that=20
the&nbsp;IP is pointing at the first instruction of the "</FONT><FONT=20
face=3D"Courier New">try { Console.WriteLine ("In try =
Block");</FONT><FONT=20
color=3D#0000ff>" block so that the test in </FONT><FONT=20
face=3D"Courier New">mono_handle_exception()</FONT><BR><BR><FONT=20
face=3D"Courier New">if (ei-&gt;try_start &lt;=3D MONO_CONTEXT_GET_IP =
(ctx)=20
&amp;&amp;</FONT><BR><BR><FONT color=3D#0000ff>would result in the wrong =
catch=20
being used to field the exception.<BR></FONT><BR><BR>-----Original=20
Message-----<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Hi,<BR><BR>&nbsp; Great work ! You might want to try modifying the S390=20
port<BR>to use the<BR>arch-independent exception handling code in=20
mini-exceptions.c.</FONT> </P></BODY></HTML>

------_=_NextPart_001_01C46901.65E220D9--