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

 
 

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

Submitter:  A.R. Burgers <arb>
Submitted:  Fri 26 Apr 2013 06:52:18 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 26 Apr 2013 12:28:04 PM UTC, comment #2: 
Philip Nienhuis <philipnienhuis>
Group Member
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>
Group Member
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 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 arb (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-26 philipnienhuis StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-04-26 philipnienhuis StatusNone Confirmed
        Assigned toNone philipnienhuis
        Release3.6.4 dev

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code