bugGNU Octave - Bugs: bug #40218, Slow 24 byte memory leak in parser

 
 

bug #40218: Slow 24 byte memory leak in parser

Submitter:  Rik <rik5>
Submitted:  Wed 09 Oct 2013 03:16:53 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  jwe
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 09 Oct 2013 06:29:22 PM UTC, comment #2: 

You're might quick today :)

Yes, this fixes the memory leak.  I'll try, no guarantees since it choked my computer the last time, to run the entire test suite under valgrind.

Rik <rik5>
Group administrator
Wed 09 Oct 2013 06:06:13 PM UTC, comment #1: 

I checked in the following change.  It seems to work for me, but can you please verify and close this report if the problem is fixed for you?

http://hg.savannah.gnu.org/hgweb/octave/rev/77eff9c6fb09

John W. Eaton <jwe>
Group administrator
Wed 09 Oct 2013 03:16:53 PM UTC, original submission:  

The parser seems to repeatedly leak 24 bytes each time a function file is parsed.  A representative loss summary from valgrind is:


==5818== 24 bytes in 1 blocks are definitely lost in loss record 94 of 586
==5818==    at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5818==    by 0x58B4BFC: octave_base_parser::make_statement_list(tree_statement*) (oct-parse.yy:3170)
==5818==    by 0x58AA896: octave_push_parse(octave_pstate*, int, YYSTYPE const*, octave_base_parser&) (oct-parse.yy:348)
==5818==    by 0x58A9CE2: octave_pull_parse(octave_pstate*, octave_base_parser&) (oct-parse.cc:2099)
==5818==    by 0x58A9C5F: octave_parse(octave_base_parser&) (oct-parse.cc:2067)
==5818==    by 0x58B4FAF: octave_parser::run() (oct-parse.yy:3235)
==5818==    by 0x58B535F: parse_fcn_file(std::string const&, std::string const&, std::string const&, bool, bool, bool, bool, std::string const&) (oct-parse.yy:3347)
==5818==    by 0x58B64BC: load_fcn_from_file(std::string const&, std::string const&, std::string const&, std::string const&, bool) (oct-parse.yy:3529)
==5818==    by 0x5C54943: symbol_table::fcn_info::fcn_info_rep::find_user_function() (symtab.cc:998)
==5818==    by 0x5C53C0F: symbol_table::fcn_info::fcn_info_rep::xfind(octave_value_list const&, bool) (symtab.cc:779)
==5818==    by 0x5C532BB: symbol_table::fcn_info::fcn_info_rep::find(octave_value_list const&, bool) (symtab.cc:616)
==5818==    by 0x5C581B5: symbol_table::fcn_info::find(octave_value_list const&, bool) (symtab.h:988)
==5818==    by 0x5C563EC: symbol_table::do_find(std::string const&, octave_value_list const&, bool, bool) (symtab.cc:1348)
==5818==    by 0x5C555F7: symbol_table::find(std::string const&, octave_value_list const&, bool, bool) (symtab.cc:1149)
==5818==    by 0x5C5584B: symbol_table::find_function(std::string const&, octave_value_list const&, bool) (symtab.cc:1184)
==5818==    by 0x5C5165D: symbol_table::symbol_record::find(octave_value_list const&) const (symtab.cc:138)


The attached val.log contains everything from the valgrind run where the only Octave commands issued were 'ls' and 'dir'.



Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29337:  val.log added by rik5 (863KiB - text/x-log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (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.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-09 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2013-10-09 jwe StatusNone Ready For Test
    2013-10-09 rik5 Attached File- Added val.log, #29337

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code