Guard CycleDetector against recursion exhaustion.

fixes #3935.
This commit is contained in:
Christian Parpart
2018-08-01 12:02:59 +01:00
committed by Alex Beregszaszi
parent ef269bf40d
commit 38f9667e09
5 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -2119,7 +2119,7 @@ bool StructType::recursive() const
{
if (!m_recursive.is_initialized())
{
auto visitor = [&](StructDefinition const& _struct, CycleDetector<StructDefinition>& _cycleDetector)
auto visitor = [&](StructDefinition const& _struct, CycleDetector<StructDefinition>& _cycleDetector, size_t /*_depth*/)
{
for (ASTPointer<VariableDeclaration> const& variable: _struct.members())
{