bugGNU Octave - Bugs: bug #35120, Invalid read of size 4

 
 

bug #35120: Invalid read of size 4

Submitted by:  Muhali <muhali>
Submitted on:  Mon 19 Dec 2011 08:07:25 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Tue 20 Dec 2011 04:20:39 AM UTC, comment #1: 

I haven't been able to reproduce the crash, but the following changeset avoids the valgrind error for me.

http://hg.savannah.gnu.org/hgweb/octave/rev/f90c3facfac3

John W. Eaton <jwe>
Project Administrator
Mon 19 Dec 2011 08:07:25 PM UTC, original submission:  

I see random segfaults when reading scripts. This is perhaps related to the following valgrind analysis, with foo.m being an empty script:

%> valgrind -q octave --no-init-file -Hq foo.m
==30251== Invalid read of size 4
==30251==    at 0x748BEA0: fileno (fileno.c:37)
==30251==    by 0x52CEE33: octave__init_buffer(yy_buffer_state*, _IO_FILE*) (lex.cc:3454)
==30251==    by 0x52D0436: octave__create_buffer(_IO_FILE*, int) (lex.cc:3403)
==30251==    by 0x52D0582: octave_restart(_IO_FILE*) (lex.cc:3328)
==30251==    by 0x52D23E3: reset_parser() (lex.ll:1151)
==30251==    by 0x52D2528: cleanup_parser() (lex.ll:1431)
==30251==    by 0x5427709: clean_up_and_exit(int) (toplev.cc:678)
==30251==    by 0x53CF095: octave_main (octave.cc:904)
==30251==    by 0x7443EAC: (below main) (libc-start.c:228)
==30251==  Address 0x11c90540 is 0 bytes inside a block of size 568 free'd
==30251==    at 0x4C268FE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30251==    by 0x748855C: fclose@@GLIBC_2.2.5 (iofclose.c:88)
==30251==    by 0x535B7D8: parse_fcn_file(std::string const&, std::string const&, bool, bool, std::string const&) (unwind-prot.h:260)
==30251==    by 0x535D42C: load_fcn_from_file(std::string const&, std::string const&, std::string const&, std::string const&, bool) (oct-parse.yy:3772)
==30251==    by 0x540CE55: symbol_table::fcn_info::fcn_info_rep::find_user_function() (symtab.cc:1009)
==30251==    by 0x5413071: symbol_table::fcn_info::fcn_info_rep::xfind(octave_value_list const&, bool) (symtab.cc:782)
==30251==    by 0x541325F: symbol_table::fcn_info::fcn_info_rep::find(octave_value_list const&, bool) (symtab.cc:602)
==30251==    by 0x5411EE5: symbol_table::do_find(std::string const&, octave_value_list const&, bool, bool) (symtab.h:780)
==30251==    by 0x541200C: symbol_table::find(std::string const&, octave_value_list const&, bool, bool) (symtab.cc:1157)
==30251==    by 0x5412800: symbol_table::find_function(std::string const&, octave_value_list const&, bool) (symtab.cc:1192)
==30251==    by 0x535049D: feval(std::string const&, octave_value_list const&, int) (oct-parse.yy:4121)
==30251==    by 0x5425453: do_octave_atexit() (toplev.cc:1049)
==30251==

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

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 jwe (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-20 jwe StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5