diff options
author | Fangrui Song <maskray@google.com> | 2019-05-09 01:45:53 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-09 01:45:53 +0000 |
commit | bd086817f646a498d81a8114d269e2fa823a1eb3 (patch) | |
tree | 41db6d3bab9c6e8bd3ac85079709925b8a2cd64f /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 2dda1269abbdb6cdb51123f5bf6d32b5ed86e6b0 (diff) | |
download | bcm5719-llvm-bd086817f646a498d81a8114d269e2fa823a1eb3.tar.gz bcm5719-llvm-bd086817f646a498d81a8114d269e2fa823a1eb3.zip |
[ELF] Initialize Target before it may be dereferenced by findAux when reporting "duplicate symbol" error
for (InputFile *F : Files)
Symtab->addFile<ELFT>(F); // if there is a duplicate symbol error
...
Target = getTarget();
When parsing .debug_info in the object file (for better diagnostics),
DWARF.cpp findAux may dereference the null pointer Target
auto *DR = dyn_cast<Defined>(&File->getRelocTargetSym(Rel));
if (!DR) {
// Broken debug info may point to a non-defined symbol,
// some asan object files may also contain R_X86_64_NONE
RelType Type = Rel.getType(Config->IsMips64EL);
if (Type != Target->NoneRel) /// Target is null
Move the assignment of Target to an earlier place to fix this.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D61712
llvm-svn: 360305
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions