File: locstats-bytes-overflow.yaml

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (93 lines) | stat: -rw-r--r-- 3,071 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# RUN: yaml2obj %s -o %t.o
# RUN: %llvm-locstats %t.o 2>&1 | FileCheck %s
# RUN: rm %t.o

## Check that we are covering the situation when a stat field overflows.
##
## The yaml represents this DWARF:
##
## DW_TAG_compile_unit
##   DW_AT_low_pc (0x0000000000000000)
##   DW_AT_high_pc  (0x000000000000000b)
##
##   DW_TAG_subprogram
##     DW_AT_low_pc (0x0000000000000000)
##     DW_AT_high_pc  (0xffffffffffffffff)
##       DW_TAG_variable
##         DW_AT_location (0x00000023:
##            [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)
##   DW_TAG_subprogram
##     DW_AT_low_pc    (0x0000000000000000)
##     DW_AT_high_pc   (0xffffffffffffffff)
##     DW_TAG_variable
##       DW_AT_location        (0x00000023:
##             [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)

# CHECK: warning: "sum_all_variables(#bytes in parent scope)" field overflowed.
# CHECK: PC ranges covered: tainted

--- !ELF
FileHeader:
  Class:   ELFCLASS[[BITS=64]]
  Data:    ELFDATA2LSB
  Type:    ET_EXEC
  Machine: EM_X86_64
Sections:
  - Name:         .debug_loc
    Type:         SHT_PROGBITS
    AddressAlign: 0x01
    Content:      '00000000000000000600000000000000010055000000000000000000000000000000000300000000000000050000000000000001005200000000000000000000000000000000'
  - Name:         .debug_ranges
    Type:         SHT_PROGBITS
    AddressAlign: 0x01
    Content:      '000000000000000003000000000000000500000000000000080000000000000000000000000000000000000000000000'
DWARF:
  debug_abbrev:
    - Table:
      - Code:     1
        Tag:      DW_TAG_compile_unit
        Children: DW_CHILDREN_yes
        Attributes:
          - Attribute: DW_AT_low_pc
            Form:      DW_FORM_addr
          - Attribute: DW_AT_high_pc
            Form:      DW_FORM_data8
      - Code:     2
        Tag:      DW_TAG_subprogram
        Children: DW_CHILDREN_yes
        Attributes:
          - Attribute: DW_AT_low_pc
            Form:      DW_FORM_addr
          - Attribute: DW_AT_high_pc
            Form:      DW_FORM_data8
      - Code:     3
        Tag:      DW_TAG_variable
        Children: DW_CHILDREN_no
        Attributes:
          - Attribute: DW_AT_location
            Form:      DW_FORM_sec_offset
  debug_info:
    - Version:    4
      AbbrOffset: 0x00
      Entries:
        - AbbrCode: 1 ## DW_TAG_compile_unit
          Values:
            - Value: 0x00 ## DW_AT_low_pc
            - Value: 0x0b ## DW_AT_high_pc
        - AbbrCode: 2 ## DW_TAG_subprogram
          Values:
            - Value: 0x00 ## DW_AT_low_pc
            - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc
        - AbbrCode: 3 ## DW_TAG_variable
          Values:
            - Value: 0x23 ## DW_AT_sec_offset
        - AbbrCode: 0 ## NULL
        - AbbrCode: 2 ## DW_TAG_subprogram
          Values:
            - Value: 0x00 ## DW_AT_low_pc
            - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc
        - AbbrCode: 3 ## DW_TAG_variable
          Values:
            - Value: 0x23 ## DW_AT_sec_offset
        - AbbrCode: 0 ## NULL
        - AbbrCode: 0 ## NULL