Skip to content

bump rust #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2018-11-05
nightly-2018-11-07
10 changes: 5 additions & 5 deletions src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, '

_ if intrinsic_name.starts_with("atomic_cxchg") => {
let ptr = self.ref_to_mplace(self.read_immediate(args[0])?)?;
let expect_old = self.read_immediate(args[1])?; // read as value for the sake of `binary_op_val()`
let expect_old = self.read_immediate(args[1])?; // read as value for the sake of `binary_op_imm()`
let new = self.read_scalar(args[2])?;
let old = self.read_immediate(ptr.into())?; // read as value for the sake of `binary_op_val()`
// binary_op_val will bail if either of them is not a scalar
let (eq, _) = self.binary_op_val(mir::BinOp::Eq, old, expect_old)?;
let old = self.read_immediate(ptr.into())?; // read as value for the sake of `binary_op_imm()`
// binary_op_imm will bail if either of them is not a scalar
let (eq, _) = self.binary_op_imm(mir::BinOp::Eq, old, expect_old)?;
let res = Immediate::ScalarPair(old.to_scalar_or_undef(), eq.into());
self.write_immediate(res, dest)?; // old value is returned
// update ptr depending on comparison
Expand Down Expand Up @@ -234,7 +234,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, '
let a = self.read_immediate(args[0])?;
let b = self.read_immediate(args[1])?;
// check x % y != 0
if self.binary_op_val(mir::BinOp::Rem, a, b)?.0.to_bytes()? != 0 {
if self.binary_op_imm(mir::BinOp::Rem, a, b)?.0.to_bytes()? != 0 {
return err!(ValidationFailure(format!("exact_div: {:?} cannot be divided by {:?}", a, b)));
}
self.binop_ignore_overflow(mir::BinOp::Div, a, b, dest)?;
Expand Down
4 changes: 2 additions & 2 deletions tests/run-pass/rc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME: Validation disabled due to https://github.com/rust-lang/rust/issues/54908
// compile-flags: -Zmiri-disable-validation
// FIXME: Disabled due to https://github.com/rust-lang/rust/issues/55747
// ignore-test

use std::cell::RefCell;
use std::rc::Rc;
Expand Down