1. 22 Sep, 2014 1 commit
  2. 19 Sep, 2014 1 commit
  3. 29 Aug, 2014 2 commits
    • Erik Verbruggen's avatar
      C++: Fix possible use-after-free of AST. · c8c2aaaf
      Erik Verbruggen authored
      
      
      The CppRefactoringChanges::fileNoEditor takes a Document from the
      snapshot it has. Although this snapshot is a safe copy, it might have
      been gotten right after it was updated by indexing. Such a document will
      still have its AST. If this AST is used by any refactoring action
      without retaining it, the pointers will be dangling after a short while
      (specifically: after the locator has extracted all the information).
      
      The fileNoEditor method is called by the declDefLinkFinder to search
      the target document. The snapshot is obtained before, and contains the
      document for the semantic info. However, the target document will not
      come from the semantic info, but from the indexer.
      
      Change-Id: I212ff41dde6910e94e80552b2c3e5911fe9496ae
      Task-number: QTCREATORBUG-11262
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      c8c2aaaf
    • Erik Verbruggen's avatar
      C++: set the objectName of QTimers. · 4a3cc6d2
      Erik Verbruggen authored
      
      
      This will hopefully help a bit in resolving the crashes that happen in
      QCoreApplication::notifyInternal.
      
      Change-Id: Ib3aa8c1a1f50778bd89938d7c529d8399ccf91ea
      Task-number: QTCREATORBUG-11262
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      4a3cc6d2
  4. 21 Aug, 2014 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Remove concurrent write access to diagnostic messages · 6d70418e
      Nikolai Kosjar authored
      ...in CheckSymbols (highlighting backend). CheckSymbols might run
      concurrently several times with the same CPlusPlus::Document and modify
      the diagnostic messages in an unsave manner. See stack straces below.
      
      While the generated diagnostic messages ("Only virtual functions can be
      marked 'final'", "Too few arguments", ...) are useful, they weren't
      propagated to the editor widget since several minor versions.
      
      =================================================================
      ==23724==ERROR: AddressSanitizer: attempting double-free on 0x60c0072fcd00 in thread T528 (Thread (pooled)):
          #0 0x4787c1 in __interceptor_free (/home/nik/dev/creator/creator-ut_clang-qt5/bin/qtcreator+0x4787c1)
          #1 0x7fa15e5da4ac in QTypedArrayData<unsigned short>::deallocate(QArrayData*) /home/nik/usr/qt-5.3.1/include/QtCore/qarraydata.h:234
          #2 0x7fa15e5d87db in QString::~QString() /home/nik/usr/qt-5.3.1/include/QtCore/qstring.h:995
          #3 0x7fa15e5f4f6a in CPlusPlus::Document::DiagnosticMessage::~DiagnosticMessage() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:140
          #4 0x7fa15e5f4de2 in QList<CPlusPlus::Document::DiagnosticMessage>::node_destruct(QList<CPlusPlus::Document::DiagnosticMessage>::Node*, QList<CPlusPlus::Document::DiagnosticMessage>::Node*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:432
          #5 0x7fa15e5f4ae9 in QList<CPlusPlus::Document::DiagnosticMessage>::dealloc(QListData::Data*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:784
          #6 0x7fa15e5f47ed in QList<CPlusPlus::Document::DiagnosticMessage>::~QList() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:760
          #7 0x7fa15e7533c2 in QList<CPlusPlus::Document::DiagnosticMessage>::clear() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:793
          #8 0x7fa15e6f2ed2 in CPlusPlus::Document::clearDiagnosticMessages() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:205
          #9 0x7fa15e6c5f5b in CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:337
          #10 0x7fa15e6c83c2 in non-virtual thunk to CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:348
          #11 0x7fa17f0ccab1 (/home/nik/usr/qt-5.3.1/lib/libQt5Core.so.5+0x98ab1)
          #12 0x7fa17f0cfa5e (/home/nik/usr/qt-5.3.1/lib/libQt5Core.so.5+0x9ba5e)
          #13 0x7fa17eaeb181 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8181)
          #14 0x7fa17dbec38c (/lib/x86_64-linux-gnu/libc.so.6+0xfb38c)
      
      0x60c0072fcd00 is located 0 bytes inside of 128-byte region [0x60c0072fcd00,0x60c0072fcd80)
      freed by thread T539 (Thread (pooled)) here:
          #0 0x4787c1 in __interceptor_free (/home/nik/dev/creator/creator-ut_clang-qt5/bin/qtcreator+0x4787c1)
          #1 0x7fa15e5da4ac in QTypedArrayData<unsigned short>::deallocate(QArrayData*) /home/nik/usr/qt-5.3.1/include/QtCore/qarraydata.h:234
          #2 0x7fa15e5d87db in QString::~QString() /home/nik/usr/qt-5.3.1/include/QtCore/qstring.h:995
          #3 0x7fa15e5f4f6a in CPlusPlus::Document::DiagnosticMessage::~DiagnosticMessage() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:140
          #4
      
       0x7fa15e5f4de2 in QList<CPlusPlus::Document::DiagnosticMessage>::node_destruct(QList<CPlusPlus::Document::DiagnosticMessage>::Node*, QList<CPlusPlus::Document::DiagnosticMessage>::Node*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:432
          #5 0x7fa15e5f4ae9 in QList<CPlusPlus::Document::DiagnosticMessage>::dealloc(QListData::Data*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:784
          #6 0x7fa15e5f47ed in QList<CPlusPlus::Document::DiagnosticMessage>::~QList() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:760
          #7 0x7fa15e7533c2 in QList<CPlusPlus::Document::DiagnosticMessage>::clear() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:793
          #8 0x7fa15e6f2ed2 in CPlusPlus::Document::clearDiagnosticMessages() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:205
          #9 0x7fa15e6c5f5b in CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:337
          #10 0x7fa15e6c83c2 in non-virtual thunk to CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:348
      
      Change-Id: Ifab2842ea43aeb26099835966b02d8afc4b85df4
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      6d70418e
  5. 24 Jul, 2014 3 commits
  6. 17 Jul, 2014 1 commit
  7. 08 Jul, 2014 2 commits
  8. 07 Jul, 2014 1 commit
  9. 04 Jul, 2014 7 commits
  10. 01 Jul, 2014 1 commit
    • Christian Kandeler's avatar
      Always pass Core::Id by value. · 93304df0
      Christian Kandeler authored
      
      
      Currently we pass in some places by value, elsewhere by const ref and
      for some weird reason also by const value in a lot of places. The latter
      is particularly annoying, as it is also used in interfaces and therefore
      forces all implementors to do the same, since leaving the "const" off is
      causing compiler warnings with MSVC.
      
      Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
      Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
      93304df0
  11. 30 Jun, 2014 1 commit
  12. 25 Jun, 2014 1 commit
  13. 24 Jun, 2014 2 commits
  14. 19 Jun, 2014 1 commit
  15. 18 Jun, 2014 3 commits
  16. 17 Jun, 2014 2 commits
  17. 16 Jun, 2014 2 commits
  18. 12 Jun, 2014 4 commits
  19. 10 Jun, 2014 3 commits
  20. 06 Jun, 2014 1 commit