bugGNU Octave - Bugs: bug #50831, can't load structure with...


bug #50831: can't load structure with non-matlab field identifiers from 'ascii' format file

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Wed 19 Apr 2017 12:50:49 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Patch Submitted Assigned to:  None
Originator Name:  Olaf Till Open/Closed:  Open
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.


Wed 19 Apr 2017 12:50:49 PM UTC, original submission:  

Contrary to Matlab, Octave allows any strings as field identifiers in structures. But after saving such structures in the 'ascii' format, they can't be reloaded, since the validity of the identifier is checked with a general test for identifier validity.

You can check for this bug with the following test:

%! filename = "test-ascii.dat";
%! a.("a-b") = 1;
%! unwind_protect
%!   save (filename, "a");
%!   la = load (filename);
%!   assert (a, la.a);
%! unwind_protect_cleanup
%!   unlink (filename);
%! end_unwind_protect

A patch will be attached as soon as the bug number is known.

The patch avoids checking of identifier validity whenever function fields are read from an 'ascii' format file. The above test is contained in the changeset.

Olaf Till <i7tiol>
Project Member


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

Attach Files:

Attached Files
file #40444:  bug-50831.cset added by i7tiol (4KiB - application/octet-stream)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by i7tiol (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-22 mtmiller Dependencies- => bugs #56368 is dependent
    2018-03-20 mtmiller CategoryNone => Octave Function
        StatusNone => Patch Submitted
    2017-04-19 i7tiol Attached File- => Added bug-50831.cset, #40444

    Back to the top

    Powered by Savane 3.5