llvm with tablegen backend for capstone disassembler
Go to file
Thomas Anderson 516d07de07 [libc++] Fix use-after-free when building with _LIBCPP_DEBUG=1
The issue is the following code:

    __cn1->__add(*__ip);
    (*__ip)->__c_ = __cn1;

`__ip` points into the array of iterators for container `__cn2`.  This code adds
the iterator to the array of iterators for `__cn1`, and updates the iterator to
point to the new container.

This code works fine, except when `__cn1` and `__cn2` are the same container.
`__cn1->__add()` might need to grow the array of iterators, and when it does,
`__ip` becomes invalid, so the second line becomes a use-after-free error.

Simply swapping the order of the above two lines is not sufficient, because of
the memmove() below.  The easiest and most performant solution is just to skip
touching any iterators if the containers are the same.

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

llvm-svn: 355550
2019-03-06 21:10:08 +00:00
clang AMDGPU: Fix the mapping of sub group sync scope 2019-03-06 20:54:48 +00:00
clang-tools-extra [clangd] Add Source to clangd::Diagnostic. 2019-03-06 10:51:38 +00:00
compiler-rt [NFC][TSan][libdispatch] Rename tsan_block_context_t -> block_context_t 2019-03-06 19:27:10 +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 Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
libcxx [libc++] Fix use-after-free when building with _LIBCPP_DEBUG=1 2019-03-06 21:10:08 +00:00
libcxxabi [libc++abi] Specify unwind lib before other system libraries when linking 2019-03-01 22:55:15 +00:00
libunwind [CMake][libunwind] Define add_target_flags which is missing 2019-02-28 21:38:59 +00:00
lld [LLD][COFF] More detailed information for /failifmismatch 2019-03-06 20:18:38 +00:00
lldb Remove redundant second os.path.join call [NFC] 2019-03-06 20:51:28 +00:00
llgo Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
llvm [AArch64] Improve FP16 instruction selection for vector round and vector conver from half instructions 2019-03-06 20:30:06 +00:00
openmp [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +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 [opaque pointer types] Update calls to CreateCall to pass the function 2019-02-08 19:30:46 +00:00
pstl [pstl] Fix missing parallel policy guards 2019-03-01 01:26:35 +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

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.