<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - LLDB thinks a vector has many more elements than it does"
   href="http://llvm.org/bugs/show_bug.cgi?id=17805">17805</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLDB thinks a vector has many more elements than it does
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dunpealer@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11483" name="attach_11483" title="Test case demonstrating the bug">attachment 11483</a> <a href="attachment.cgi?id=11483&action=edit" title="Test case demonstrating the bug">[details]</a></span>
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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>