Go to file
Jordan Rupprecht b2702d6a45 [llvm-objcopy] Fix crash when writing empty binary output
Summary: When using llvm-objcopy -O binary and the resulting file will be empty (e.g. removing the only section that would be written, or using --only-keep with a section that doesn't exist/isn't SHF_ALLOC), we crash because FileOutputBuffer expects Size > 0. Add a regression test, and change Buffer to open/truncate the output file in this case.

Reviewers: alexshap, jhenderson, jakehehrlich, espindola

Reviewed By: alexshap, jhenderson

Subscribers: jfb, llvm-commits, emaste, arichardson

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

llvm-svn: 352371
2019-01-28 15:02:40 +00:00
clang [AST] Introduce GenericSelectionExpr::Association 2019-01-28 14:18:11 +00:00
clang-tools-extra [clangd] Index main-file macros (bug 39761) 2019-01-28 14:11:49 +00:00
compiler-rt [CMake] Use __libc_start_main rather than fopen when checking for C library 2019-01-28 04:12:54 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
libcxx [CMake] Use __libc_start_main rather than fopen when checking for C library 2019-01-28 04:12:54 +00:00
libcxxabi [CMake] Use __libc_start_main rather than fopen when checking for C library 2019-01-28 04:12:54 +00:00
libunwind [CMake] Use __libc_start_main rather than fopen when checking for C library 2019-01-28 04:12:54 +00:00
lld [LLD][COFF] Partial sections 2019-01-28 01:45:35 +00:00
lldb [lldb] Update shebang python2 -> python 2019-01-26 01:05:02 +00:00
llgo Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm [llvm-objcopy] Fix crash when writing empty binary output 2019-01-28 15:02:40 +00:00
openmp NFC: fixed formatting to be consistent across the file 2019-01-21 16:11:43 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly Fix/unify top comment in lib/Analysis/PolyhedralInfo.cpp 2019-01-22 12:18:38 +00:00
pstl Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
.arcconfig Add an .arcconfig for the top of the git monorepo. 2019-01-11 16:27:14 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.