diff options
Diffstat (limited to 'lit/SymbolFile/DWARF/debug-names-compressed.cpp')
-rw-r--r-- | lit/SymbolFile/DWARF/debug-names-compressed.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lit/SymbolFile/DWARF/debug-names-compressed.cpp b/lit/SymbolFile/DWARF/debug-names-compressed.cpp new file mode 100644 index 000000000000..076cac192522 --- /dev/null +++ b/lit/SymbolFile/DWARF/debug-names-compressed.cpp @@ -0,0 +1,14 @@ +// Test for a bug where we crashed while processing a compressed debug_names +// section (use after free). + +// REQUIRES: lld, zlib + +// RUN: clang -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %s +// RUN: ld.lld %t.o -o %t --compress-debug-sections=zlib +// RUN: lldb-test symbols --find=variable --name=foo %t | FileCheck %s + +// CHECK: Found 1 variables: +int foo; +// ONE-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = debug-names-compressed.cpp:[[@LINE-1]] + +extern "C" void _start() {} |