Fri 16 Sep 2016 04:52:56 PM UTC, comment #13:
Thanks for testing and pushing this fix :)
|
Fri 16 Sep 2016 04:23:37 PM UTC, comment #12:
Thanks for testing. I added a commit message and pushed the change under Mike's name. Fixed, closing report.
|
Fri 16 Sep 2016 04:05:19 PM UTC, comment #11:
After applying patch from file #38510, the tests pass without crash.
|
Fri 16 Sep 2016 02:59:47 PM UTC, comment #10:
Can someone who can reproduce the problem test Mike's latest patch from 9/14?
|
Wed 14 Sep 2016 04:57:19 PM UTC, comment #9:
Attached patch seems to work for me and produces the same results. It's slightly more code than the original, but looks more straightforward and doesn't need the try-catch with duplicated cleanup or saving state and rethrowing.
(file #38510)
|
Tue 13 Sep 2016 12:20:49 PM UTC, comment #8:
Mike: Yes, using an unwind_protect object is probably better.
|
Tue 13 Sep 2016 09:29:33 AM UTC, comment #7:
Both Mike and jwe's patches fix the crash on openSUSE.
|
Tue 13 Sep 2016 06:16:31 AM UTC, comment #6:
Yes that's probably fine also.
I don't think there's anything particularly wrong about copying an exception object and throwing a copy, it's just an object like any other.
Yet another cleaner way to do this might be to use unwind_protect to restore the state of the stdout and stderr streams after completion. That should work whether an exception is thrown or not, and no need to even catch and rethrow I think.
|
Mon 12 Sep 2016 10:40:50 PM UTC, comment #5:
Mike: Is it OK to copy the exception and throw the copy?
If not, then what about the following patch? I know it duplicates some code, but it avoids copying the exception.
(file #38491)
|
Mon 12 Sep 2016 09:13:17 PM UTC, comment #4:
Attaching a second patch which does this with a flag and a stack-allocated copy of the caught exception, which I think is the better way to do this.
Dmitry can you test whether this patch solves the error on your openSUSE testing?
(file #38488)
|
Mon 12 Sep 2016 09:01:36 PM UTC, comment #3:
The attached patch fixes the crash for me. I believe the code in evalc is indeed wrong. This patch introduces a leak, but I'm not sure what would be the proper way to clean up an exception object that is allocated on the heap and then thrown to be caught or not caught later.
I guess we could use a boolean flag instead of a pointer to an exception object that may or may not point to a valid exception.
(file #38487)
|
Mon 12 Sep 2016 05:59:29 PM UTC, comment #2:
The rest of the test suite runs to completion if I delete libinterp/parse-tree/oct-parse.in.yy-tst.
The crash seems to be coming from tests involving eval or evalc, for example:
|
Mon 12 Sep 2016 05:00:06 AM UTC, comment #1:
Confirmed here on Debian, the following is enough to trigger the crash for me:
The lex.ll test cases must be run first, running tests in oct-parse.in.yy alone does not cause a crash.
|
Sun 11 Sep 2016 11:31:48 AM UTC, original submission:
Octave 4.2.0-rc1 crashes at post build tests for all openSUSE versions:
This situation is caused by strong build environment settings:
|