bugGNU Octave - Bugs: bug #61191, eval can cause a crash to desktop

 
 

bug #61191: eval can cause a crash to desktop

Submitter:  None
Submitted:  Mon 20 Sep 2021 11:32:51 AM UTC
   
 
Category:  Interpreter Severity:  4 - Important
Priority:  7 - High Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.3.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 06 Oct 2021 01:43:51 AM UTC, comment #5: 

Thank you for the quick fix @jwe.  That change fixes the bug for me on openSUSE Leap 15.3 (stable and default branch as of today). All tests are still passing.

Same observations in comment #3. I think it is safe to close this report.

Kai Torben Ohlhus <siko1056>
Group Member
Tue 21 Sep 2021 05:47:51 PM UTC, comment #4: 

I pushed the following changeset on stable and merged with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/37ddca7ad9cb

Marking this report as ready for test.

John W. Eaton <jwe>
Group administrator
Mon 20 Sep 2021 06:23:02 PM UTC, comment #3: 

That change fixes the bug for me on Ubuntu. All tests are still passing.

Markus Mützel <mmuetzel>
Group administrator
Mon 20 Sep 2021 05:41:58 PM UTC, comment #2: 

I'm attaching a possible fix.

(file #51949)

John W. Eaton <jwe>
Group administrator
Mon 20 Sep 2021 01:46:17 PM UTC, comment #1: 

I can confirm the crash also with Octave 6.3.0 and Octave 7.0.0 (hg id 41eecdf76372) on Windows.
Same with Octave 7.0.0 (hg id 813b7827c5f8) on Ubuntu 20.10 (with `bugscript.m` in `./a`):

octave:1> addpath a
octave:2> omc_1=rand(3,1);
octave:3> Tc_1=rand(3,1);
octave:4> bugscript
panic: impossible state reached in file '../libinterp/corefcn/stack-frame.cc' at line 1264
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)


Raising priority and severity because this is a hard crash with the potential of a user losing data. The commands look quite simple to me and I wouldn't expect an error/crash.

Markus Mützel <mmuetzel>
Group administrator
Mon 20 Sep 2021 11:32:51 AM UTC, original submission:  

The following error is causing the code available at

https://github.com/nghiaho12/camera_calibration_toolbox_octave

to crash to desktop. I have narrowed down the cause to a few evaluations of eval. To reproduce:

  • Copy the following into a script (I called it bug.m)


omc_1=rand(3,1);
Tc_1=rand(3,1);
bugscript

  • In a different folder that needs to be added to the Octave path (it must be a different folder or it works without issue) create a script called bugscript.m and copy the following:


kk = 1;
eval(['omckk = omc_' num2str(kk) ';']);
eval(['Tckk = Tc_' num2str(kk) ';']);
eval(['omc_' num2str(kk) ' = omckk;']);

The fourth line will crash Octave. If the third or fourth line is removed it works fine.

I received no error just a crash to the desktop but the link above has a bug report stating they get the message:

panic: impossible state reached in file 'libinterp/corefcn/stack-frame.cc' at line 1257
fatal: caught signal Aborted -- stopping myself...


The above works without issue in version 4.2.1 and the author of the above link states they tested it in version 4.4.0.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51949:  stack-frame-diffs.txt added by jwe (632B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

    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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-06 siko1056 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2021-09-21 jwe StatusPatch Submitted Ready For Test
    2021-09-20 jwe Attached File- Added stack-frame-diffs.txt, #51949
        StatusConfirmed Patch Submitted
    2021-09-20 mmuetzel Severity3 - Normal 4 - Important
        Priority5 - Normal 7 - High
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code