Skip to content

Commit 5e39ddf

Browse files
Clippy butchered the formatting!
1 parent 0d2ec3a commit 5e39ddf

File tree

13 files changed

+14
-42
lines changed

13 files changed

+14
-42
lines changed

libafl_qemu/librasan/asan/src/hooks/aligned_alloc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ use crate::{GuestAddr, asan_alloc, asan_panic, size_t};
1313
#[unsafe(export_name = "patch_aligned_alloc")]
1414
pub unsafe extern "C" fn aligned_alloc(alignment: size_t, size: size_t) -> *mut c_void {
1515
unsafe {
16-
trace!(
17-
"aligned_alloc - alignment: {alignment:#x}, size: {size:#x}"
18-
);
16+
trace!("aligned_alloc - alignment: {alignment:#x}, size: {size:#x}");
1917

2018
fn is_power_of_two(n: size_t) -> bool {
2119
n != 0 && (n & (n - 1)) == 0

libafl_qemu/librasan/asan/src/hooks/posix_memalign.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ pub unsafe extern "C" fn posix_memalign(
1717
size: size_t,
1818
) -> c_int {
1919
unsafe {
20-
trace!(
21-
"posix_memalign - memptr: {memptr:p}, align: {align:#x}, size: {size:#x}"
22-
);
20+
trace!("posix_memalign - memptr: {memptr:p}, align: {align:#x}, size: {size:#x}");
2321

2422
if memptr.is_null() {
2523
asan_panic(c"posix_memalign - memptr is null".as_ptr() as *const c_char);

libafl_qemu/librasan/asan/src/hooks/reallocarray.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ pub unsafe extern "C" fn reallocarray(
1616
size: size_t,
1717
) -> *mut c_void {
1818
unsafe {
19-
trace!(
20-
"reallocarray - ptr: {ptr:p}, nmemb: {nmemb:#x}, size: {size:#x}"
21-
);
19+
trace!("reallocarray - ptr: {ptr:p}, nmemb: {nmemb:#x}, size: {size:#x}");
2220
match nmemb.checked_mul(size) {
2321
Some(size) => {
2422
if ptr.is_null() && size == 0 {

libafl_qemu/librasan/asan/src/hooks/stpncpy.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ pub unsafe extern "C" fn stpncpy(
1717
dsize: size_t,
1818
) -> *mut c_char {
1919
unsafe {
20-
trace!(
21-
"stpncpy - dst: {dst:p}, src: {src:p}, dsize: {dsize:#x}"
22-
);
20+
trace!("stpncpy - dst: {dst:p}, src: {src:p}, dsize: {dsize:#x}");
2321

2422
if dsize == 0 {
2523
return dst;

libafl_qemu/librasan/asan/src/mmap/libc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,7 @@ impl<S: Symbols> Mmap for LibcMmap<S> {
213213
}
214214

215215
fn protect(addr: GuestAddr, len: usize, prot: MmapProt) -> Result<(), Self::Error> {
216-
trace!(
217-
"protect - addr: {addr:#x}, len: {len:#x}, prot: {prot:#x}"
218-
);
216+
trace!("protect - addr: {addr:#x}, len: {len:#x}, prot: {prot:#x}");
219217
let fn_mprotect = Self::get_mprotect()?;
220218
unsafe { asan_swap(false) };
221219
let ret = unsafe { fn_mprotect(addr as *mut c_void, len, c_int::from(&prot)) };

libafl_qemu/librasan/asan/src/mmap/linux.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ impl Mmap for LinuxMmap {
7070
}
7171

7272
fn protect(addr: GuestAddr, len: usize, prot: MmapProt) -> Result<(), Self::Error> {
73-
trace!(
74-
"protect - addr: {addr:#x}, len: {len:#x}, prot: {prot:#x}"
75-
);
73+
trace!("protect - addr: {addr:#x}, len: {len:#x}, prot: {prot:#x}");
7674
unsafe {
7775
mprotect(addr as *mut c_void, len, MprotectFlags::from(&prot))
7876
.map_err(|errno| LinuxMapError::FailedToMprotect(addr, len, prot, errno))

libafl_qemu/librasan/asan/src/patch/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ impl Patches {
6262
}
6363

6464
pub fn is_patched(addr: GuestAddr) -> bool {
65-
PATCHED
66-
.get()
67-
.is_some_and(|p| p.lock().contains_key(&addr))
65+
PATCHED.get().is_some_and(|p| p.lock().contains_key(&addr))
6866
}
6967
}
7068

libafl_qemu/librasan/asan/src/shadow/guest.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ impl<M: Mmap, L: ShadowLayout> Shadow for GuestShadow<M, L> {
4949
len: usize,
5050
poison: PoisonType,
5151
) -> Result<(), Self::Error> {
52-
debug!(
53-
"poison - start: 0x{start:x}, len: 0x{len:x}, pioson: {poison:?}"
54-
);
52+
debug!("poison - start: 0x{start:x}, len: 0x{len:x}, pioson: {poison:?}");
5553

5654
if Self::is_out_of_bounds(start, len) {
5755
Err(GuestShadowError::AddressRangeOverflow(start, len))?;
@@ -200,9 +198,7 @@ impl<M: Mmap, L: ShadowLayout> Shadow for GuestShadow<M, L> {
200198
* zero
201199
*/
202200
if first_k != 0 {
203-
trace!(
204-
"is_poison #2 - start: 0x{start:x}, len: 0x{len:x}, first_k: 0x{first_k:x}"
205-
);
201+
trace!("is_poison #2 - start: 0x{start:x}, len: 0x{len:x}, first_k: 0x{first_k:x}");
206202
return Ok(true);
207203
}
208204
}

libafl_qemu/librasan/asan/src/shadow/host.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ impl<H: Host> Shadow for HostShadow<H> {
3333
}
3434

3535
fn poison(&mut self, start: GuestAddr, len: usize, val: PoisonType) -> Result<(), Self::Error> {
36-
debug!(
37-
"poison - start: 0x{start:x}, len: 0x{len:x}, pioson: {val:?}"
38-
);
36+
debug!("poison - start: 0x{start:x}, len: 0x{len:x}, pioson: {val:?}");
3937
H::poison(start, len, val).map_err(|e| HostShadowError::HostError(e))
4038
}
4139

libafl_qemu/librasan/asan/src/test.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ pub unsafe extern "C" fn asan_store(addr: *const c_void, size: usize) {
118118
pub unsafe extern "C" fn asan_alloc(len: usize, align: usize) -> *mut c_void {
119119
trace!("alloc - len: {len:#x}, align: {align:#x}");
120120
let ptr = FRONTEND.lock().alloc(len, align).unwrap() as *mut c_void;
121-
trace!(
122-
"alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}"
123-
);
121+
trace!("alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}");
124122
ptr
125123
}
126124

libafl_qemu/librasan/gasan/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ pub unsafe extern "C" fn asan_store(addr: *const c_void, size: usize) {
9999
pub unsafe extern "C" fn asan_alloc(len: usize, align: usize) -> *mut c_void {
100100
trace!("alloc - len: {len:#x}, align: {align:#x}");
101101
let ptr = FRONTEND.lock().alloc(len, align).unwrap() as *mut c_void;
102-
trace!(
103-
"alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}"
104-
);
102+
trace!("alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}");
105103
ptr
106104
}
107105

libafl_qemu/librasan/qasan/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ pub unsafe extern "C" fn asan_store(addr: *const c_void, size: usize) {
9898
pub unsafe extern "C" fn asan_alloc(len: usize, align: usize) -> *mut c_void {
9999
trace!("alloc - len: {len:#x}, align: {align:#x}");
100100
let ptr = FRONTEND.lock().alloc(len, align).unwrap() as *mut c_void;
101-
trace!(
102-
"alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}"
103-
);
101+
trace!("alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}");
104102
ptr
105103
}
106104

libafl_qemu/librasan/zasan/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ pub unsafe extern "C" fn asan_store(addr: *const c_void, size: usize) {
8383
pub unsafe extern "C" fn asan_alloc(len: usize, align: usize) -> *mut c_void {
8484
trace!("alloc - len: {len:#x}, align: {align:#x}");
8585
let ptr = FRONTEND.lock().alloc(len, align).unwrap() as *mut c_void;
86-
trace!(
87-
"alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}"
88-
);
86+
trace!("alloc - len: {len:#x}, align: {align:#x}, ptr: {ptr:p}");
8987
ptr
9088
}
9189

0 commit comments

Comments
 (0)