Skip to content

Commit

Permalink
fix Windows stdout/stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 18, 2018
1 parent 7614b2a commit 728a45d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fn_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,12 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a+'mir>: crate::MiriEvalContextExt<'a,
this.write_scalar(Scalar::from_uint(key, dest.layout.size), dest)?;
}
"TlsGetValue" => {
let key = this.read_scalar(args[0])?.to_bits(args[0].layout.size)?;
let key = this.read_scalar(args[0])?.to_usize(this)? as u128;
let ptr = this.machine.tls.load_tls(key)?;
this.write_scalar(ptr, dest)?;
}
"TlsSetValue" => {
let key = this.read_scalar(args[0])?.to_bits(args[0].layout.size)?;
let key = this.read_scalar(args[0])?.to_usize(this)? as u128;
let new_ptr = this.read_scalar(args[1])?.not_undef()?;
this.machine.tls.store_tls(key, new_ptr)?;

Expand All @@ -615,7 +615,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a+'mir>: crate::MiriEvalContextExt<'a,
this.write_scalar(handle, dest)?;
}
"WriteFile" => {
let handle = this.read_scalar(args[0])?.to_i32()?;
let handle = this.read_scalar(args[0])?.to_isize(this)?;
let buf = this.read_scalar(args[1])?.not_undef()?;
let n = this.read_scalar(args[2])?.to_usize(&*this.tcx)?;
let written_place = this.deref_operand(args[3])?;
Expand Down

0 comments on commit 728a45d

Please sign in to comment.