[Mono-bugs] [Bug 363799] Mono ignores a try/catch block

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 22 04:30:57 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=363799

User kornelpal at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=363799#c3





--- Comment #3 from Kornél Pál <kornelpal at gmail.com>  2008-02-22 02:30:57 MST ---
I didn't see previously that you submitted and IL code as well.

Your test assumes that methods calling other methods are not inlined. That is
currently true for Mono but should not be assumed. Use "noinlining" instead
that disables inlining by purpose.

Note that you are calling the missing method in TestMethod as well as in
NoInline that may be a bug in your code. Also note that you leave an int32 on
the stack in NoInline so you would get an InvalidProgramException even when the
missing method were present.

You are unable to catch the execption because your code gets inlined.
It's quite simple to fix the problem:

--- bug-363799_call_missing_method_generated.il 2008-02-22 09:47:39.640625000
+0100
+++ bug-363799_call_missing_method_generated_noinline.il        2008-02-22
10:22:10.812500000 +0100
@@ -36,7 +36,7 @@
                ret
        }

-       .method public static void TestMethod() cil managed
+       .method public static void TestMethod() cil managed noinlining
        {
                .maxstack 8
                call void Driver::NoInline()


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list