Struct libafl_bolts::os::unix_shmem_server::ServedShMemProvider
source · pub struct ServedShMemProvider<SP>where
SP: ShMemProvider,{ /* private fields */ }
Expand description
Hands out served shared maps, as used on Android.
Implementations§
source§impl<SP> ServedShMemProvider<SP>where
SP: ShMemProvider,
impl<SP> ServedShMemProvider<SP>where
SP: ShMemProvider,
sourcepub fn on_restart(&mut self)
pub fn on_restart(&mut self)
Tell the provider that we are about to restart and the worker should not kill the shared memory
Trait Implementations§
source§impl<SP> Clone for ServedShMemProvider<SP>where
SP: ShMemProvider,
impl<SP> Clone for ServedShMemProvider<SP>where
SP: ShMemProvider,
source§impl<SP> Debug for ServedShMemProvider<SP>where
SP: ShMemProvider + Debug,
impl<SP> Debug for ServedShMemProvider<SP>where
SP: ShMemProvider + Debug,
source§impl<SP> Default for ServedShMemProvider<SP>where
SP: ShMemProvider,
impl<SP> Default for ServedShMemProvider<SP>where
SP: ShMemProvider,
source§impl<SP> ShMemProvider for ServedShMemProvider<SP>where
SP: ShMemProvider,
impl<SP> ShMemProvider for ServedShMemProvider<SP>where
SP: ShMemProvider,
source§fn new() -> Result<Self, Error>
fn new() -> Result<Self, Error>
Connect to the server and return a new ServedShMemProvider
Will try to spawn a ShMemService
. This will only work for the first try.
§type ShMem = ServedShMem<<SP as ShMemProvider>::ShMem>
type ShMem = ServedShMem<<SP as ShMemProvider>::ShMem>
The actual shared map handed out by this
ShMemProvider
.source§fn new_shmem(&mut self, map_size: usize) -> Result<Self::ShMem, Error>
fn new_shmem(&mut self, map_size: usize) -> Result<Self::ShMem, Error>
Create a new shared memory mapping
source§fn shmem_from_id_and_size(
&mut self,
id: ShMemId,
size: usize
) -> Result<Self::ShMem, Error>
fn shmem_from_id_and_size( &mut self, id: ShMemId, size: usize ) -> Result<Self::ShMem, Error>
Get a mapping given its id and size
source§fn pre_fork(&mut self) -> Result<(), Error>
fn pre_fork(&mut self) -> Result<(), Error>
This method should be called before a fork or a thread creation event, allowing the
ShMemProvider
to
get ready for a potential reset of thread specific info, and for potential reconnects.
Make sure to call Self::post_fork()
after threading!source§fn post_fork(&mut self, is_child: bool) -> Result<(), Error>
fn post_fork(&mut self, is_child: bool) -> Result<(), Error>
This method should be called after a fork or after cloning/a thread creation event, allowing the
ShMemProvider
to
reset thread specific info, and potentially reconnect.
Make sure to call Self::pre_fork()
before threading!source§fn release_shmem(&mut self, map: &mut Self::ShMem)
fn release_shmem(&mut self, map: &mut Self::ShMem)
Release the resources associated with the given
ShMem
source§fn new_shmem_object<T: Sized + 'static>(&mut self) -> Result<Self::ShMem, Error>
fn new_shmem_object<T: Sized + 'static>(&mut self) -> Result<Self::ShMem, Error>
Create a new shared memory mapping to hold an object of the given type
source§fn new_shmem_objects_array<T: Sized + 'static>(
&mut self,
len: usize
) -> Result<Self::ShMem, Error>
fn new_shmem_objects_array<T: Sized + 'static>( &mut self, len: usize ) -> Result<Self::ShMem, Error>
Create a new shared memory mapping to hold an array of objects of the given type
source§fn shmem_object_from_id<T: Sized + 'static>(
&mut self,
id: ShMemId
) -> Result<Self::ShMem, Error>
fn shmem_object_from_id<T: Sized + 'static>( &mut self, id: ShMemId ) -> Result<Self::ShMem, Error>
Get a mapping given its id to hold an object of the given type
source§fn shmem_from_description(
&mut self,
description: ShMemDescription
) -> Result<Self::ShMem, Error>
fn shmem_from_description( &mut self, description: ShMemDescription ) -> Result<Self::ShMem, Error>
Get a mapping given a description
Auto Trait Implementations§
impl<SP> RefUnwindSafe for ServedShMemProvider<SP>where
SP: RefUnwindSafe,
impl<SP> Send for ServedShMemProvider<SP>where
SP: Send,
impl<SP> Sync for ServedShMemProvider<SP>where
SP: Sync,
impl<SP> Unpin for ServedShMemProvider<SP>where
SP: Unpin,
impl<SP> UnwindSafe for ServedShMemProvider<SP>where
SP: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting
TupleList
, of an Prepend::prepend()
call,
including the prepended entry.source§fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.