about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-11-09 01:13:40 +0100
committerGitHub <noreply@github.com>2020-11-09 01:13:40 +0100
commit5639d9793f1d2440bb9a8c8630f20d757a48e111 (patch)
treeca472a913c994140e167a613d05ee609db9f5490 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent4e5b7add7f5313f6db8df9b11be155f7a3e467f7 (diff)
parentb0df3f76dc70eba57d6e0665fa6ccac89b25d3aa (diff)
downloadrust-5639d9793f1d2440bb9a8c8630f20d757a48e111.tar.gz
rust-5639d9793f1d2440bb9a8c8630f20d757a48e111.zip
Rollup merge of #78476 - RalfJung:btree-alias, r=Mark-Simulacrum
fix some incorrect aliasing in the BTree

This line is wrong:
```
ptr::copy(slice.as_ptr().add(idx), slice.as_mut_ptr().add(idx + 1), slice.len() - idx);
```
When `slice.as_mut_ptr()` is called, that creates a mutable reference to the entire slice, which invalidates the raw pointer previously returned by `slice.as_ptr()`. (Miri currently misses this because raw pointers are not tracked properly.)

Cc ````````@ssomers````````
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions