fmt
This commit is contained in:
parent
624f68da16
commit
dd683dd12e
@ -661,13 +661,11 @@ pub fn perform_access(
|
|||||||
for (perms_range, perms) in self.rperms.iter_mut_all() {
|
for (perms_range, perms) in self.rperms.iter_mut_all() {
|
||||||
let idx = self.tag_mapping.get(&tag).unwrap();
|
let idx = self.tag_mapping.get(&tag).unwrap();
|
||||||
// Only visit initialized permissions
|
// Only visit initialized permissions
|
||||||
if let Some(p) = perms.get(idx) && p.initialized {
|
if let Some(p) = perms.get(idx)
|
||||||
TreeVisitor {
|
&& p.initialized
|
||||||
nodes: &mut self.nodes,
|
{
|
||||||
tag_mapping: &self.tag_mapping,
|
TreeVisitor { nodes: &mut self.nodes, tag_mapping: &self.tag_mapping, perms }
|
||||||
perms,
|
.traverse_nonchildren(
|
||||||
}
|
|
||||||
.traverse_nonchildren(
|
|
||||||
tag,
|
tag,
|
||||||
|args| node_app(perms_range.clone(), args),
|
|args| node_app(perms_range.clone(), args),
|
||||||
|args| err_handler(perms_range.clone(), args),
|
|args| err_handler(perms_range.clone(), args),
|
||||||
|
@ -563,6 +563,7 @@ fn atomic_min_max_scalar(
|
|||||||
let old = this.allow_data_races_mut(|this| this.read_immediate(place))?;
|
let old = this.allow_data_races_mut(|this| this.read_immediate(place))?;
|
||||||
let lt = this.wrapping_binary_op(mir::BinOp::Lt, &old, &rhs)?.to_scalar().to_bool()?;
|
let lt = this.wrapping_binary_op(mir::BinOp::Lt, &old, &rhs)?.to_scalar().to_bool()?;
|
||||||
|
|
||||||
|
#[rustfmt::skip] // rustfmt makes this unreadable
|
||||||
let new_val = if min {
|
let new_val = if min {
|
||||||
if lt { &old } else { &rhs }
|
if lt { &old } else { &rhs }
|
||||||
} else {
|
} else {
|
||||||
|
@ -351,7 +351,9 @@ fn emulate_foreign_item_inner(
|
|||||||
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
|
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
|
||||||
this.read_target_isize(hModule)?;
|
this.read_target_isize(hModule)?;
|
||||||
let name = this.read_c_str(this.read_pointer(lpProcName)?)?;
|
let name = this.read_c_str(this.read_pointer(lpProcName)?)?;
|
||||||
if let Ok(name) = str::from_utf8(name) && is_dyn_sym(name) {
|
if let Ok(name) = str::from_utf8(name)
|
||||||
|
&& is_dyn_sym(name)
|
||||||
|
{
|
||||||
let ptr = this.fn_ptr(FnVal::Other(DynSym::from_str(name)));
|
let ptr = this.fn_ptr(FnVal::Other(DynSym::from_str(name)));
|
||||||
this.write_pointer(ptr, dest)?;
|
this.write_pointer(ptr, dest)?;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user