bugGNU nano - Bugs: bug #51644, a very long line of HTML can...

 
 

bug #51644: a very long line of HTML can seemingly hang nano (when using the html syntax)

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 02 Aug 2017 07:39:50 PM UTC  
 
Severity: 4 - ImportantStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 03 Aug 2017 07:22:33 PM UTC, comment #3:

Fixed in git, 94b484ea.

We could make the same change for the xml syntax, but I think XML files are less likely to be produced without any line breaks.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 02 Aug 2017 08:13:13 PM UTC, comment #2:

Okay, the reproduction recipe is easy:

for x in $(seq 3210); do echo -n "<tag>"; done >longline

Then run:

src/nano -Yhtml longline

On my machine, it will take some 12 seconds before nano will finally show the file contents. You can increase this time a lot by just adding another 1000 to the number. When not using the html syntax, the response will be nearly immediate.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 02 Aug 2017 07:52:47 PM UTC, comment #1:

(Silly Savannah should jump to the next field when I press <Enter> on the Summary line.)

I have an example file that I can reproduce this consistently with, but it is a private webpage, so I can't attach it here.

But the hanging (or at least: nano is busy for more than a minute and still doesn't show any file content) only takes place with the html and xml syntaxes. When using --syntax=c or --syntax=default, nano does not hang. (It's sluggish, because the line is 100k characters long, with lots of HTML tags, but it does not hang.)

When I disable the first line with start and end regexes in the html syntax, then there is no hanging either. It's all the looking for matching angular brackets that seems to tire nano out -- or makes it actually hang. Version 2.6.3 does not have the problem; version 2.7.5 has.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 02 Aug 2017 07:39:50 PM UTC, original submission:
Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

(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

 

Carbon-Copy List
  • -unavailable- added by bens (Submitted the item)
  •  

    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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 28 Aug 2017 07:09:11 PM UTCbensOpen/ClosedOpen=>Closed
    Thu 03 Aug 2017 07:22:33 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>bens
    Wed 02 Aug 2017 08:13:13 PM UTCbensSummarya very long line of HTML can hang nano (when using the html syntax)=>a very long line of HTML can seemingly hang nano (when using the html syntax)

    Back to the top


    Powered by Savane 3.1-cleanup1