Skip to content

NativeAOT: dwarfdump --verify produces thousands of warnings and errors #72552

@TheSpydog

Description

@TheSpydog

Running llvm-dwarfdump-12 --verify on NativeAOT-generated linux object files produces a tremendous number of validation warnings and errors. I first noticed this on my Switch project, but I was able to reproduce the problem even when testing with the basic "Hello World" program created by dotnet new console.

A full Hello World validation log for linux-x64 can be found in this gist if you want to wade through 236,000+ lines of dwarfdump output. 😄

Thankfully despite the verbosity of the output, there are only a few unique types of warnings and errors generated.

  • warning: DW_TAG_subprogram has DW_CHILDREN_yes but DIE has no children (occurs 2585 times)
  • error: Unable to resolve location list offset pair: Base address not defined (occurs 17599 times)
  • error: DIEs have overlapping address ranges: (occurs 1683 times)
  • error: DIE address ranges are not contained in its parent's ranges: (occurs 793 times)

The latter two appear to be related to exception handling, since they're almost always proceeded by a DW_TAG_try_block or DW_TAG_catch_block.

I'm pretty out of my depth here, but I would like to at least try to debug and fix these issues. Any recommendations for what I should be looking at in ObjWriter?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions