octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61415] Debug build causes build failure from


From: anonymous
Subject: [Octave-bug-tracker] [bug #61415] Debug build causes build failure from memory leaks
Date: Sat, 6 Nov 2021 10:20:59 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Follow-up Comment #1, bug #61415 (project octave):

The debug build still builds except for the documentation. If we start
./run-octave and type exit at the Octave prompt, many AddressSanitizer errors
are printed like


Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7f081e980ca1 in operator new(unsigned long)
/build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x7f081c0e584a in
octave::type_info::register_type(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
> const&, octave_value const&, bool)
../libinterp/octave-value/ov-typeinfo.cc:156
    #2 0x7f081be0cf14 in octave_bool_matrix::register_type(octave::type_info&)
../libinterp/octave-value/ov-bool-mat.cc:70
    #3 0x7f081c13392a in install_types(octave::type_info&)
../libinterp/octave-value/ov.cc:3298
    #4 0x7f081c0e450f in octave::type_info::type_info(int)
../libinterp/octave-value/ov-typeinfo.cc:84
    #5 0x7f081cc0664d in
octave::interpreter::interpreter(octave::application*)
../libinterp/corefcn/interpreter.cc:463
    #6 0x7f081b32b3db in octave::application::create_interpreter()
../libinterp/octave.cc:346
    #7 0x7f081deac573 in octave::interpreter_qobject::execute()
../libgui/src/interpreter-qobject.cc:51
    #8 0x7f081e1d5d72 in
octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call,
int, void**) libgui/src/moc-interpreter-qobject.cc:88
    #9 0x7f0819638056 in QObject::event(QEvent*)
(/usr/lib/libQt5Core.so.5+0x2f1056)
    #10 0x7f081a0eeff5 in QApplicationPrivate::notify_helper(QObject*,
QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15aff5)


The sequence is like

1. An interpreter object is created at line 51 in
libgui/src/interpreter-qobject.cc inside the function execute().

2. The interpreter object is shut down in line 97 but not deleted in that
function. There is a comment block in lines 99-108 explaining that the GUI
should delete it, so that the GUI can process pending events first.

3. It looks like the interpreter object is never formally deleted by the GUI
even though it is not used after it has been shut down, so it looks to
AddressSanitizer like it has leaked 8 bytes.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61415>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]