2015-10-07 06:27:08 +08:00
|
|
|
// These test checks that llvm-objdump will not crash with malformed Mach-O
|
|
|
|
// files. So the check line is not all that important but the bug fixes to
|
|
|
|
// make sure llvm-objdump is robust is what matters.
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
|
2015-10-07 06:27:08 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0001.macho \
|
|
|
|
# RUN: | FileCheck -check-prefix=m0001 %s
|
|
|
|
|
|
|
|
# m0001: (method_t extends past the end of the section)
|
|
|
|
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
|
2015-10-07 06:27:08 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho \
|
|
|
|
# RUN: | FileCheck -check-prefix=m0006 %s
|
|
|
|
|
|
|
|
# m0006: ivarLayout 0x8
|
2015-10-09 00:56:35 +08:00
|
|
|
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
|
2015-10-09 00:56:35 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho \
|
|
|
|
# RUN: | FileCheck -check-prefix=m0010 %s
|
|
|
|
|
|
|
|
# m0010: 00000000000010e0 0x10e8 _OBJC_CLASS_
|
2015-10-09 06:50:55 +08:00
|
|
|
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
|
2015-10-09 06:50:55 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0040.macho \
|
|
|
|
# RUN: | FileCheck -check-prefix=m0040 %s
|
|
|
|
|
|
|
|
# m0040: 00000000000010a0 0xf39 -[tiny_dylib init]
|
2015-10-10 00:48:44 +08:00
|
|
|
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
|
2015-10-10 00:48:44 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0080.macho \
|
|
|
|
# RUN: | FileCheck -check-prefix=m0080 %s
|
|
|
|
|
|
|
|
# m0080: data 0xf960000 (struct class_ro_t *)
|
|
|
|
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
|
2015-10-14 01:06:34 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0261.macho
|
|
|
|
|
2016-04-09 01:55:03 +08:00
|
|
|
# RUN: llvm-objdump --print-imm-hex=false -macho -disassemble \
|
2015-10-10 08:05:01 +08:00
|
|
|
# RUN: %p/Inputs/malformed-machos/mem-crup-0337.macho \
|
|
|
|
# RUN: | FileCheck -check-prefix=m0337 %s
|
|
|
|
|
|
|
|
# m0337: subq $16, %rsp
|