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

Minimal plugin not found in static build although explicitly imported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2.0
    • 6.2.0
    • Build System: CMake
    • Ubuntu 20.04 LTS
      clang 10.0.0
      cmake 3.19.2 from Qt's online installer

    Description

      1. Clone Qt.
        I did this in /tmp/qt-bisect:
        git clone git://code.qt.io/qt/qt5.git
        cd qt5/
        perl init-repository --module-subset=qtbase,qtsvg
        
      2. Configure and build Qt.
        I did this in /tmp/qt-bisect/build-qt:
        /tmp/qt-bisect/qt5/configure -platform linux-clang -opensource -confirm-license -prefix $PWD/qtbase -release -static -no-gc-binaries -sanitize fuzzer-no-link -sanitize address -no-openssl && cmake --build .
        
      3. To avoid QTBUG-92083, set compiler and linker flags:
        export CFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link"
        export CXXFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link"
        export LFLAGS=$CFLAGS
        
      4. Build the svg fuzzer:
        /tmp/qt-bisect/build-qt/qtbase/bin/qt-cmake /tmp/qt-bisect/qt5/qtsvg/tests/libfuzzer/svg/qsvgrenderer/render/ && cmake --build .
        
      5. Try running the fuzzer:
        ./render
        

        It fails with the error message:

        qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
        This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        

      Please note that the fuzzer's CMakeLists.txt already contains

      qt_import_plugins(render
          INCLUDE Qt::QMinimalIntegrationPlugin
      )
      

      This caused oss-fuzz to wrongly close found issues.

      Attachments

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

        Activity

          People

            alexandru.croitor Alexandru Croitor
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes