I noticed this whilst doing some work on the debug line parser. LLD uses the debug info and debug line sections to determine the location of e.g. references to undefined symbols, when producing error messages. In the event that debug info was present, but debug line parsing failed for some reason, then a nullptr would end up being dereferenced by the location-lookup code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/InputFiles.cpp | ||
---|---|---|
149 ↗ | (On Diff #137373) | If there any reason why it cannot be early returned above? const DWARFDebugLine::LineTable *LT = DwarfLine->getOrParseLineTable(LineData, 0, Dwarf, nullptr); if (!LT) return; |
ELF/InputFiles.cpp | ||
---|---|---|
149 ↗ | (On Diff #137373) | Good point - not that I can think of. |