GNOME Bugzilla – Bug 782090
doxygen 1.8.13 regression? - segmentation fault
Last modified: 2017-05-02 23:00:11 UTC
% cat doxyfile GENERATE_XML=YES INPUT=. % cat x.hh /** docs go here */ class A { friend class B; }; % doxygen-1.8.13/bin/doxygen -v 1.8.13 % doxygen-1.8.13/bin/doxygen doxyfile . . Generating member index... Generating file index... Generating file member index... Generating example index... finalizing index lists... writing tag file... Generating XML output... Generating XML output for class A Segmentation fault (core dumped) Originally noticed on FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219022 Reproduced on fedora 23/x86_64 (manually compiled from 1.8.13 source with 'cmake . && make'). Doesn't seg fault with 1.8.12
(gdb) bt
+ Trace 237417
0x0000000000858460 in generateXMLForMember (md=0x151b060, ti=..., t=..., def=0x1513c20) at /tmp/jhein/libftdi/f/x/doxygen-1.8.13/src/xmlgen.cpp:623 623 if (al->refQualifier!=RefQualifierNone) (gdb) p al $1 = (ArgumentList *) 0x0
This prevents the seg fault, but I don't know if it's the right fix for doxygen. --- xmlgen.cpp.orig 2016-11-29 08:14:16.000000000 +0000 +++ xmlgen.cpp 2017-05-02 22:53:15.248428856 +0000 @@ -620,7 +620,7 @@ if (md->isInline()) t << "yes"; else t << "no"; t << "\""; - if (al->refQualifier!=RefQualifierNone) + if (al && al->refQualifier!=RefQualifierNone) { t << " refqual=\""; if (al->refQualifier==RefQualifierLValue) t << "lvalue"; else t << "rvalue";
I see previously reported (bug 776791), and it was fixed here: https://github.com/doxygen/doxygen/commit/0f02761a158a5e9ddbd5801682482af8986dbc35#diff-dea13e25f9bbae3ddde44cc615b9c9ba *** This bug has been marked as a duplicate of bug 776791 ***