From 04bf9add68f9ae443fc5befa11070d0d465f707e Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Tue, 28 May 2013 20:03:52 -0400 Subject: [PATCH] Avoid direct recursion when computing the exceptions of a method. * exceptions.cs: When Filling the exceptions of a method make sure to not recurse on the methods itself as this can lead to a stackoverflow. --- mcs/tools/mdoc/Mono.Documentation/exceptions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mcs/tools/mdoc/Mono.Documentation/exceptions.cs b/mcs/tools/mdoc/Mono.Documentation/exceptions.cs index 9929998565c..b8a58c42dde 100644 --- a/mcs/tools/mdoc/Mono.Documentation/exceptions.cs +++ b/mcs/tools/mdoc/Mono.Documentation/exceptions.cs @@ -145,6 +145,10 @@ namespace Mono.Documentation { body.Method.DeclaringType.Scope.Name == memberRef.DeclaringType.Scope.Name) || ((locations & ExceptionLocations.DependentAssemblies) != 0 && body.Method.DeclaringType.Scope.Name != memberRef.DeclaringType.Scope.Name)) { + + if (memberRef.Resolve () == body.Method) + break; + IEnumerable memberExceptions = this [memberRef]; AddExceptions (body, instruction, memberExceptions.Select (es => es.Exception), -- 2.11.4.GIT