Open ldionne opened 5 years ago
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.
always_inline
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.
Shafik is the best person to look at this.
Extended Description
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):
Then, from within lldb:
The evaluation works the first time around, but fails the second time around with a segfault.