https://bugs.kde.org/show_bug.cgi?id=373996

--- Comment #8 from Kevin Funk <kf...@kde.org> ---
I can still reproduce the crash. Note: The to-be-deleted file needs to be
tracked in the VCS (e.g. via an `git add`).

ASAN trace:
==22144==ERROR: AddressSanitizer: attempting free on address which was not
malloc()-ed: 0x7ffe1bf561b0 in thread T0
    #0 0x510dc0 in operator delete(void*, unsigned long)
(/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x510dc0)
    #1 0x7f71b5d12cd0 in QObjectPrivate::deleteChildren()
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2a6cd0)
    #2 0x7f71b6a033da in QWidget::~QWidget()
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1963da)
    #3 0x7f71ba7b8d78 in KTextEditor::ViewPrivate::~ViewPrivate()
(/usr/lib/x86_64-linux-gnu/libKF5TextEditor.so.5+0x18ad78)
    #4 0x7f71ba73851e in KTextEditor::DocumentPrivate::~DocumentPrivate()
(/usr/lib/x86_64-linux-gnu/libKF5TextEditor.so.5+0x10a51e)
    #5 0x7f71ba7388c8 in KTextEditor::DocumentPrivate::~DocumentPrivate()
(/usr/lib/x86_64-linux-gnu/libKF5TextEditor.so.5+0x10a8c8)
    #6 0x7f71bbea0d67 in
KDevelop::TextDocument::close(KDevelop::IDocument::DocumentSaveMode)
/home/kfunk/devel/src/kf5/kdevplatform-stable/shell/textdocument.cpp:566:9
    #7 0x7f71bbea53ac in KDevelop::TextDocument::repositoryCheckFinished(bool)
/home/kfunk/devel/src/kf5/kdevplatform-stable/shell/textdocument.cpp:767:9
    #8 0x7f71bbeb044e in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,
QtPrivate::List<bool>, void, void (KDevelop::TextDocument::*)(bool)>::call(void
(KDevelop::TextDocument::*)(bool), KDevelop::TextDocument*, void**)
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:141:13
    #9 0x7f71bbeb0100 in void QtPrivate::FunctionPointer<void
(KDevelop::TextDocument::*)(bool)>::call<QtPrivate::List<bool>, void>(void
(KDevelop::TextDocument::*)(bool), KDevelop::TextDocument*, void**)
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:160:13
    #10 0x7f71bbeafd16 in QtPrivate::QSlotObject<void
(KDevelop::TextDocument::*)(bool), QtPrivate::List<bool>, void>::impl(int,
QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120:17
    #11 0x7f71b5d1481d in QMetaObject::activate(QObject*, int, int, void**)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2a881d)
    #12 0x7f71b162b165 in KDevelop::CheckInRepositoryJob::finished(bool)
/home/kfunk/devel/build/kf5/kdevplatform-stable/vcs/KDevPlatformVcs_automoc.dir/moc_icontentawarev_262F6KF7NTUPVZ.cpp:135:5
    #13 0x7f717cb51332 in
GitPluginCheckInRepositoryJob::repositoryQueryFinished(int)
/home/kfunk/devel/src/kf5/kdevplatform-stable/plugins/git/gitplugincheckinrepositoryjob.cpp:91:10
    #14 0x7f717cb53b7c in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,
QtPrivate::List<int>, void, void
(GitPluginCheckInRepositoryJob::*)(int)>::call(void
(GitPluginCheckInRepositoryJob::*)(int), GitPluginCheckInRepositoryJob*,
void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:141:13
    #15 0x7f717cb53830 in void QtPrivate::FunctionPointer<void
(GitPluginCheckInRepositoryJob::*)(int)>::call<QtPrivate::List<int>, void>(void
(GitPluginCheckInRepositoryJob::*)(int), GitPluginCheckInRepositoryJob*,
void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:160:13
    #16 0x7f717cb53446 in QtPrivate::QSlotObject<void
(GitPluginCheckInRepositoryJob::*)(int), QtPrivate::List<int>, void>::impl(int,
QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120:17
    #17 0x7f71b5d1481d in QMetaObject::activate(QObject*, int, int, void**)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2a881d)
    #18 0x7f71b5c1a230 in QProcess::finished(int)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x1ae230)
    #19 0x7f71b5c2241e  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x1b641e)
    #20 0x7f71b5c22598  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x1b6598)
    #21 0x7f71b5d144a8 in QMetaObject::activate(QObject*, int, int, void**)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2a84a8)
    #22 0x7f71b5d8e46d in QSocketNotifier::activated(int,
QSocketNotifier::QPrivateSignal)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x32246d)
    #23 0x7f71b5d20a61 in QSocketNotifier::event(QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2b4a61)
    #24 0x7f71b69c035b in QApplicationPrivate::notify_helper(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15335b)
    #25 0x7f71b69c7b10 in QApplication::notify(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15ab10)
    #26 0x7f71b5ce889f in QCoreApplication::notifyInternal2(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x27c89f)
    #27 0x7f71b5d3d3bc  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d13bc)
    #28 0x7f71a9e83376 in g_main_context_dispatch
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a376)
    #29 0x7f71a9e835df  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a5df)
    #30 0x7f71a9e8368b in g_main_context_iteration
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a68b)
    #31 0x7f71b5d3cf0e in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d0f0e)
    #32 0x7f71b5ce6889 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x27a889)
    #33 0x7f71b6baea06 in QDialog::exec()
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x341a06)
    #34 0x7f71b6bae919 in QDialog::exec()
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x341919)
    #35 0x7f71b6bc1224 in QFileDialog::getSaveFileUrl(QWidget*, QString const&,
QUrl const&, QString const&, QString*, QFlags<QFileDialog::Option>, QStringList
const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x354224)
    #36 0x7f71ba721eb2 in KTextEditor::DocumentPrivate::documentSaveAs()
(/usr/lib/x86_64-linux-gnu/libKF5TextEditor.so.5+0xf3eb2)
    #37 0x7f71ba8aeaea 
(/usr/lib/x86_64-linux-gnu/libKF5TextEditor.so.5+0x280aea)
    #38 0x7f71b5d144a8 in QMetaObject::activate(QObject*, int, int, void**)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2a84a8)
    #39 0x7f71b69b9991 in QAction::triggered(bool)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x14c991)
    #40 0x7f71b69bc37f in QAction::activate(QAction::ActionEvent)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x14f37f)
    #41 0x7f71b6b2b9b9  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2be9b9)
    #42 0x7f71b6b33043  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2c6043)
    #43 0x7f71b6b34015 in QMenu::mouseReleaseEvent(QMouseEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2c7015)
    #44 0x7f71b6a07a77 in QWidget::event(QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19aa77)
    #45 0x7f71b6b36342 in QMenu::event(QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2c9342)
    #46 0x7f71b69c035b in QApplicationPrivate::notify_helper(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15335b)
    #47 0x7f71b69c89cc in QApplication::notify(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15b9cc)
    #48 0x7f71b5ce889f in QCoreApplication::notifyInternal2(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x27c89f)
    #49 0x7f71b69c707c in QApplicationPrivate::sendMouseEvent(QWidget*,
QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15a07c)
    #50 0x7f71b6a22505  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1b5505)
    #51 0x7f71b6a24b02  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1b7b02)
    #52 0x7f71b69c035b in QApplicationPrivate::notify_helper(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15335b)
    #53 0x7f71b69c7b10 in QApplication::notify(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15ab10)
    #54 0x7f71b5ce889f in QCoreApplication::notifyInternal2(QObject*, QEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x27c89f)
    #55 0x7f71b622c722 in
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xf5722)
    #56 0x7f71b622e2a4 in
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
(/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xf72a4)
    #57 0x7f71b620c23a in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xd523a)
    #58 0x7f7196c0882f  (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5+0x7182f)
    #59 0x7f71a9e83376 in g_main_context_dispatch
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a376)
    #60 0x7f71a9e835df  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a5df)
    #61 0x7f71a9e8368b in g_main_context_iteration
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a68b)
    #62 0x7f71b5d3cf0e in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d0f0e)
    #63 0x7f71b5ce6889 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x27a889)
    #64 0x7f71b5ceeffb in QCoreApplication::exec()
(/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x282ffb)
    #65 0x5219df in main
/home/kfunk/devel/src/kf5/kdevelop-stable/app/main.cpp:763:12
    #66 0x7f71b47f33f0 in __libc_start_main
/build/glibc-cxyGtm/glibc-2.24/csu/../csu/libc-start.c:291
    #67 0x420f79 in _start
(/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x420f79)

Address 0x7ffe1bf561b0 is located in stack of thread T0 at offset 2608 in frame
    #0 0x7f717cb531af in QtPrivate::QSlotObject<void
(GitPluginCheckInRepositoryJob::*)(int), QtPrivate::List<int>, void>::impl(int,
QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:114

  This frame has 1 object(s):
    [32, 48) 'coerce' <== Memory access at offset 2608 overflows this variable
HINT: this may be a false positive if your program uses some custom stack
unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: bad-free
(/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x510dc0) in operator
delete(void*, unsigned long)
==22144==ABORTING

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to