Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
Qt Creator 10.0.0-beta1
-
None
-
-
af03f49bf (10.0)
Description
Memory analyzer reports Conditional jump or move depends on uninitialised value(s) and points into clangformatbaseindenter:781 (introduced here: https://codereview.qt-project.org/c/qt-creator/qt-creator/+/448232 ):
Conditional jump or move depends on uninitialised value(s) in ClangFormat::ClangFormatBaseIndenter::styleForFile() const in /home/jarek/dev/creator-10/src/plugins/clangformat/clangformatbaseindenter.cpp:781 1: QUtf8::convertToUnicode(QChar*, QByteArrayView) in /home/jarek/dev/qt-64/qtbase/src/corelib/text/qstringconverter.cpp:643 2: QUtf8::convertToUnicode(QByteArrayView) in /home/jarek/dev/qt-64/qtbase/src/corelib/text/qstringconverter.cpp:591 3: QString::fromUtf8(QByteArrayView) in /home/jarek/dev/qt-64/qtbase/src/corelib/text/qstring.cpp:5607 4: QString::fromUtf8(char const*, long long) in /home/jarek/dev/qt-64/qtbase/src/corelib/text/qstring.h:805 5: QString::fromStdString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in /home/jarek/dev/qt-64/qtbase/src/corelib/text/qstring.h:1477 6: ClangFormat::Internal::LlvmFileSystemAdapter::makeAbsolute(llvm::SmallVectorImpl<char>&) const in /home/jarek/dev/creator-10/src/plugins/clangformat/llvmfilesystem.h:154 7: clang::format::getStyle(llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::vfs::FileSystem*, bool) in /home/jarek/dev/creator-10-build-64/lib/qtcreator/plugins/libClangFormat.so 8: ClangFormat::ClangFormatBaseIndenter::styleForFile() const in /home/jarek/dev/creator-10/src/plugins/clangformat/clangformatbaseindenter.cpp:781 9: ClangFormat::ClangFormatIndenter::tabSettings() const in /home/jarek/dev/creator-10/src/plugins/clangformat/clangformatindenter.cpp:68 10: ClangFormat::ClangFormatForwardingIndenter::tabSettings() const in /home/jarek/dev/creator-10/src/plugins/clangformat/clangformatindenter.cpp:197 11: CppEditor::Internal::CppEditorDocument::tabSettings() const in /home/jarek/dev/creator-10/src/plugins/cppeditor/cppeditordocument.cpp:436 12: TextEditor::Internal::LineColumnLabel::update() in /home/jarek/dev/creator-10/src/plugins/texteditor/texteditor.cpp:177 13: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (TextEditor::Internal::LineColumnLabel::*)()>::call(void (TextEditor::Internal::LineColumnLabel::*)(), TextEditor::Internal::LineColumnLabel*, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobjectdefs_impl.h:135 14: void QtPrivate::FunctionPointer<void (TextEditor::Internal::LineColumnLabel::*)()>::call<QtPrivate::List<>, void>(void (TextEditor::Internal::LineColumnLabel::*)(), TextEditor::Internal::LineColumnLabel*, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobjectdefs_impl.h:172 15: QtPrivate::QSlotObject<void (TextEditor::Internal::LineColumnLabel::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobjectdefs_impl.h:383 16: QtPrivate::QSlotObjectBase::call(QObject*, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobjectdefs_impl.h:363 17: void doActivate<false>(QObject*, int, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobject.cpp:3979 18: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobject.cpp:4039 19: QPlainTextEdit::cursorPositionChanged() in /home/jarek/dev/qt-64-build/qtbase/src/widgets/Widgets_autogen/include/moc_qplaintextedit.cpp:687 20: QPlainTextEditPrivate::_q_cursorPositionChanged() in /home/jarek/dev/qt-64/qtbase/src/widgets/widgets/qplaintextedit.cpp:429 21: QPlainTextEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) in /home/jarek/dev/qt-64-build/qtbase/src/widgets/Widgets_autogen/include/moc_qplaintextedit.cpp:496 22: void doActivate<false>(QObject*, int, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobject.cpp:3991 23: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) in /home/jarek/dev/qt-64/qtbase/src/corelib/kernel/qobject.cpp:4039 24: QWidgetTextControl::cursorPositionChanged() in /home/jarek/dev/qt-64-build/qtbase/src/widgets/Widgets_autogen/include/moc_qwidgettextcontrol_p.cpp:727 25: QWidgetTextControl::setTextCursor(QTextCursor const&, bool) in /home/jarek/dev/qt-64/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp:913 Uninitialised value was created by a stack allocation 1: clang::format::getStyle(llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::vfs::FileSystem*, bool) in /home/jarek/dev/creator-10-build-64/lib/qtcreator/plugins/libClangFormat.so
Marcus, please investigate further...