2017-06-06 09:22:34 +08:00
|
|
|
; Verify that llvm-dwarfdump handles invalid string offset tables.
|
|
|
|
|
2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-str-offsets-invalid-1.x86_64.o | \
|
2017-06-06 09:22:34 +08:00
|
|
|
RUN: FileCheck --check-prefix=INVALIDCONTRIB %s
|
2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-str-offsets-invalid-2.x86_64.o | \
|
2017-06-06 09:22:34 +08:00
|
|
|
RUN: FileCheck --check-prefix=INVALIDCONTRIB %s
|
2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-str-offsets-invalid-3.x86_64.o | \
|
2017-06-06 09:22:34 +08:00
|
|
|
RUN: FileCheck --check-prefix=INVALIDCONTRIB %s
|
2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-str-offsets-invalid-4.x86_64.o | \
|
2017-06-06 09:22:34 +08:00
|
|
|
RUN: FileCheck --check-prefix=INVALIDLENGTH %s
|
2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-str-offsets-invalid-5.x86_64.o | \
|
2017-06-06 09:22:34 +08:00
|
|
|
RUN: FileCheck --check-prefix=INVALIDSECTIONLENGTH %s
|
|
|
|
|
|
|
|
INVALIDCONTRIB: .debug_str_offsets contents:
|
|
|
|
INVALIDCONTRIB-NOT: contents:
|
|
|
|
INVALIDCONTRIB: error: invalid contribution to string offsets table in section .debug_str_offsets.
|
|
|
|
|
|
|
|
INVALIDLENGTH: .debug_str_offsets contents:
|
|
|
|
INVALIDLENGTH-NOT: contents:
|
|
|
|
INVALIDLENGTH: error: contribution to string offsets table in section .debug_str_offsets has invalid length.
|
|
|
|
|
|
|
|
INVALIDSECTIONLENGTH: .debug_str_offsets contents:
|
|
|
|
INVALIDSECTIONLENGTH-NOT: contents:
|
|
|
|
INVALIDSECTIONLENGTH: error: size of .debug_str_offsets is not a multiple of 4.
|