[lldb-dev] [Bug 17805] New: LLDB thinks a vector has many more elements than it does

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 4 15:42:03 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17805

            Bug ID: 17805
           Summary: LLDB thinks a vector has many more elements than it
                    does
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: dunpealer at gmail.com
    Classification: Unclassified

Created attachment 11483
  --> http://llvm.org/bugs/attachment.cgi?id=11483&action=edit
Test case demonstrating the bug

This is on Linux, Xubuntu 13.04, using latest APT packages from llvm.org/apt.

Compiler: Ubuntu clang version 3.4-1~exp1 (trunk) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
lldb version 3.4 ( revision )
libstdc++ version: 4.7.3-1ubuntu1

When running the attached test.cc code, breaking at line #14 and executing `p
vec` in the debugger, the following output is printed:

(lldb) p vec
(std::vector<std::vector<std::pair<int, int>, std::allocator<std::pair<int,
int> > >, std::allocator<std::vector<std::pair<int, int>,
std::allocator<std::pair<int, int> > > > >) $0 = size=4294967295 {
  [0] = size=4294967295 {
    [0] = (first = 0, second = 1)
    [1] = (first = 1, second = 2)
    [2] = (first = 2, second = 3)
    [3] = (first = 3, second = 4)
    ...
  } 
  [1] = size=4294967295 {
    [0] = (first = 1, second = 2)
    [1] = (first = 2, second = 3)
    [2] = (first = 3, second = 4)
    [3] = (first = 4, second = 5)
    ...
  } 

LLDB thinks vec itself is of size 4294967295 when in fact it contains only 300
vectors. Worse, it thinks each of these 300 vectors contains 4294967295
pair<int,int>s, when in fact there are only 4.

-- 
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/20131104/2a1f56be/attachment.html>


More information about the lldb-dev mailing list