https://bugs.llvm.org/show_bug.cgi?id=39500
Bug ID: 39500
Summary: Segfault when evaluating STL expression
Product: lldb
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev@lists.llvm.org
Reporter: ldio...@apple.com
CC: llvm-b...@lists.llvm.org
When evaluating some STL expression, lldb segfaults. This only seems to happen
with a recent Clang and LLDB, which may be related to the removal of
`always_inline` from libc++ shipped with recent Clangs.
This bug is a reduction of the STL-related failure that started happening in
http://green.lab.llvm.org/green/job/lldb-cmake/11896.
Here's the reproduction (with Trunk Clang and LLDB):
```
#!/bin/sh
cat > t.cpp <<EOF
#include <cstdio>
#include <map>
#include <string>
int main() {
std::string hello_world = "Hello World!";
std::map<std::string, int> associative_array;
associative_array[hello_world] = 1;
associative_array.count(hello_world);
std::printf("before returning....\n"); // Set break point at this line.
}
EOF
clang++ t.cpp -O0 -g
lldb a.out
```
Then, from within lldb:
```
breakpoint set -l 9
run
expr associative_array.count(hello_world)
expr associative_array.count(hello_world)
```
The evaluation works the first time around, but fails the second time around
with a segfault.
--
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