This is an archive of the discontinued LLVM Phabricator instance.

[LLD] - Do not crash when reporting errors when .debug_line_str (DWARF5) is used.
ClosedPublic

Authored by grimar on Oct 2 2018, 4:37 AM.

Details

Summary

Imagine we have the following code:

int foo();
int main() { return foo(); }

It will crash if you try to compile it with`clang -O0 -gdwarf-5 test.cpp -o test -g -fuse-ld=lld`

The crash happens inside the LLVM DWARF parser because LLD does not provide the .debug_line_str section.
At the same time for correct parsing and reporting, we anyways need to provide this section from our side.
The patch fixes the issue.

Diff Detail

Event Timeline

grimar created this revision.Oct 2 2018, 4:37 AM
ruiu accepted this revision.Oct 2 2018, 9:38 AM

LGTM

This revision is now accepted and ready to land.Oct 2 2018, 9:38 AM
grimar closed this revision.Oct 3 2018, 2:04 AM

r343667