Go to file
George Rimar 0a5d4b8472 [llvm-objcopy] - Report SHT_GROUP sections with invalid alignment.
This patch fixes the reason of ubsan failure (UB detected) 
happened after landing the D59638 (I had to revert it).
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/11760/steps/check-llvm%20ubsan/logs/stdio)

Problem is the following. Our implementation of GroupSection assumes that
its address is 4 bytes aligned when writes it:

template <class ELFT>
void ELFSectionWriter<ELFT>::visit(const GroupSection &Sec) {
  ELF::Elf32_Word *Buf =
      reinterpret_cast<ELF::Elf32_Word *>(Out.getBufferStart() + Sec.Offset);
...

But the test case for D59638 did not set AddressAlign in YAML. So address was
not 4 bytes aligned since Sec.Offset was odd. That triggered the issue.

This patch teaches llvm-objcopy to report an error for such sections (which should
not met in reality), what is better than having UB.

Differential revision: https://reviews.llvm.org/D59695

llvm-svn: 356853
2019-03-24 13:31:08 +00:00
clang [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc. 2019-03-24 00:56:52 +00:00
clang-tools-extra [pp-trace] Delete redundant clang:: 2019-03-24 07:31:21 +00:00
compiler-rt Fix typos in compiler-rt/lib/builtins/atomic.c 2019-03-23 18:39: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 sincos: Simplify declaration headers. 2019-03-13 07:13:34 +00:00
libcxx Fix a minor bug with std::next and prev not and negative numbers. In particular, std::prev cannot require Bidirectional Iterators, because you might 'go back' -1 places, which goes forward. Thanks to Ville and Jonathan for the bug report. 2019-03-22 22:32:20 +00:00
libcxxabi Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/" 2019-03-08 20:33:55 +00:00
libunwind Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/" 2019-03-08 20:33:55 +00:00
lld [LLD][COFF] Separate module descriptors creation from type/symbol merging 2019-03-22 22:07:27 +00:00
lldb [Reproducers] Fix GDB remote flakiness during replay 2019-03-22 23:33:17 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [llvm-objcopy] - Report SHT_GROUP sections with invalid alignment. 2019-03-24 13:31:08 +00:00
openmp [OpenMP] Fix OMPT cancellation test for GOMP 2019-03-15 21:24:45 +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 [CodeGen] LLVM OpenMP Backend. 2019-03-19 03:18:21 +00:00
pstl [pstl] By default, disable the parallel policies 2019-03-14 19:33:58 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +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.