Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18949

rebalancing on std::set throws of debug visualizer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 4.4.0
    • Debugger
    • I'm working on Linux with glibc version 2.26, gcc 7.2.0 and GDB 8.0.1

    Description

      The visualization of a std::set is broken. Reproducable with the following code

          std::set<int> simpleSet;
          for( int i=0; i<10; ++i )
              simpleSet.insert( i );

      Up to i=6 everything is fine but upon inserting 7 the set goes from

          Locals
              i    7    int
              simpleSet    <7 items>    std::set<int, std::less<int>, std::allocator<int> >
                  [0]    0    int
                  [1]    1    int
                  [2]    2    int
                  [3]    3    int
                  [4]    4    int
                  [5]    5    int
                  [6]    6    int

      to

          Locals
              i    8    int
              simpleSet    <8 items>    std::set<int, std::less<int>, std::allocator<int> >
                  [0]    0    int
                  [1]    1    int
                  [2]    2    int
                  [3]    1    int
                  [4]    2    int
                  [5]    1    int
                  [6]    2    int
                  [7]    1    int

      in the debugger. This is reproducable with other datatypes and random values. It also happens with std::multiset but not with std::map. Always on inserting the 8th element all previous elements are changed. Inserting more just adds more 1s and 2s to the set's visualization.

      Attachments

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

        Activity

          People

            hjk hjk
            jaytea jaytea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes