Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29638

AdressSanitizer: use after free for CMake settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 12.0.0
    • None

      add/remove value in "current configuration" and click "run cmake"

      :-1: error: AddressSanitizer: heap-use-after-free /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:652 in CMakeProjectManager::Internal::ConfigModelTreeItem::flags(int) const
      ==3753175==ERROR: AddressSanitizer: heap-use-after-free on address 0x629002493bf0 at pc 0x7f36b99adfee bp 0x7ffc52bd1060 sp 0x7ffc52bd1050
      READ of size 1 at 0x629002493bf0 thread T0
          #0 0x7f36b99adfed in CMakeProjectManager::Internal::ConfigModelTreeItem::flags(int) const /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:652
          #1 0x7f372ae60076 in Utils::BaseTreeModel::flags(QModelIndex const&) const /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/libs/utils/treemodel.cpp:1036
          #2 0x7f3728f16f84 in QSortFilterProxyModel::flags(QModelIndex const&) const (/usr/lib/libQt6Core.so.6+0x316f84) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #3 0x7f3728f16f84 in QSortFilterProxyModel::flags(QModelIndex const&) const (/usr/lib/libQt6Core.so.6+0x316f84) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #4 0x7f3728f07a54  (/usr/lib/libQt6Core.so.6+0x307a54) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #5 0x7f3728efcf80 in QItemSelection::indexes() const (/usr/lib/libQt6Core.so.6+0x2fcf80) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #6 0x7f372a0ae36a in QTreeView::selectionChanged(QItemSelection const&, QItemSelection const&) (/usr/lib/libQt6Widgets.so.6+0x4ae36a) (BuildId: c2c1cb8b40c27c92a323b4f4481b39e7c8d88dcd)
          #7 0x7f3728d91542  (/usr/lib/libQt6Core.so.6+0x191542) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #8 0x7f3728effc72  (/usr/lib/libQt6Core.so.6+0x2ffc72) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #9 0x7f3728d91542  (/usr/lib/libQt6Core.so.6+0x191542) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #10 0x7f3728ee6e49 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) (/usr/lib/libQt6Core.so.6+0x2e6e49) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #11 0x7f3728f1381c  (/usr/lib/libQt6Core.so.6+0x31381c) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #12 0x7f3728f13d1d  (/usr/lib/libQt6Core.so.6+0x313d1d) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #13 0x7f3728d91542  (/usr/lib/libQt6Core.so.6+0x191542) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #14 0x7f3728ee6e49 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) (/usr/lib/libQt6Core.so.6+0x2e6e49) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #15 0x7f3728f1381c  (/usr/lib/libQt6Core.so.6+0x31381c) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #16 0x7f3728f13d1d  (/usr/lib/libQt6Core.so.6+0x313d1d) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #17 0x7f3728d91542  (/usr/lib/libQt6Core.so.6+0x191542) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #18 0x7f3728ee6e49 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) (/usr/lib/libQt6Core.so.6+0x2e6e49) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #19 0x7f372ae5b527 in Utils::TreeItem::removeChildren() /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/libs/utils/treemodel.cpp:709
          #20 0x7f372ae60516 in Utils::BaseTreeModel::setRootItem(Utils::TreeItem*) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/libs/utils/treemodel.cpp:1076
          #21 0x7f36b99abae7 in CMakeProjectManager::Internal::ConfigModel::generateTree() /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:516
          #22 0x7f36b99ab1ff in CMakeProjectManager::Internal::ConfigModel::setConfiguration(QList<CMakeProjectManager::Internal::ConfigModel::InternalDataItem> const&) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:488
          #23 0x7f36b99a433c in CMakeProjectManager::Internal::ConfigModel::setConfiguration(QList<CMakeProjectManager::Internal::ConfigModel::DataItem> const&) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:180
          #24 0x7f36b99a8d8d in CMakeProjectManager::Internal::ConfigModel::setConfiguration(CMakeProjectManager::CMakeConfig const&) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:377
          #25 0x7f36b959dddd in operator() /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp:391
          #26 0x7f36b95f4a01 in call /usr/include/qt6/QtCore/qobjectdefs_impl.h:127
          #27 0x7f36b95f1277 in call<QtPrivate::List<>, void> /usr/include/qt6/QtCore/qobjectdefs_impl.h:241
          #28 0x7f36b95ec829 in impl /usr/include/qt6/QtCore/qobjectdefs_impl.h:409
          #29 0x7f3728d91349  (/usr/lib/libQt6Core.so.6+0x191349) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #30 0x7f36c29a2031 in ProjectExplorer::BuildSystem::parsingFinished(bool) /sda/home/christian/dev/qtcreator/super-master/Debug_System_Q_2df610fdb9294b86/ProjectExplorer.515e3dc2/qt.headers/moc_buildsystem.cpp:236
          #31 0x7f36c1c98b3b in ProjectExplorer::BuildSystem::emitParsingFinished(bool) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/projectexplorer/buildsystem.cpp:115
          #32 0x7f36c1c9a99e in ProjectExplorer::BuildSystem::ParseGuard::release() /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/projectexplorer/buildsystem.cpp:307
          #33 0x7f36c1c9a9e9 in ProjectExplorer::BuildSystem::ParseGuard::operator=(ProjectExplorer::BuildSystem::ParseGuard&&) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/projectexplorer/buildsystem.cpp:313
          #34 0x7f36b96ce578 in CMakeProjectManager::Internal::CMakeBuildSystem::combineScanAndParse(bool) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp:904
          #35 0x7f36b96d6601 in CMakeProjectManager::Internal::CMakeBuildSystem::handleParsingSucceeded(bool) /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp:1175
          #36 0x7f36b97459c4 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<bool>, void, void (CMakeProjectManager::Internal::CMakeBuildSystem::*)(bool)>::call(void (CMakeProjectManager::Internal::CMakeBuildSystem::*)(bool), CMakeProjectManager::Internal::CMakeBuildSystem*, void**) /usr/include/qt6/QtCore/qobjectdefs_impl.h:135
          #37 0x7f36b9737884 in void QtPrivate::FunctionPointer<void (CMakeProjectManager::Internal::CMakeBuildSystem::*)(bool)>::call<QtPrivate::List<bool>, void>(void (CMakeProjectManager::Internal::CMakeBuildSystem::*)(bool), CMakeProjectManager::Internal::CMakeBuildSystem*, void**) /usr/include/qt6/QtCore/qobjectdefs_impl.h:172
          #38 0x7f36b9729725 in QtPrivate::QSlotObject<void (CMakeProjectManager::Internal::CMakeBuildSystem::*)(bool), QtPrivate::List<bool>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt6/QtCore/qobjectdefs_impl.h:384
          #39 0x7f3728d91349  (/usr/lib/libQt6Core.so.6+0x191349) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #40 0x7f36b9b23f21 in CMakeProjectManager::Internal::FileApiReader::dataAvailable(bool) const /sda/home/christian/dev/qtcreator/super-master/Debug_System_Q_2df610fdb9294b86/CMakeProjectManager.f0edb5fc/qt.headers/moc_fileapireader.cpp:241
          #41 0x7f36b9aa1e93 in operator() /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/fileapireader.cpp:286
          #42 0x7f36b9aa730d in operator() /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/libs/utils/async.h:78
          #43 0x7f36b9aaa7f5 in call /usr/include/qt6/QtCore/qobjectdefs_impl.h:127
          #44 0x7f36b9aa9d6e in call<QtPrivate::List<int>, void> /usr/include/qt6/QtCore/qobjectdefs_impl.h:241
          #45 0x7f36b9aa968b in impl /usr/include/qt6/QtCore/qobjectdefs_impl.h:409
          #46 0x7f3728d91349  (/usr/lib/libQt6Core.so.6+0x191349) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
          #47 0x7f3728e800cd in QFutureWatcherBase::event(QEvent*) (/usr/lib/libQt6Core.so.6+0x2800cd) (BuildId: b6b6413f12bdfa0f594dbec300f816d4442d5baf)
      ...
      SUMMARY: AddressSanitizer: heap-use-after-free /sda/home/christian/dev/qtcreator/super-master/src/qtcreator/src/plugins/cmakeprojectmanager/configmodel.cpp:652 in CMakeProjectManager::Internal::ConfigModelTreeItem::flags(int) const 

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cadam Cristian Adam
            cadam Cristian Adam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes