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

On 64-bit platforms, QBuffer::write(ptr, 2GiB + 1) incorrectly reports success

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.5, 6.3.1, 6.4.0 Beta1
    • 6.2.4, 6.3.0 Beta3, 6.4
    • Core: I/O
    • None
    • All
    • 3
    • 61157c8354 (qt/qtbase/dev) 15919c5bda (qt/qtbase/6.3) fb19f77aa3 (qt/qtbase/6.2) fb19f77aa3 (qt/tqtc-qtbase/6.2) 15919c5bda (qt/tqtc-qtbase/6.3) 61157c8354 (qt/tqtc-qtbase/dev)
    • Team B Foundation Sprint 55

    Description

      When trying to write more than 2GiB of data to a QBuffer on 64-bit platforms, the write() call returns success, while the write is actually short:

      const std::string input(2 * 1024 * 1024 * 1024 + 1, 42);
      auto r = buffer.write(input.data(), input.size()); // returns input.size()
      // but
      assert(buffer.buffer().size() == input.size()); // fails!
      

      32-bit platforms don't support this operation, so it's a 64-bit-only issue.

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes