Skip to content

Infinite loop when parsing a simple header file #10282

@nuclear868

Description

@nuclear868

Describe the bug

When generating documentation, doxygen gets stuck on a specific file and the cpu usage goes to 100% (one core)
The console log stops at the line

Generating docs for file include/Base35.h...

It also happens when I run doxygen on this file alone, included in the example archive

Expected behavior

The generation should succeed

Screenshots

doxygen

To Reproduce

There is an attached archive with a directory, containing 2 files: include/Base35.h and Doxyfile
I enter the directory, call doxygen Doxyfile and it gets stuck on the Base35.h file

Version

Operating system: Kubuntu 23.04

Doxygen 1.9.4 (comes with (K)ubuntu 23.04)
Also happens on Doxygen 1.9.8 (built from source)
Does not happen on Doxygen 1.9.1 (comes with (K)ubuntu 22.04)

Stack trace

As I saw, frame #4 (MemberList::writeDocumentation) does not exit.
This is backtrace from doxygen-1.9.4, as I am using gdb, which can automatically download debug symbols.

0x00005555558e81cc in isId (c=66) at /usr/src/doxygen-1.9.4-4/src/util.h:173
Downloading source file /usr/src/doxygen-1.9.4-4/src/util.h
173       return c=='_' || c>=128 || c<0 || isalnum(c) || c=='$';
(gdb) bt
#0  0x00005555558e81cc in isId (c=66) at /usr/src/doxygen-1.9.4-4/src/util.h:173
#1  addTemplateNames (s=..., n=..., t=...) at /usr/src/doxygen-1.9.4-4/src/memberdef.cpp:807
#2  0x00005555558f8ae3 in writeDefArgumentList (ol=..., scope=scope@entry=0x555556840ce8, md=md@entry=0x55555685f068) at /usr/src/doxygen-1.9.4-4/src/memberdef.cpp:948
#3  0x00005555559094ac in MemberDefImpl::writeDocumentation (this=0x55555685f060, ml=<optimized out>, memCount=<optimized out>, memTotal=<optimized out>, ol=..., scName=..., container=0x555556843f28, inGroup=false,
showEnumValues=false, showInline=false) at /usr/src/doxygen-1.9.4-4/src/memberdef.cpp:3519
#4  0x0000555555917ec7 in MemberList::writeDocumentation (this=this@entry=0x555556847f30, ol=..., scopeName=..., container=container@entry=0x555556843f28, title=..., showEnumValues=showEnumValues@entry=false,
showInline=false) at /usr/src/doxygen-1.9.4-4/src/memberlist.cpp:711
#5  0x0000555555736502 in FileDefImpl::writeMemberDocumentation (this=this@entry=0x555556843f20, ol=..., lt=<optimized out>, title=...) at /usr/src/doxygen-1.9.4-4/src/filedef.cpp:1669
#6  0x000055555573eb62 in FileDefImpl::writeDocumentation (this=0x555556843f20, ol=...) at /usr/src/doxygen-1.9.4-4/src/filedef.cpp:949
#7  0x000055555570b4b6 in generateFileDocs () at /usr/src/doxygen-1.9.4-4/src/doxygen.cpp:8208
#8  0x000055555570e663 in generateOutput () at /usr/src/doxygen-1.9.4-4/src/doxygen.cpp:12499
#9  0x000055555568a072 in main (argc=2, argv=0x7fffffffdbe8) at /usr/src/doxygen-1.9.4-4/src/main.cpp:38
(gdb)

Additional context

doxygenIssue.tar.gz

This is an example containing the Doxyfile and the file from the project that reproduces the issue. I think that the files that it includes (Buffer.h and EncodeError.h) are not needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions