bugGNU Octave - Bugs: bug #38834, strread crashes on '%g' format

 
 

bug #38834: strread crashes on '%g' format

Submitted by:  A.R. Burgers <arb>
Submitted on:  Fri 26 Apr 2013 06:52:18 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 26 Apr 2013 12:28:04 PM UTC, comment #2:

Fixed in this cs:
http://hg.savannah.gnu.org/hgweb/octave/rev/4d8462fe15b9

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Fri 26 Apr 2013 11:59:18 AM UTC, comment #1:

Confirmed, also present in dev sources.

I'll look into it. Seems like a more rigid check for invalid format specifiers is needed.

Thanks for reporting.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Fri 26 Apr 2013 06:52:18 AM UTC, original submission:

a=strread('1.0,'%g') is incorrect, but:

octave 3.6.4 reports an 'out-of-bound' error:

octave:1> a=strread('1.0','%g')
error: strread: A(I): index out of bounds; value 1 out of bound 0
error: called from:
error: /usr/share/octave/3.6.4/m/io/strread.m at line 287, column 7
octave:1>

Would be nice to have a more informative message,
as in matlab R2012b:

>> a=strread('1.0','%g')

Error using dataread
Badly formed format string.

Error in strread (line 49)
[varargout{1:nlhs}]=dataread('string',varargin{:}); %#ok<REMFF1>

A.R. Burgers <arb>

 

(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 arb (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 26 Apr 2013 12:28:04 PM UTCphilipnienhuisStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 26 Apr 2013 11:59:18 AM UTCphilipnienhuisStatusNone=>Confirmed
      Assigned toNone=>philipnienhuis
      Release3.6.4=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1