1# RUN: llvm-mc %s -filetype obj -triple=i686-pc-linux -o %t 2# RUN: not llvm-dwarfdump -v -verify %t 2>&1 | FileCheck %s 3# CHECK: The length for this unit is too large for the .debug_info provided. 4 5## Check we do not crash when trying to parse truncated .debug_info. 6.section .debug_info,"",@progbits 7 .long 0x1c 8 .value 0x4 9 .long .Ldebug_abbrev0 10 .byte 0x4 11 12 .uleb128 0x1 # DW_TAG_compile_unit [1] * 13 .long 0 # DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] = "test") 14 .byte 0x4 # DW_AT_language [DW_FORM_data1] (DW_LANG_C_plus_plus) 15 .long 0 # DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000000] = "test") 16 .long 0 # DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000000] = "test") 17 .long 0 # DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text") 18 .long 0 # DW_AT_high_pc [DW_FORM_data4] (0x00000000) 19 20.section .debug_abbrev,"",@progbits 21.Ldebug_abbrev0: 22 .uleb128 0x1 23 .uleb128 0x11 # DW_TAG_compile_unit, DW_CHILDREN_yes 24 .byte 0x1 25 .uleb128 0x25 # DW_AT_producer, DW_FORM_strp 26 .uleb128 0xe 27 .uleb128 0x13 # DW_AT_language, DW_FORM_data1 28 .uleb128 0xb 29 .uleb128 0x3 # DW_AT_name, DW_FORM_strp 30 .uleb128 0xe 31 .uleb128 0x1b # DW_AT_comp_dir, DW_FORM_strp 32 .uleb128 0xe 33 .uleb128 0x11 # DW_AT_low_pc, DW_FORM_addr 34 .uleb128 0x1 35 .uleb128 0x12 # DW_AT_high_pc, DW_FORM_data4 36 .uleb128 0x6 37 .byte 0 38 .byte 0 39 .byte 0 40 41.section .debug_str,"MS",@progbits,1 42.string "test" 43