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

Double free in QCircularBuffer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.5.0 RC, 5.7.0 Alpha
    • Qt3D
    • None
    • Development version was tested with Qt 4.8 Linux (gcc 4.8.4), Qt 5.4 Linux (gcc 5.2.1) and Qt 5.6 Windows 7 (some msvc)

    Description

      I am using QCircularBuffer in my project and experienced a double free in certain circumstances.
      The problem occurs on assignment copying the QCircularBuffer and append items afterwards to either one of the copies.

      example
      {
              Qt3DCore::QCircularBuffer<int> a(5);
              Qt3DCore::QCircularBuffer<int> b(5);
              b = a;
              b.append(3);
      }
      

      Here, buffer "a" hits a double free at the end of the scope in line 101, qcircularbuffer_p.h (development branch)

      { operator delete[](p); }

      Attachments

        Issue Links

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

          Activity

            People

              seanharmer Sean Harmer
              kodiak John Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes