Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97109

Use of uninitialized value in qfilesystemengine_unix.cpp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.3.0 Feature Freeze
    • 6.2.0
    • Core: I/O
    • None
    • 3fc58a5ed837bc5135198a05255ca7ac72ced69e

    Description

      Discovered while building qtbase with Memory Sanitizer.

      CodeChecker report (only accessible with Qt VPN):

      https://codechecker.ci.qt.io/sanitizer_testruns/report-detail?review-status=Unreviewed&review-status=Confirmed%20bug&detection-status=New&detection-status=Reopened&detection-status=Unresolved&run=moc-msan&report-id=45&report-hash=94506df4be4dc1da005560cc662a1f47&report-filepath=src%2Fcorelib%2Fio%2Fqfilesystemengine_unix.cpp

      Sample output (full log attached):

      Output
      ------
      ==787111==WARNING: MemorySanitizer: use-of-uninitialized-value
      #0 0x955fe0 in QFileSystemMetaData::fillFromStatxBuf(statx const&) /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/corelib/io/qfilesystemengine_unix.cpp:336:9
      #1 0x95583b in QFileSystemEngine::fillMetaData(int, QFileSystemMetaData&) /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/corelib/io/qfilesystemengine_unix.cpp:417:18
      #2 0x96e98e in QFSFileEnginePrivate::nativeOpen(QFlags<QIODeviceBase::OpenModeFlag>) /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/corelib/io/qfsfileengine_unix.cpp:134:17
      #3 0x74abb3 in QFSFileEngine::open(QFlags<QIODeviceBase::OpenModeFlag>) /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/corelib/io/qfsfileengine.cpp:253:15
      #4 0x727f06 in QFile::open(QFlags<QIODeviceBase::OpenModeFlag>) /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/corelib/io/qfile.cpp:908:22
      #5 0x5396a3 in runMoc(int, char**) /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/tools/moc/main.cpp:473:17
      #6 0x546091 in main /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/tools/moc/main.cpp:656:12
      #7 0x7ff01fcc80b2 in __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308:16
      #8 0x41e60d in _start (/home/daskolan/sanitizer_results/test_run_5/qtbase/msan/build/libexec/moc+0x41e60d)

      SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/daskolan/sanitizer_results/test_run_5/qtbase/src/src/corelib/io/qfilesystemengine_unix.cpp:336:9 in QFileSystemMetaData::fillFromStatxBuf(statx const&)
      Exiting

      Attachments

        Activity

          People

            thiago Thiago Macieira
            david.skoland David Skoland
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: