提交 51a75614 编写于 作者: M Manish Vasani

Fix race condition in symbol start action execution

Guard against entry added from another thread.
Fixes internal VSO bug [#700302](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/700302)
上级 83d18908
......@@ -139,7 +139,16 @@ HostSymbolStartAnalysisScope getSymbolAnalysisScopeCore()
lock (_gate)
{
_lazyPendingMemberSymbolsMapOpt = _lazyPendingMemberSymbolsMapOpt ?? new Dictionary<ISymbol, HashSet<ISymbol>>();
_lazyPendingMemberSymbolsMapOpt.Add(symbol, dependentSymbols);
// Guard against entry added from another thread.
if (!_lazyPendingMemberSymbolsMapOpt.ContainsKey(symbol))
{
_lazyPendingMemberSymbolsMapOpt.Add(symbol, dependentSymbols);
}
else
{
Debug.Assert(dependentSymbols.SetEquals(_lazyPendingMemberSymbolsMapOpt[symbol]));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册