Merge pull request #476 from RalfJung/atomics

atomics wrap around on overflow
This commit is contained in:
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer 2018-10-12 09:31:09 +02:00 committed by GitHub
commit 7fb2fa70a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
"xsub" => mir::BinOp::Sub,
_ => bug!(),
};
// FIXME: what do atomics do on overflow?
// Atomics wrap around on overflow.
self.binop_ignore_overflow(op, old, rhs, ptr.into())?;
}