<html>
    <head>
      <base href="https://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-mi failing in llvm::CommandLine global constructor on debug builds"
   href="https://llvm.org/bugs/show_bug.cgi?id=30822">30822</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lldb-mi failing in llvm::CommandLine global constructor on debug builds
          </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@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>todd.fiala@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On Ubuntu 14.04 and 16.04 x86_64, I am seeing a failure to run lldb-mi due to
an assert being raised on builds where NDEBUG is not defined.

The failure is in a global constructor in LLVM's Debug.cpp file where it adds a
'debug' command line option.  At the time the global constructor files, the
StringDictionary where the option is being checked for existence seems to
indicate it has something like 7k objects in it, which seems wrong.  Running
through valgrind doesn't show any memory stomps, though.

Here is the CMake/ninja setup I'm using:

# For Ubuntu 14.04
$ CC=clang-3.6 CXX=clang++-3.6 cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ../llvm
-DLLDB_EXPORT_ALL_SYMBOLS=TRUE
$ ninja

Here's the error:
$ bin/lldb-mi
: CommandLine Error: Option 'debug' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options


I am wondering if:
(a) our Ubuntu buildbots are seeing this behavior?
(b) why we're not failing the build?

This regression seems to have been introduced fairly recently, as I have
downstream Ubuntu repositories that I directly manage (ci.swift.org) where we
do run the lldb-mi tests on Ubuntu, and the lldb-mi failure seems to have only
shown up after r281031.</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>