1 2 3 4 5 6 7 8 9 10
use crate::error::Result; /// Returns true if an address is executable. pub fn is_executable_address(address: *const ()) -> Result<bool> { Ok( region::query(address as *const _)? .protection() .contains(region::Protection::EXECUTE), ) }