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

 
 

bug #42354: indent -kr utf8.c crashes

Submitted by:  None
Submitted on:  Wed 14 May 2014 12:40:52 PM UTC  
 
Category: CSeverity: 3 - Normal
Item Group: CrashStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1