66 lines · plain
1## This tests handling invalid .debug_str_offsets.dwo sections in2## a pre-standard DWO/DWP file.3 4# RUN: llvm-mc -triple x86_64 %s -filetype=obj -o %t.dwo5# RUN: not llvm-dwarfdump -v %t.dwo 2>&1 | FileCheck %s6 7# RUN: llvm-mc -triple x86_64 %s -filetype=obj -o %t.dwp --defsym DWP=08# RUN: not llvm-dwarfdump -v %t.dwp 2>&1 | FileCheck %s9 10# CHECK: error: invalid reference to or invalid content in .debug_str_offsets[.dwo]: length exceeds section size11 12 .section .debug_abbrev.dwo,"e",@progbits13.LAbbr:14 .byte 0x01 # Abbrev code15 .byte 0x11 # DW_TAG_compile_unit16 .byte 0x00 # DW_CHILDREN_no17 .byte 0x00 # EOM(1)18 .byte 0x00 # EOM(2)19 .byte 0x00 # EOM(3)20.LAbbrEnd:21 22 .section .debug_info.dwo,"e",@progbits23.LCU:24 .long .LCUEnd-.LCUVersion25.LCUVersion:26 .short 427 .long 028 .byte 829 .uleb128 130.LCUEnd:31 32## The section is truncated, i.e. its size is not a multiple of entry size.33 .section .debug_str_offsets.dwo,"e",@progbits34.LStrOff:35 .byte 036.LStrOffEnd:37 38.ifdef DWP39 .section .debug_cu_index, "", @progbits40## Header:41 .long 2 # Version42 .long 3 # Section count43 .long 1 # Unit count44 .long 2 # Slot count45## Hash Table of Signatures:46 .quad 0x1100001122222222 # DWO Id of CU047 .quad 048## Parallel Table of Indexes:49 .long 150 .long 051## Table of Section Offsets:52## Row 0:53 .long 1 # DW_SECT_INFO54 .long 3 # DW_SECT_ABBREV55 .long 6 # DW_SECT_STR_OFFSETS56## Row 1, offsets of the contribution57 .long .LCU-.debug_info.dwo58 .long .LAbbr-.debug_abbrev.dwo59 .long .LStrOff-.debug_str_offsets.dwo60## Table of Section Sizes:61## Row 1, sizes of the contribution62 .long .LCUEnd-.LCU63 .long .LAbbrEnd-.LAbbr64 .long .LStrOffEnd-.LStrOff65.endif66