llvm-project/llvm/lib
Pavel Labath 46bfdb956c MemoryBuffer: Add a missing error-check to getOpenFileImpl
Summary:
In case the function was called with a desired read size *and* the file
was not an "mmap()" candidate, the function was falling back to a
"pread()", but it was failing to check the result of that system call.
This meant that the function would return "success" even though the read
operation failed, and it returned a buffer full of uninitialized memory.

Reviewers: rnk, dblaikie

Subscribers: kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66224

llvm-svn: 368977
2019-08-15 08:20:15 +00:00
..
Analysis [SCEV] Rename getMaxBackedgeTakenCount to getConstantMaxBackedgeTakenCount [NFC] 2019-08-14 21:58:13 +00:00
AsmParser IR: print value numbers for unnamed function arguments 2019-08-03 14:28:34 +00:00
BinaryFormat [Dwarf] Complete the list of type tags. 2019-08-13 17:00:54 +00:00
Bitcode [AutoUpgrader] Make ArcRuntime Autoupgrader more conservative 2019-08-13 17:52:21 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen [SelectionDAGBuilder] Teach gather/scatter getUniformBase to look through vector zeroinitializer indices in addition to scalar zeroes. 2019-08-14 21:38:56 +00:00
DebugInfo [llvm-objdump] Add warning messages if disassembly + source for problematic inputs 2019-08-15 05:15:22 +00:00
Demangle llvm-undname: Correctly demangle vararg parameters 2019-06-04 19:10:08 +00:00
ExecutionEngine Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
FuzzMutate
Fuzzer
IR Revert "Expose TailCallKind via the LLVM C API" 2019-08-15 03:49:51 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LTO Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
LineEditor [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
Linker Linker: Add support for GlobalIFunc. 2019-08-08 22:09:18 +00:00
MC [NFC][AIX] Use assert instead of llvm_unreachable 2019-08-13 17:04:51 +00:00
MCA [MCA] Add flag -show-encoding to llvm-mca. 2019-08-09 11:26:27 +00:00
Object Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
ObjectYAML [yaml2obj/obj2yaml] - Add a basic support for extended section indexes. 2019-08-08 09:49:05 +00:00
Option Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics 2019-07-09 00:34:08 +00:00
Passes Title: Loop Cache Analysis 2019-08-09 13:56:29 +00:00
ProfileData Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
Remarks Reland: [Remarks] Add an LLVM-bitstream-based remark serializer 2019-07-31 00:13:51 +00:00
Support MemoryBuffer: Add a missing error-check to getOpenFileImpl 2019-08-15 08:20:15 +00:00
TableGen Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
Target [X86] Add isel pattern to match VZEXT_MOVL and a v2i64 scalar_to_vector bitcasted from x86mmx to MOVQ2DQ. 2019-08-15 06:46:30 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI [TextAPI] Fix & Add tests for tbd files version 3. 2019-08-12 23:01:07 +00:00
ToolDrivers [llvm-dlltool] Clarify an error message. NFC. 2019-08-02 11:20:03 +00:00
Transforms [LV] fold-tail predication should be respected even with assume_safety 2019-08-15 07:12:14 +00:00
WindowsManifest
XRay Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
CMakeLists.txt Fix build errors LLVM tests are disabled. 2019-07-11 22:08:35 +00:00
LLVMBuild.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00