brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 280ceae Raw
65 lines · plain
1# RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \2# RUN: | not llvm-dwarfdump -verify - \3# RUN: | FileCheck %s4 5# CHECK: Verifying .apple_names...6# CHECK-NEXT:	error: Bucket[0] has invalid hash index: 4294967294.7# CHECK-NEXT:	error: Hash[0] has invalid HashData offset: 0x000000b4.8# CHECK-NEXT:	error: .apple_names Bucket[1] Hash[1] = 0x0002b60f Str[0] = 0x0000005a DIE[0] = 0x00000001 is not a valid DIE offset for "j".9 10# This test is meant to verify that the -verify option 11# in llvm-dwarfdump, correctly identifies12# an invalid hash index for bucket[0] in the .apple_names section, 13# an invalid HashData offset for Hash[0], as well as14# an invalid DIE offset in the .debug_info section.15# We're reading an invalid DIE due to the incorrect interpretation of DW_FORM for the DIE.16# Instead of DW_FORM_data4 the Atom[0].form is: DW_FORM_flag_present.17 18	.section	__TEXT,__text,regular,pure_instructions19	.file	1 "basic.c"20	.comm	_i,4,2                  ## @i21	.comm	_j,4,2                  ## @j22	.section	__DWARF,__debug_str,regular,debug23Linfo_string:24	.asciz	"Apple LLVM version 8.1.0 (clang-802.0.35)" ## string offset=025	.asciz	"basic.c"               ## string offset=4226	.asciz	"/Users/sgravani/Development/tests" ## string offset=5027	.asciz	"i"                     ## string offset=8428	.asciz	"int"                   ## string offset=8629	.asciz	"j"                     ## string offset=9030	.section	__DWARF,__debug_info,regular,debug31Lsection_info:32	.section	__DWARF,__apple_names,regular,debug33Lnames_begin:34	.long	1212240712              ## Header Magic35	.short	1                       ## Header Version36	.short	0                       ## Header Hash Function37	.long	2                       ## Header Bucket Count38	.long	2                       ## Header Hash Count39	.long	12                      ## Header Data Length40	.long	0                       ## HeaderData Die Offset Base41	.long	1                       ## HeaderData Atom Count42	.short	1                       ## DW_ATOM_die_offset43	.short	25                       ## DW_FORM_data4 -- error: .apple_names Bucket[1] Hash[1] = 0x0002b60f Str[0] = 0x0000005a DIE[0] = 0x00000001 is not a valid DIE offset for "j".44	.long	-2                      ## Bucket 0 -- error: Bucket[0] has invalid hash index: 4294967294.45	.long	1                       ## Bucket 146	.long	177678                  ## Hash in Bucket 047	.long	177679                  ## Hash in Bucket 148	.long	Lsection_line    ## Offset in Bucket 0 -- error: Hash[0] has invalid HashData offset: 0x000000b4.49	.long	LNames1-Lnames_begin    ## Offset in Bucket 150LNames0:51	.long	84                      ## i52	.long	1                       ## Num DIEs53	.long	3054	.long	055LNames1:56	.long	90                      ## j57	.long	1                       ## Num DIEs58	.long	5859	.long	060 61.subsections_via_symbols62	.section	__DWARF,__debug_line,regular,debug63Lsection_line:64Lline_table_start0:65