Skip to content

Conversation

@ludfjig
Copy link
Contributor

@ludfjig ludfjig commented Nov 6, 2025

Remove MemoryManager and FunctionRegistry fields from HyperlightVm, passing them as parameters to run() and dispatch_call_from_host() instead. This eliminates duplicate ownership, simplifies the ownership model and gets rid of a complete category of possible errors, since they already live on the sandbox itself.

This is PR 1/n towards dealing with #998. Requires #924 before merging, will mark PR ready then

@ludfjig ludfjig added kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. kind/refactor For PRs that restructure or remove code without adding new functionality. and removed kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. labels Nov 6, 2025
@ludfjig ludfjig changed the title Deduplicate mem mgr and host functinos from HyperlightVm to remove possible errors Deduplicate mem mgr and host functinos from HyperlightVm to remove category of possible errors Nov 6, 2025
Remove MemoryManager and FunctionRegistry fields from HyperlightVm, passing
them as parameters to run() and dispatch_call_from_host() instead. This
eliminates duplicate ownership, simplifies the ownership model and gets
rid of a complete category of possible errors.

Signed-off-by: Ludvig Liljenberg <[email protected]>
}
}

// if !self.mem_mgr.check_stack_guard()? {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo: uncomment this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor For PRs that restructure or remove code without adding new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant