Skip to content

fix: use try_into instead of as u64 cast in push_buffer - #1825

Open
JM00NJ wants to merge 1 commit into
hyperlight-dev:mainfrom
JM00NJ:fix/push-buffer-try-into
Open

JM00NJ wants to merge 1 commit into
hyperlight-dev:mainfrom
JM00NJ:fix/push-buffer-try-into

Conversation

@JM00NJ

@JM00NJ JM00NJ commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1820.

Replaces as u64 cast with .try_into() in push_buffer for correctness and future-proofing, as suggested by @jprendes. While usize == u64 on both x86_64 and ARM64 currently, .try_into() makes the conversion explicit and safe for any future platform changes.

@jprendes jprendes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @JM00NJ !

@jprendes

Copy link
Copy Markdown
Contributor

@JM00NJ could you add the sign-off line to the commits message? The DCO check is failing. Thanks!

@jprendes jprendes added the kind/refactor For PRs that restructure or remove code without adding new functionality. label Sep 11, 2026
@JM00NJ
JM00NJ force-pushed the fix/push-buffer-try-into branch from 5aef1a5 to ade6b88 Compare September 11, 2026 20:45
@jsturtevant
jsturtevant enabled auto-merge (squash) September 11, 2026 22:19
@yoshuawuyts yoshuawuyts added the lifecycle/blocked-on-author The issue requires an action by the author label Sep 14, 2026
@andreiltd

Copy link
Copy Markdown
Member

Hey @JM00NJ, thanks for the fixes! I just wanted to give you a heads-up about the stack communication, that it will be soon replaced by virtual queue based comms. This means that, unfortunately, the changes from this PR and push_buffer PR will not make to the next release just because they are applied on soon to-be-wiped code.

@JM00NJ

JM00NJ commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Hey @JM00NJ, thanks for the fixes! I just wanted to give you a heads-up about the stack communication, that it will be soon replaced by virtual queue based comms. This means that, unfortunately, the changes from this PR and push_buffer PR will not make to the next release just because they are applied on soon to-be-wiped code.

Thanks for the heads up! Good to know about the virtual queue migration. I'll take a look at #1794 ; happy to contribute there once the new implementation lands.

@jprendes

Copy link
Copy Markdown
Contributor

Also, the commit also needs to be GPG signed, I'm happy to merge it after you sign it, even if this code is going away.

Signed-off-by: JM00NJ <51642194+JM00NJ@users.noreply.github.com>
auto-merge was automatically disabled September 14, 2026 16:49

Head branch was pushed to by a user without write access

@JM00NJ
JM00NJ force-pushed the fix/push-buffer-try-into branch from ade6b88 to ff21631 Compare September 14, 2026 16:49
@andreiltd
andreiltd enabled auto-merge (squash) September 14, 2026 18:39
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. lifecycle/blocked-on-author The issue requires an action by the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants