diff options
| author | Fangrui Song <maskray@google.com> | 2020-02-12 14:08:42 -0800 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2020-02-13 08:56:38 -0800 |
| commit | 6c73246179376442705b3a545f4e1f1478777a04 (patch) | |
| tree | 79f4e9cbc33aa31120974fab348bfc7aa00cc836 /lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | |
| parent | 21d09ccf268dc071d452b0207a3dd91228a51da3 (diff) | |
[ELF] Fix a null pointer dereference when --emit-relocs and --strip-debug are used together
Fixes https://bugs.llvm.org//show_bug.cgi?id=44878
When --strip-debug is specified, .debug* are removed from inputSections
while .rel[a].debug* (incorrectly) remain.
LinkerScript::addOrphanSections() requires the output section of a relocated
InputSectionBase to be created first.
.debug* are not in inputSections ->
output sections .debug* are not created ->
getOutputSectionName(.rel[a].debug*) dereferences a null pointer.
Fix the null pointer dereference by deleting .rel[a].debug* from inputSections as well.
Reviewed By: grimar, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D74510
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp')
0 files changed, 0 insertions, 0 deletions
