[all-commits] [llvm/llvm-project] 59c9a4: [llvm-gsymutil] Fix assert failure on FileEntry.Di...
kusmour via All-commits
all-commits at lists.llvm.org
Mon Jan 29 17:41:14 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59c9a48d5e19716e5df8d0f794e489891fd2c835
https://github.com/llvm/llvm-project/commit/59c9a48d5e19716e5df8d0f794e489891fd2c835
Author: kusmour <kusmour at gmail.com>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
M llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
A llvm/test/tools/llvm-gsymutil/X86/elf-empty-dir.yaml
Log Message:
-----------
[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
More information about the All-commits
mailing list