[llvm-bugs] [Bug 39402] New: Don't crash when using -a on non-archives
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 23 04:42:19 PDT 2018
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: unassignedbugs at nondot.org
Reporter: jh7370.2008 at my.bristol.ac.uk
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181023/8250a36f/attachment.html>
More information about the llvm-bugs
mailing list