[llvm-bugs] [Bug 35552] New: [ThinLTO] Incautious error handling
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Dec 6 12:55:18 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35552
Bug ID: 35552
Summary: [ThinLTO] Incautious error handling
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Bitcode Reader
Assignee: unassignedbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvm-bugs at lists.llvm.org
While investigating PR35472, we occasionally got a different error,
"can't create module summary index for buffer: Invalid bitcode signature"
followed by a crash.
ThinLTOCodeGenerator::linkCombinedIndex() nominally returns a
std::unique_ptr<ModuleSummaryIndex>, however if readModuleSummaryIndex()
returns an error (e.g., Invalid bitcode signature), linkCombinedIndex()
can return nullptr.
ThinLTOCodeGenerator::run() has this code:
// Sequential linking phase
auto Index = linkCombinedIndex();
...
Index->collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries);
That is, there's no null check, and the nullptr causes the inevitable
segfault. I figured I'd let the ThinLTO experts decide how they want
to handle this.
--
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/20171206/d23c0d96/attachment.html>
More information about the llvm-bugs
mailing list