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

unsafe precondition(s) violated: ptr::copy_nonoverlapping with rust 1.78 #96

Closed
m-dahl opened this issue May 17, 2024 · 1 comment
Closed

Comments

@m-dahl
Copy link
Collaborator

m-dahl commented May 17, 2024

With rust 1.78 we now get panics on what I assume has to do with how we copy data from c message structs.

thread 'msg_types::tests::test_float_sequence' panicked at library/core/src/panicking.rs:156:5:
unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap

As a temporary fix you can downgrate to rust 1.77.

But we should investigate the root cause of the problem.

@m-dahl
Copy link
Collaborator Author

m-dahl commented May 17, 2024

Rust 1.78 had in the release notes:

One of the checks now performed is that from_raw_parts no longer accepts a null ptr to the data (before the empty slice was returned). from_raw_parts is used a lot in the r2r code base. There may be up more of these issues that I didn't find yet.

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

No branches or pull requests

1 participant