bugGNU nano - Bugs: bug #47111, memory leak w/position history

 
 

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

bug #47111: memory leak w/position history

Submitter:  Mike Frysinger <vapier>
Submitted:  Wed 10 Feb 2016 07:19:32 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 11 Feb 2016 08:21:17 AM UTC, comment #3: 

Reproducing it depends on what files you edit.  When editing only files you've edited before, the number of position-history items won't increase, so the next time you start nano, it will not need to drop any.  But when you edit a bunch of new files, the number of items will go over the 200 (if your position list was maxed out at that moment), nano wil save all of those, and the next time you start nano it will drop the first few of them.


Benno Schulenberg <bens>
Group administrator
Thu 11 Feb 2016 02:57:48 AM UTC, comment #2: 

seems to be ok now.  it wasn't 100% reproducible though.

Mike Frysinger <vapier>
Group Member
Wed 10 Feb 2016 08:32:12 PM UTC, comment #1: 

I knew about that one: loading just threw superfluous records aside -- I just hoped no one would bother me about that.  :)

Fixed in SVN, r5629.

At least... I think this is the fix.

Benno Schulenberg <bens>
Group administrator
Wed 10 Feb 2016 07:19:32 PM UTC, original submission:  

using svn rev5627

=================================================================
==32144==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f1ae810200a in malloc (.../5.3.0/libasan.so.2+0x9d00a)
    #1 0x455caf in nmalloc .../utils.c:388
    #2 0x41de03 in load_poshistory .../files.c:3311
    #3 0x433544 in main .../nano.c:2423
    #4 0x7f1ae74245ef in __libc_start_main (/lib64/libc.so.6+0x205ef)

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x7f1ae810200a in malloc (.../5.3.0/libasan.so.2+0x9d00a)
    #1 0x455caf in nmalloc .../utils.c:388
    #2 0x455d75 in mallocstrncpy .../utils.c:418
    #3 0x455dd7 in mallocstrcpy .../utils.c:428
    #4 0x41de1c in load_poshistory .../files.c:3312
    #5 0x433544 in main .../nano.c:2423
    #6 0x7f1ae74245ef in __libc_start_main (/lib64/libc.so.6+0x205ef)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f1ae810200a in malloc (.../5.3.0/libasan.so.2+0x9d00a)
    #1 0x455caf in nmalloc .../utils.c:388
    #2 0x41de03 in load_poshistory .../files.c:3311
    #3 0x433544 in main .../nano.c:2423
    #4 0x7f1ae74245ef in __libc_start_main (/lib64/libc.so.6+0x205ef)

SUMMARY: AddressSanitizer: 160 byte(s) leaked in 4 allocation(s).

Mike Frysinger <vapier>
Group Member

 

(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 (Posted a comment)
  • -email is unavailable- added by vapier (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-02-13 bens Open/ClosedOpen Closed
    2016-02-11 bens StatusReady For Test Fixed
    2016-02-10 bens StatusNone Ready For Test
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code