Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added VmSlice class, a slice in the virtual address space. #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jason-nitro
Copy link

@jason-nitro jason-nitro commented Nov 3, 2024

Problem

Add a new VmSlice class, to support slices that are in VM-space. This is needed for keys (or anything else) that are implemented as slices-of-slices. The "inner" slice is in VM-space, but the existing code treats it as if it were a physical address by using a "real" Rust slice for it. This works okay as long as the Agave code is compiled with 64-bit addresses, which matches the 64-bit VM address space. However, if the code is built in 32 bits, interpreted programs can fail with bad memory accesses.

Summary of Changes

Addition of VmSlice class: a virtual-space slice.

Fixes #

@jason-nitro jason-nitro changed the title Added VmSlice class (untested). A slice in the virtual address space. Added VmSlice class, a slice in the virtual address space. Nov 3, 2024
@jason-nitro
Copy link
Author

Wondering if I should add back Iter (etc), even if we don't currently require it, since this is a slice class and should really have it for completeness.

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