https://bugs.llvm.org/show_bug.cgi?id=39402
Bug ID: 39402
Summary: Don't crash when using -a on non-archives
Product: tools
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: llvm-objdump
Assignee: unassignedb...@nondot.org
Reporter: jh7370.2...@my.bristol.ac.uk
CC: llvm-bugs@lists.llvm.org
-a prints archive headers. It should probably emit a warning/error and not do
anything when specified for a regular object file. However, it instead crashes,
because it attempts to dereference a null pointer:
static void DumpObject(ObjectFile *o, const Archive *a = nullptr,
const Archive::Child *c = nullptr) {
...
if (ArchiveHeaders && !MachOOpt)
printArchiveChild(a->getFileName(), *c); // a will be null here
...
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs