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

[REG 6.2 -> 6.3.0] QDateTime::fromString slow at handling large input

    XMLWordPrintable

Details

    • c58a3a4aae4c423bd0477a981ad1c517a30579e3 (qt/qtbase/dev) a7d1c48ca3162a805708d059da87ca3d742863f1 (qt/qtbase/dev) 448e45b1f4cf9e4883c547d68312c469c79a9cd5 (qt/qtbase/6.2)

    Description

      1. Build the libfuzzer test for QDateTime::fromString, e.g.:
        ~/dev/clang-10.0.0/qt-dev_10.13-base_svg-devbld-no-openssl/qtbase/bin/qt-cmake -S ~/dev/src/qtbase/tests/libfuzzer/corelib/time/qdatetime/fromstring/ -GNinja && cmake --build . --parallel
        
      2. Run the resulting binary, passing in the attached file:
        ./fromstring 38077.txt
        

        It takes too long to finish. Times I see are:

        developer build, debug, no sanitizers 9901 ms
        static, release, UBSAN 10293 ms
        static, release, ASAN 68568 ms

        The slow formats seem to be Qt::TextDate and Qt::RFC2822Date.

      I admit, the file is a tad larger than usual, but why would fromString() even try to handle all of this data?

      With Qt 6.2.0 and this input, fromString() finishes quickly, e.g. in 35ms with ASAN.

      Google's oss-fuzz found this as issue 38077. They will publish the details on December 2nd.

      Attachments

        1. 38077.txt
          128 kB
        2. details.html
          1.78 MB
        3. CMakeLists.txt
          0.3 kB
        4. main.cpp
          0.5 kB

        Issue Links

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

          Activity

            People

              manordheim Mårten Nordheim
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes