Fix ForkserverExecutorBuilder::shmem_provider (#2539) (#2540)

* Fix ForkserverExecutorBuilder::shmem_provider (#2539)

* fmt
This commit is contained in:
Dominik Maier 2024-09-23 14:15:11 +02:00 committed by GitHub
parent 93fdbb604c
commit 173a9ad8ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 11 deletions

View File

@ -1309,6 +1309,9 @@ impl<'a> ForkserverExecutorBuilder<'a, UnixShMemProvider> {
shmem_provider: &'a mut SP,
) -> ForkserverExecutorBuilder<'a, SP> {
ForkserverExecutorBuilder {
// Set the new provider
shmem_provider: Some(shmem_provider),
// Copy all other values from the old Builder
program: self.program,
arguments: self.arguments,
envs: self.envs,
@ -1319,14 +1322,13 @@ impl<'a> ForkserverExecutorBuilder<'a, UnixShMemProvider> {
is_deferred_frksrv: self.is_deferred_frksrv,
autotokens: self.autotokens,
input_filename: self.input_filename,
shmem_provider: Some(shmem_provider),
map_size: self.map_size,
max_input_size: MAX_INPUT_SIZE_DEFAULT,
min_input_size: MIN_INPUT_SIZE_DEFAULT,
kill_signal: None,
timeout: None,
asan_obs: None,
crash_exitcode: None,
max_input_size: self.max_input_size,
min_input_size: self.min_input_size,
kill_signal: self.kill_signal,
timeout: self.timeout,
asan_obs: self.asan_obs,
crash_exitcode: self.crash_exitcode,
}
}
}

View File

@ -203,7 +203,10 @@ where
}
impl<'a, I> MappedInput for BytesSubInput<'a, I> {
type Type<'b> = BytesSubInput<'b, I> where Self: 'b;
type Type<'b>
= BytesSubInput<'b, I>
where
Self: 'b;
}
#[cfg(test)]

View File

@ -209,8 +209,10 @@ impl<T> MappedInput for Option<T>
where
T: MappedInput,
{
type Type<'a> = Option<T::Type<'a>>
where T: 'a;
type Type<'a>
= Option<T::Type<'a>>
where
T: 'a;
}
/// A wrapper type that allows us to use mutators for Mutators for `&mut `[`Vec`].
@ -263,7 +265,10 @@ impl<'a> HasMutatorBytes for MutVecInput<'a> {
}
impl<'a> MappedInput for MutVecInput<'a> {
type Type<'b> = MutVecInput<'b> where Self: 'b;
type Type<'b>
= MutVecInput<'b>
where
Self: 'b;
}
/// Defines the input type shared across traits of the type.