Skip to content

Conversation

jejuisland87654
Copy link
Contributor

@jejuisland87654 jejuisland87654 commented Aug 29, 2025

Description

Allow to configure MmapSharedProvider to use filename/fd as id, instead of always using fd in apple and filename in linux

Checklist

  • I have run ./scripts/precommit.sh and addressed all comments

@@ -723,7 +722,11 @@ pub mod unix_shmem {
/// At most [`MAX_MMAP_FILENAME_LEN`] - 2 bytes from filename will be used.
///
/// This will *NOT* automatically delete the shmem files, meaning that it's user's responsibility to delete them after fuzzing
pub fn new(map_size: usize, filename: impl AsRef<Path>) -> Result<Self, Error> {
pub fn new(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use two distinct constructors instead of the extra bool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having the parameter here makes it easy to create it dynamically from MmapShMemProvider, and there we do have both new and with_filename_as_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants