[lldb-dev] [Bug 36436] New: Incorrect size of std::array

via lldb-dev lldb-dev at lists.llvm.org
Mon Feb 19 04:51:35 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36436

            Bug ID: 36436
           Summary: Incorrect size of std::array
           Product: lldb
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dantipov at nvidia.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19899
  --> https://bugs.llvm.org/attachment.cgi?id=19899&action=edit
Sample program

$ /home/dantipov/.local/llvm-6.0.0/bin/lldb t-array
(lldb) target create "t-array"
Current executable set to 't-array' (x86_64).
(lldb) b t-array.cc:10
Breakpoint 1: where = t-array`main + 92 at t-array.cc:10, address =
0x0000000000400573
(lldb) r
Process 16720 launched: '/home/dantipov/tmp/t-array' (x86_64)
Process 16720 stopped
* thread #1, name = 't-array', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400573 t-array`main(argc=1, argv=0x00007fffffffe318)
at t-array.cc:10
   7      std::array<float, 3> y { 1.1111, 2.2222, 3.3333 };
   8      (void) x;
   9      (void) y;
-> 10     return 0;
   11   }
(lldb) fr v -a
(std::array<int, 8>) x = {                                            ;; Why 8?
  _M_elems = ([0] = 1, [1] = 2, [2] = 3, [3] = 4, [4] = 5, [5] = 6)
}
(std::array<float, 8>) y = {                                          ;;
Likewise
  _M_elems = ([0] = 1.11109996, [1] = 2.22219992, [2] = 3.33330011)
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180219/ff15c33d/attachment-0001.html>


More information about the lldb-dev mailing list