bugGNU indent - Bugs: bug #42354, indent -kr utf8.c crashes

 
 

bug #42354: indent -kr utf8.c crashes

Submitter:  None
Submitted:  Wed 14 May 2014 12:40:52 PM UTC
   
 
Category:  C Severity:  3 - Normal
Item Group:  Crash Status:  Works For Me
Privacy:  Public Assigned to:  andrewsh
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 02 Sep 2018 07:58:48 AM UTC, comment #1: 

Unreproducible on the current code from Mercurial, potentially fixed as part of #46626 or #46627.

Thanks for the submission anyway.

Andrej Shadura <andrewsh>
Group administrator
Wed 14 May 2014 12:40:52 PM UTC, original submission:  

(1) GNU indent 2.2.10 installed via macports (http://www.macports.org/)
(2) utf8.c from the Perl source code distribution (e.g. http://www.cpan.org/src/5.0/perl-5.18.2.tar.gz)

$ gnuindent -kr utf8.c
(couple of seconds pass)
[13]    72799 segmentation fault (core dumped)  gnuindent -kr utf8.c

(gnuindent is /opt/local/bin/gnuindent)

I tried reformatting other *.c files, and most of them reformat fine with -kr, while some of them fail.

I also tried reformatting with the default format (I guess it's GNU...), with

gnuindent utf8.c

and that passes.  Though one needs to restore the original utf8.c, since the crash with -kr of course truncated the file.  The truncated utf8.c ends with (new) line 1827:

  1827      * is NULL or an inversion lis

(no newline).  Seems repeatable spot.  Nothing strange in that line, the complete line in the original:

  1829      * is NULL or an inversion list that defines the swash.  If not null, it

The truncated output file is 57344 bytes, the original is 138487 bytes, 4401 lines.

I did report this to macports people, but they suggested I report it also here.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by andrewsh (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-02 andrewsh StatusNone Works For Me
        Assigned toNone andrewsh
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code