You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nyx-net git:(main) ./setup.sh
[?] Checking submodules ...
[?] Checking QEMU-NYX ...
[?] Checking NYX-Net fuzzer ...
[*] Compiling NYX-Net fuzzer ...
[?] Checking submodules ...
[?] Checking rust_fuzzer ...
Compiling fuzz_runner v0.1.0 (/home/ilorj/Desktop/protocols/nyx-net/fuzzer/libnyx/fuzz_runner)
error[E0793]: reference to packed field is unaligned
--> /home/ilorj/Desktop/protocols/nyx-net/fuzzer/libnyx/fuzz_runner/src/lib.rs:221:9
|
221 | &self.feedback_data.shared.ijon.max_data
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 properly aligned even when using raw pointers)
For more information about this error, try rustc --explain E0793.
error: could not compile fuzz_runner due to previous error
The text was updated successfully, but these errors were encountered:
ilorj
changed the title
error[E0793]: reference to packed field is unaligned
error[E0793]: reference to packed field is unaligned. Ubuntu 20.04
Aug 21, 2023
@ilorj@nj00001@bluestar628
Hi, I had the same error and resolved it by downgrading rust to 1.63.0, which was done by executing rustup override set 1.63.0 in nyx-net directory.
I solved this problem by downgrading rust to 1.65.0
Ubuntu 22.04, rustup override set 1.65.0
add #[allow(unaligned_references)] before fn ijon_max_buffer(&self)->&[64] in nyx-net/fuzzer/libnyx/fuzz_runner/src/lib.rs file
nyx-net git:(main) ./setup.sh
[?] Checking submodules ...
[?] Checking QEMU-NYX ...
[?] Checking NYX-Net fuzzer ...
[*] Compiling NYX-Net fuzzer ...
[?] Checking submodules ...
[?] Checking rust_fuzzer ...
Compiling fuzz_runner v0.1.0 (/home/ilorj/Desktop/protocols/nyx-net/fuzzer/libnyx/fuzz_runner)
error[E0793]: reference to packed field is unaligned
--> /home/ilorj/Desktop/protocols/nyx-net/fuzzer/libnyx/fuzz_runner/src/lib.rs:221:9
|
221 | &self.feedback_data.shared.ijon.max_data
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 properly aligned even when using raw pointers)For more information about this error, try
rustc --explain E0793
.error: could not compile
fuzz_runner
due to previous errornyx-net git:(main) cargo --version
cargo 1.69.0 (6e9a83356 2023-04-12)
nyx-net git:(main) rustc --version
rustc 1.69.0 (84c898d65 2023-04-16)
The text was updated successfully, but these errors were encountered: