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

[REG 4.1->4.2] wrong pointer address resolution in dumpers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.2.1
    • Qt Creator 4.2.0
    • Debugger
    • None
    • 0e6c9d26f1e3e0ba0d19dcb62e234b606e0ae2d9 et al

    Description

      struct Foo { int bar = 0; };
      struct TestClass { Foo *foos = new Foo[10]; };
      
      int main()
      {
          TestClass tc;
          return 0; // Break here
      }

      The dumper is:

      def qdump__TestClass(d, value):
          size = 10
          foos = value["foos"]
      
          d.putItemCount(size, 10)
          d.putNumChild(size)
      
          if d.isExpanded():
              with Children(d, size, maxNumChild=10, childType=foos.type):
                  for i in d.childRange():
                      d.putSubItem(i, foos[i])

      In 4.1, bar values are all 0...

      In 4.2 they look random (9903144, 9902248, 32...)

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-17428
        # Subject Branch Project Status CR V

        Activity

          People

            hjk hjk
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes