https://bugzilla.novell.com/show_bug.cgi?id=668925
https://bugzilla.novell.com/show_bug.cgi?id=668925#c3 Sebastien Pouliot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Gendarme |Cecil AssignedTo|[email protected] |[email protected] Product|Mono: Tools |Mono: Class Libraries Target Milestone|--- |2.10.x Summary|Gendarme.Rules.Exceptions.D |ExceptionHandler.HandlerEnd |oNotDestroyStackTraceRule |does not "handle" compilers |throws |pointing past the end of |ArgumentNullException |the instructions --- Comment #3 from Sebastien Pouliot <[email protected]> 2011-02-09 02:32:05 UTC --- JB, here's my local fix. The final fix needs to be backported to 2-10 :-) diff --git a/Mono.Cecil.Cil/CodeReader.cs b/Mono.Cecil.Cil/CodeReader.cs index 4cfc7db..38ec162 100644 --- a/Mono.Cecil.Cil/CodeReader.cs +++ b/Mono.Cecil.Cil/CodeReader.cs @@ -348,7 +348,9 @@ namespace Mono.Cecil.Cil { handler.TryEnd = GetInstruction (handler.TryStart.Offset + read_length ()); handler.HandlerStart = GetInstruction (read_entry ()); - handler.HandlerEnd = GetInstruction (handler.HandlerStart.Offset + read_length ()); + // some compilers (e.g. CSC) can point past the last instruction + handler.HandlerEnd = GetInstruction (handler.HandlerStart.Offset + read_length ()) + ?? body.instructions [body.instructions.Count - 1]; ReadExceptionHandlerSpecific (handler); -- 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
