[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51088] double free at Octave exit
From: |
Olaf Till |
Subject: |
[Octave-bug-tracker] [bug #51088] double free at Octave exit |
Date: |
Wed, 24 May 2017 06:05:42 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #4, bug #51088 (project octave):
The second half of the changeset is not necessary to fix the bug as it was
currently triggered. But I thought a similar bug could occur if this change
isn't made, too.
To explain the second half:
To your question: The destructor of the symbol_table (being empty, but
automatically calling the destructors of the contained objects), _is_ called
by deleting with the copy 'inst' of 'p->second'. The '...->second' entries in
'all_instances' are zeroed before triggering the destructor call to avoid that
the side effects of the destructor may try to trigger a destructor of a
specific symbol table a second time (over 'all_instances').
This deleting with a pointer copy, _after_ zeroing the original pointer, is
the same as was done already before my patch in symtab.cc,
symbol_table::cleanup(), to avoid that side effects call destructors of
already destroyed symbol_tables. Here, in symbtab.h,
symbol_table::erase_scope(), my change is only a precaution against the
possibility that the side effects could try to destroy (over 'all_instances')
the _same_ symbol table as we currently already are destroying. Or can someone
exclude that this happens? I'd rather be at the safe side.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51088>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Olaf Till, 2017/05/22
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Olaf Till, 2017/05/22
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Olaf Till, 2017/05/22
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Rik, 2017/05/23
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Rik, 2017/05/23
- [Octave-bug-tracker] [bug #51088] double free at Octave exit,
Olaf Till <=
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, John W. Eaton, 2017/05/28
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, John W. Eaton, 2017/05/28
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Olaf Till, 2017/05/28
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, John W. Eaton, 2017/05/30
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Olaf Till, 2017/05/31
- [Octave-bug-tracker] [bug #51088] double free at Octave exit, Rik, 2017/05/31