Hi,

  The current JIT sometimes miscompiles exception handling
code. Here
is an example:

        catch [mscorlib]System.Exception {
                call void class [mscorlib]System.Console::WriteLine()
                call void class [mscorlib]System.Console::WriteLine(object)
                leave IL_0030
        }

>From this, the JIT creates the following tree:

        (CALL_VOID NOP ADDR_G)
        (ARG_I4 EXCEPTION)
        (CALL_VOID NOP ADDR_G)
        RETHROW_ABORT
        BR

As can be seen above, the first call precedes the EXCEPTION
node,
which means the call will corrupt the exception object
stored in ECX.

I attached a more complete testcase for the problem.

                               bye

                                    Zoltan

Attachment: bug-catch.il
Description: Binary data

Reply via email to