bugGNU Octave - Bugs: bug #47543, segfault with warnings disabled in...

 
 

bug #47543: segfault with warnings disabled in subfunction when all warnings disabled globally

Submitted by:  Orion Poplawski <opoplawski>
Submitted on:  Sat 26 Mar 2016 05:00:37 PM UTC  
 
Category: InterpreterSeverity: 4 - Important
Priority: 7 - HighItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.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.

 

(Jump to the original submission Jump to the original submission)

Fri 15 Jul 2016 10:33:08 PM UTC, comment #9:

Verified this fix. Closing report.

Rik <rik5>
Project Administrator
Fri 15 Jul 2016 07:41:26 PM UTC, comment #8:

Um, yeah.

It's funny that #47387 is also an Octave bug, not something totally different. But then again, I think we dominate the bug tracker activity on savannah...

John W. Eaton <jwe>
Project Administrator
Fri 15 Jul 2016 06:52:17 PM UTC, comment #7:

You mean bug #47837 right? :)

Mike Miller <mtmiller>
Project Administrator
Fri 15 Jul 2016 05:22:06 PM UTC, comment #6:

Lachlan: I pushed your changset:

http://hg.savannah.gnu.org/hgweb/octave/rev/879f297f3194

Can this bug be closed now? What about bug #47387?

John W. Eaton <jwe>
Project Administrator
Wed 08 Jun 2016 07:11:34 AM UTC, comment #5:

Ping.

Does anyone have any comments on this patch?

I'm happy either to fix it in response to comments, or to have http://hg.savannah.gnu.org/hgweb/octave/rev/6ed7bae8017b backed out completely. Either way, I think we should fix the segfaults ASAP.

Lachlan Andrew <lachlan>
Project Member
Sun 27 Mar 2016 04:07:29 AM UTC, comment #4:

The attached patch should fix the problem. Thanks for the simple test case, Mike. I also plan to write a BIST for this, but want feedback first.

The code now does what I intended, but that is still not really the right thing. Issuing "warning <state> all" only changes the default state, so that it doesn't disturb the "language-extension" warning.

This doesn't really affect Matlab compatibility, since the warning IDs are all different and no command can be used on both platforms. That means that the team leaders can decide if "warning <state> all" should assign that state to all warnings, or just to those not explicitly specified.

My personal choice would be to provide a mechanism to turn "language-extension" off for core+forge functions, as was discussed at bug #36743, particularly jwe's comment 9 https://savannah.gnu.org/bugs/?func=detailitem&item_id=36743#comment9. (Please overlook my intemperance in some comments in that discussion...)

I'd like to overhaul errors and warnings to give more flexibility than just "on" and "off", but first I need to learn to stop submitting bugs :)

(file #36776)

Lachlan Andrew <lachlan>
Project Member
Sat 26 Mar 2016 06:34:03 PM UTC, comment #3:

Bisecting confirms that the cause of this regression is the following change, made to fix bug #45753:

http://hg.savannah.gnu.org/hgweb/octave/rev/6ed7bae8017b

CC'ing Lachlan who worked on the patch for this other bug.

Mike Miller <mtmiller>
Project Administrator
Sat 26 Mar 2016 05:38:04 PM UTC, comment #2:

And confirmed that this crash was not present in 4.0.0 but is present in 4.0.1. Beginning bisect.

Mike Miller <mtmiller>
Project Administrator
Sat 26 Mar 2016 05:20:03 PM UTC, comment #1:

Thanks for reporting. I was looking at this at the same time, I've created a minimal test case to show that it has to do with the test environment and something to do with the way warnings are disabled and restored. Retitling to be more accurate and has nothing to do with the image package specifically.

Using the attached myfunc.m,

There have to be at least two test runs after warnings are turned off. The first test seems to enable all warnings, perhaps as it's trying to restore the warning state before test was called. The second test causes the segfault. It has to be a subfunction that disables warnings locally.

(file #36770)

Mike Miller <mtmiller>
Project Administrator
Sat 26 Mar 2016 05:00:37 PM UTC, original submission:

>> pkg load image
>> warning off all
>> test graythresh


panic: impossible state reached in file '../../libinterp/corefcn/error.cc' at line 1470
panic: Aborted -- stopping myself...

Orion Poplawski <opoplawski>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #36770:  myfunc.m added by mtmiller (190B - text/x-objcsrc)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by mtmiller
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by opoplawski (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 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Jul 2016 10:33:08 PM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 15 Jul 2016 05:23:09 PM UTCjweStatusPatch Submitted=>Ready For Test
    Mon 27 Jun 2016 08:12:51 AM UTClachlanStatusIn Progress=>Patch Submitted
    Wed 04 May 2016 03:43:07 PM UTCrik5Dependencies-=>bugs #47837 is dependent
    Sun 27 Mar 2016 04:07:51 AM UTClachlanStatusPatch Submitted=>In Progress
    Sun 27 Mar 2016 04:07:29 AM UTClachlanAttached File-=>Added bug_47543_warning_all.cset, #36776
      StatusConfirmed=>Patch Submitted
    Sat 26 Mar 2016 06:34:03 PM UTCmtmillerPriority5 - Normal=>7 - High
      Carbon-Copy-=>Added lachlan
    Sat 26 Mar 2016 05:38:04 PM UTCmtmillerSeverity3 - Normal=>4 - Important
      Item GroupSegfault, Bus Error, etc.=>Regression
    Sat 26 Mar 2016 05:20:03 PM UTCmtmillerAttached File-=>Added myfunc.m, #36770
      StatusNone=>Confirmed
      SummaryCrash in image graythresh with warnings disabled=>segfault with warnings disabled in subfunction when all warnings disabled globally

    Back to the top


    Powered by Savane 3.1-cleanup1