Fix Invalid read of size 4 in KateApp::~KateApp()
The problem was, that QList<KateMainWindow *> m_mainWindows; was deleted first, and ~KatePluginManager() accesses this list during its destruction (unloading of plugins GUI). ==3956== Invalid read of size 4 ==3956== at 0x48D0FB: QListData::size() const (qlist.h:107) ==3956== by 0x492A63: QList<KateMainWindow*>::size() const (qlist.h:160) ==3956== by 0x4920E5: KateApp::mainWindowsCount() const (kateapp.cpp:368) ==3956== by 0x4A9C5E: KatePluginManager::disablePluginGUI(KatePluginInfo*) (katepluginmanager.cpp:274) ==3956== by 0x4A9772: KatePluginManager::unloadPlugin(KatePluginInfo*) (katepluginmanager.cpp:196) ==3956== by 0x4A944C: KatePluginManager::unloadAllPlugins() (katepluginmanager.cpp:156) ==3956== by 0x4A8805: KatePluginManager::~KatePluginManager() (katepluginmanager.cpp:52) ==3956== by 0x4904C1: KateApp::~KateApp() (kateapp.cpp:71) ==3956== by 0x48C79F: main (main.cpp:429) ==3956== Address 0x1bb5612c is 12 bytes inside a block of size 32 free'd ==3956== at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==3956== by 0xAE80408: QListData::dispose(QListData::Data*) (qlist.cpp:166) ==3956== by 0x49360C: QList<KateMainWindow*>::dealloc(QListData::Data*) (qlist.h:857) ==3956== by 0x492C1F: QList<KateMainWindow*>::~QList() (qlist.h:817) ==3956== by 0x49048D: KateApp::~KateApp() (kateapp.cpp:71) ==3956== by 0x48C79F: main (main.cpp:429) ==3956== ==3956== Invalid read of size 4 ==3956== at 0x48D105: QListData::size() const (qlist.h:107) ==3956== by 0x492A63: QList<KateMainWindow*>::size() const (qlist.h:160) ==3956== by 0x4920E5: KateApp::mainWindowsCount() const (kateapp.cpp:368) ==3956== by 0x4A9C5E: KatePluginManager::disablePluginGUI(KatePluginInfo*) (katepluginmanager.cpp:274) ==3956== by 0x4A9772: KatePluginManager::unloadPlugin(KatePluginInfo*) (katepluginmanager.cpp:196) ==3956== by 0x4A944C: KatePluginManager::unloadAllPlugins() (katepluginmanager.cpp:156) ==3956== by 0x4A8805: KatePluginManager::~KatePluginManager() (katepluginmanager.cpp:52) ==3956== by 0x4904C1: KateApp::~KateApp() (kateapp.cpp:71) ==3956== by 0x48C79F: main (main.cpp:429) ==3956== Address 0x1bb56128 is 8 bytes inside a block of size 32 free'd ==3956== at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==3956== by 0xAE80408: QListData::dispose(QListData::Data*) (qlist.cpp:166) ==3956== by 0x49360C: QList<KateMainWindow*>::dealloc(QListData::Data*) (qlist.h:857) ==3956== by 0x492C1F: QList<KateMainWindow*>::~QList() (qlist.h:817) ==3956== by 0x49048D: KateApp::~KateApp() (kateapp.cpp:71) ==3956== by 0x48C79F: main (main.cpp:429)
parent
1108d3d9
Please register or sign in to comment