bugGNU nano - Bugs: bug #46778, segfault when opening as second...

 
 

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

bug #46778: segfault when opening as second argument a directory that was tried before

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 29 Dec 2015 05:31:41 PM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 30 Dec 2015 10:28:38 AM UTC, comment #4: 

I can't figure out what it interacts with, but it doesn't matter, the fix is simple: don't attempt to position the cursor when no buffer was actually opened.

Fixed in SVN, r5514.

Benno Schulenberg <bens>
Group administrator
Wed 30 Dec 2015 09:24:04 AM UTC, comment #3: 

The bug has appeared with r5304.  The strange thing is that that same commit is in 2.4.3, but that version works okay.  So it is not the commit in itself that is wrong -- it is the interaction with some earlier commit that is not included in 2.4.3.

Benno Schulenberg <bens>
Group administrator
Tue 29 Dec 2015 09:12:59 PM UTC, comment #2: 

Okay, fine -- it has something to do with the contents of ~/.nano/filepos_history.  Even though doc/syntax is a directory, it still has an entry in that file: /home/ben/Repositories/ANYTHING/doc/syntax/ 1 78.  How it got there, I don't know...  Deleting it requires starting nano with --ignore.  Once deleted, things start to work normally again.

However, searching for "/ " in the filepos_history file, shows up many more occurrences -- I've apparently accidentily tried many times to open a directory.  If I do that now again, with the name of such a directory as second file argument, nano will segfault.

Benno Schulenberg <bens>
Group administrator
Tue 29 Dec 2015 08:44:56 PM UTC, comment #1: 

I am perplexed.  I cannot reproduce it in a fresh checkout, but can reproduce it consistently in the source tree that I normally work in.

Somehow it has something to do with the actual doc/syntax directory in that source tree: when I run a nano from a fresh checkout and give it as second file argument the mentioned doc/syntax in my normal source tree, it segfaults.  A 2.4.3 is fine, anything before it too, but a 2.5.0 and later segfault.

Even 'rm -rf doc' and restoring it with 'svn up' does not remove the anomaly...

Hrm!  It has to do with the name of that normal source tree -- when I change it to anything else, things work fine.  Now the question is: why may that thing not be called ANYTHING (literally)?

When I move this ANYTHING out of the way, and rename the fresh checkout to ANYTHING, it fails there too: 'src/nano doc doc/syntax' segfaults.  Give it any other name, it works fine.  Pffft!

Benno Schulenberg <bens>
Group administrator
Tue 29 Dec 2015 05:31:41 PM UTC, original submission:  

To reproduce, run 'src/nano doc doc/syntax'.

Result: Segmentation fault.

Bug seems present only in SVN, not in 2.5.0, nor before.

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
    2016-01-14 bens Open/ClosedOpen Closed
    2015-12-30 bens StatusNone Fixed
    2015-12-30 bens Summarynano segfaults when trying to open a directory that was tried before segfault when opening as second argument a directory that was tried before
    2015-12-29 bens Summarynano segfaults when trying to open two directories nano segfaults when trying to open a directory that was tried before

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code