dotnet/msbuild

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

Open

#1,599 建立於 2017年1月22日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C# (1,364 fork)batch import
Area: Solution (.sln)help wantedtriaged

倉庫指標

Star
 (5,062 star)
PR 合併指標
 (平均合併 11天 7小時) (30 天內合併 125 個 PR)

描述

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).

貢獻者指南