Skip to content

Conversation

@simongdavies
Copy link
Contributor

This PR contains two changes to snapshots:

It moves mem::shared_mem_snapshot::SharedMemorySNapshot into sandbox::snapshot::Snapshot, because that structure has always contained more than just a snapshot of a shared memory. It also removes the Arc reference counting wrapper from the new structure, and shifts the Arc wrapper into sandbox::initialized_multi_use::MultiUseSandbox, which is where it was actually needed.

Previously, snapshots were compared for equality by checking if they were literally the same object in memory. This replaces that comparison with a deterministic hash of the contents of the sandbox, which can be persisted to and reloaded from disk.

@simongdavies simongdavies added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Dec 9, 2025
@simongdavies simongdavies added the Guest-COW PRs that form part of the Guest-COW change label Dec 9, 2025
Copy link
Contributor

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

LGTM

syntactically and others added 4 commits December 10, 2025 13:13
This moves `mem::shared_mem_snapshot::SharedMemorySNapshot` into
`sandbox::snapshot::Snapshot`, because that structure has always
contained more than /just/ a snapshot of a shared memory.  It also
removes the Arc reference counting wrapper from the new structure, and
shifts the Arc wrapper into
`sandbox::initialized_multi_use::MultiUseSandbox`, which is where it
was actually needed.

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Previously, snapshots were compared for equality by checking if they
were literally the same object in memory. This replaces that
comparison with a deterministic hash of the contents of the sandbox,
which can be persisted to and reloaded from disk.

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Make asserts errors and poision sandbox
Fix hasher inputs

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies merged commit b7c64cc into hyperlight-dev:main Dec 10, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Guest-COW PRs that form part of the Guest-COW change kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants