bugGNU Octave - Bugs: bug #40232, Memory leak in...

 
 

bug #40232: Memory leak in string_vector::resize or load_path::get_file_list

Submitted by:  Rik <rik5>
Submitted on:  Thu 10 Oct 2013 03:21:24 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 10 Oct 2013 08:55:31 PM UTC, comment #2:

Since the leak is entriely due to the singleton, and is never going to grow in size, it seems fine to close this report.

Rik <rik5>
Project Administrator
Thu 10 Oct 2013 08:49:22 PM UTC, comment #1:

It looks to me like this leak is just happening because the load_path singleton is not explicitly cleaned up when Octave exits.

If I uncomment the call to singleton_cleanup_list::cleanup in do_octave_atexit, the valgrind summary for starting and exiting Octave (with --no-gui) goes from

to

As far as I can tell, all the "definitely lost" bytes are due to load_path.

I'd uncomment the singleton cleanup but there is an ominous warning just before that line that tells me I shouldn't.

I'm not so worried about these kinds of "leaks", though ultimately I'd like to eliminate them by eliminating the singletons (I have some ideas about how to do that, but it will take time).

Perhaps we should just close this report?

John W. Eaton <jwe>
Project Administrator
Thu 10 Oct 2013 03:21:24 AM UTC, original submission:

I can't tell if the leak is in resize, or in load_path and the way it is using resize. In the routine get_file_list() a string vector is first resized to the largest possible number of elements and at the end of the routine it is resized again to a smaller value. It is the second resize which is causing the problem.

Rik <rik5>
Project Administrator

 

(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 jwe (Posted a comment)
  • -unavailable- added by rik5 (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 project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 10 Oct 2013 08:55:31 PM UTCrik5StatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1