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

fix(Rust): Fix memory errors caused by casting #1372

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

theweipeng
Copy link
Member

In the stable version of Rust, the from_raw_parts_mut API does not check for memory alignment, but in the 1.78.0-nightly version, alignment checking has been added to the preconditions. To ensure memory safety, we have replaced direct memory writes with the LittleEndian::write_xx methods from the appropriate library. While this may introduce additional overhead for memory checks, robustness is the priority before releasing the software.

@theweipeng theweipeng changed the title Bugfix(Rust): Fix memory errors caused by casting fix(Rust): Fix memory errors caused by casting Feb 14, 2024
Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

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

LGTM

@chaokunyang chaokunyang merged commit a6986ec into apache:main Feb 14, 2024
30 of 31 checks passed
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