Merged
Conversation
242ed08 to
11b6dfa
Compare
stevenengler
approved these changes
Aug 21, 2023
While a little more awkward to use, this gives us a bit more flexibility. In particular it will let us make this variable resettable after fork by adding a `RefCell`.
This will let us add interior mutability (to replace after fork) cheaply; without needing some form of Mutex that needs to be locked and unlocked on every access.
The initial implementation of fork won't support running with the memory manager (`MemoryMapper`) enabled. Move it to its own test suite so that we can continue to run the clone tests with it enabled.
After forking we still have the previously allocated signal stack in thread local storage, but we still need to to install it for the new thread/process.
Unlike when creating a new thread, when we create a new process the child process finishes the shim-side syscall handling normally instead of long-jumping back to the point of the original syscall. We handle this on the shadow side by validating the native clone syscall result and propating that back to finish the virtualized clone syscall.
…lStorage::unregister_current_thread
The fork libc function actually uses the clone syscall with CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID, so those needed to be implemented as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.