dotnet/msbuild

Prevent infinite recursion in Solution parser when a project is nested under itself

Open

#1,599 opened on 2017年1月22日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)C# (1,364 forks)batch import
Area: Solution (.sln)help wantedtriaged

Repository metrics

Stars
 (5,062 stars)
PR merge metrics
 (平均マージ 11d 7h) (30d で 125 merged PRs)

説明

We don't check for invalid project nestings in the solution file, so it's possible to create a solution that crashes MSBuild with stack overflow:

https://github.com/Microsoft/msbuild/blob/xplat/src/XMakeBuildEngine/Construction/Solution/ProjectInSolution.cs#L393

An example solution is: https://github.com/dotnet/corefx/blob/f6ab339f446e37505f93ef9f430801fa1dcc05b8/src/System.Collections.Immutable/System.Collections.Immutable.sln#L40-L41

Note that we should check for indirect recursion as well (loops).

コントリビューターガイド