-
Notifications
You must be signed in to change notification settings - Fork 4
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
misaligned pointer dereference #9
Comments
I get this also. This is a new check in rust that was previous undefined behavior, I think. Newly released in 1.7 I don't know a lot about it but it seems like one way to solve the problem is using read_unaligned I believe that in the function with the problem, you could possibly replace the *proc_ev with proc_ev.read_unaligned()? I might try this if I get a minute and submit a PR
|
We don't have direct control of
The assertion is about being aligned to 8-bytes boundary, which makes it necessary for |
When I run the example code, I get:
Backtrace:
I guess this has something to do with alignment of the C structs, and my system happens to hit an edge case. In my own
<linux/connector.h>
, I have:However the bindgen doesn't seem to capture this:
cnproc-rs/src/binding.rs
Lines 1072 to 1079 in 3d8f058
The text was updated successfully, but these errors were encountered: