mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
llvm with tablegen backend for capstone disassembler
516d07de07
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 |
||
---|---|---|
clang | ||
clang-tools-extra | ||
compiler-rt | ||
debuginfo-tests | ||
libclc | ||
libcxx | ||
libcxxabi | ||
libunwind | ||
lld | ||
lldb | ||
llgo | ||
llvm | ||
openmp | ||
parallel-libs | ||
polly | ||
pstl | ||
.arcconfig | ||
.clang-format | ||
.clang-tidy | ||
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.