[lldb-dev] [Bug 30822] New: lldb-mi failing in llvm::CommandLine global constructor on debug builds

2016-10-28 Thread via lldb-dev
https://llvm.org/bugs/show_bug.cgi?id=30822

Bug ID: 30822
   Summary: lldb-mi failing in llvm::CommandLine global
constructor on debug builds
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: todd.fi...@gmail.com
CC: llvm-b...@lists.llvm.org
Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 30824] New: lldb evaluates $N incorrectly when it was a printed register value

2016-10-28 Thread via lldb-dev
https://llvm.org/bugs/show_bug.cgi?id=30824

Bug ID: 30824
   Summary: lldb evaluates $N incorrectly when it was a printed
register value
   Product: lldb
   Version: 3.8
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: r...@swtch.com
CC: llvm-b...@lists.llvm.org
Classification: Unclassified

Using Ubuntu 14.04 LTS's lldb-3.8 package to debug a trivial program, try
printing a register value (first print, so it ends up being $0) and then
referring to that print in a later expression. The later reference is
incorrectly evaluated:

$ echo 'int main() {return 0;}' | gcc -xc - -o a.out # any binary will do
$ lldb-3.8 --version
lldb version 3.8.0 ( revision )
$ lldb-3.8 a.out
(lldb) target create "a.out"
Current executable set to 'a.out' (x86_64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x004004ed
(lldb) r
Process 62061 launched: '/usr/local/google/home/rsc/a.out' (x86_64)
Process 62061 stopped
* thread #1: tid = 62061, 0x004004ed a.out`main, name = 'a.out', stop
reason = breakpoint 1.1
frame #0: 0x004004ed a.out`main
a.out`main:
->  0x4004ed <+0>: pushq  %rbp
0x4004ee <+1>: movq   %rsp, %rbp
0x4004f1 <+4>: movl   $0x0, %eax
0x4004f6 <+9>: popq   %rbp
(lldb) print/x $rdi
(unsigned long) $0 = 0x0001
(lldb) print/x ($rdi)
(unsigned long) $1 = 0x0001
(lldb) print/x $0
(unsigned long) $0 = 0x0001
(lldb) print/x ($0)
(unsigned long) $2 = 0x77ff6008  <<< WRONG!
(lldb) 

$0 and ($0) should evaluate to the same value. The final print is wrong. This
happens in any non-trivial expression involving printed register values.
Continuing:

(lldb) print/x $rdi
(unsigned long) $3 = 0x0001
(lldb) print/x $rsi
(unsigned long) $4 = 0x7fffe058
(lldb) print/x $rdi+$rsi
(unsigned long) $5 = 0x7fffe059
(lldb) print/x $3+$4
(unsigned long) $6 = 0xeffec010  <<< WRONG!
(lldb)

And so on.

I see this on OS X with the Xcode toolchain lldb as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 30822] lldb-mi failing in llvm::CommandLine global constructor on debug builds

2016-10-28 Thread via lldb-dev
https://llvm.org/bugs/show_bug.cgi?id=30822

Todd Fiala  changed:

   What|Removed |Added

   Assignee|lldb-dev@lists.llvm.org |todd.fi...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev