[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave 4.2.1 ambiguity with `clean_up_and_exit()`?
From: |
siko1056 |
Subject: |
Octave 4.2.1 ambiguity with `clean_up_and_exit()`? |
Date: |
Thu, 11 Jan 2018 05:05:49 -0700 (MST) |
jwe,
While looking for a solution for bug #52650 [1] I noticed, that the function
`clean_up_and_exit()` in the standalone demo function [2] is mapped to
`liboctave/cruft/misc/quit.cc` [3]. I stepped with a debugger into it and
especially the output is suspicious:
GCD of [10, 15] is 5
terminate called after throwing an instance of 'octave::exit_exception'
Aborted (core dumped)
The implementation [3] looks like an emergency break with the `throw`
statement,
rather than a gentle exit function. On the other hand, there is an
implementation `octave::interpreter::clean_up_and_exit() in
`libinterp/corefcn/interpreter.cc` [4] that seems to be unused in the
presence
of [3], even within `interpreter.cc`.
This last aspect seems very critical to me. So did I miss something or is
there an ambiguity on the stable branch? The good news is, the default
branch
seems not effected, you made a great effort in the refactoring there. The
bad news is, that the segmentation fault does not vanish by a simple
`return 0;`.
A similar problem I recently noticed on the mailing-list [5]. Thus what is
the suggested method to stop the Octave interpreter in 4.2.*? Otherwise,
our
users will have to wait until 4.4.* to get the situation fixed for
standalone
builds.
Regards,
Kai
[1] https://savannah.gnu.org/bugs/index.php?52650
[2]
https://hg.savannah.gnu.org/hgweb/octave/file/06eb006b1e0f/examples/code/embedded.cc#l34
[3]
https://hg.savannah.gnu.org/hgweb/octave/file/06eb006b1e0f/liboctave/cruft/misc/quit.cc#l52
[4]
https://hg.savannah.gnu.org/hgweb/octave/file/06eb006b1e0f/libinterp/corefcn/interpreter.cc#l984
[5] https://lists.gnu.org/archive/html/help-octave/2018-01/msg00043.html
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html
- Octave 4.2.1 ambiguity with `clean_up_and_exit()`?,
siko1056 <=