aboutsummaryrefslogtreecommitdiff
path: root/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s')
-rw-r--r--test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s b/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
new file mode 100644
index 000000000000..c26bfcb02e0a
--- /dev/null
+++ b/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
@@ -0,0 +1,13 @@
+# RUN: llvm-mc %s -filetype obj -triple i386-pc-linux -o - | \
+# RUN: llvm-dwarfdump -debug-addr - 2> %t.err | FileCheck %s
+# RUN: FileCheck %s -input-file %t.err -check-prefix=ERR
+
+# CHECK: .debug_addr contents:
+# CHECK-NOT: {{.}}
+# ERR: section is not large enough to contain a .debug_addr table length at offset 0x0
+# ERR-NOT: {{.}}
+
+# too small section to contain length field
+ .section .debug_addr,"",@progbits
+.Ldebug_addr0:
+ .short 1 # unit_length