diff options
author | kusmour <kusmour@gmail.com> | 2024-01-29 20:41:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-29 20:41:02 -0500 |
commit | 59c9a48d5e19716e5df8d0f794e489891fd2c835 (patch) | |
tree | e309feb2d18519b07f852c3743c574c4109da8b5 /llvm/lib/TextAPI/Symbol.cpp | |
parent | 3d1157000db56a340e1dae90b587bd144ffeaa6c (diff) | |
download | llvm-59c9a48d5e19716e5df8d0f794e489891fd2c835.zip llvm-59c9a48d5e19716e5df8d0f794e489891fd2c835.tar.gz llvm-59c9a48d5e19716e5df8d0f794e489891fd2c835.tar.bz2 |
[llvm-gsymutil] Fix assert failure on FileEntry.Dir empty (#79926)
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
Diffstat (limited to 'llvm/lib/TextAPI/Symbol.cpp')
0 files changed, 0 insertions, 0 deletions