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 733856 - segfault in QGListIterator while parsing fortran code
segfault in QGListIterator while parsing fortran code
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.7
Other Linux
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-07-28 10:56 UTC by andy.weber.aw
Modified: 2014-08-21 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description andy.weber.aw 2014-07-28 10:56:23 UTC
I guess this is a regression because the same file is parsed without problems in 1.8.1.2-2. Fortran code from http://hg.savannah.gnu.org/hgweb/octave/file/d4b69559a0f7/liboctave/cruft/ranlib/tstmid.for

I've install the debugging symbols and ran

doxygen -g
gdb -d ../doxygen-1.8.7/src -d ../doxygen-1.8.7/qtools /usr/bin/doxygen

Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching for files to process...
Searching for files in directory /home/andy/src/octave-default-dbg-build/doc/doxyhtml/debug
Reading and parsing tag files
Parsing files
Reading /home/andy/src/octave-default-dbg-build/doc/doxyhtml/debug/tstmid.for...
Prepassing fixed form of /home/andy/src/octave-default-dbg-build/doc/doxyhtml/debug/tstmid.for
Parsing file /home/andy/src/octave-default-dbg-build/doc/doxyhtml/debug/tstmid.for...
********************************************************************
Error in file /home/andy/src/octave-default-dbg-build/doc/doxyhtml/debug/tstmid.for line: 612, state: 17
********************************************************************

Program received signal SIGSEGV, Segmentation fault.
QGListIterator::QGListIterator (this=0x7fffffffdf10, l=...) at qglist.cpp:1058
warning: Source file is more recent than executable.
1058	    curNode = list->firstNode;			// set to first node
(gdb) list
1053	*/
1054	
1055	QGListIterator::QGListIterator( const QGList &l )
1056	{
1057	    list = (QGList *)&l;			// get reference to list
1058	    curNode = list->firstNode;			// set to first node
1059	    if ( !list->iterators ) {
1060		list->iterators = new QGList;		// create iterator list
1061		CHECK_PTR( list->iterators );
1062	    }
(gdb) print l
$1 = (const QGList &) @0x180: <error reading variable>
(gdb) print list
$2 = (QGList *) 0x0
(gdb) bt
  • #0 QGListIterator::QGListIterator
    at qglist.cpp line 1058
  • #1 QListIterator
    at ../qtools/qlist.h line 129
  • #2 endScope
    at fortranscanner.l line 1904
  • #3 parseMain
    at fortranscanner.l line 2316
  • #4 FortranLanguageScanner::parseInput
    at fortranscanner.l line 2348
  • #5 parseFile
    at doxygen.cpp line 9282
  • #6 parseFiles
    at doxygen.cpp line 9374
  • #7 parseInput
    at doxygen.cpp line 10912
  • #8 main
    at main.cpp line 37

Comment 1 albert 2014-07-30 11:37:54 UTC
Problem is that in the newer versions the word type is to start type definitions etc. In the past the word type was used as a variable name, like in the given example.

I've just pushed a solution to github (pull request 203) that recognizes the word type in this case as a variable.
Comment 2 albert 2014-08-03 07:35:31 UTC
Code of patch has been integrated into git.
Comment 3 Dimitri van Heesch 2014-08-21 17:15:43 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.8. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information 
that you think can be relevant (preferrably in the form of a self-contained example).