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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.2.4, 6.3.0 Beta3, 6.4
    • Fix Version/s: 6.2.5, 6.3.1, 6.4.0 Beta1
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      All
    • Epic Link:
    • Story Points:
      3
    • Commits:
      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)
    • Sprint:
      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

            Assignee:
            mmutz Marc Mutz
            Reporter:
            mmutz Marc Mutz
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            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