WorksButNotTested db1d38eeb6
LibAFL_QEMU/librasan: Add support for reading environment (#3241)
* Add support for reading environment

* Fix clippy

* Review fixes
2025-05-20 21:48:08 +02:00

21 lines
403 B
Rust

#[cfg(test)]
#[cfg(feature = "hooks")]
mod tests {
use core::ptr::null_mut;
use asan::hooks::valloc::valloc;
#[test]
fn test_valloc_zero() {
let p = unsafe { valloc(0) };
assert_eq!(p, null_mut());
}
#[test]
fn test_valloc_buff() {
let p = unsafe { valloc(10) };
assert_ne!(p, null_mut());
assert!(p as usize & 0xfff == 0);
}
}