Fri 01 Dec 2017 06:42:30 AM UTC, comment #5:
OK, I found the function in the code (error.cc).
Those remaining two uses of warning will surely fail if the two others fail. They are called immediately at the start of main.
Out of curiosity, I looked at the warning() routine. It's pretty standard code, using variable argument list routines, up until calling this routine:
From about
onward the code becomes dodgy as to whether stack, protect, current frame and do_keyboard are using things all properly initialized by this point.
|
Fri 01 Dec 2017 05:52:15 AM UTC, comment #4:
I'm pretty sure warning() is referencing the Octave interpreter function, which is a problem at this stage since the interpreter, exception handling routines, etc. are not installed yet.
We should probably print an additional prefix like "error:". I've attached a second cset that does that.
There are two remaining instances of warning in octave.cc. They seem to be associated with creating an embedded interpreter. They should also be tested to see if there is a problem. There is an example in Appendix A, and some sample code in examples/code that could probably be used to create a test bed.
(file #42542)
|
Fri 01 Dec 2017 05:32:48 AM UTC, comment #3:
Works here. Do you want some type of warning/error prompt before the message? E.g.:
What is "warning()" function? A gnulib command? Or is it somehow accessing the equivalent of Octave interpreter function "warning"? If the latter, is the use of "warning()" in the early stages of launch a problem?
|
Fri 01 Dec 2017 05:14:42 AM UTC, comment #2:
The interpreter should never segfault, even for erroneous input.
I have some guesses as to why this is happening, but the simplest thing to do is probably to print the message directly to stderr rather than going through warning().
And looking through octave.cc, this is not the only place where warning() is used. I tried combining --eval CODE with specifying an m-file to run and got a slightly different core dump.
)
Try the attached patch 52567.cset. It works for me.
(file #42541)
|
Fri 01 Dec 2017 02:23:15 AM UTC, comment #1:
Confirmed. If I comment out the warning() call:
I see the usage message and no abort signal:
|