bugGNU Octave - Bugs: bug #51993, Seg fault when calling 'clear all'...

 
 

bug #51993: Seg fault when calling 'clear all' after creating class that contains subfunctions in local functions

Submitted by:  Piotr Held <jsoh425>
Submitted on:  Mon 11 Sep 2017 09:04:24 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Piotr HeldOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 14 Sep 2017 05:36:39 PM UTC, comment #2:

So I tested it again before the new changeset and after it and the changeset fixed the problem for me. Thanks :).

Piotr Held <jsoh425>
Thu 14 Sep 2017 02:51:31 PM UTC, comment #1:

I pushed the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/840882c82e22

I'm not sure how to add a test for this since "clear all" or "clear classes" could have disastrous results if executed in the middle of running the test suite.

John W. Eaton <jwe>
Project Administrator
Mon 11 Sep 2017 09:04:24 PM UTC, original submission:

When creating the following class (I attached the class *.m file also):

After constructing this class calling 'clear all' or exiting Octave causes heap-use-after-free AddressSanitizer error. This does not seem to be a problem if the subfunction ('sub_foo' in this case) is defined not in a classdef local function but in a separate function file.

I also stepped through the code and was able to confirm that the error occurs while clearing 'sub_foo' from symbol_table::clear_functions ( symtab.h:1194) when clearing 'sub_foo' from the symbol table.

Piotr Held <jsoh425>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #41781:  local_fcn_class.m added by jsoh425 (227B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jsoh425 (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Sep 2017 05:57:22 PM UTCjweStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 14 Sep 2017 02:51:31 PM UTCjweStatusNone=>Ready For Test
    Mon 11 Sep 2017 09:04:24 PM UTCjsoh425Attached File-=>Added local_fcn_class.m, #41781

    Back to the top


    Powered by Savane 3.1-cleanup1