After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782090 - doxygen 1.8.13 regression? - segmentation fault
doxygen 1.8.13 regression? - segmentation fault
Status: RESOLVED DUPLICATE of bug 776791
Product: doxygen
Classification: Other
Component: general
1.8.13
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2017-05-02 22:40 UTC by John Hein
Modified: 2017-05-02 23:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description John Hein 2017-05-02 22:40:20 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
Comment 1 John Hein 2017-05-02 22:42:18 UTC
(gdb) bt
  • #0 generateXMLForMember(MemberDef*, FTextStream&, FTextStream&, Definition*)
  • #1 generateXMLSection(Definition*, FTextStream&, FTextStream&, MemberList*, char const*, char const*, char const*)
  • #2 generateXMLForClass(ClassDef*, FTextStream&)
  • #3 generateXML()
  • #4 generateOutput()
  • #5 main

Comment 2 John Hein 2017-05-02 22:51:42 UTC
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
Comment 3 John Hein 2017-05-02 22:55:04 UTC
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";
Comment 4 John Hein 2017-05-02 23:00:11 UTC
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 ***