<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Segfault when evaluating STL expression"
href="https://bugs.llvm.org/show_bug.cgi?id=39500">39500</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segfault when evaluating STL expression
</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>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>ldionne@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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
<a href="http://green.lab.llvm.org/green/job/lldb-cmake/11896">http://green.lab.llvm.org/green/job/lldb-cmake/11896</a>.
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.</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>