bugGNU Octave - Bugs: bug #50707, exit in a script file causes abort...

 
 

bug #50707: exit in a script file causes abort from unhandled exception

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Sun 02 Apr 2017 10:10:53 PM UTC  
 
Category: InterpreterSeverity: 4 - Important
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.1Operating 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 05 Apr 2017 05:42:15 PM UTC, comment #4:

I agree, that looks like a big overhaul, closing this as won't fix. If anyone can suggest a workaround that would allow something like

to work, and allow an exit status to be reflected, with Octave 4.2, that would be helpful.

Mike Miller <mtmiller>
Project Administrator
Wed 05 Apr 2017 12:13:34 PM UTC, comment #3:

Though exit in a script is a different case, I think it is the same problem that was reported in bug #50068.

I didn't see a way to fix this on stable without changing external interfaces.

John W. Eaton <jwe>
Project Administrator
Wed 05 Apr 2017 12:00:50 PM UTC, comment #2:

I can confirm this for the latest stable branch, but on dev everything works fine for me with your example. Maybe one of these solved the issue unintentionally?

https://hg.savannah.gnu.org/hgweb/octave/log?rev=exit

Kai Torben Ohlhus <siko1056>
Project Member
Sun 02 Apr 2017 11:36:44 PM UTC, comment #1:

The example shows this, but I guess I should be explicit, I mean a script file that is running from the command shell, what the user manual calls a self-contained Octave script, in the section "Executable Octave Programs".

Starting Octave interactively and calling a script file by name or with the run() function does not show this error.

There is no simple workaround for this, because a self-contained script that takes command-line arguments cannot be combined with the --eval option.

Mike Miller <mtmiller>
Project Administrator
Sun 02 Apr 2017 10:10:53 PM UTC, original submission:

Calling the exit() function in a script file results in a SIGABRT because of an uncaught octave::exit_exception in the interpreter:

This is particularly bad for script files that intend to return a success or failure via the exit status using the exit function as intended.

This works correctly on the default branch, and worked in Octave 4.0, bug affects 4.2.1 and the current stable branch.

Mike Miller <mtmiller>
Project Administrator

 

(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 jwe (Posted a comment)
  • -unavailable- added by siko1056 (Posted a comment)
  • -unavailable- added by mtmiller (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
    Wed 05 Apr 2017 05:42:15 PM UTCmtmillerStatusConfirmed=>Wont Fix
      Open/ClosedOpen=>Closed
    Wed 05 Apr 2017 12:00:50 PM UTCsiko1056StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1