Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.

bugfix: fix rkyv alignment#1780

Draft
codeblooded1729 wants to merge 4 commits intobing/rkyv-accessfrom
kapil/fix-rkyv-alignment
Draft

bugfix: fix rkyv alignment#1780
codeblooded1729 wants to merge 4 commits intobing/rkyv-accessfrom
kapil/fix-rkyv-alignment

Conversation

@codeblooded1729
Copy link
Contributor

No description provided.

@codeblooded1729 codeblooded1729 force-pushed the kapil/fix-rkyv-alignment branch from 9c5cac2 to 85b8f11 Compare June 17, 2024 09:23
fn from(value: StateObject) -> Self {
let archived = rkyv::access::<TokenObject, Failure>(&value.data[..]).unwrap();
let mut aligned_data = AlignedVec::with_capacity(value.data.len());
aligned_data.extend_from_slice(&value.data);
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems suspicious. I suspect we want our StateObject's data to be an AlignedVec in the first place, then we don't need to copy here. (Assuming this code also gets executed on guest.)

Copy link
Contributor

@matthiasgoergens matthiasgoergens left a comment

Choose a reason for hiding this comment

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

What's the status of this PR?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants