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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

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

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>
Group administrator
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>
Group administrator
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>
Group administrator
Wed 02 Aug 2017 07:39:50 PM UTC, original submission:  


Benno Schulenberg <bens>
Group administrator

 

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

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 bens (Submitted the item)
  •  

    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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-28 bens Open/ClosedOpen Closed
    2017-08-03 bens StatusNone Fixed
        Assigned toNone bens
    2017-08-02 bens Summarya 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.13-758e.
    Corresponding source code