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 777941 - crash on friend class and xml output
crash on friend class and xml output
Status: RESOLVED DUPLICATE of bug 776791
Product: doxygen
Classification: Other
Component: general
1.8.13
Other Windows
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2017-01-30 13:35 UTC by Nicolas Diehl
Modified: 2017-02-24 19:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Diehl 2017-01-30 13:35:51 UTC
Example code from https://en.wikipedia.org/wiki/Friend_class

class B {
    friend class A; // A is a friend of B
private:
    int i;
};
class A {
public: 
    A(B b) {
        b.i = 0; // legal access due to friendship
    }
};

- make a new file friend.cpp containing the code above
- run doxygen -g to generate a new Doxyfile
- edit Doxyfile to GENERATE_XML = YES
- run doxygen
-> Doxygen crashes and leaves behind an empty class_b.xml
Comment 1 Marc Alff 2017-02-24 09:13:41 UTC
Just got the same crash, reproduced with doxygen 1.8.13.

GENERATE_XML = YES

C++ code:

class foo
{
private:
  int x;

  friend class crash_here_in_xml;
};

The issue is in generateXMLForMember(),
which crashes like this:

- md->memberType() is MemberType_Friend
- isFunc is set to true
- ArgumentList *al = md->argumentList() is NULL

which fails at line 623 on
  if (al->refQualifier!=RefQualifierNone)
Comment 2 albert 2017-02-24 18:09:46 UTC
As far as I can see this is the same problem as in bug_776791 which has been fixed with pull request 555 and that is integrated in the master branch on January 4, 2017.
Quick test showed that the problem was present in 1.8.13 but not iun my master build.
Comment 3 Dimitri van Heesch 2017-02-24 19:57:12 UTC

*** This bug has been marked as a duplicate of bug 776791 ***