bugGNU Octave - Bugs: bug #36038, Memory error in 'octave --eval 0'

 
 

bug #36038: Memory error in 'octave --eval 0'

Submitted by:  Max Brister <fisheater>
Submitted on:  Thu 29 Mar 2012 10:32:38 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: FixedAssigned 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.

 

Fri 30 Mar 2012 05:53:37 PM UTC, comment #2:

I checked in your change with a few minor edits.

Thanks.

John W. Eaton <jwe>
Project Administrator
Thu 29 Mar 2012 11:06:15 PM UTC, comment #1:

I have attached a patch which fixes this issue. When there is no current buffer, yyrestart creates a new buffer for the old yyin first. This causes problems if yyin has already been deleted, as is the case with --eval.

I fixed this by just setting yyin to NULL in delete_buffer if current_buffer is also NULL.

Max Brister

(file #25514)

Max Brister <fisheater>
Project Member
Thu 29 Mar 2012 10:32:38 PM UTC, original submission:

This error was originally discovered while looking into bug #35772. It occurs in at least octave 3.6.1 and 14508:0901f926ed50.

The valgrind output is

The error is in a call to fileno from octave__init_buffer. This appears to be a use after free of a FILE pointer.

Max Brister <fisheater>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25514:  invalid_read.patch added by fisheater (600B - text/x-patch)

 

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 fisheater (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Mar 2012 05:53:37 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 29 Mar 2012 11:06:15 PM UTCfisheaterAttached File-=>Added invalid_read.patch, #25514

    Back to the top


    Powered by Savane 3.1-cleanup1