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

unaligned packed field error #6

Open
syheliel opened this issue Aug 15, 2022 · 0 comments
Open

unaligned packed field error #6

syheliel opened this issue Aug 15, 2022 · 0 comments

Comments

@syheliel
Copy link

err message

error: reference to packed field is unaligned                                                                                                                                        
   --> src/runner.rs:219:9               
    |                                                                                     
219 |         &feedback_buffer.ijon.max_data                                                                                                                                         
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                         
    |                                       
    = note: `#[deny(unaligned_references)]` on by default                                 
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be pr
operly aligned even when using raw pointers)
                                             
error: could not compile `rust_fuzzer` due to 2 previous errors.

maybe not worth a fix, it can be fixed by adding #[allow(unaligned_references)]

version

cargo 1.65.0-nightly (4fd148c47 2022-08-03)
Blarse added a commit to Blarse/spec-fuzzer that referenced this issue Jun 19, 2023
Blarse added a commit to Blarse/spec-fuzzer that referenced this issue Jun 20, 2023
Blarse added a commit to Blarse/spec-fuzzer that referenced this issue Sep 1, 2023
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