|
From: | John W. Eaton |
Subject: | [Octave-bug-tracker] [bug #48574] With GCC 6.x, an error in an onCleanup function causes Octave to crash |
Date: | Wed, 20 Jul 2016 23:28:47 +0000 (UTC) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL: <http://savannah.gnu.org/bugs/?48574> Summary: With GCC 6.x, an error in an onCleanup function causes Octave to crash Project: GNU Octave Submitted by: jwe Submitted on: Wed 20 Jul 2016 11:28:45 PM GMT Category: Interpreter Severity: 5 - Blocker Priority: 5 - Normal Item Group: Crash Status: Patch Submitted Assigned to: jwe Originator Name: jwe Originator Email: Open/Closed: Open Discussion Lock: Any Release: dev Operating System: Any _______________________________________________________ Details: GCC 6 now warns ../libinterp/octave-value/ov-oncleanup.cc: In destructor 'virtual octave_oncleanup::~octave_oncleanup()': ../libinterp/octave-value/ov-oncleanup.cc:92:7: warning: throw will always call terminate() [-Wterminate] throw; ^~~~~ ../libinterp/octave-value/ov-oncleanup.cc:92:7: note: in C++11 destructors default to noexcept and an error in an onCleanup function can trigger this problem. The following is sufficient to demonstrate the bug: function foo () onCleanup (@() error ('oops!')); end foo A possible fix is attached. Maybe we should also display the message from the last error along with the new warning about an error in the cleanup function? What does Matlab do for something like this? _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 20 Jul 2016 11:28:45 PM GMT Name: diffs.txt Size: 888B By: jwe <http://savannah.gnu.org/bugs/download.php?file_id=37966> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?48574> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |