From c1c7e8a161c98f7a7c76d59c08de55badb106322 Mon Sep 17 00:00:00 2001 From: jfrijters Date: Mon, 29 Aug 2011 06:36:08 +0000 Subject: [PATCH] Bug fix. Exception blocks inside potential try { } finally { } blocks were not handled correctly. Could result in finally blocks that run multiple times (when an exception occurs). --- runtime/verifier.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/verifier.cs b/runtime/verifier.cs index f611a43f..2787408e 100644 --- a/runtime/verifier.cs +++ b/runtime/verifier.cs @@ -3441,7 +3441,7 @@ sealed class MethodAnalyzer nextIsReachable = false; for (int j = 0; j < exceptions.Length; j++) { - if (j != exceptionIndex && exceptions[j].startIndex <= exception.startIndex && exception.endIndex <= exceptions[j].endIndex) + if (j != exceptionIndex && exceptions[j].startIndex >= exception.startIndex && exception.endIndex <= exceptions[j].endIndex) { UpdateTryBlockExit(exception, exceptions[j].handlerIndex, ref exit, ref fail); }