Skip to content

Commit 339e566

Browse files
authored
Merge pull request doxygen#6857 from albert-github/feature/bug_645910
Bug 645910 - Segfault on recursion while parsing "\subpage A" in "\page A"
2 parents 1c2d4f3 + be1ccef commit 339e566

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/doxygen.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8705,7 +8705,14 @@ static void computePageRelations(Entry *root)
87058705
for (bii.toFirst();(bi=bii.current());++bii)
87068706
{
87078707
PageDef *subPd = Doxygen::pageSDict->find(bi->name);
8708-
if (subPd)
8708+
if (pd==subPd)
8709+
{
8710+
err("page defined at line %d of file %s with label %s is a direct "
8711+
"subpage of itself! Please remove this cyclic dependency.\n",
8712+
pd->docLine(),pd->docFile().data(),pd->name().data());
8713+
exit(1);
8714+
}
8715+
else if (subPd)
87098716
{
87108717
pd->addInnerCompound(subPd);
87118718
//printf("*** Added subpage relation: %s->%s\n",

0 commit comments

Comments
 (0)