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 567494 - Fortran: Problem with blockdata sub-programs
Fortran: Problem with blockdata sub-programs
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.8
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 639126 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-01-12 13:33 UTC by Marcus Mohr
Modified: 2012-05-28 09:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example code demonstrating problem with BLOCKDATA (2.06 KB, text/plain)
2009-01-12 13:36 UTC, Marcus Mohr
  Details
PATCH resolving problems with block data (3.37 KB, patch)
2012-01-01 10:40 UTC, albert
none Details | Review

Description Marcus Mohr 2009-01-12 13:33:43 UTC
Hi,

having recognised that my favourite code documentation system now also supports Fortran I recently installed doxygen version 1.5.8 on my Debian Etch system. Optimistically I let it loose on our old medium-sized (~18.000 LoC) F77 project.
Unfortunately this test ended in a segmentation fault

WARNING: fortrancode.l: stack empty!Generating code for file driver.f...
WARNING: fortrancode.l: stack empty!Generating code for file energy.f...
WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!Segmentation fault

I was able to pinpoint this problem to the BLOCKDATA sub-programs used in the code. Obviously there seems to be a problem with finding the end of the sub-program,since a single END statement is not recognised.

I'll attach an example program showing the results for various combinations of
"start" and "stop" statements for BLOCKDATA sub-programs.

Note that for a single BLOCKDATA sub-program no obvious segfault occurs (valgrind doesn't detect one either) and doxygen runs through. In our code there are 7 such sub-programs, so the segfault appears to be related to their interplay.

Good news is that after changing all sub-programs to BLOCKDATA .... END BLOCKDATA
doxygen works nicely :)

Regards
Marcus
Comment 1 Marcus Mohr 2009-01-12 13:36:25 UTC
Created attachment 126272 [details]
Example code demonstrating problem with BLOCKDATA
Comment 2 albert 2012-01-01 10:40:55 UTC
Created attachment 204410 [details] [review]
PATCH resolving problems with block data

This patch handles the usage of "block data" statement in Fortran, in the Fortran scanner as well as for the source code listing.
Comment 3 Dimitri van Heesch 2012-01-11 18:38:40 UTC
Thanks, I'll include the patch in the next subversion update.
Comment 4 Dimitri van Heesch 2012-02-25 15:37:21 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.0. 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.
Comment 5 Dimitri van Heesch 2012-05-28 09:19:35 UTC
*** Bug 639126 has been marked as a duplicate of this bug. ***