llvm-for-llvmta/test/tools/llvm-symbolizer/invalid-input-address.test

24 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-04-25 10:02:23 +02:00
# Use address that can't fit in a 64-bit number. Show that llvm-symbolizer
# simply echoes it as per other malformed input addresses.
RUN: llvm-symbolizer --obj=addr.exe 0x10000000000000000 | FileCheck --check-prefix=LARGE-ADDR %s
LARGE-ADDR-NOT: {{.}}
LARGE-ADDR: 0x10000000000000000
LARGE-ADDR-NOT: {{.}}
RUN: echo '"some text"' '"some text2"' > %t.rsp
RUN: echo -e 'some text\nsome text2\n' > %t.inp
# Test bad input address values, via stdin, command line and response file.
RUN: llvm-symbolizer --obj=%p/Inputs/addr.exe < %t.inp | FileCheck --check-prefix=BAD-INPUT %s
RUN: llvm-symbolizer --obj=%p/Inputs/addr.exe "some text" "some text2" | FileCheck --check-prefix=BAD-INPUT %s
RUN: llvm-symbolizer --obj=%p/Inputs/addr.exe @%t.rsp | FileCheck --check-prefix=BAD-INPUT %s
# Test bad input address values for the GNU-compatible version.
RUN: llvm-addr2line --obj=%p/Inputs/addr.exe < %t.inp | FileCheck --check-prefix=BAD-INPUT %s
RUN: llvm-addr2line --obj=%p/Inputs/addr.exe "some text" "some text2" | FileCheck --check-prefix=BAD-INPUT %s
RUN: llvm-addr2line --obj=%p/Inputs/addr.exe @%t.rsp | FileCheck --check-prefix=BAD-INPUT %s
BAD-INPUT: some text
BAD-INPUT-NEXT: some text2