Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DWARFDump] Make --verify handle all sections by default #81559

Merged
merged 2 commits into from
Feb 13, 2024

Commits on Feb 13, 2024

  1. [DWARFDump] Make --verify handle all sections by default

    The current behavior of --verify is that it only verifies debug_info,
    debug_abbrev and debug_names. This seems fairly arbitrary and might have been
    unintentional, as originally the absence of any section flags implied "all".
    
    This patch changes the behavior so that the verifier now verifies everything by
    default. It revealed two tests that had potentially invalid DWARF:
    
    1. dwarfdump-str-offsets.s is adding padding between two debug_str_offset
    contributions. The standard does not explicitly allow this behavior. See issue
    llvm#81558
    
    2. dwarf5-macro.test uses a checked-in binary that has invalid
    debug_str_offsets. One of its entries points to the _middle_ of the string
    section:
    
    error: .debug_str_offsets: contribution 0x0: index 0x4: invalid string offset
    *0x18 == 0x455D, is neither zero nor immediately following a null character
    
    If we look at the closest offset to 0x455D in debug_str:
    
    ```
    0x0000454e: "__SLONG32_TYPE int"
    ```
    
    0x455D points to "int".
    felipepiovezan committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    505e492 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef33216 View commit details
    Browse the repository at this point in the history