[Mono-bugs] [Bug 31470][Nor] Changed - unnecessary leave after throw
4 Oct 2002 08:58:02 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/31470 Fri Oct 4 00:20:50 2002
+++ shadow/31470.tmp.25986 Fri Oct 4 04:58:02 2002
@@ -3,13 +3,13 @@
@@ -174,6 +174,32 @@
I do not know that this can be fixed with MCS at all
------- Additional Comments From email@example.com 2002-10-04 00:20 -------
Resetting priority to minor for now.
I think this should be worked around in our runtime
+------- Additional Comments From firstname.lastname@example.org 2002-10-04 04:58 -------
+The code si invalid IL code, there is no way to work around this mcs
+bug (caused by a reflection API misfeature).
+The fix in the runtime is to throw an InvalidProgramException and
+avoid the loop, but there is no way that kind of code can be executed.
+mcs needs to guarantee that at the end of the exception blocks
+there is some IL code (either from the C# code or generated
+automatically by mcs).
+You should ask martin how he solved the other bug I referenced above
+(there is some discussion in that bug report, too).
+I don't know how martin fixed the other case, but here is my
+suggestion: after each EndExceptionBlock() call mcs should check if
+it needs to emit some more code (as part of the method).
+If there is no more code to emit, mcs needs to guarantee that the
+method has valid IL code and as such, it needs to insert something
+ newobj [mscorlib]System.Exception::.ctor()
+This is the easiest thing to do since you don't have to deal with
+returning a value if the method doesn't return void.
+Note that this code is never executed anyway, but it needs to be there
+for the code to be valid.
+Also note that mcs produces the invalid code also when running on the