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

[llvm-gsymutil] Fix assert failure on FileEntry.Dir empty #79926

Merged
merged 2 commits into from
Jan 30, 2024

Commits on Jan 30, 2024

  1. [llvm-gsymutil] Fix assert failure on FileEntry.Dir empty

    Summary:
    FileEntry.Dir can be empty if debug info only contains relative path.
    This caused an assertion failure when gsym segmentation is trying to copy a file entry with empty dir.
    As the fitst entry of StringTable is always empty (and is preserved), `StringOffsetMap` doesn't have key 0.
    Hence, `find(0)` returns `End` and `operator->()` fails the assertion
    
    Test Plan:
    ./bin/llvm-lit -sv llvm/test/tools/llvm-gsymutil/X86/elf-empty-dir.yaml
    kusmour committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9536c39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3146020 View commit details
    Browse the repository at this point in the history