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 664277 - Segmentation error parsing a Fortran 77 file
Segmentation error parsing a Fortran 77 file
Status: RESOLVED DUPLICATE of bug 625601
Product: doxygen
Classification: Other
Component: general
1.7.5.1
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-11-17 14:34 UTC by Philippe Poilbarbe
Modified: 2011-11-21 17:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
To reproduce segfault (24.00 KB, application/x-gzip)
2011-11-17 18:16 UTC, Philippe Poilbarbe
Details

Description Philippe Poilbarbe 2011-11-17 14:34:11 UTC
When parsing a fortran 77 file I have a segmentation error after the message:
********************************************************************
Error in file /home/su_php/dev/OCTANT/src/support/ALG_AjustementPolynomial.F line: 290, state: 21
********************************************************************

I have reduced the file enough to produce the error.
But I can have no crash if I remove (or move) ordinary comments (not Doxygen special comments ‽

The file is in Fortran 77 in fixed format.

Joined is the fortran file and the Doxygen parameter file
Comment 1 albert 2011-11-17 17:36:02 UTC
Dear Philippe,

You write "oined is the fortran file and the Doxygen parameter file" but I don't see them.

Please attach

Albert
Comment 2 Philippe Poilbarbe 2011-11-17 18:15:26 UTC
Oops... I forgot it.
I redo it and now the message if:
********************************************************************
Error in file /home/su_php/dev/OCTANT/doc/doxygen/ALG_AjustementPolynomial.F line: 288, state: 21
********************************************************************

Since there is not exactly the same number of lines.

If I remove lines 79 to 81 (3 comment lines, the segfault disapear)
Comment 3 Philippe Poilbarbe 2011-11-17 18:16:34 UTC
Created attachment 201609 [details]
To reproduce segfault
Comment 4 albert 2011-11-20 15:02:06 UTC
The problem in this case is that the input file is recognized as a free formatted Fortran file, this is not the case it is a fixed formatted file.

A "temporary" solution for this case is to have the first line as:
C -*- coding: utf-8 -*-
or to have an extra first line with just a C in the first position.

This bug is a duplicate of bug_625601
Comment 5 Dimitri van Heesch 2011-11-20 15:15:02 UTC

*** This bug has been marked as a duplicate of bug 625601 ***
Comment 6 Philippe Poilbarbe 2011-11-21 08:58:38 UTC
OK.
Setting all comments with 'C' instead of '!' corrects the crashes.
If I understand correctly '!' tells the parser to consider the code as free form while 'C' if for fixed form.
Comment 7 albert 2011-11-21 17:36:43 UTC
Dear Philippe,

It is not as easy as this, but whit a C or * in the firs column it recognizes it as fixed form. There is a BUG report about recognizing fixed versus free format but it is quite complex to get a routine that is full proof.

Albert