Fix CoreId for Frida, FreeBSD (#1100)
This commit is contained in:
parent
672d25e5ac
commit
b3020d7296
@ -137,7 +137,7 @@ pub struct FuzzerOptions {
|
|||||||
/// cores. 'none' to run a client without binding to any core.
|
/// cores. 'none' to run a client without binding to any core.
|
||||||
/// ex: '1,2-4,6' selects the cores 1, 2, 3, 4, and 6.
|
/// ex: '1,2-4,6' selects the cores 1, 2, 3, 4, and 6.
|
||||||
#[cfg(feature = "frida_cli")]
|
#[cfg(feature = "frida_cli")]
|
||||||
#[arg(long, default_value = "0", value_parser = Cores::from_cmdline, help_heading = "ASAN Options")]
|
#[arg(long, default_value = "0", value_parser = Cores::from_cmdline, help_heading = "Cores that should use ASAN")]
|
||||||
pub asan_cores: Cores,
|
pub asan_cores: Cores,
|
||||||
|
|
||||||
/// number of fuzz iterations to perform
|
/// number of fuzz iterations to perform
|
||||||
|
@ -158,8 +158,7 @@ impl Cores {
|
|||||||
|
|
||||||
/// Checks if this [`Cores`] instance contains a given ``core_id``
|
/// Checks if this [`Cores`] instance contains a given ``core_id``
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn contains(&self, core_id: usize) -> bool {
|
pub fn contains(&self, core_id: CoreId) -> bool {
|
||||||
let core_id = CoreId::from(core_id);
|
|
||||||
self.ids.contains(&core_id)
|
self.ids.contains(&core_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -740,7 +739,7 @@ mod freebsd {
|
|||||||
// Ensure that the system pinned the current thread
|
// Ensure that the system pinned the current thread
|
||||||
// to the specified core.
|
// to the specified core.
|
||||||
let mut core_mask = new_cpuset();
|
let mut core_mask = new_cpuset();
|
||||||
unsafe { CPU_SET(ids[0].id, &mut core_mask) };
|
unsafe { CPU_SET(ids[0].0, &mut core_mask) };
|
||||||
|
|
||||||
let new_mask = get_affinity_mask().unwrap();
|
let new_mask = get_affinity_mask().unwrap();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user