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

 
 

bug #47111: memory leak w/position history

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Wed 10 Feb 2016 07:19:32 PM UTC  
 
Severity: 3 - NormalStatus: 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 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>
Project AdministratorIn charge of this item.
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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project Member

 

(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 (Posted a comment)
  • -unavailable- added by vapier (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
    Sat 13 Feb 2016 10:37:05 AM UTCbensOpen/ClosedOpen=>Closed
    Thu 11 Feb 2016 08:21:17 AM UTCbensStatusReady For Test=>Fixed
    Wed 10 Feb 2016 08:32:12 PM UTCbensStatusNone=>Ready For Test
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1