Skip to content

Commit d4a86cd

Browse files
authored
Hide Forkserver constructor API (#3076)
1 parent 0154a3b commit d4a86cd

File tree

1 file changed

+2
-33
lines changed

1 file changed

+2
-33
lines changed

libafl/src/executors/forkserver.rs

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -315,42 +315,11 @@ const fn fs_opt_get_mapsize(x: i32) -> i32 {
315315

316316
#[expect(clippy::fn_params_excessive_bools)]
317317
impl Forkserver {
318-
/// Create a new [`Forkserver`]
319-
#[expect(clippy::too_many_arguments)]
320-
pub fn new(
321-
target: OsString,
322-
args: Vec<OsString>,
323-
envs: Vec<(OsString, OsString)>,
324-
input_filefd: RawFd,
325-
use_stdin: bool,
326-
memlimit: u64,
327-
is_persistent: bool,
328-
is_deferred_frksrv: bool,
329-
dump_asan_logs: bool,
330-
coverage_map_size: Option<usize>,
331-
debug_output: bool,
332-
) -> Result<Self, Error> {
333-
Self::with_kill_signal(
334-
target,
335-
args,
336-
envs,
337-
input_filefd,
338-
use_stdin,
339-
memlimit,
340-
is_persistent,
341-
is_deferred_frksrv,
342-
dump_asan_logs,
343-
coverage_map_size,
344-
debug_output,
345-
KILL_SIGNAL_DEFAULT,
346-
)
347-
}
348-
349318
/// Create a new [`Forkserver`] that will kill child processes
350319
/// with the given `kill_signal`.
351320
/// Using `Forkserver::new(..)` will default to [`Signal::SIGTERM`].
352321
#[expect(clippy::too_many_arguments)]
353-
pub fn with_kill_signal(
322+
fn new(
354323
target: OsString,
355324
args: Vec<OsString>,
356325
envs: Vec<(OsString, OsString)>,
@@ -992,7 +961,7 @@ where
992961
};
993962

994963
let mut forkserver = match &self.program {
995-
Some(t) => Forkserver::with_kill_signal(
964+
Some(t) => Forkserver::new(
996965
t.clone(),
997966
self.arguments.clone(),
998967
self.envs.clone(),

0 commit comments

Comments
 (0)