Skip to content

Commit

Permalink
Auto merge of #77611 - oli-obk:atomic_miri_leakage, r=nagisa
Browse files Browse the repository at this point in the history
Directly use raw pointers in `AtomicPtr` store/load

I was unable to find any reason for this limitation in the latest source of LLVM or in the documentation [here](http://llvm.org/docs/Atomics.html#libcalls-atomic).

fixes rust-lang/miri#1574
  • Loading branch information
bors committed Dec 9, 2020
2 parents d404840 + 7760894 commit aec0fc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ macro atomic_minmax($fx:expr, $cc:expr, <$T:ident> ($ptr:ident, $src:ident) -> $

macro validate_atomic_type($fx:ident, $intrinsic:ident, $span:ident, $ty:expr) {
match $ty.kind() {
ty::Uint(_) | ty::Int(_) => {}
ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {}
_ => {
$fx.tcx.sess.span_err(
$span,
&format!(
"`{}` intrinsic: expected basic integer type, found `{:?}`",
"`{}` intrinsic: expected basic integer or raw pointer type, found `{:?}`",
$intrinsic, $ty
),
);
Expand Down

0 comments on commit aec0fc5

Please sign in to comment.